diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml new file mode 100644 index 00000000000..b697708763d --- /dev/null +++ b/.github/workflows/build_wheels.yml @@ -0,0 +1,47 @@ +name: Build wheels + +on: + # push: + # branches: + # - develop + # - wheel + # tags: + # - "*" + + workflow_dispatch: + inputs: + ref: + description: 'The branch, tag, or SHA for which to run (eg: v22.1.0 or develop)' + required: true + +jobs: + build_wheel: + + strategy: + fail-fast: false + matrix: + python-version: ["3.9"] + os: [ubuntu-22.04, macos-13, windows-2019] + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout EnergyPlus + uses: actions/checkout@v3 + with: + ref: ${{ github.event.inputs.ref }} + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + + - name: build wheels + run: | + pip install wheel + python setup.py bdist_wheel + + - uses: actions/upload-artifact@v3 + with: + name: energyplus-wheel-${{ matrix.os }} + path: ./dist diff --git a/.github/workflows/custom_check.yml b/.github/workflows/custom_check.yml index 9d940979637..54e58a3f39c 100644 --- a/.github/workflows/custom_check.yml +++ b/.github/workflows/custom_check.yml @@ -12,10 +12,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up Python 3.7 + - name: Set up Python 3.10 uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: '3.10' - name: Custom Check shell: bash diff --git a/.github/workflows/documentation-windows.yml b/.github/workflows/documentation-windows.yml index 538079de8d0..8c9b7e13f67 100644 --- a/.github/workflows/documentation-windows.yml +++ b/.github/workflows/documentation-windows.yml @@ -17,10 +17,10 @@ jobs: - name: Checkout EnergyPlus uses: actions/checkout@v3 - - name: Set up Python 3.7 + - name: Set up Python 3.10 uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: '3.10' - name: Install System dependencies and LaTeX shell: bash @@ -99,7 +99,7 @@ jobs: - name: Build Docs working-directory: ${{runner.workspace}}/EnergyPlus/doc/build run: | - cmake --build . -j 2 + cmake --build . -j 4 - name: Upload entire pdf folder if: ${{ always() }} diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 05793e46bee..e0f3efb5504 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -10,10 +10,10 @@ jobs: - name: Checkout EnergyPlus uses: actions/checkout@v3 - - name: Set up Python 3.7 + - name: Set up Python 3.10 uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: '3.10' - name: Set up LaTeX run: sudo apt update && sudo apt install -y texlive texlive-xetex texlive-science poppler-utils @@ -30,7 +30,7 @@ jobs: - name: Build Docs working-directory: ${{runner.workspace}}/EnergyPlus/doc/build - run: cmake --build . -j 2 + run: cmake --build . -j 4 - name: Upload Acknowledgments uses: actions/upload-artifact@v3 diff --git a/.github/workflows/epjson.yml b/.github/workflows/epjson.yml index 2e67b3ad3b5..7272f04f3e9 100644 --- a/.github/workflows/epjson.yml +++ b/.github/workflows/epjson.yml @@ -19,10 +19,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up Python 3.8 + - name: Set up Python 3.10 uses: actions/setup-python@v4 with: - python-version: '3.8' + python-version: '3.10' - name: Setup shell: bash diff --git a/.github/workflows/linux_build.yml b/.github/workflows/linux_build.yml index 6573d8ffabf..0a961d34352 100644 --- a/.github/workflows/linux_build.yml +++ b/.github/workflows/linux_build.yml @@ -81,4 +81,4 @@ jobs: - name: Build EnergyPlus working-directory: ./build/ shell: bash - run: cmake --build . --target energyplus -j 2 + run: cmake --build . --target energyplus -j 4 diff --git a/.github/workflows/linux_release.yml b/.github/workflows/linux_release.yml index 3fd87ae3f0e..e414a87f668 100644 --- a/.github/workflows/linux_release.yml +++ b/.github/workflows/linux_release.yml @@ -40,7 +40,7 @@ jobs: - name: Setup QtIFW 4.x uses: jmarrec/setup-qtifw@v1 with: - qtifw-version: '4.x' + qtifw-version: '4.6.1' - name: Install Python dependencies run: | @@ -72,7 +72,7 @@ jobs: - name: Build Package working-directory: ./build shell: bash - run: cmake --build . --target package -j 2 + run: cmake --build . --target package -j 4 - name: Upload Tarball to release uses: svenstaro/upload-release-action@v2 diff --git a/.github/workflows/mac_release.yml b/.github/workflows/mac_release.yml index 0b75ee5b6c4..4865cb258f2 100644 --- a/.github/workflows/mac_release.yml +++ b/.github/workflows/mac_release.yml @@ -8,7 +8,7 @@ on: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BUILD_TYPE: Release - FC: gfortran-11 + FC: gfortran-13 SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk Python_REQUIRED_VERSION: 3.8 @@ -47,7 +47,7 @@ jobs: - name: Setup QtIFW 4.x uses: jmarrec/setup-qtifw@v1 with: - qtifw-version: '4.x' + qtifw-version: '4.6.1' - name: Install Python dependencies run: | @@ -65,6 +65,9 @@ jobs: # The MACOSX_DEPLOYMENT_TARGET environment variable sets the default value for the CMAKE_OSX_DEPLOYMENT_TARGET variable. # We use cmake commands to build some subprojects, so setting it globally echo MACOSX_DEPLOYMENT_TARGET=${{ matrix.macos_dev_target }} >> $GITHUB_ENV + echo "Installing gcc@13 for gfortran support of -static-libquadmath" + brew list gcc@13 || brew install gcc@13 + which gfortran-13 || echo "FC=$(brew --prefix gcc@13)/bin/gfortran-13" >> $GITHUB_ENV - name: Create Build Directory run: cmake -E make_directory ./build/ @@ -79,6 +82,7 @@ jobs: -DPython_ROOT_DIR:PATH=$RUNNER_TOOL_CACHE/Python/${{ steps.setup-python.outputs.python-version }}/x64/ \ -DBUILD_FORTRAN:BOOL=ON -DBUILD_PACKAGE:BOOL=ON \ -DDOCUMENTATION_BUILD:STRING="BuildWithAll" -DTEX_INTERACTION:STRING="batchmode" \ + -DENABLE_OPENMP:BOOL=OFF -DUSE_OpenMP:BOOL=OFF \ ../ - name: Build Package @@ -86,6 +90,20 @@ jobs: shell: bash run: cmake --build . --target package -j 3 + - name: otool the exes and libs + shell: bash + working-directory: ./build + run: | + set -x + cd _CPack_Packages/Darwin/TGZ/EnergyPlus*/ + otool -L ExpandObjects || true + otool -L ConvertInputFormat || true + otool -L energyplus || true + otool -L libenergyplusapi.dylib || true + otool -L PreProcess/IDFVersionUpdater/Transition-V23-1-0-to-V23-2-0 || true + otool -L PostProcess/ReadVarsESO || true + otool -L PostProcess/HVAC-Diagram || true + - name: Upload Tarball to release uses: svenstaro/upload-release-action@v2 with: diff --git a/.github/workflows/windows_release.yml b/.github/workflows/windows_release.yml index 4626332c3b1..ca1ced0b609 100644 --- a/.github/workflows/windows_release.yml +++ b/.github/workflows/windows_release.yml @@ -58,7 +58,7 @@ jobs: - name: Setup QtIFW 4.x uses: jmarrec/setup-qtifw@v1 with: - qtifw-version: '4.x' + qtifw-version: '4.6.1' - name: Install Python dependencies run: | @@ -131,7 +131,7 @@ jobs: - name: Build Package working-directory: ./build shell: bash - run: cmake --build . --target package -j 2 --config $BUILD_TYPE + run: cmake --build . --target package -j 4 --config $BUILD_TYPE - name: Upload Zip to release uses: svenstaro/upload-release-action@v2 diff --git a/.gitignore b/.gitignore index a4e9462dc08..9c8800789a8 100644 --- a/.gitignore +++ b/.gitignore @@ -70,6 +70,12 @@ cppcheck.txt # by default CLion uses cmake-build-debug as the build folder, so add that as well cmake-build-* +# for wheel builds, we can also ignore a couple +build-wheel/ +dist/ +energyplus.egg-info +wheelhouse/ + # App-specific project files, for example, for Geany IDE: *.geany .project diff --git a/.readthedocs.yml b/.readthedocs.yml index cf48064e021..b1f8e80e941 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -2,9 +2,18 @@ version: 2 sphinx: configuration: doc/readthedocs/sphinx/conf.py + builder: html + +build: + os: ubuntu-22.04 + tools: + python: "3.11" + apt_packages: + - doxygen -# read the docs image build already includes sphinx-rtd-theme, so this isn't needed -# however, keeping it here and running it on RTD is a near zero cost operation and makes sure the requirements are ok python: install: - requirements: doc/readthedocs/requirements.txt + +submodules: + exclude: all diff --git a/CMakeLists.txt b/CMakeLists.txt index ceca25eec6e..7f03d68dedd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,6 +59,8 @@ add_library(project_fp_options INTERFACE) add_library(project_warnings INTERFACE) +add_library(turn_off_warnings INTERFACE) + set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads) target_link_libraries(project_options INTERFACE Threads::Threads) @@ -174,6 +176,7 @@ endif() # we are making *a Python 3.6 Interpreter* a required dependency, so find it here # If LINK_WITH_PYTHON, also request the Development (libs) at the same time, to ensure consistent version between interpreter and Development +# and ask for at least 3.8 (for the PyConfig stuff). if(LINK_WITH_PYTHON) # find_package(Python) has the problem that on github actions in particular it'll pick up the most recent python (eg 3.9) from the tool cache # even if you have used the setup-python action and set it to 3.8, so we make the exact version required @@ -184,7 +187,7 @@ if(LINK_WITH_PYTHON) if(Python_REQUIRED_VERSION) find_package(Python ${Python_REQUIRED_VERSION} EXACT COMPONENTS Interpreter Development REQUIRED) else() - find_package(Python 3.6 COMPONENTS Interpreter Development REQUIRED) + find_package(Python 3.8 COMPONENTS Interpreter Development REQUIRED) endif() else() find_package(Python 3.6 COMPONENTS Interpreter REQUIRED) @@ -346,6 +349,8 @@ if(BUILD_TESTING) set_target_properties(TestAPI_Runtime_C PROPERTIES FOLDER Testing) set_target_properties(TestAPI_Functional_C PROPERTIES FOLDER Testing) set_target_properties(TestEnergyPlusCallbacks PROPERTIES FOLDER Testing) + set_target_properties(TestAPI_RuntimeDeleteState_C PROPERTIES FOLDER Testing) + set_target_properties(TestAPI_RuntimeResetState_C PROPERTIES FOLDER Testing) endif() add_subdirectory(src/ConvertInputFormat) diff --git a/LICENSE.txt b/LICENSE.txt index 6b977491254..c9b07918624 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved. +EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved. NOTICE: This Software was developed under funding from the U.S. Department of Energy and the U.S. Government consequently retains certain rights. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, and perform publicly and display publicly, and to permit others to do so. diff --git a/README.md b/README.md index 5cb72a85de4..9c5639d3fc5 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ In the meantime, while Decent CI is still handling the regression and bulkier te [![](https://github.com/NREL/EnergyPlus/workflows/Linux%20Releases/badge.svg)](https://github.com/NREL/EnergyPlus/actions/workflows/linux_release.yml) EnergyPlus is released twice annually, usually in March and September. -It is recommended all use of EnergyPlus is production workflows use these formal, public releases. +It is recommended all use of EnergyPlus in production workflows use these formal, public releases. Iteration **(pre-)releases** may be created during a development cycle, however users should generally avoid these, as input syntax may change which won't be supported by the major release version transition tools, and could require manual intervention to remedy. If an interim release is intended for active use by users, such as a bug-fix-only or performance-only re-release, it will be clearly specified on the release notes and a public announcement will accompany this type of release. Our releases are now built by Github Actions. diff --git a/cmake/CompilerFlags.cmake b/cmake/CompilerFlags.cmake index c622c9d0b1e..936b844962c 100644 --- a/cmake/CompilerFlags.cmake +++ b/cmake/CompilerFlags.cmake @@ -77,6 +77,9 @@ if(MSVC AND NOT ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")) # Visual C++ (VS target_compile_options(project_options INTERFACE $<$:/RTCsu>) # Runtime checks target_compile_options(project_fp_options INTERFACE $<$:/fp:strict>) # Floating point model target_compile_options(project_options INTERFACE $<$:/DMSVC_DEBUG>) # Triggers code in main.cc to catch floating point NaNs + + target_compile_options(turn_off_warnings INTERFACE /W0) + elseif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") # g++/Clang # TODO: after we fix all test, enable this by default on Debug builds @@ -86,9 +89,10 @@ elseif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" O # COMPILER FLAGS target_compile_options(project_options INTERFACE -pipe) # Faster compiler processing - target_compile_options(project_warnings INTERFACE -Wpedantic - )# Turn on warnings about constructs/situations that may be non-portable or outside of the standard - target_compile_options(project_warnings INTERFACE -Wall -Wextra) # Turn on warnings + target_compile_options(project_warnings INTERFACE -Wpedantic) + # Turn on warnings about constructs/situations that may be non-portable or outside of the standard + target_compile_options(project_warnings INTERFACE -Wall) # Turn on warnings + target_compile_options(project_warnings INTERFACE -Wextra) # Turn on warnings target_compile_options(project_warnings INTERFACE -Wno-unknown-pragmas) if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.0) target_compile_options(project_warnings INTERFACE -Wno-deprecated-copy) @@ -101,6 +105,16 @@ elseif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" O target_compile_options(project_warnings INTERFACE -Wno-unused-but-set-parameter -Wno-unused-but-set-variable) target_compile_options(project_warnings INTERFACE -Wno-maybe-uninitialized) target_compile_options(project_warnings INTERFACE -Wno-aggressive-loop-optimizations) + # Sadly, GCC 13.2 is throwing many false positives on dangling references and compile time array-bounds + # https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=6b927b1297e66e26e62e722bf15c921dcbbd25b9 + # https://trofi.github.io/posts/264-gcc-s-new-Wdangling-reference-warning.html + target_compile_options(project_warnings INTERFACE -Wno-dangling-reference) + # The array-bounds appears to be problematic as well depending on the optimization level chosen + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100430 + target_compile_options(project_warnings INTERFACE -Wno-array-bounds) + # depending on the level of overflow check selected, the stringop-overflow can also emit false positives + # https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wstringop-overflow + target_compile_options(project_warnings INTERFACE -Wno-stringop-overflow) elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0) # Suppress unused-but-set warnings until more serious ones are addressed @@ -139,6 +153,8 @@ elseif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" O target_compile_options(project_options INTERFACE $<$:-fno-stack-protector>) # ADD_CXX_RELEASE_DEFINITIONS("-Ofast") # -Ofast (or -ffast-math) needed to auto-vectorize floating point loops + target_compile_options(turn_off_warnings INTERFACE -w) + elseif(WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") # Disabled Warnings: Enable some of these as more serious warnings are addressed @@ -192,6 +208,8 @@ elseif(WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") target_compile_options(project_fp_options INTERFACE $<$:/Qfp-stack-check>) target_compile_options(project_options INTERFACE $<$:/traceback>) # Enables traceback on error + target_compile_options(turn_off_warnings INTERFACE /w) + elseif(UNIX AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") # Disabled Warnings: Enable some of these as more serious warnings are addressed @@ -237,6 +255,7 @@ elseif(UNIX AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") target_compile_options(project_fp_options INTERFACE $<$:-fp-stack-check>) # Check the floating point stack after every function call target_compile_options(project_options INTERFACE $<$:-traceback>) # Enables traceback on error + target_compile_options(turn_off_warnings INTERFACE -w) endif() # COMPILER TYPE # Add Color Output if Using Ninja: diff --git a/cmake/Install.cmake b/cmake/Install.cmake index 184d7b6f0cc..2fd731286a5 100644 --- a/cmake/Install.cmake +++ b/cmake/Install.cmake @@ -237,6 +237,7 @@ install(CODE "execute_process(COMMAND \"${Python_EXECUTABLE}\" \"${PROJECT_SOURC install(FILES "${DOCS_OUT}/ExampleFiles-ObjectsLink.html" DESTINATION "./ExampleFiles/" COMPONENT ExampleFiles) option(BUILD_CHANGELOG "Build a changelog for this package -- requires GITHUB_TOKEN in environment" OFF) +mark_as_advanced(FORCE BUILD_CHANGELOG) if(BUILD_CHANGELOG) # build the change log, only if we do have a github token in the environment # Watch out! GITHUB_TOKEN could go out of scope by the time install target is run. diff --git a/cmake/ProjectMacros.cmake b/cmake/ProjectMacros.cmake index ecd9d7f50c1..6bd2aec73d7 100644 --- a/cmake/ProjectMacros.cmake +++ b/cmake/ProjectMacros.cmake @@ -194,6 +194,25 @@ function(ADD_SIMULATION_TEST) endfunction() +function(ADD_API_SIMULATION_TEST) + # Used for running API tests in the testfiles/API folder + # The only argument should be the Python file that drives the simulation run + # The Python file should expect a single argument - the build/Products directory where + # energyplus(.exe) and pyenergyplus/ live. The Python script should be able to locate + # the associated IDF(s) and run successfully + set(options) + set(oneValueArgs PYTHON_FILE) + set(multiValueArgs) + cmake_parse_arguments(ADD_API_SIMULATION_TEST "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + if(NOT ADD_API_SIMULATION_TEST_PYTHON_FILE) + message(FATAL_ERROR "You must provide a PYTHON_FILE argument to ADD_API_SIMULATION_TEST") + endif() + set(DIR_WITH_PY_ENERGYPLUS $) + add_test( + NAME "APISimulation.${ADD_API_SIMULATION_TEST_PYTHON_FILE}" + COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/testfiles/API/${ADD_API_SIMULATION_TEST_PYTHON_FILE} ${DIR_WITH_PY_ENERGYPLUS}) +endfunction() + function(fixup_executable EXECUTABLE_PATH) include(GetPrerequisites) get_prerequisites("${EXECUTABLE_PATH}" PREREQUISITES 1 1 "" "") diff --git a/cmake/PythonCopyStandardLib.py b/cmake/PythonCopyStandardLib.py index 023eca47980..1e4becce5bb 100644 --- a/cmake/PythonCopyStandardLib.py +++ b/cmake/PythonCopyStandardLib.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- @@ -59,11 +59,10 @@ # should result in something like `/usr/lib/python3.7` # this script must be called with two args: -# 1 - the path to the EnergyPlus executable in the install tree, which is be used to determine where to copy the library -# since this is in the install tree, you'll need to use a cmake generator expression +# 1 - the path to the EnergyPlus executable in the install-tree, which is used to determine where to copy the library +# since this is in the install-tree, you'll need to use a cmake generator expression # 2 - name of the folder to create to store the copied in python standard library, usually python_standard_library import ctypes -from distutils.dir_util import copy_tree import os import platform import shutil @@ -90,35 +89,33 @@ # Let's check the library files to see if the ABI matches # Otherwise if you build with say python 3.8 initially, and then switch to # python 3.9, your lib-dynload will still have the 38 .so files - std_lib_ctypes_sos = gb.glob(os.path.join(standard_lib_dir, "**/_ctypes.*"), recursive=True) - this_lib_ctypes_sos = gb.glob(os.path.join(target_dir, "**/_ctypes.*"), recursive=True) - def find_libs(dirPath): + def find_libs(dir_path): sos = [] for ext in ['a', 'so', 'lib']: - sos += gb.glob(os.path.join(dirPath, "**/*.{}*".format(ext)), + sos += gb.glob(os.path.join(dir_path, "**/*.{}*".format(ext)), recursive=True) return [os.path.basename(f) for f in sos] + std_lib_ctypes_sos = find_libs(standard_lib_dir) this_lib_ctypes_sos = find_libs(target_dir) if ((set(std_lib_ctypes_sos) - set(this_lib_ctypes_sos)) or - (set(this_lib_ctypes_sos) - set(std_lib_ctypes_sos))): + (set(this_lib_ctypes_sos) - set(std_lib_ctypes_sos))): print("Detected changes in the python libs, wiping and recopying") shutil.rmtree(target_dir) else: # File names match sys.exit(0) - shutil.copytree(standard_lib_dir, target_dir) # On Windows, we also need to grab the DLLs folder, which is one folder up if platform.system() == 'Windows': python_root_dir = os.path.dirname(standard_lib_dir) dll_dir = os.path.join(python_root_dir, 'DLLs') - copy_tree(dll_dir, target_dir) + shutil.copytree(dll_dir, target_dir, dirs_exist_ok=True) # then I'm going to try to clean up any __pycache__ folders in the target dir to reduce installer size for root, dirs, _ in os.walk(target_dir): diff --git a/cmake/PythonGetBitSize.py b/cmake/PythonGetBitSize.py index eeb47010777..cc4d6e38562 100644 --- a/cmake/PythonGetBitSize.py +++ b/cmake/PythonGetBitSize.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/cmake/ReverseDDPostProcess.py b/cmake/ReverseDDPostProcess.py index 084eca9dbb7..6777b567862 100644 --- a/cmake/ReverseDDPostProcess.py +++ b/cmake/ReverseDDPostProcess.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/design/FY2023/API_Enhancements_Inputs.md b/design/FY2023/API_Enhancements_Inputs.md new file mode 100644 index 00000000000..04d6d0fa251 --- /dev/null +++ b/design/FY2023/API_Enhancements_Inputs.md @@ -0,0 +1,183 @@ +# Enhancing the Usability of the EnergyPlus API + +## Document Tracking + +- 2023-06-21 Initial draft +- 2023-08-02 Revised draft with more design detail +- 2024-02-07 Note that some of these enhancements are now being completed for 24.1, while the remaining pieces will be pushed to 24.2. + +## Background + +- API activity is continuing to rise, and a new discussion was opened on E+ to perpetually track user activity/requests +- Every API demo I give hints at ways users want to interact and difficulties they encounter. A few aspects have recurred: + - Being able to tie together multiple simulation engines and keep E+ in sync (out of scope for this -- improved mechanization) + - Being able to easily deploy and embed E+ into workflows (out of scope for this -- pip install) + - Being able to create reusable functionality (I already did this one) + - Odd nature of hardwired discrete EMS integer values (that's here!) + - Cannot actuate User-Defined Components with callback functions, only with Python-Plugins (that's here too!) + +## Problem Statement + +I had always hoped that users would develop their own reusable scripts and packages, which is one reason that users provide custom search paths for Python in their input files. +However, API callback functionality is tied very closely to a single input model because of hardwired object names. +Users can create fully functional generic code and then create thin wrappers that tie the functionality to a single model, but this can be improved. + +By providing a set of API functions that provide the current input structure to the user, they can directly write generic code in more situations. +Most users still operate on IDF, so providing the already-interpreted input deck as a Python object will lead to a lower bar for writing generic code. + +In addition, there are "magic numbers" in the EMS interface which allow certain control strategies or settings to be applied discretely based on integer values. +Internally to EnergyPlus, these are often stored as an enumeration, and as the numbers have meaning, they must be hardcoded there as well. +These are not currently exposed as symbols through the EnergyPlus API, which means user scripts must hardcode these there too. +To alleviate this, it is proposed that an automated method be created which either: + - programmatically exposes these internal values through symbols in the API, or + - allows a call into an API function to get symbolic values for certain discrete settings or configurations. + +The final problem here relates to the user-defined components and the API. +As of right now, the user-defined components in EnergyPlus require the user to specify an initialization routine and a simulation routine. +These are either ERL-based programs, or Python-Plugin instance names, and there is no way to utilize an API callback function for either actuation. +Users who want to take advantage of the API/callback workflow are limited in this and cannot combine the workflow with user-defined component functionality. + +## Design of API Functions for Accessing Current Inputs + +I want to provide an API endpoint that provides input data as Python objects. +Any functions here would belong in the data exchange API group, as it relies on a currently running simulation. +The inputs, whether EpJSON or IDF (or CBOR, or...), are already interpreted into a JSON object in the EnergyPlus C++ at runtime. +The new endpoints would provide methods to access a list of names for object types, for example: + +I already completed this as a small side task in https://github.com/NREL/EnergyPlus/pull/9973, so this is done. + +## Design of EMS Magic Number Solution + +The solution here is a bit less clear. + +If the agreed solution is to expose the internal enumerations through a set of symbolic constants in the API layer, then +the result may be a small script that scrapes the EnergyPlus code as a part of the libenergyplusapi target and creates an API file full of symbols. +This file would be packaged like all the other API files and users could import the symbols and avoid having to track magic numbers. +This solution could help future proof the user code in case the symbols changed for some reason, although it is doubtful we would make that much of a breaking change anytime soon. +I would expect the symbols to remain an enum class in the core C++ code, but it would still need to be determined how to pass this information to both C and Python. + +Consider the before: + +```python +api.exchange.set_actuator_value(state, actuator_handle, 3) +``` + +versus the after: + +```python +api.exchange.set_actuator_value(state, actuator_handle, api.constants.operation_mode.cooling) +``` + +If the agreed upon solution is to create a worker function inside the EnergyPlus API to "mine" out the magic numbers based on symbolic entries, it actually becomes a bit easier. +Any enumeration that is exposed through EMS actuation would need to be given a symbolic class and key name. +Then a single worker function would be created that takes string views of the class and key name. +Internally, there could be a nested switch block that simply returns the enumerated value as an integer back to the user. +The user would then avoid magic numbers. +Consider the before: + +```python +api.exchange.set_actuator_value(state, actuator_handle, 3) +``` + +versus the after: + +```python +operation_mode = api.functional.get_enum_value("OperationMode", "Cooling") +api.exchange.set_actuator_value(state, actuator_handle, operation_mode) +``` + +This would still require a string in the Python code, but feels a ton better than a magic number. +A quick scan of all the calls to SetupEMSActuator reveals a few possible candidates for this new paradigm. + +There are several plant-based supervisory control actuators that were expected to only carry discrete 0 (off) and 1 (on) values. +However, the component supervisory actuators respond to that actuator in a continuous nature, allowing the user to scale the available load capacity for that component. +So for now at least, those plant actuators will be left alone, and not captured in this magic-number cleanup. + +The remaining candidates include: + +| Actuator "Object" | Control Type | +|--------------------------------------------|---------------------| +| AirLoopHVAC | Availability Status | +| Window Shading Control | Control Status | +| Variable Refrigerant Flow Heat Pump | Operating Mode | +| Coil:Cooling:DX:SingleSpeed:ThermalStorage | Operating Mode | + +The "AirLoopHVAC" actuator with control type "Availability Status" accepts the following discrete values, currently as magic numbers, as described in the EMSApplicationGuide document: + +- 0.0 ( = NoAction). This tells the air system to do whatever it would usually do without any special override status. +- 1.0 ( = ForceOff). This overrides the air system to shut down when it would normally want to run. +- 2.0 ( = CycleOn). This overrides the air system to start up when it would normally be off. +- 3.0 ( = CycleOnZoneFansOnly). + +There "Window Shading Control" actuator with control type "Control Status" has a relatively long list of magic numbers with the following meanings: + +- –1.0: No shading device. +- 0.0: Shading device is off (applies to shades and blinds). +- 1.0: Interior shade is on. +- 2.0: Glazing is switched to a darker state (switchable glazing only). +- 3.0: Exterior shade is on. +- 4.0: Exterior screen is on. +- 6.0: Interior blind is on. +- 7.0: Exterior blind is on. +- 8.0: Between-glass shade is on. +- 9.0: Between-glass blind is on. + +The "Variable Refrigerant Flow Heat Pump" actuator with control type "Operating Mode" accepts the following discrete values: + +- 0.0: System is OFF +- 1.0: System is in Cooling Mode +- 2.0: System is in Heating Mode + +The "Coil:Cooling:DX:SingleSpeed:ThermalStorage" actuator with control type "Operating Mode" accepts the following discrete values: + +- 0 = Off Mode +- 1 = Cooling Only Mode +- 2 = Cooling and Charge Mode +- 3 = Cooling and Discharge Mode +- 4 = Charge Only Mode +- 5 = Discharge Only Mode + +As we can see, the magic number use is not consistent, and can lead to confusing, difficult to maintain Python code. +The primary goal for this work will be to add a worker function that allows the user to capture these control signals by meaningful name, eliminating the magic numbers. +As further actuators are added to the program, if they are managing discrete control signals, they can be added to this worker function. +The implementation of this function will almost certainly be easiest to maintain as a simple IF ladder, although it is possible that the strings could be hashed into integral values that could be SWITCHed. + +As of right now, my preferred path forward would be the following steps: +- Each of the above discrete EMS actuators should have an enum class that they are using internally, move these to a single header file just containing the enums +- Create an API worker function that just relies on this one enum header, the basic GetEnumValue (sp?) function, and the MakeUPPER function, to return a meaningful integer value or ::Invalid +- Evaluate the -1 magic number being used on the window shading control type, and how to proceed there. + +## Improvements to User-Defined Components + +The API callbacks do not have "names" in the input file, which immediately breaks any option to use callbacks to handle user defined initialization and simulation. +In order to get the user defined components working with the API, we need to make two changes: + - Modify the input structure and code of the user-defined components so that we allow a name input that is not directly found in the input file + - Add a callback registration function where an external function can be registered with a name argument, that can be paired up to the user-defined component function name + +The input file changes would look like this: + +``` +UserDefinedComponentFoo, + My User Defined Component, !- Name + ...other inputs..., !- Etc + MyInitRoutine, !- Name of the init routine, could be an EMS:Program, a PythonPlugin:Instance, or the name of a registered user-defined init callback + MySimRoutine, !- Name of the sim routine, could be an EMS:Program, a PythonPlugin:Instance, or the name of a registered user-defined sim callback + ...etc...; +``` + +And the new callback registration function would be something like: + +```python +def my_user_defined_init_function(state): + pass # foo + +def my_user_defined_sim_function(state): + pass # foo + +api.runtime.callback_user_defined_init(state, "MyInitRoutine", my_user_defined_init_function) +api.runtime.callback_user_defined_sim(state, "MySimRoutine", my_user_defined_sim_function) +``` + +An API user will register the callback function ahead of the call to run EnergyPlus. +The input processing for the user defined component will need to check the name entered for each function and determine if it is an ERL program, Python Plugin, or API callback. +If there is a duplicate, or none match, errors/warnings will be emitted. diff --git a/design/FY2024/NFP-labHeatExchangerHR.md b/design/FY2024/NFP-labHeatExchangerHR.md new file mode 100644 index 00000000000..e9f89833030 --- /dev/null +++ b/design/FY2024/NFP-labHeatExchangerHR.md @@ -0,0 +1,270 @@ + +Enhancement for Variable-Speed Heat Recovery Ventilation in Laboratories +================ + +**Yujie Xu, Tianzhen Hong** + +**Lawrence Berkeley National Laboratory*** + + - Original Date: Oct 24, 2023 + +## Justification for Feature Update + +For lab buildings, the heating-cooling air flow rate could vary substantially +depending on the occupancy, the type of experiment, and the operation protocol. +Correctly capturing its HVAC energy consumption and heat recovery performance +requires accurate information on heat exchangers' sensible and latent +effectiveness at various flow conditions. However, in EnergyPlus, the heat +exchanger object, HeatExchanger:AirToAir:SensibleAndLatent, describes the +sensible and latent effectiveness at only two reference points (100% and 75% +airflow) for either heating or cooling. This feature will add four new optional +fields at the end of the HeatExchanger:AirToAir:SensibleAndLatent object. These +new fields will specify four performance curves to more flexibly express the +relationship between sensible and latent effectiveness at different relative +airflow (the percentage of the actual airflow relative to the nominal supply +airflow). Being able to characterize the efficiency at low-flow-rate conditions +can allow more accurate modeling of the heat recovery system and justify the +adoption of high-potential energy-saving strategies like using variable speed +fans in the exhaust air heat recovery systems in laboratories. + +A team led by Jon McHugh, who is doing EnergyPlus modeling to support California +Title 24 development, requested the feature. This feature supports ANSI/ASSP +Z9.5-2022 Laboratory Ventilation standard, which requires variable-airflow +exhaust system operations. + +## Overview ## + +### Existing approach ### + +Currently, the HeatExchanger:AirToAir:SensibleAndLatent in EnergyPlus only has +two reference points to describe the relationship between relative airflow and +heat exchange effectiveness in transferring sensible and latent heat (the fields +between the two arrows in the following example). + +Example: + + HeatExchanger:AirToAir:SensibleAndLatent, + OA Heat Recovery 1, !- Heat exchanger name + FanAndCoilAvailSched, !- Availability schedule name + 0.05, !- Nominal supply air flow rate {m3/s} + .76, !- Sensible effectiveness at 100% airflow heating condition <-- + .68, !- Latent effectiveness at 100% airflow heating condition + .81, !- Sensible effectiveness at 75% airflow heating condition + .73, !- Latent effectiveness at 75% airflow heating condition + .76, !- Sensible effectiveness at 100% airflow cooling condition + .68, !- Latent effectiveness at 100% airflow cooling condition + .81, !- Sensible effectiveness at 75% airflow cooling condition + .73, !- Latent effectiveness at 75% airflow cooling condition <-- + ERV Outdoor air Inlet Node, !- Supply air inlet node name + Heat Recovery Outlet Node, !- Supply air outlet node name + Zone 1 Exhaust Node, !- Exhaust air inlet node name + Heat Recovery Secondary Outlet Node, !- Exhaust air outlet node name + 50.0, !- Nominal electric power {W} + Yes, !- Supply air outlet temperature control + Rotary, !- Heat exchanger type + MinimumExhaustTemperature, !- Frost control type + 1.7; !- Threshold temperature + +### The gap in the modeling capability ### + +In current EnergyPlus, a linear relationship is specified for the heat exchanger +effectiveness at different relative airflow, using the performance at 75% and +100% of the supply air flow rate. The linear performance curve is valid for +relative airflow from 50% to 130%. However, some heat exchangers could have +non-linear performance curves as shown in Figure 1 and Figure 2. In the example +of Figure 2, the effectiveness is a function of both air flow rate and liquid +capacity flow ratio (the minimum capacity flow rate of all streams in a heat +exchanger divided by the maximum). If the capacity flow ratio is fixed at some +value, say 1.0, then the distances between the curves for different air flow +rates are not even. This indicates the non-linear relationship between the +airflow and the effectiveness. The air-flow-and-effectiveness relationship could +be non-monotonic as well for certain values of capacity flow ratio[2] + +alt text + + +Figure 1. An example of a heat exchanger with non-linear performance curves at different airflow conditions [1] + +alt text + + +Figure 2. Another example of heat exchanger effectiveness being non-linear and non-mototonic with air flow + +Furthermore, when the relative airflow is below 50% or above 130%, the program +will throw a warning, "Average air volume flow rate is <50% or >130% of the +nominal HX supply air volume flow rate.", indicating that there could be an +issue of linearly extrapolating the curve. This also suggests the need for more +points to better capture the heat exchanger performance at very low or very high +airflow conditions. + +## Approach + +This feature proposes to add 4 optional fields holding 4 performance curves at +the end of the HeatExchanger:AirToAir:SensibleAndLatent. These fields will +specify the heating/cooling sensible or latent effectiveness multiplier as a +function of relative airflow. The effectiveness at a certain airflow ratio will +be the value of the curve at that airflow ratio multiplied by the corresponding +effectiveness value at 100% airflow at the beginning of the object. The four +fields corresponding to effectiveness at 75% airflow conditions will be removed. +The warning message of "Average air volume flow rate is <50% or >130% of the +nominal HX supply air volume flow rate." will be removed too. + + HeatExchanger:AirToAir:SensibleAndLatent, + \memo This object models an air-to-air heat exchanger using effectiveness relationships. + \memo The heat exchanger can transfer sensible energy, latent energy, or both between the + \memo supply (primary) and exhaust (secondary) air streams. + \min-fields 19 + A1, \field Name + \required-field + \type alpha + \reference HXAirToAirNames + \reference HXAirToAirSensibleAndLatentNames + \reference AFNHeatExchangerNames + \reference-class-name validBranchEquipmentTypes + \reference validBranchEquipmentNames + \reference-class-name validOASysEquipmentTypes + \reference validOASysEquipmentNames + A2, \field Availability Schedule Name + \note Availability schedule name for this system. Schedule value > 0 means the system is available. + \note If this field is blank, the system is always available. + \type object-list + \object-list ScheduleNames + N1, \field Nominal Supply Air Flow Rate + \required-field + \type real + \autosizable + \minimum> 0.0 + \units m3/s + N2, \field Sensible Effectiveness at 100% Heating Air Flow + \type real + \units dimensionless + \minimum 0.0 + \maximum 1.0 + \default 0.0 + N3, \field Latent Effectiveness at 100% Heating Air Flow + \type real + \units dimensionless + \minimum 0.0 + \maximum 1.0 + \default 0.0 <- remove two 75% effectiveness point after here + N4, \field Sensible Effectiveness at 100% Cooling Air Flow + \type real + \units dimensionless + \minimum 0.0 + \maximum 1.0 + \default 0.0 + N5, \field Latent Effectiveness at 100% Cooling Air Flow + \type real + \units dimensionless + \minimum 0.0 + \maximum 1.0 + \default 0.0 <- remove two 75% effectiveness point after here + A7, \field Supply Air Inlet Node Name + \required-field + \type node + A4, \field Supply Air Outlet Node Name + \required-field + \type node + A5, \field Exhaust Air Inlet Node Name + \required-field + \type node + A6, \field Exhaust Air Outlet Node Name + \required-field + \type node + N6, \field Nominal Electric Power + \type real + \units W + \ip-units W + \minimum 0.0 + \default 0.0 + A7, \field Supply Air Outlet Temperature Control + \type choice + \key No + \key Yes + \default No + A8, \field Heat Exchanger Type + \type choice + \key Plate + \key Rotary + \default Plate + A9, \field Frost Control Type + \type choice + \key None + \key ExhaustAirRecirculation + \key ExhaustOnly + \key MinimumExhaustTemperature + \default None + N7, \field Threshold Temperature + \type real + \units C + \default 1.7 + \note Supply (outdoor) air inlet temp threshold for exhaust air recirculation and + \note exhaust only frost control types. Exhaust air outlet threshold Temperature for + \note minimum exhaust temperature frost control type. + N8, \field Initial Defrost Time Fraction + \type real + \units dimensionless + \minimum 0.0 + \maximum 1.0 + \default 0.083 + \note Fraction of the time when frost control will be invoked at the threshold temperature. + \note This field only used for exhaust air recirc and exhaust-only frost control types. + N9, \field Rate of Defrost Time Fraction Increase + \type real + \units 1/K + \minimum 0.0 + \default 0.012 + \note Rate of increase in defrost time fraction as actual temp falls below threshold temperature. + \note This field only used for exhaust air recirc and exhaust-only frost control types. + A10,\field Economizer Lockout + \type choice + \key Yes + \key No + \default Yes + \note Yes means that the heat exchanger will be locked out (off) + \note when the economizer is operating or high humidity control is active + A11,\field Sensible Effectiveness of Heating Air Flow Curve Name + \note optional + \note if this field has value, then the sensivle effectiveness for heating + \note will be the value in N2 multiplied by this curve value + \type object-list + \object-list UnivariateFunctions + A12,\field Latent Effectiveness of Heating Air Flow Curve Name + \note optional + \note if this field has value, then the latent effectiveness for heating + \note will be the value in N3 multiplied by this curve value + \type object-list + \object-list UnivariateFunctions + A13,\field Sensible Effectiveness of Cooling Air Flow Curve Name + \note optional + \note if this field has value, then the sensivle effectiveness for cooling + \note will be the value in N4 multiplied by this curve value + \type object-list + \object-list UnivariateFunctions + A14;\field Latent Effectiveness of Cooling Air Flow Curve Name + \note optional + \note if this field has value, then the latent effectiveness for cooling + \note will be the value in N5 multiplied by this curve value + \type object-list + \object-list UnivariateFunctions + +## Testing/Validation/Data Source(s) + +The feature will be tested and demonstrated with a test file derived from 5Zone_Unitary_HXAssistedCoil.idf. + +## Acknowledgments + +LBNL had a few meetings with Jon McHugh and his team who made the original request of the new feature. + +## Proposed additions to Meters: + +N/A + +## Proposed Report Variables: + +N/A + +## References + +[1] W. J. Turner, "Investigation and Development of Hybrid Ventilation Wall Convector," The University of Reading, 2009. [Online]. Available: https://www.researchgate.net/publication/263209666_Investigation_and_Development_of_Hybrid_Ventilation_Wall_Convector/figures?lo=1 +[2] Mahmoud, M., Filipsson, P., Brunninge, S., & Dalenbäck, J. O. (2022). Flow rate optimization in run-around heat recovery systems. Applied Thermal Engineering, 200, 117599. diff --git a/design/FY2024/fig_1_9-Comparison-of-effect-of-airflow-rate-on-heat-exchanger-effectiveness-for-cooling-and.png b/design/FY2024/fig_1_9-Comparison-of-effect-of-airflow-rate-on-heat-exchanger-effectiveness-for-cooling-and.png new file mode 100644 index 00000000000..648c0cdc75e Binary files /dev/null and b/design/FY2024/fig_1_9-Comparison-of-effect-of-airflow-rate-on-heat-exchanger-effectiveness-for-cooling-and.png differ diff --git a/design/FY2024/fig_2_effectiveness_vs_capacity_flow_ratio.png b/design/FY2024/fig_2_effectiveness_vs_capacity_flow_ratio.png new file mode 100644 index 00000000000..0a3f82eb3c8 Binary files /dev/null and b/design/FY2024/fig_2_effectiveness_vs_capacity_flow_ratio.png differ diff --git a/doc/ems-application-guide/src/ems-actuators/internal-gains-and-exterior-lights.tex b/doc/ems-application-guide/src/ems-actuators/internal-gains-and-exterior-lights.tex index ccb7484b45a..8111b6ce429 100644 --- a/doc/ems-application-guide/src/ems-actuators/internal-gains-and-exterior-lights.tex +++ b/doc/ems-application-guide/src/ems-actuators/internal-gains-and-exterior-lights.tex @@ -28,6 +28,10 @@ \subsection{Other Equipment}\label{other-equipment} An actuator called ``OtherEquipment'' is available with a control type called ``Power Level'' (in W). This allows you to set the power associated with each OtherEquipment input object. The unique identifier is the name of the OtherEquipment input object. Other equipment offers a way to adjust the zone air energy balance without consuming any energy resources. +\subsection{Indoor Living Wall}\label{indoor-living-wall} + +An actuator called ``IndoorLivingWall'' is available with a control type called ``Evapotranspiration Rate'' (in \unit{\kilo\gram\per\square\meter\per\second}). This allows you to set the evapotranspiration rates for each IndoorLivingWall object directly using EMS, Python PlugIns, or Python API. The unique identifier is the name of the IndoorLivingWall input object. + \subsection{Baseboard}\label{baseboard} An actuator called ``ZoneBaseboard:OutdoorTemperatureControlled'' is available with a control type called ``Power Level'' (in W). The unique identifier is the name of the ZoneBaseboard:OutdoorTemperatureControlled input object. diff --git a/doc/engineering-reference/engineering-reference.tex b/doc/engineering-reference/engineering-reference.tex index 065dff18556..6c462d884ce 100644 --- a/doc/engineering-reference/engineering-reference.tex +++ b/doc/engineering-reference/engineering-reference.tex @@ -226,6 +226,8 @@ \input{src/simulation-models-encyclopedic-reference-003/zone-internal-gains} +\input{src/simulation-models-encyclopedic-reference-003/indoor-living-wall} + \input{src/simulation-models-encyclopedic-reference-003/indoor-swimming-pool} \input{src/simulation-models-encyclopedic-reference-003/pipes} diff --git a/doc/engineering-reference/src/simulation-models-encyclopedic-reference-003.tex b/doc/engineering-reference/src/simulation-models-encyclopedic-reference-003.tex index b352faf740d..03508a1c122 100644 --- a/doc/engineering-reference/src/simulation-models-encyclopedic-reference-003.tex +++ b/doc/engineering-reference/src/simulation-models-encyclopedic-reference-003.tex @@ -7,6 +7,7 @@ \chapter{Simulation Models -- Encyclopedic Reference}\label{simulation-models--- \begin{itemize} \tightlist \item Zone Internal Gains + \item Indoor Living Wall \item Indoor Swimming Pool \item Pipes \item Pumps diff --git a/doc/engineering-reference/src/simulation-models-encyclopedic-reference-003/indoor-living-wall.tex b/doc/engineering-reference/src/simulation-models-encyclopedic-reference-003/indoor-living-wall.tex new file mode 100644 index 00000000000..686edd882a1 --- /dev/null +++ b/doc/engineering-reference/src/simulation-models-encyclopedic-reference-003/indoor-living-wall.tex @@ -0,0 +1,161 @@ +\section{Indoor Living Wall }\label{indoor-living-wall} + +Indoor living walls refer to vertically built structures where plants grow soil-based or hydroponically, provide natural cooling effects through plant evapotranspiration, and enhance overall indoor environmental quality in the built environment. Pilot studies shows measurable benefits of hydroponic indoor greenery systems on reducing building cooling rates. This object mathematically describes the thermal performance of indoor living wall systems through surface heat balance as well as heat and mass balance of thermal zones where the indoor living walls are located. + +\subsection{Energy Balance of Indoor Living Wall}\label{energy-balance-of-indoor-living-wall} + +The IndoorLivingWall object directly connects with the inside surface heat balance, zone air heat balance, and zone air moisture balance in EnergyPlus. Indoor living wall surface heat balance, which determines leaf surface temperature, takes into account convective heat transfer between indoor living walls and zone air, incident shortwave solar radiation, longwave radiation with surrounding surfaces, heat required for vaporization from ET, and heat conduction. Latent load from ET of indoor living walls contributes to indoor air moisture balance. + +Plant energy balance equation: + +\begin{equation} +Q_{lw-net}+Q_{sw}+h_{ip} \cdot A_ip \cdot (T_z - T_p )-\lambda \cdot A_ip \cdot ET+Q_{cond}=0 +\end{equation} + +where: + +\(Q_{lw-net}\) is the net longwave radiation from surrounding surfaces to indoor living walls(W); + +\(Q_{sw}\) is the shortwave radiation on indoor living wall surface(W); + +\(h_{ip}\) is the convective heat transfer coefficient(W/(m\(^2\)\(^{\circ}\)C)); + +\(T_z\) is the zone air temperature (\(^{\circ}\)C); + +\(T_p\) is the plant surface temperature (\(^{\circ}\)C); + +\(A_ip\) is the plant surface area(m\(^2\)); + +\(\lambda\) is the latent heat of vaporization(J/kg); + +\(ET\) is the evapotranspiration rate (kg/(m\(^2\)s)). + +Indoor air heat balance connects with indoor living walls through convective heat transfer, which has the opposite sign of the term in surface heat balance. Convective portion of heat gain from LED lights also contributes to zone air heat balance equation. + +\begin{equation} +\begin{array}{l}{\rho_{air}}{V_z}{c_p}{dT_z}/{dt} = \sum\limits_{i = 1}^{{N_{sl}}} {\dot Q_i^{}} + \sum\limits_{i = 1}^{{N_{surfaces}}} {{h_i}} {A_i} ({{T_{si}} - {T_z}}) + {{h_ip}}{A_ip}({{T_{p}} - {T_z}})\\ + \sum\limits_{i = 1}^{{N_{zones}}} {{{\dot m}_i}} {C_p}{{T_{zi}} - {T_z}} + {\dot m_{\inf }}{C_p}( {{T_\infty } - {T_z}}) +{\dot Q_{sys}}\end{array} +\end{equation} + +where: + +$\frac{\rho_{air} V_z c_p dT_z}{dt}$ represents energy stored in zone air during each timestep (W); + +$\rho_{air}$ is zone air density (kg/m\(^3\)); + +$c_p$ is the air specific heat (J/(kg\(^{\circ}\)C)) ; + +$V_z$ is zone air volume (m$^3$); + +\(\dot Q_i\) is the convective heat from internal loads (W); + +\({{h_i}} {A_i}\left( {{T_{si}} - {T_z}} \right)\) is the convective heat transfer from surfaces to zone air (W); + +\({{h_ip}} {A_ip}\left( {{T_{p}} - {T_z}} \right)\) represents the term for convective heat transfer from indoor plants to zone air (W); + +\({{{\dot m}_i}} {C_p}\left( {{T_{zi}} - {T_z}} \right)\) represents heat transfer due to air mixing between zones (W); + +\({\dot m_{\inf }}{C_p}\left( {{T_\infty } - {T_z}} \right)\) represents heat transfer due to infiltration of outdoor air (W); + +\(\dot Q_{sys}\) is the sensible heat gain from mechanical systems (W). + +A modified zone air moisture balance equation shown below considers indoor living walls. + +\begin{equation} +\begin{array}{l} \frac{\rho_{air} V_z C_W}{\delta t} \left( {W_z^t - W_z^{t - \delta t}} \right) = \sum\limits_{i = 1}^{{N_{sl}}} {kg_{mass_{sched\;load}}} + kg_{mass_{et}} \\ + \sum\limits_{i = 1}^{{N_{surfaces}}} {{A_i}{h_{mi}}} {\rho_{ai{r_z}}}\left( {{W_{surf{s_i}}} - W_z^t} \right)+ \sum\limits_{i = 1}^{{N_{zones}}} {{{\dot m}_i}} \left( {{W_{zi}} - W_z^t} \right) + {{\dot m}_{\inf }}\left( {{W_\infty } - W_z^t} \right) + {{\dot m}_{sys}}\left( {{W_{\sup }} - W_z^t} \right)\end{array} +\end{equation} + +where: + +\(kg_{mass_{et}}\) is the moisture added to thermal zone from indoor living walls (kg/s); + +\(W\) is the humidity ratio of moisture air (kg moisture/kg dry air); + +$\frac{\rho_air V_z C_W}{\delta t} \left(W_z^t - W_z^{t-\delta t}\right)$ represents moisture stored in zone air during each timestep (kg/s); + +\(kg_{mass_{et}}\) represents moisture rate from plant evapotranspiration added to zone air (kg/s); + +\({{{\dot m}_i}} \left( {W_zi - W_z^t} \right)\) represents moisture mass flow due to air mixing (kg/s); + +\({{\dot m}_{\inf }}\left( {{W_\infty } - W_z^t} \right)\) represents moisture gain rate due to outside air infiltration (kg/s); + +\({{\dot m}_{sys}}\left( {{W_{\sup }} - W_z^t} \right)\) represents the moisture gain rate from mechanical systems (kg/s). + +\subsection{Evapotranspiration from indoor living wall}\label{evaporation-from-indoor-living-wall} + +Evapotranspiration (ET) represents the amount of water lost through transpiration from plant surfaces and evaporation from growing media. In plant heat balance, transpiration is a major component in forming the plant energy balance and provides evaporative cooling for the surrounding built environment. Plant transpiration is a vital process to transport water and nutrients from roots to shoots. Transpiration is driven by net radiation and sensible heat gains from the surrounding environment and provides evaporative cooling for the built environment. For the indoorlivingwall object, we have two calculation methods for evapotranspiration (ET) including Penman-Monteith model and Stanghellini model. + +The Penman-Monteith model, described in the equation below, is the most popular ET model used for open field agriculture. The model or modified model has been tested for ET rate predictions for indoor environments such as greenhouse and vertical farming applications. + +\begin{equation} +ET=1/\lambda \cdot (\Delta \cdot(I_n-G)+(\rho_a \cdot Cp \cdot VPD)/r_a )/(\Delta+\gamma \cdot (1+r_s/r_a ) ) +\end{equation} + +where: + +\(ET\) is the evapotranspiration rate (kg/m\(^2\)s); + +\(\lambda\) is the latent heat of vaporization (MJ/kg); + +\(\Delta\) is the slope of the saturation vapor pressure-temperature curve (kPa/\(^{\circ}\)C); + +\(\gamma\)is the psychrometric constant (kPa/\(^{\circ}\)C); + +\(I_n\) represents net radiation, which is based on daylighting level and/or LED growth lighting intensity level (MW/m\(^2\)); + +\(G\) represents soil heat flux, which is assumed to be zero in the current model(MW/m\(^2\)); + +\(\rho_a\) is air density (kg/m\(^3\)); + +\(Cp\) is the specific heat of air (MJ/(kg\(^{\circ}\)C)); + +\(VPD\) is vapor pressure deficit (kPa); + +\(r_s\) is surface resistance, which is the resistance to the flow of vapor through the crop to the leaf surface (s/m); + +\(r_a\) represents aerodynamic resistance, which is the resistance to the flow of water vapor and sensible heat from the surface of the leaf to the surrounding air (s/m). + +Empirical models of stomatal resistance such as the Jarvis and the Ball models require experimental data to generate submodel structure and fit the model coefficients. In this module, we used the surface and aerodynamic resistance models from Graamans et al. to calculate $r_s$ and $r_a$. + +\begin{equation} +r_s=60 \cdot (1500+I_n/C)/(200+I_n/C) +\end{equation} + +\begin{equation} +r_a=350 \cdot \sqrt{L/u_\infty} \cdot (1/LAI) +\end{equation} + +where: + +\(C\) is the conversion factor from \unit{\mega\watt\per\square\meter} to \unit{\micro\mole\per\square\meter\per\second}; + +\(u_\infty\) is the air velocity (m/s); + +\(L\) is the leaf diameter (m); + +\(LAI\) is defined as the ratio of one-side leaf area per unit plant growing area. + +In the current IndoorLivingWall, the room air velocity \(u_\infty\) is assumed 0.1 m/s, the mean leaf diameter L is assumed 0.1 m, and LAI is calculated based on total leaf area and surface area. + +Stanghellini model is similar to Penman-Monteith model; both are based on energy heat balance for plants. The Stanghellini model includes leaf area index LAI [-] accounting for energy flux between multiple layers of leaves in a CEA canopy. + +The equation for the evaporation rate is: +\begin{equation} +ET=1/\lambda \cdot (\Delta \cdot(I_n-G)+(2 \cdot Cp LAI \cdot Cp \rho_a \cdot Cp \cdot VPD)/r_a )/(\Delta+\gamma \cdot (1+r_s/r_a ) ) +\end{equation} + +Users can also define a customized ET model using an "Evapotranspiration rate" actuator which can be calculated with Energy Management System (EMS) objects, Python PlugIns objects, and Python API with the indoor living wall model. Please refer the Application Guide for EMS. + +\subsection{References}\label{references-indoorlivingwall} + +Wang, L. and M.J. Witte (2022). Integrating building energy simulation with a machine learning algorithm for evaluating indoor living walls’ impacts on cooling energy use in commercial buildings. Energy and Buildings 272, p. 112322. + + Monteith, J.L. (1965). Evaporation and environment. in Symposia of the society for experimental biology. Cambridge University Press (CUP) Cambridge. + + Graamans, L., et al. (2017) Plant factories; crop transpiration and energy balance. Agricultural Systems. 153, p. 138-147. + + Wang, L., E. Iddio, and B. Ewers (2021). Introductory overview: Evapotranspiration (ET) models for controlled environment agriculture (CEA). Computers and Electronics in Agriculture 190, p. 106447. + + Jarvis, P. (1976). The interpretation of the variations in leaf water potential and stomatal conductance found in canopies in the field.Philosophical Transactions of the Royal Society of London. Series B, 273(927), p. 593-610. + + Ball, J.T., I.E. Woodrow, and J.A. Berry (1987). A model predicting stomatal conductance and its contribution to the control of photosynthesis under different environmental conditions, in Progress in photosynthesis research, Springer. p. 221-224. + diff --git a/doc/input-output-reference/src/input-for-output.tex b/doc/input-output-reference/src/input-for-output.tex index d2b8226128a..87ac1608356 100644 --- a/doc/input-output-reference/src/input-for-output.tex +++ b/doc/input-output-reference/src/input-for-output.tex @@ -2199,9 +2199,11 @@ \subsubsection{Inputs}\label{inputs-12-014} JtoGJ -- Joules converted into Gigajoules (1 / 1,000,000,000) \item InchPound -- convert all annual, monthly, economics and timebins tabular values to common InchPound equivalent +\item +InchPoundExceptElectricity -- similar to \textbf{InchPound} but using kWh (energy), and W or kW (rate) for electricity usages. \end{itemize} -The JtoKWH, JtoMJ and JtoGJ unit conversion input option applies only to the Output:Table:Monthly reports and partially to the ABUPS report. For ABUPS, the JtoKWH option changes the report but the JtoMJ and JtoGJ options do not change the report since it is already in MJ/m2 and GJ. In addition, the JtoKWH option also changes results in the LEED Summary report changing GJ to kWh and MJW/m2 to kWh/m2. The InchPound unit conversion input option applies to all annual, monthly, timebins and economic reports that appear in the SQL file. +The JtoKWH, JtoMJ and JtoGJ unit conversion input option applies only to the Output:Table:Monthly reports and partially to the ABUPS report. For ABUPS, the JtoKWH option changes the report but the JtoMJ and JtoGJ options do not change the report since it is already in MJ/m2 and GJ. In addition, the JtoKWH option also changes results in the LEED Summary report changing GJ to kWh and MJW/m2 to kWh/m2. The InchPound unit conversion input option applies to all annual, monthly, timebins and economic reports that appear in the SQL file. The InchPoundExceptElectricity unit conversion input option makes conversions similar to what InchPound option does, except for using kWh (energy) or W/kW (rate) for electricity related outputs. This also applies to some lighting and plug load design levels that appears in IP version of Code and Standars (usually given in W or W/ft$^2$). Since the Output:SQLite tabular unit conversion setting act on the Tabular reports only, the other SQLite reporting will not affected by this unit conversion setting. The table below lists the affected SQLite tabular tables. diff --git a/doc/input-output-reference/src/overview/group-internal-gains-people-lights-other.tex b/doc/input-output-reference/src/overview/group-internal-gains-people-lights-other.tex index e5a4528aff9..153bf1e2b2e 100644 --- a/doc/input-output-reference/src/overview/group-internal-gains-people-lights-other.tex +++ b/doc/input-output-reference/src/overview/group-internal-gains-people-lights-other.tex @@ -2348,6 +2348,168 @@ \subsection{Internal Gain Equipment Outputs}\label{outputs-5-004} The total heat gain from equipment. It is the sum of the following components: Total Heat Gain = Radiant Heat Gain + Convective Heat Gain + Latent Heat Gain. It is also equal to the power input to the equipment minus any Lost Heat. +\subsection{IndoorLivingWall}\label{indoorlivingwall} + +Indoor greenery systems such as indoor living walls are panels of plants, which grow hydroponically or soil-based. The living wall structures can be either free-standing or attached to walls. This IndoorLivingWall object simulates the thermal performance of indoor living wall in the built environment. The IndoorLivingWall directly connects with the inside surface heat balance, zone air heat balance, and zone air moisture balance in EnergyPlus. + +\subsubsection{Inputs}\label{inputs-indoorlivingwall} + +\paragraph{Field: Name}\label{field-name-indoorlivingwall} + +The name of the IndoorLivingWall object, which must be unique across all IndoorLivingWall objects. + +\paragraph{Field: Schedule Name}\label{field-schedule-name-indoorlivingwall} + +This field is the name of the schedule (ref: Schedules) that modifies the presence of indoor living walls. The schedule values can be zero or one. Zero represents the scenario that the indoor living wall was removed from the thermal zone while one represents the scenario that the indoor living wall is in the presence of the thermal zone. + +\paragraph{Field: ET Calculation Method}\label{field-et-calculation-method} + +This field lists two choices of calculation methods for evapotranspiration (ET) including Penman-Monteith model and Stanghellini model. Users can also develop a customize ET function to override ET rates of indoor living walls through Energy Management System (EMS) objects, Python PlugIns objects, and Python API. + +\paragraph{Field: Lighting Method}\label{field-lighting-method} + +This field lists three different methods to obtain net radiation for indoor living walls. They are artificial grow lights only (LED), daylighting only (Daylight), and artificial lights and daylight (LED-Daylight). If the LED lighting method is selected, the field LED Intensity Schedule Name should be used to define the LED lighting intensity level. If the Daylight or LED-Daylight method is selected, the field Daylighting Reference Point Name should be used to determine the daylighting sensor location. If the LED-Daylight method is selected, a targeted lighting intensity schedule should be defined. Based on the available daylighting, the required LED lighting level and power will be automatically adjusted to meet the targeted LED intensity level. + +\paragraph{Field: LED Schedule Name}\label{field-LED-schedule-name} + +This field is the name of the schedule (ref: Schedules) that defines the fraction of LED nominal intensity level for indoor living walls. The scheduled value can be any fractional value between 0 and 1. + +\paragraph{Field: Daylighting Control Name}\label{field-daylighting-control-name} + +If daylighting is used in the selected lighting methods (Daylight or LED-Daylight), users should define an object of Daylighting:Control to obtain the daylighting illuminance level and an object for Daylighing:ReferencePoint for the daylighting sensor location in the thermal zone. The name of the object of Daylighting:Controls should be specified in this field. + +\paragraph{Field: LED-Daylight Targeted Lighting Intensity Schedule Name}\label{field-led-daylight-targeted-lighting-intensity-schedule-name} + +This field defines targeted LED intensity levels the photosynthetic photon flux density (PPFD) in the unit of \unit{\micro\mole\per\square\meter\per\second} for indoor living wall systems. The schedule values can be any positive number representing the targeted PPFD. + +\paragraph{Field: Total Leaf Area}\label{field-total-leaf-area} + +This field is the estimated one-sided leaf area {[}\unit{\square\meter}{]} of an indoor living wall. Based on the users’ input, leaf area index (LAI) is calculated as the ratio of the total leaf area and the partition wall area. Typical LAIs are 1.0 for grass and 3.0 for bushes and shrubs. The maximum LAI is 2.0 for the IndoorLivingWall module in EnergyPlus. If the calculated LAI is greater than 2.0, the maximum value of 2.0 is used for LAI in the simulation. + +\paragraph{Field: LED Nominal Intensity}\label{field-led-nominal-intensity} + +This field defines the nominal LED intensity level for indoor living wall systems. The value represents the photosynthetic photon flux density (PPFD) of LED grow light. PPFD is measured in \unit{\micro\mole\per\square\meter\per\second} which establishes exactly how many photosynthetically active radiation (PAR) photons are landing on a specific area. + +\paragraph{Field: LED Nominal Power}\label{field-led-nominal-power} + +This field defines nominal total LED power {[}\unit{\W}{]} for an indoor living wall system. + +\paragraph{Field: Radiant Fraction of LED Lights}\label{field-radiant-fraction-of-led-lights} + +This field defines the fraction of LED lights (radiant fraction) supporting plant photosynthesis. + +An IDF example: + +\begin{lstlisting} +IndoorLivingWall, + Space1-1IndoorLivingWall, !-Name + SPACE1-1SouthPartition, !-Surface Name + AlwaysOn, !-Schedule Name + Penman-Monteith, !-ET Calculation Method + LED, !-Lighting Method + AlwaysOff, !-LED Intensity Schedule Name + , !-Daylighting Control Name + , !-LED - Daylight Targeted Lighting Intensity Schedule Name + 30, !- Total Leaf Area {m2} + 32.5, !- LED Nominal Intensity {umol/(m2s)} + 640, !- LED Nominal Power {W} + 0.6; !- Radiant Fraction of LED Lights +\end{lstlisting} + +\subsubsection{Outputs}\label{outputs-indoorlivingwall} + +IndoorLivingWall objects have output variables for individual objects. The following outputs are available: + +\begin{itemize} +\tightlist +\item + Zone,Average,Indoor Living Wall Plant Surface Temperature {[}C{]} +\item + Zone,Average,Indoor Living Wall Sensible Heat Gain Rate {[}W{]} +\item + Zone,Average,Indoor Living Wall Latent Heat Gain Rate {[}W{]} +\item + Zone,Average,Indoor Living Wall Evapotranspiration Rate {[}\unit{\kilo\gram\per\square\meter\per\second}{]} +\item + Zone,Average,Indoor Living Wall Energy Required For Evapotranspiration Per Unit Area {[}\unit{W/m^2}{]} +\item + Zone,Average,Indoor Living Wall LED Operational PPFD {[}\unit{\micro\mole\per\square\meter\per\second}{]} +\item + Zone,Average,Indoor Living Wall PPFD {[}\unit{\micro\mole\per\square\meter\per\second}{]} +\item + Zone,Average,Indoor Living Wall Vapor Pressure Deficit {[}Pa{]} +\item + Zone,Average,Indoor Living Wall LED Sensible Heat Gain Rate {[}W{]} +\item + Zone,Average,Indoor Living Wall LED Operational Power {[}W{]} +\item + Zone,Sum,Indoor Living Wall LED Electricity Energy {[}J{]} +\end{itemize} + +\paragraph{Baseboard Electricity Rate {[}W{]}}\label{baseboard-electric-power-w} + +This field is the electric power for the ZoneBaseboard:OutdoorTemperatureControlled object in Watts. + +\paragraph{Baseboard Electricity Energy {[}J{]}}\label{baseboard-electric-energy-j} + +The outdoor temperature controlled baseboard heat option is assumed to be fueled by electricity. This field is the same as the Baseboard Total Heating Energy (above) in joules. This energy is included in the following meters: +\begin{lstlisting} +Electricity:Facility +Electricity:Building +Electricity:Zone: +Electricity:SpaceType: +InteriorEquipment:Electricity +InteriorEquipment:Electricity:Zone: +InteriorEquipment:Electricity:SpaceType: +:InteriorEquipment:Electricity +:InteriorEquipment:Electricity:Zone: +:InteriorEquipment:Electricity:SpaceType: +\end{lstlisting} + +\paragraph{Baseboard Radiant Heating Rate {[}W{]}}\label{baseboard-radiant-heating-rate-w} + +\paragraph{Baseboard Radiant Heating Energy {[}J{]}}\label{baseboard-radiant-heating-energy-j} + +These output variables are the amount of radiant heat gain for the Zone\-Baseboard:\-Outdoor\-Temperature\-Controlled object in Watts (for rate) or Joules. This is determined by the current heat gain from the heater to the zone and the ``Fraction Radiant'' specified in the input. The radiant gains (long wavelength) are distributed to the surfaces using an area weighting scheme. + +\paragraph{Baseboard Convective Heating Rate {[}W{]}}\label{baseboard-convective-heating-rate-w} + +\paragraph{Baseboard Convective Heating Energy {[}J{]}}\label{baseboard-convective-heating-energy-j} + +These output variables are the amount of convective heat gain for the Zone\-Baseboard:\-Outdoor\-Temperature\-Controlled object in Watts (for rate) or Joules. This is determined by the current heat gain from the heater to the zone and the ``Fraction Radiant'' specified in input (1-FractionRadiant = FractionConvected). The convective heat gain is added to the zone air heat balance directly. + +\paragraph{Baseboard Total Heating Rate {[}W{]}}\label{baseboard-total-heating-rate-w} + +\paragraph{Baseboard Total Heating Energy {[}J{]}}\label{baseboard-total-heating-energy-j} + +These output variables are the amount of heat gain for the Zone\-Baseboard:\-Outdoor\-Temperature\-Controlled object in Watts (for rate) or Joules. This is determined by the sum of the radiant and convective heat gains from the baseboard heat. + +\paragraph{Space or Zone Baseboard Electricity Rate {[}W{]}}\label{zone-baseboard-electric-power-w} + +This field is the electric power for all Zone\-Baseboard:\-Outdoor\-Temperature\-Controlled objects within the space or zone in Watts. + +\paragraph{Space or Zone Baseboard Electricity Energy {[}J{]}}\label{zone-baseboard-electric-energy-j} + +The outdoor temperature controlled baseboard heat option is assumed to be fueled by electricity. This field is the same as the Baseboard Total Heating Energy (above) in joules. + +\paragraph{Space or Zone Baseboard Radiant Heating Rate {[}W{]}}\label{zone-baseboard-radiant-heating-rate-w} + +\paragraph{Space or Zone Baseboard Radiant Heating Energy {[}J{]}}\label{zone-baseboard-radiant-heating-energy-j} + +These output variables are the amount of radiant heat gain for all Zone\-Baseboard:\-Outdoor\-Temperature\-Controlled objects within the space or zone in Watts (for rate) or Joules. This is determined by the current heat gain from the heater to the space or zone and the ``Fraction Radiant'' specified in the input. The radiant gains (long wavelength) are distributed to the surfaces using an area weighting scheme. + +\paragraph{Space or Zone Baseboard Convective Heating Rate {[}W{]}}\label{zone-baseboard-convective-heating-rate-w} + +\paragraph{Space or Zone Baseboard Convective Heating Energy {[}J{]}}\label{zone-baseboard-convective-heating-energy-j} + +These output variables are the amount of convective heat gain for all Zone\-Baseboard:\-Outdoor\-Temperature\-Controlled objects within the space or zone in Watts (for rate) or Joules. This is determined by the current heat gain from the heater to the space or zone and the ``Fraction Radiant'' specified in input (1-FractionRadiant = FractionConvected). The convective heat gain is added to the space or zone air heat balance directly. + +\paragraph{Space or Zone Baseboard Total Heating Rate {[}W{]}}\label{zone-baseboard-total-heating-rate-w} + +\paragraph{Space or Zone Baseboard Total Heating Energy {[}J{]}}\label{zone-baseboard-total-heating-energy-j} + +These output variables are the amount of heat gain for all Zone\-Baseboard:\-Outdoor\-Temperature\-Controlled objects within the space or zone in Watts (for rate) or Joules. This is determined by the sum of the radiant and convective heat gains from the baseboard heat. + \subsection{ElectricEquipment:ITE:AirCooled}\label{electricequipmentiteaircooled} @@ -3129,11 +3291,11 @@ \subsubsection{Outputs}\label{outputs-14-002} Zone,Average,Zone Baseboard Total Heating Rate {[}W{]} \end{itemize} -\paragraph{Baseboard Electricity Rate {[}W{]}}\label{baseboard-electric-power-w} +\paragraph{Baseboard Electricity Rate {[}W{]}}\label{baseboard-electric-power-w-2} This field is the electric power for the ZoneBaseboard:OutdoorTemperatureControlled object in Watts. -\paragraph{Baseboard Electricity Energy {[}J{]}}\label{baseboard-electric-energy-j} +\paragraph{Baseboard Electricity Energy {[}J{]}}\label{baseboard-electric-energy-j-2} The outdoor temperature controlled baseboard heat option is assumed to be fueled by electricity. This field is the same as the Baseboard Total Heating Energy (above) in joules. This energy is included in the following meters: \begin{lstlisting} @@ -3149,47 +3311,47 @@ \subsubsection{Outputs}\label{outputs-14-002} :InteriorEquipment:Electricity:SpaceType: \end{lstlisting} -\paragraph{Baseboard Radiant Heating Rate {[}W{]}}\label{baseboard-radiant-heating-rate-w} +\paragraph{Baseboard Radiant Heating Rate {[}W{]}}\label{baseboard-radiant-heating-rate-w-2a} -\paragraph{Baseboard Radiant Heating Energy {[}J{]}}\label{baseboard-radiant-heating-energy-j} +\paragraph{Baseboard Radiant Heating Energy {[}J{]}}\label{baseboard-radiant-heating-energy-j-2a} These output variables are the amount of radiant heat gain for the Zone\-Baseboard:\-Outdoor\-Temperature\-Controlled object in Watts (for rate) or Joules. This is determined by the current heat gain from the heater to the zone and the ``Fraction Radiant'' specified in the input. The radiant gains (long wavelength) are distributed to the surfaces using an area weighting scheme. -\paragraph{Baseboard Convective Heating Rate {[}W{]}}\label{baseboard-convective-heating-rate-w} +\paragraph{Baseboard Convective Heating Rate {[}W{]}}\label{baseboard-convective-heating-rate-w-2a} -\paragraph{Baseboard Convective Heating Energy {[}J{]}}\label{baseboard-convective-heating-energy-j} +\paragraph{Baseboard Convective Heating Energy {[}J{]}}\label{baseboard-convective-heating-energy-j-2a} These output variables are the amount of convective heat gain for the Zone\-Baseboard:\-Outdoor\-Temperature\-Controlled object in Watts (for rate) or Joules. This is determined by the current heat gain from the heater to the zone and the ``Fraction Radiant'' specified in input (1-FractionRadiant = FractionConvected). The convective heat gain is added to the zone air heat balance directly. -\paragraph{Baseboard Total Heating Rate {[}W{]}}\label{baseboard-total-heating-rate-w} +\paragraph{Baseboard Total Heating Rate {[}W{]}}\label{baseboard-total-heating-rate-w-2a} -\paragraph{Baseboard Total Heating Energy {[}J{]}}\label{baseboard-total-heating-energy-j} +\paragraph{Baseboard Total Heating Energy {[}J{]}}\label{baseboard-total-heating-energy-j-2a} These output variables are the amount of heat gain for the Zone\-Baseboard:\-Outdoor\-Temperature\-Controlled object in Watts (for rate) or Joules. This is determined by the sum of the radiant and convective heat gains from the baseboard heat. -\paragraph{Space or Zone Baseboard Electricity Rate {[}W{]}}\label{zone-baseboard-electric-power-w} +\paragraph{Space or Zone Baseboard Electricity Rate {[}W{]}}\label{zone-baseboard-electric-power-w-2} This field is the electric power for all Zone\-Baseboard:\-Outdoor\-Temperature\-Controlled objects within the space or zone in Watts. -\paragraph{Space or Zone Baseboard Electricity Energy {[}J{]}}\label{zone-baseboard-electric-energy-j} +\paragraph{Space or Zone Baseboard Electricity Energy {[}J{]}}\label{zone-baseboard-electric-energy-j-2} The outdoor temperature controlled baseboard heat option is assumed to be fueled by electricity. This field is the same as the Baseboard Total Heating Energy (above) in joules. -\paragraph{Space or Zone Baseboard Radiant Heating Rate {[}W{]}}\label{zone-baseboard-radiant-heating-rate-w} +\paragraph{Space or Zone Baseboard Radiant Heating Rate {[}W{]}}\label{zone-baseboard-radiant-heating-rate-w-2} -\paragraph{Space or Zone Baseboard Radiant Heating Energy {[}J{]}}\label{zone-baseboard-radiant-heating-energy-j} +\paragraph{Space or Zone Baseboard Radiant Heating Energy {[}J{]}}\label{zone-baseboard-radiant-heating-energy-j-2} These output variables are the amount of radiant heat gain for all Zone\-Baseboard:\-Outdoor\-Temperature\-Controlled objects within the space or zone in Watts (for rate) or Joules. This is determined by the current heat gain from the heater to the space or zone and the ``Fraction Radiant'' specified in the input. The radiant gains (long wavelength) are distributed to the surfaces using an area weighting scheme. -\paragraph{Space or Zone Baseboard Convective Heating Rate {[}W{]}}\label{zone-baseboard-convective-heating-rate-w} +\paragraph{Space or Zone Baseboard Convective Heating Rate {[}W{]}}\label{zone-baseboard-convective-heating-rate-w-2} -\paragraph{Space or Zone Baseboard Convective Heating Energy {[}J{]}}\label{zone-baseboard-convective-heating-energy-j} +\paragraph{Space or Zone Baseboard Convective Heating Energy {[}J{]}}\label{zone-baseboard-convective-heating-energy-j-2} These output variables are the amount of convective heat gain for all Zone\-Baseboard:\-Outdoor\-Temperature\-Controlled objects within the space or zone in Watts (for rate) or Joules. This is determined by the current heat gain from the heater to the space or zone and the ``Fraction Radiant'' specified in input (1-FractionRadiant = FractionConvected). The convective heat gain is added to the space or zone air heat balance directly. -\paragraph{Space or Zone Baseboard Total Heating Rate {[}W{]}}\label{zone-baseboard-total-heating-rate-w} +\paragraph{Space or Zone Baseboard Total Heating Rate {[}W{]}}\label{zone-baseboard-total-heating-rate-w-2} -\paragraph{Space or Zone Baseboard Total Heating Energy {[}J{]}}\label{zone-baseboard-total-heating-energy-j} +\paragraph{Space or Zone Baseboard Total Heating Energy {[}J{]}}\label{zone-baseboard-total-heating-energy-j-2} These output variables are the amount of heat gain for all Zone\-Baseboard:\-Outdoor\-Temperature\-Controlled objects within the space or zone in Watts (for rate) or Joules. This is determined by the sum of the radiant and convective heat gains from the baseboard heat. diff --git a/doc/input-output-reference/src/overview/group-plant-equipment.tex b/doc/input-output-reference/src/overview/group-plant-equipment.tex index 8b9e1b999ee..5626dcfa515 100644 --- a/doc/input-output-reference/src/overview/group-plant-equipment.tex +++ b/doc/input-output-reference/src/overview/group-plant-equipment.tex @@ -4089,7 +4089,7 @@ \subsubsection{Inputs}\label{inputs-10-013} \paragraph{Field: Nominal Thermal Efficiency}\label{field-nominal-thermal-efficiency} -This required numeric field contains the heating efficiency (as a fraction between 0 and 1) of the boiler's burner.~ This is the efficiency relative to the higher heating value (HHV) of fuel at a part load ratio of 1.0. Manufacturers typically specify the efficiency of a boiler using the higher heating value of the fuel. For the rare occurrences when a manufacturers (or particular data set) thermal efficiency is based on the lower heating value (LHV) of the fuel, multiply the thermal efficiency by the lower-to-higher heating value ratio. For example, assume a fuel's lower and higher heating values are approximately 45,450 and 50,000 kJ/kg, respectively. For a manufacturers thermal efficiency rating of 0.90 (based on the LHV), the nominal thermal efficiency entered here is 0.82 (i.e.~0.9 multiplied by 45,450/50,000). +This required numeric field contains the heating efficiency (as a fraction) of the boiler's burner.~ This is the efficiency relative to the higher heating value (HHV) of fuel at a part load ratio of 1.0. Manufacturers typically specify the efficiency of a boiler using the higher heating value of the fuel. For the rare occurrences when a manufacturers (or particular data set) thermal efficiency is based on the lower heating value (LHV) of the fuel, multiply the thermal efficiency by the lower-to-higher heating value ratio. For example, assume a fuel's lower and higher heating values are approximately 45,450 and 50,000 kJ/kg, respectively. For a manufacturers thermal efficiency rating of 0.90 (based on the LHV), the nominal thermal efficiency entered here is 0.82 (i.e.~0.9 multiplied by 45,450/50,000). Note that a nominal efficiency greater than 1.0 is allowed for special applications, but will generate a warning. \paragraph{Field: Efficiency Curve Temperature Evaluation Variable}\label{field-efficiency-curve-temperature-evaluation-variable} diff --git a/doc/input-output-reference/src/overview/group-unitary-equipment.tex b/doc/input-output-reference/src/overview/group-unitary-equipment.tex index ebbb30382fc..42ef71a45ff 100644 --- a/doc/input-output-reference/src/overview/group-unitary-equipment.tex +++ b/doc/input-output-reference/src/overview/group-unitary-equipment.tex @@ -297,6 +297,10 @@ \subsubsection{Inputs}\label{inputs-049} This numeric field defines the supply air flow rate per unit of capacity leaving the unitary system when neither cooling or heating is operating. Values must be greater than or equal to 0 or this field is autosizable. Required field when No Load Supply Air Flow Rate Method is \textbf{FlowPerHeatingCapacity}. +\paragraph{Field: No Load Supply Air Flow Rate Control Set To Low Speed}\label{field-no-load-supply-air-flow-rate-control-set-to-low-speed-004} + +This alpha field defines whether the supply air flow rate leaving the air conditioner in cubic meters per second when neither cooling nor heating is required is set to the coil high speed or low speed air flow rate. The valid choices are Yes or No. The default value is Yes. If the coil type does not have multiple air flow rates or if Design Specification Multispeed Object Type = UnitarySystemPerformance:Multispeed then this field is not used. If Yes is selected and the coil air flow rate is autosized the No Load Supply Air Flow Rate is proportional to the number of speeds. + \paragraph{Field: Maximum Supply Air Temperature}\label{field-maximum-supply-air-temperature-000} This numeric field contains the design operating air outlet temperature in degrees C when the unitary system is heating. If this input field is left blank, the default value is 80 C. When Control Type = SingleZoneVAV, enter the maximum air temperature limit for reduced fan speed in heating model. For the SingleZoneVAV model this input does not limit the maximum supply air temperature resulting from heating or supplemental heating coil operation at high fan speed. This field is autosizable. diff --git a/doc/input-output-reference/src/overview/group-user-defined-hvac-and-plant-component.tex b/doc/input-output-reference/src/overview/group-user-defined-hvac-and-plant-component.tex index 7097806c0a0..5b0f56db9e6 100644 --- a/doc/input-output-reference/src/overview/group-user-defined-hvac-and-plant-component.tex +++ b/doc/input-output-reference/src/overview/group-user-defined-hvac-and-plant-component.tex @@ -4,7 +4,13 @@ \section{Group User Defined HVAC and Plant Component Models}\label{group-user-de Some building energy performance rating systems allow analysts to option of using exceptional calculation methods when a simulation program cannot perform the function required to be modeled. These user defined component models are intended to provide a means for including such exceptional calculations within the context of a full EnergyPlus model. This allows using EnergyPlus for everything it can model and extending it yourself to include a new type of HVAC or Plant component. -These objects are advanced. Making good use of them requires the user to have a detailed understanding of EnergyPlus HVAC and Plant models as well as the Energy Management System (EMS). The EnergyPlus Runtime Language (Erl) is used to program the component model. The Application Guide for EMS provides more discussion of how to use the objects in this group see the chapter called User-Defined Component Models. +These objects are advanced. Making good use of them requires the user to have a detailed understanding of EnergyPlus HVAC and Plant models as well as the Energy Management System (EMS). There are three methods for creating the programs: + +\begin{description} + \item[Erl-Based] In this case, the EnergyPlus Runtime Language (Erl) is used to program the component model right in the IDF itself. The Application Guide for EMS provides more discussion of how to use the objects in this group see the chapter called User-Defined Component Models. + \item[Python Plugin] In this case, the user will create a PythonPlugin:Instance object in the IDF which lists the name of a Python file and class. That class should override the \texttt{on\_user\_defined\_component\_model} method to create user defined behavior. + \item[API Callback] This approach is very similar to the Python Plugin in that the user will still create the user defined behavior in Python. However in this case, the user will create a callback function for modeling the behavior, and register the function using the runtime API function \texttt{callback\_user\_defined\_component\_model}. The string passed to this registration function should be entered into the user-defined object's Program Name input field to match them up. +\end{description} \subsection{ZoneHVAC:ForcedAir:UserDefined}\label{zonehvacforcedairuserdefined} diff --git a/doc/input-output-reference/src/overview/group-water-heaters.tex b/doc/input-output-reference/src/overview/group-water-heaters.tex index 7d9eb3a6b28..d86a0e64016 100644 --- a/doc/input-output-reference/src/overview/group-water-heaters.tex +++ b/doc/input-output-reference/src/overview/group-water-heaters.tex @@ -126,7 +126,7 @@ \subsubsection{Inputs}\label{inputs-052} \paragraph{Field: Heater Thermal Efficiency}\label{field-heater-thermal-efficiency} -The thermal conversion efficiency from fuel energy to heat energy for the heater element or burner. This is not the same as the overall efficiency of the water heater. +The thermal conversion efficiency (as a fraction) from fuel energy to heat energy for the heater element or burner. This is not the same as the overall efficiency of the water heater. Note that a thermal efficiency greater than 1.0 is allowed for special applications, but will generate a warning. \paragraph{Field: Part Load Factor Curve Name}\label{field-part-load-factor-curve-name} @@ -749,7 +749,7 @@ \subsubsection{Inputs}\label{inputs-1-049} \paragraph{Field: Heater Thermal Efficiency}\label{field-heater-thermal-efficiency-1} -The thermal conversion efficiency from fuel energy to heat energy for the heater element or burner (for both Heaters 1 and 2). This is not the same as the overall efficiency of the water heater. +The thermal conversion efficiency (as a fraction) from fuel energy to heat energy for the heater element or burner (for both Heaters 1 and 2). This is not the same as the overall efficiency of the water heater. Note that a thermal efficiency greater than 1.0 is allowed for special applications, but will generate a warning. \paragraph{Field: Off-Cycle Parasitic Fuel Consumption Rate}\label{field-off-cycle-parasitic-fuel-consumption-rate-1} diff --git a/doc/input-output-reference/src/overview/group-zone-forced-air-units.tex b/doc/input-output-reference/src/overview/group-zone-forced-air-units.tex index 45778edb650..2daad751ecc 100644 --- a/doc/input-output-reference/src/overview/group-zone-forced-air-units.tex +++ b/doc/input-output-reference/src/overview/group-zone-forced-air-units.tex @@ -2204,6 +2204,10 @@ \subsubsection{Inputs}\label{inputs-8-029} This numeric field defines the supply air flow rate leaving the air conditioner in cubic meters per second when neither cooling nor heating is required (i.e., DX coil and heater are off but the supply air fan operates). This field is only used when the air conditioner's supply air fan operating mode schedule specifies continuous fan operation. Values must be greater than or equal to zero, or this field is autosizable. If the air conditioner's supply air fan operating mode schedule specifies continuous fan operation and this value is set to zero or this field is left blank, then the model assumes that the supply air flow rate when no cooling/heating is needed is equal to the supply air flow rate when the cooling or heating coil was last operating (for cooling operation or heating operation). +\paragraph{Field: No Load Supply Air Flow Rate Control Set To Low Speed}\label{field-no-load-supply-air-flow-rate-control-set-to-low-speed-001} + +This alpha field defines whether the supply air flow rate leaving the air conditioner in cubic meters per second when neither cooling nor heating is required is set to the coil high speed or low speed air flow rate. The valid choices are Yes or No. The default value is Yes. If the coil type does not have multiple air flow rates then this field is not used. If Yes is selected and the coil air flow rate is autosized the No Load Supply Air Flow Rate is proportional to the number of speeds. + \paragraph{Field: Cooling Outdoor Air Flow Rate}\label{field-cooling-outdoor-air-flow-rate-001} This numeric field defines the outdoor air flow rate through the air conditioner in cubic meters per second when the DX cooling coil is operating. Values must be greater than or equal to 0, or this field is autosizable. Note that the Cooling Outdoor Air Flow Rate is fixed; it cannot change during the simulation. In addition, the Cooling Outdoor Air Flow Rate cannot be greater than the air conditioner's supply air volumetric flow rate during cooling operation. This field is set to zero flow when the PTAC is connected to an \textit{\hyperref[airterminalsingleductmixer]{AirTerminal:SingleDuct:Mixer}} object. @@ -2319,6 +2323,7 @@ \subsubsection{Inputs}\label{inputs-8-029} autosize, !- Cooling Supply Air Flow Rate {m3/s} autosize, !- Heating Supply Air Flow Rate operation {m3/s} autosize, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize, !- Cooling Outdoor Air Flow Rate {m3/s} autosize, !- Heating Outdoor Air Flow Rate {m3/s} autosize, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2551,6 +2556,10 @@ \subsubsection{Inputs}\label{inputs-9-026} This numeric field defines the supply air flow rate leaving the heat pump in cubic meters per second when neither cooling or heating is required (i.e., DX coils and supplemental heater are off but the supply air fan operates). This field is only used when the heat pump's supply air fan operating mode schedule specifies continuous fan operation. Values must be greater than or equal to zero, or this field is autosizable. If the heat pump's supply air fan operating mode schedule specifies continuous fan operation and this value is set to zero or this field is left blank, then the model assumes that the supply air flow rate when no cooling/heating is needed is equal to the supply air flow rate when the cooling or heating coil was last operating (for cooling operation or heating operation). +\paragraph{Field: No Load Supply Air Flow Rate Control Set To Low Speed}\label{field-no-load-supply-air-flow-rate-control-set-to-low-speed-002} + +This alpha field defines whether the supply air flow rate leaving the air conditioner in cubic meters per second when neither cooling nor heating is required is set to the coil high speed or low speed air flow rate. The valid choices are Yes or No. The default value is Yes. If the coil type does not have multiple air flow rates then this field is not used. If Yes is selected and the coil air flow rate is autosized the No Load Supply Air Flow Rate is proportional to the number of speeds. + \paragraph{Field: Cooling Outdoor Air Flow Rate}\label{field-cooling-outdoor-air-flow-rate-1} This numeric field defines the outdoor air flow rate through the heat pump in cubic meters per second when the DX cooling coil is operating. Values must be greater than or equal to 0, or this field is autosizable. Note that the Cooling Outdoor Air Flow Rate is fixed; it cannot change during the simulation. In addition, the Cooling Outdoor Air Flow Rate cannot be greater than the heat pump's supply air volumetric flow rate during cooling operation. @@ -2709,6 +2718,7 @@ \subsubsection{Inputs}\label{inputs-9-026} autosize, !- Cooling Supply Air Flow Rate {m3/s} autosize, !- Heating Supply Air Flow Rate {m3/s} autosize, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize, !- Cooling Outdoor Air Flow Rate {m3/s} autosize, !- Heating Outdoor Air Flow Rate {m3/s} autosize, !- No Load Outdoor Air Flow Rate {m3/s} @@ -3042,6 +3052,10 @@ \subsubsection{Inputs}\label{inputs-11-023} This numeric field defines the supply air flow rate leaving the heat pump in cubic meters per second when neither cooling or heating is required (i.e., DX coils and supplemental heater are off but the supply air fan operates). This field is only used when the heat pump's supply air fan operating mode schedule specifies continuous fan operation. Values must be greater than or equal to zero, or this field is autosizable. If the heat pump's supply air fan operating mode schedule specifies continuous fan operation and this value is set to zero or this field is left blank, then the model assumes that the supply air flow rate when no cooling/heating is needed is equal to the supply air flow rate when the cooling or heating coil was last operating (for cooling operation or heating operation). +\paragraph{Field: No Load Supply Air Flow Rate Control Set To Low Speed}\label{field-no-load-supply-air-flow-rate-control-set-to-low-speed-003} + +This alpha field defines whether the supply air flow rate leaving the air conditioner in cubic meters per second when neither cooling nor heating is required is set to the coil high speed or low speed air flow rate. The valid choices are Yes or No. The default value is Yes. If the coil type does not have multiple air flow rates then this field is not used. If Yes is selected and the coil air flow rate is autosized the No Load Supply Air Flow Rate is proportional to the number of speeds. + \paragraph{Field: Cooling Outdoor Air Flow Rate}\label{field-cooling-outdoor-air-flow-rate-2} This numeric field defines the outdoor air flow rate through the heat pump in cubic meters per second when the DX cooling coil is operating. Values must be greater than or equal to 0, or this field is autosizable. Note that the outside air flow rate during cooling operation is fixed; it cannot change during the simulation. In addition, the outside air flow rate during cooling operation cannot be greater than the heat pump's supply air flow rate during cooling operation. This input field is set to zero flow when the WaterToAirHeatPump is connected to an \textit{\hyperref[airterminalsingleductmixer]{AirTerminal:SingleDuct:Mixer}} object. @@ -3225,6 +3239,7 @@ \subsubsection{Inputs}\label{inputs-11-023} Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/doc/readthedocs/sphinx/quick_start/quick_start.rst b/doc/readthedocs/sphinx/quick_start/quick_start.rst index f53d481dbcd..793817d5461 100644 --- a/doc/readthedocs/sphinx/quick_start/quick_start.rst +++ b/doc/readthedocs/sphinx/quick_start/quick_start.rst @@ -161,7 +161,7 @@ reformat them. EnergyPlus produces a number of files that are unique to EnergyPlus, including: -#. **ESO** (**E** nergyPlus **S** tandard **O** utput): raw report variable ourput in text form. +#. **ESO** (**E** nergyPlus **S** tandard **O** utput): raw report variable output in text form. #. **SQL**: if requested in the input file, the output variables stored in SQLite format. This format is most often by interfaces as it is convenient for automatic use. #. **RDD** (**R** eport variable **D** ata **D** ictionary): list of output variables available from the run. @@ -447,7 +447,7 @@ features, and the following documents are installed in features: EnergyPlus Essentials - A longer introduction to the use of EnergyPlus, + This is a longer introduction to the use of EnergyPlus, including more background on the program itself and the ecosystem. It also provides some guidance as to how to determine what potential sources of errors @@ -465,7 +465,7 @@ Input Output Reference This document is a thorough description of the various input and output files related to EnergyPlus, the format of these files, and how the - files interact and interrelate + files interact and interrelate. Output Details and Examples While the Input Output Reference document touches diff --git a/doc/tools/create_changelog.py b/doc/tools/create_changelog.py index 80595a74254..088d1c15015 100755 --- a/doc/tools/create_changelog.py +++ b/doc/tools/create_changelog.py @@ -1,5 +1,5 @@ #!/usr/bin/python -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/doc/tools/example_file_objects.py b/doc/tools/example_file_objects.py index 6e78318cb79..f4beefd13dc 100755 --- a/doc/tools/example_file_objects.py +++ b/doc/tools/example_file_objects.py @@ -1,5 +1,5 @@ #!/usr/bin/python -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/doc/tools/example_file_summary.py b/doc/tools/example_file_summary.py index 96966094c6c..b60f86dfc76 100755 --- a/doc/tools/example_file_summary.py +++ b/doc/tools/example_file_summary.py @@ -1,5 +1,5 @@ #!/usr/bin/python -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/doc/tools/idd_parser_library.py b/doc/tools/idd_parser_library.py index 1d15485eedc..f9ee448355b 100644 --- a/doc/tools/idd_parser_library.py +++ b/doc/tools/idd_parser_library.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/doc/tools/idf_parser_library.py b/doc/tools/idf_parser_library.py index 8bf6df24918..c74d4131a00 100644 --- a/doc/tools/idf_parser_library.py +++ b/doc/tools/idf_parser_library.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/doc/tools/idf_summary_class.py b/doc/tools/idf_summary_class.py index 94d4d8f9281..dc650003ce8 100644 --- a/doc/tools/idf_summary_class.py +++ b/doc/tools/idf_summary_class.py @@ -1,5 +1,5 @@ #!/usr/bin/python -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/doc/tools/parse_ems_actuators.py b/doc/tools/parse_ems_actuators.py index b606440cde6..1405874c093 100644 --- a/doc/tools/parse_ems_actuators.py +++ b/doc/tools/parse_ems_actuators.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/doc/tools/parse_latex_log.py b/doc/tools/parse_latex_log.py index 47c23a8c747..4c41ecce83f 100644 --- a/doc/tools/parse_latex_log.py +++ b/doc/tools/parse_latex_log.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/doc/tools/parse_output_variables.py b/doc/tools/parse_output_variables.py index f27c9c09670..ac6feabb6ba 100755 --- a/doc/tools/parse_output_variables.py +++ b/doc/tools/parse_output_variables.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- @@ -213,13 +213,13 @@ def main(): file_contents = f.read() # first warn about commented lines - p = re.compile('//\s*SetupOutputVariable') + p = re.compile(r'//\s*SetupOutputVariable') matches = p.findall(file_contents) if len(matches) > 0: print("File %s contains commented SetupOutputVariable calls; output may be flawed" % file_name) - p = re.compile('SetupOutputVariable\([^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^;]*;') + p = re.compile(r'SetupOutputVariable\([^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^;]*;') matches = p.findall(file_contents) for match in matches: diff --git a/idd/CMakeLists.txt b/idd/CMakeLists.txt index da685824757..2ac3f52d12c 100644 --- a/idd/CMakeLists.txt +++ b/idd/CMakeLists.txt @@ -57,6 +57,8 @@ install(FILES "versions/V9-5-0-Energy+.idd" DESTINATION "PreProcess/IDFVersionUp install(FILES "versions/V9-6-0-Energy+.idd" DESTINATION "PreProcess/IDFVersionUpdater") install(FILES "versions/V22-1-0-Energy+.idd" DESTINATION "PreProcess/IDFVersionUpdater") install(FILES "versions/V22-2-0-Energy+.idd" DESTINATION "PreProcess/IDFVersionUpdater") +install(FILES "versions/V23-1-0-Energy+.idd" DESTINATION "PreProcess/IDFVersionUpdater") +install(FILES "versions/V23-2-0-Energy+.idd" DESTINATION "PreProcess/IDFVersionUpdater") # For fortran... set(PREVIOUS_IDD "${CMAKE_CURRENT_SOURCE_DIR}/versions/V${PREV_RELEASE_MAJOR}-${PREV_RELEASE_MINOR}-${PREV_RELEASE_PATCH}-Energy+.idd") diff --git a/idd/Energy+.idd.in b/idd/Energy+.idd.in index 24466299615..d5a2e920ff7 100644 --- a/idd/Energy+.idd.in +++ b/idd/Energy+.idd.in @@ -369,6 +369,7 @@ ! kgWater/kgDryAir ! kmol ! kmol/s +! umol/m2s ! m3/m3 ! micron ! minutes @@ -379,6 +380,7 @@ ! ppm ! rev/min ! s +! umol_m2s ! V ! VA ! W/m2, deg C or cd/m2 @@ -22669,6 +22671,77 @@ OtherEquipment, \retaincase \default General +IndoorLivingWall, + \memo Indoor greenery systems such as indoor living walls are panels of plants, which grow hydroponically or from substrates. + \memo The living wall structures can be either free-standing or attached to walls. + \memo The IndoorLivingWall module directly connects with inside surface heat balance, zone air heat balance, and zone air moisture balance. + A1 , \field Name + \required-field + \type alpha + A2, \field Surface Name + \required-field + \note Name of the wall partition where indoor green is located. + \type object-list + \object-list SurfaceNames + A3 , \field Schedule Name + \required-field + \type object-list + \object-list ScheduleNames + \note units in Schedule should be fraction applied to design level of other equipment, generally (0.0 - 1.0) + A4 , \field Evapotranspiration Calculation Method + \note Model selection for caclulating evapotranspiration of indoor greenery system. + \note This rate can also be actuated with user-defined calculations, see EMS application guide for actuator details. + \type choice + \key Penman-Monteith + \key Stanghellini + \default Penman-Monteith + A5 , \field Lighting Method + \note Three different methods are provided here (LED; Daylight; LED-Daylight) + \type choice + \key LED + \key Daylight + \key LED-Daylight + A6 , \field LED Intensity Schedule Name + \type object-list + \object-list ScheduleNames + A7 , \field Daylighting Control Name + \note If daylighting is used in the selected lighting methods (Daylight or LED-Daylight), + \note users should define an object of Daylighting:Control to obtain the daylighting illumance level + \note and an object for Daylighing:ReferencePoint for the daylighting sensor location in the thermal zone. + \note The name of the object of Daylighting:Controls should be specified in this field. + \type alpha + A8 , \field LED-Daylight Targeted Lighting Intensity Schedule Name + \note This field defines targeted LED intensity level for indoor living wall systems. + \note The schedule values can be any positive number representing targeted photosynthetic photon flux density (PPFD). + \note Based on the available daylighting, the required LED lighting level and power will be automatically adjusted to meet the targeted LED intensity level. + \type object-list + \object-list ScheduleNames + N1 , \field Total Leaf Area + \note The value is the one-sided leaf area of an indoor living wall. + \note Based on the users’ input, LAI is calculated as the ratio of the total leaf area and the partition wall area. + \note Typical LAIs are 1.0 for grass and 3.0 for bushes and shrubs. The maximum LAI is 2.0 for the IndoorLivingWall module in EnergyPlus. + \note If the calculated LAI is greater than 2.0, the maximum value of 2.0 is used for LAI in the simulation. + \units m2 + \type real + \ip-units ft2 + N2 , \field LED Nominal Intensity + \note The value represents photosynthetic photon flux density (PPFD) of LED grow light. + \note PPFD is measured in micro-mole per m2 per second (umol_m2s) which establishes exactly how many photosynthetically active radiation (PAR) photons are landing on a specific area. + \units umol_m2s + \type real + \ip-units umol_m2s + N3 , \field LED Nominal Power + \note This field defines nominal total LED power for an indoor living wall system. + \units W + \type real + \ip-units W + N4 ; \field Radiant Fraction of LED Lights + \note This field defines the fraction of radiation from LED lights + \type real + \minimum 0.0 + \maximum 1.0 + \default 0.6 + ElectricEquipment:ITE:AirCooled, \memo This object describes air-cooled electric information technology equipment (ITE) which has \memo variable power consumption as a function of loading and temperature. @@ -23357,7 +23430,7 @@ Daylighting:Controls, A12, \field Daylighting Reference Point 6 Name \type object-list \object-list DaylightReferencePointNames - N18, \field Fraction of Zone Controlled by Reference Point 6 + N18, \field Fraction of Lights Controlled by Reference Point 6 \type real \minimum 0.0 \maximum 1.0 @@ -23396,7 +23469,7 @@ Daylighting:Controls, A15, \field Daylighting Reference Point 9 Name \type object-list \object-list DaylightReferencePointNames - N24, \field Fraction of Zone Controlled by Reference Point 9 + N24, \field Fraction of Lights Controlled by Reference Point 9 \type real \minimum 0.0 \maximum 1.0 @@ -26470,6 +26543,8 @@ AirflowNetwork:Distribution:Component:Coil, \key Coil:Cooling:DX:MultiSpeed \key Coil:Heating:DX:MultiSpeed \key Coil:Heating:Desuperheater + \key Coil:Heating:Electric:MultiStage + \key Coil:Heating:Gas:MultiStage \note Select the type of coil corresponding to the name entered in the field above. N1 , \field Air Path Length \required-field @@ -28770,7 +28845,7 @@ HVACTemplate:Zone:Unitary, \object-list ZoneNames A2, \field Template Unitary System Name \required-field - \note Enter the name of an HVACTemplate:System:Unitary, HVACTemplate:System:UnitaryHeatPump:AirTtoAir, + \note Enter the name of an HVACTemplate:System:Unitary, HVACTemplate:System:UnitaryHeatPump:AirToAir, \note or HVACTemplate:System:UnitarySystem object serving this zone. \type object-list \object-list CompactHVACSystemUnitary @@ -35887,7 +35962,7 @@ ZoneHVAC:PackagedTerminalAirConditioner, \memo Packaged terminal air conditioner (PTAC). Forced-convection heating-cooling unit \memo with supply fan, direct expansion (DX) cooling coil, heating coil (gas, electric, hot \memo water, or steam) and fixed-position outdoor air mixer. - \min-fields 18 + \min-fields 19 A1, \field Name \required-field \type alpha @@ -35947,6 +36022,13 @@ ZoneHVAC:PackagedTerminalAirConditioner, \note This air flow rate is used when no heating or cooling is required and the cooling or \note heating coil is off. If this field is left blank or zero, the supply air flow rate \note from the previous on cycle (either cooling or heating) is used. + A7 , \field No Load Supply Air Flow Rate Control Set To Low Speed + \type choice + \key Yes + \key No + \default Yes + \note When Yes is selected the minimum air flow rate is used. + \note When No is selected the maximum air flow rate is used. N4 , \field Cooling Outdoor Air Flow Rate \required-field \type real @@ -35977,7 +36059,7 @@ ZoneHVAC:PackagedTerminalAirConditioner, \note from the previous on cycle (either cooling or heating) is used. \note This field is set to zero flow when the PTAC is connected to central \note dedicated outdoor air through air terminal single duct mixer object. - A7 , \field Supply Air Fan Object Type + A8 , \field Supply Air Fan Object Type \required-field \type choice \key Fan:SystemModel @@ -35986,13 +36068,13 @@ ZoneHVAC:PackagedTerminalAirConditioner, \note Fan:ConstantVolume only works when continuous fan operation is used the entire \note simulation (all supply air fan operating mode schedule values are greater than 0). \note If any fan operating mode schedule values are 0 a Fan:SystemModel or Fan:OnOff object must be used. - A8 , \field Supply Air Fan Name + A9 , \field Supply Air Fan Name \required-field \type object-list \object-list FansCVandOnOff \object-list FansSystemModel \note Needs to match in the fan object. - A9 , \field Heating Coil Object Type + A10, \field Heating Coil Object Type \required-field \type choice \key Coil:Heating:Fuel @@ -36000,12 +36082,12 @@ ZoneHVAC:PackagedTerminalAirConditioner, \key Coil:Heating:Water \key Coil:Heating:Steam \note Select the type of heating coil. - A10 , \field Heating Coil Name + A11, \field Heating Coil Name \required-field \type object-list \object-list HeatingCoilName \note Needs to match in the heating coil object. - A11, \field Cooling Coil Object Type + A12, \field Cooling Coil Object Type \required-field \type choice \key Coil:Cooling:DX @@ -36017,34 +36099,34 @@ ZoneHVAC:PackagedTerminalAirConditioner, \note Coil:Cooling:DX:SingleSpeed or \note CoilSystem:Cooling:DX:HeatExchangerAssisted or \note Coil:Cooling:DX:VariableSpeed. - A12, \field Cooling Coil Name + A13, \field Cooling Coil Name \required-field \type object-list \object-list CoolingCoilsDXSingleSpeed \object-list CoolingCoilsDXVariableSpeed \object-list CoilCoolingDX \note Needs to match a DX cooling coil object. - A13, \field Fan Placement + A14, \field Fan Placement \type choice \key BlowThrough \key DrawThrough \default DrawThrough \note Select fan placement as either blow through or draw through. - A14, \field Supply Air Fan Operating Mode Schedule Name + A15, \field Supply Air Fan Operating Mode Schedule Name \type object-list \object-list ScheduleNames \note Enter the name of a schedule that controls fan operation. Schedule Name values of 0 denote \note cycling fan operation (fan cycles with cooling or heating coil). Schedule Name values greater \note than 0 denote constant fan operation (fan runs continually regardless of coil operation). - A15, \field Availability Manager List Name + A16, \field Availability Manager List Name \note Enter the name of an AvailabilityManagerAssignmentList object. \type object-list \object-list SystemAvailabilityManagerLists - A16, \field Design Specification ZoneHVAC Sizing Object Name + A17, \field Design Specification ZoneHVAC Sizing Object Name \note Enter the name of a DesignSpecificationZoneHVACSizing object. \type object-list \object-list DesignSpecificationZoneHVACSizingName - A17, \field Capacity Control Method + A18, \field Capacity Control Method \type choice \key None \key SingleZoneVAV @@ -36069,7 +36151,7 @@ ZoneHVAC:PackagedTerminalHeatPump, \memo supply fan, direct expansion (DX) cooling coil, DX heating coil (air-to-air heat \memo pump), supplemental heating coil (gas, electric, hot water, or steam), and \memo fixed-position outdoor air mixer. - \min-fields 26 + \min-fields 27 A1, \field Name \required-field \type alpha @@ -36128,6 +36210,13 @@ ZoneHVAC:PackagedTerminalHeatPump, \note is used when no heating or cooling is required and the DX coil compressor is off. \note If this field is left blank or zero, the supply air flow rate from the previous \note on cycle (either cooling or heating) is used. + A7 , \field No Load Supply Air Flow Rate Control Set To Low Speed + \type choice + \key Yes + \key No + \default Yes + \note When Yes is selected the minimum air flow rate is used. + \note When No is selected the maximum air flow rate is used. N4 , \field Cooling Outdoor Air Flow Rate \required-field \type real @@ -36157,27 +36246,27 @@ ZoneHVAC:PackagedTerminalHeatPump, \note on cycle (either cooling or heating) is used. \note This field is set to zero flow when the PTHP is connected to central \note dedicated outdoor air through air terminal single duct mixer object. - A7 , \field Supply Air Fan Object Type + A8 , \field Supply Air Fan Object Type \required-field \type choice \key Fan:SystemModel \key Fan:OnOff \key Fan:ConstantVolume \note Fan:ConstantVolume only works with fan operating mode is continuous. - A8 , \field Supply Air Fan Name + A9 , \field Supply Air Fan Name \required-field \type object-list \object-list FansCVandOnOff \object-list FansSystemModel \note Needs to match a fan object. - A9 , \field Heating Coil Object Type + A10, \field Heating Coil Object Type \required-field \type choice \key Coil:Heating:DX:SingleSpeed \key Coil:Heating:DX:VariableSpeed \note Only works with Coil:Heating:DX:SingleSpeed or \note Coil:Heating:DX:VariableSpeed. - A10 , \field Heating Coil Name + A11, \field Heating Coil Name \required-field \type object-list \object-list HeatingCoilsDXSingleSpeed @@ -36189,7 +36278,7 @@ ZoneHVAC:PackagedTerminalHeatPump, \default 0.001 \units dimensionless \note Defines Heating convergence tolerance as a fraction of Heating load to be met. - A11, \field Cooling Coil Object Type + A12, \field Cooling Coil Object Type \required-field \type choice \key Coil:Cooling:DX @@ -36200,7 +36289,7 @@ ZoneHVAC:PackagedTerminalHeatPump, \note Coil:Cooling:DX:SingleSpeed or \note CoilSystem:Cooling:DX:HeatExchangerAssisted or \note Coil:Cooling:DX:VariableSpeed. - A12, \field Cooling Coil Name + A13, \field Cooling Coil Name \required-field \type object-list \object-list CoolingCoilsDXSingleSpeed @@ -36213,7 +36302,7 @@ ZoneHVAC:PackagedTerminalHeatPump, \default 0.001 \units dimensionless \note Defines Cooling convergence tolerance as a fraction of the Cooling load to be met. - A13, \field Supplemental Heating Coil Object Type + A14, \field Supplemental Heating Coil Object Type \required-field \type choice \key Coil:Heating:Fuel @@ -36221,7 +36310,7 @@ ZoneHVAC:PackagedTerminalHeatPump, \key Coil:Heating:Water \key Coil:Heating:Steam \note works with gas, electric, hot water and steam heating coil. - A14, \field Supplemental Heating Coil Name + A15, \field Supplemental Heating Coil Name \required-field \type object-list \object-list HeatingCoilName @@ -36238,28 +36327,28 @@ ZoneHVAC:PackagedTerminalHeatPump, \default 21.0 \units C \note Supplemental heater will not operate when outdoor temperature exceeds this value. - A15, \field Fan Placement + A16, \field Fan Placement \type choice \key BlowThrough \key DrawThrough \default DrawThrough \note Select fan placement as either blow through or draw through. - A16, \field Supply Air Fan Operating Mode Schedule Name + A17, \field Supply Air Fan Operating Mode Schedule Name \type object-list \object-list ScheduleNames \note Enter the name of a schedule that controls fan operation. Schedule values of 0 denote \note cycling fan operation (fan cycles with cooling or heating coil). Schedule Name values greater \note than 0 denote constant fan operation (fan runs continually regardless of coil operation). \note The fan operating mode defaults to cycling fan operation if this field is left blank. - A17, \field Availability Manager List Name + A18, \field Availability Manager List Name \note Enter the name of an AvailabilityManagerAssignmentList object. \type object-list \object-list SystemAvailabilityManagerLists - A18, \field Design Specification ZoneHVAC Sizing Object Name + A19, \field Design Specification ZoneHVAC Sizing Object Name \note Enter the name of a DesignSpecificationZoneHVACSizing object. \type object-list \object-list DesignSpecificationZoneHVACSizingName - A19, \field Capacity Control Method + A20, \field Capacity Control Method \type choice \key None \key SingleZoneVAV @@ -36283,7 +36372,7 @@ ZoneHVAC:WaterToAirHeatPump, \memo Water-to-air heat pump. Forced-convection heating-cooling unit with supply fan, \memo water-to-air cooling and heating coils, supplemental heating coil (gas, electric, hot \memo water, or steam), and fixed-position outdoor air mixer. - \min-fields 21 + \min-fields 22 A1, \field Name \required-field \type alpha @@ -36338,6 +36427,13 @@ ZoneHVAC:WaterToAirHeatPump, \note is used when no heating or cooling is required and the DX coil compressor is off. \note If this field is left blank or zero, the supply air flow rate from the previous \note on cycle (either cooling or heating) is used. + A7 , \field No Load Supply Air Flow Rate Control Set To Low Speed + \type choice + \key Yes + \key No + \default Yes + \note When Yes is selected the minimum air flow rate is used. + \note When No is selected the maximum air flow rate is used. N4 , \field Cooling Outdoor Air Flow Rate \required-field \type real @@ -36367,40 +36463,40 @@ ZoneHVAC:WaterToAirHeatPump, \note on cycle (either cooling or heating) is used. \note This field is set to zero flow when the PTHP is connected to central \note dedicated outdoor air through air terminal single duct mixer object. - A7, \field Supply Air Fan Object Type + A8, \field Supply Air Fan Object Type \required-field \type choice \key Fan:SystemModel \key Fan:OnOff - A8, \field Supply Air Fan Name + A9, \field Supply Air Fan Name \required-field \type object-list \object-list FansOnOff \object-list FansSystemModel \note Needs to match Fan:SystemModel or Fan:OnOff object - A9, \field Heating Coil Object Type + A10, \field Heating Coil Object Type \required-field \type choice \key Coil:Heating:WaterToAirHeatPump:EquationFit \key Coil:Heating:WaterToAirHeatPump:VariableSpeedEquationFit - A10, \field Heating Coil Name + A11, \field Heating Coil Name \required-field \type object-list \object-list HeatingCoilsWaterToAirHP \object-list HeatingCoilsWaterToAirVSHP \note Needs to match in the water-to-air heat pump heating coil object - A11, \field Cooling Coil Object Type + A12, \field Cooling Coil Object Type \required-field \type choice \key Coil:Cooling:WaterToAirHeatPump:EquationFit \key Coil:Cooling:WaterToAirHeatPump:VariableSpeedEquationFit - A12, \field Cooling Coil Name + A13, \field Cooling Coil Name \required-field \type object-list \object-list CoolingCoilsWaterToAirHP \object-list CoolingCoilsWaterToAirVSHP \note Needs to match in the water-to-air heat pump cooling coil object - A13, \field Supplemental Heating Coil Object Type + A14, \field Supplemental Heating Coil Object Type \required-field \type choice \key Coil:Heating:Fuel @@ -36408,7 +36504,7 @@ ZoneHVAC:WaterToAirHeatPump, \key Coil:Heating:Water \key Coil:Heating:Steam \note works with gas, electric, hot water and steam heating coils - A14, \field Supplemental Heating Coil Name + A15, \field Supplemental Heating Coil Name \required-field \type object-list \object-list HeatingCoilName @@ -36425,25 +36521,25 @@ ZoneHVAC:WaterToAirHeatPump, \maximum 21.0 \default 21.0 \units C - A15, \field Outdoor Dry-Bulb Temperature Sensor Node Name + A16, \field Outdoor Dry-Bulb Temperature Sensor Node Name \type node - A16, \field Fan Placement + A17, \field Fan Placement \type choice \key BlowThrough \key DrawThrough \default BlowThrough - A17, \field Supply Air Fan Operating Mode Schedule Name + A18, \field Supply Air Fan Operating Mode Schedule Name \type object-list \object-list ScheduleNames \note Enter the name of a schedule that controls fan operation. Schedule values of 0 denote \note cycling fan operation (fan cycles with cooling or heating coil). Schedule values greater \note than 0 denote constant fan operation (fan runs continually regardless of coil operation). \note The fan operating mode defaults to cycling fan operation if this field is left blank. - A18, \field Availability Manager List Name + A19, \field Availability Manager List Name \note Enter the name of an AvailabilityManagerAssignmentList object. \type object-list \object-list SystemAvailabilityManagerLists - A19, \field Heat Pump Coil Water Flow Mode + A20, \field Heat Pump Coil Water Flow Mode \type choice \key Constant \key Cycling @@ -36453,15 +36549,15 @@ ZoneHVAC:WaterToAirHeatPump, \note Constant results in 100% water flow regardless of compressor PLR \note Cycling results in water flow that matches compressor PLR \note ConstantOnDemand results in 100% water flow whenever the coil is on, but is 0% whenever the coil has no load - A20, \field Design Specification ZoneHVAC Sizing Object Name + A21, \field Design Specification ZoneHVAC Sizing Object Name \note Enter the name of a DesignSpecificationZoneHVACSizing object. \type object-list \object-list DesignSpecificationZoneHVACSizingName - A21, \field Design Specification Multispeed Object Type + A22, \field Design Specification Multispeed Object Type \type choice \key UnitarySystemPerformance:Multispeed \note Enter the type of performance specification object used to describe the multispeed coil or fan. - A22; \field Design Specification Multispeed Object Name + A23; \field Design Specification Multispeed Object Name \type object-list \object-list UnitarySystemPerformanceNames \note The name of the performance specification object used to describe the multispeed coil or fan. @@ -62613,37 +62709,13 @@ HeatExchanger:AirToAir:SensibleAndLatent, \minimum 0.0 \maximum 1.0 \default 0.0 - N4, \field Sensible Effectiveness at 75% Heating Air Flow - \type real - \units dimensionless - \minimum 0.0 - \maximum 1.0 - \default 0.0 - N5, \field Latent Effectiveness at 75% Heating Air Flow - \type real - \units dimensionless - \minimum 0.0 - \maximum 1.0 - \default 0.0 - N6, \field Sensible Effectiveness at 100% Cooling Air Flow - \type real - \units dimensionless - \minimum 0.0 - \maximum 1.0 - \default 0.0 - N7, \field Latent Effectiveness at 100% Cooling Air Flow + N4, \field Sensible Effectiveness at 100% Cooling Air Flow \type real \units dimensionless \minimum 0.0 \maximum 1.0 \default 0.0 - N8, \field Sensible Effectiveness at 75% Cooling Air Flow - \type real - \units dimensionless - \minimum 0.0 - \maximum 1.0 - \default 0.0 - N9, \field Latent Effectiveness at 75% Cooling Air Flow + N5, \field Latent Effectiveness at 100% Cooling Air Flow \type real \units dimensionless \minimum 0.0 @@ -62661,7 +62733,7 @@ HeatExchanger:AirToAir:SensibleAndLatent, A6, \field Exhaust Air Outlet Node Name \required-field \type node - N10,\field Nominal Electric Power + N6, \field Nominal Electric Power \type real \units W \ip-units W @@ -62684,14 +62756,14 @@ HeatExchanger:AirToAir:SensibleAndLatent, \key ExhaustOnly \key MinimumExhaustTemperature \default None - N11,\field Threshold Temperature + N7, \field Threshold Temperature \type real \units C \default 1.7 \note Supply (outdoor) air inlet temp threshold for exhaust air recirculation and \note exhaust only frost control types. Exhaust air outlet threshold Temperature for \note minimum exhaust temperature frost control type. - N12,\field Initial Defrost Time Fraction + N8, \field Initial Defrost Time Fraction \type real \units dimensionless \minimum 0.0 @@ -62699,20 +62771,44 @@ HeatExchanger:AirToAir:SensibleAndLatent, \default 0.083 \note Fraction of the time when frost control will be invoked at the threshold temperature. \note This field only used for exhaust air recirc and exhaust-only frost control types. - N13,\field Rate of Defrost Time Fraction Increase + N9, \field Rate of Defrost Time Fraction Increase \type real \units 1/K \minimum 0.0 \default 0.012 \note Rate of increase in defrost time fraction as actual temp falls below threshold temperature. \note This field only used for exhaust air recirc and exhaust-only frost control types. - A10;\field Economizer Lockout + A10,\field Economizer Lockout \type choice \key Yes \key No \default Yes \note Yes means that the heat exchanger will be locked out (off) \note when the economizer is operating or high humidity control is active + A11,\field Sensible Effectiveness of Heating Air Flow Curve Name + \note optional + \note if this field has value, then the sensivle effectiveness for heating + \note will be the value in N2 multiplied by this curve value + \type object-list + \object-list UnivariateFunctions + A12,\field Latent Effectiveness of Heating Air Flow Curve Name + \note optional + \note if this field has value, then the latent effectiveness for heating + \note will be the value in N3 multiplied by this curve value + \type object-list + \object-list UnivariateFunctions + A13,\field Sensible Effectiveness of Cooling Air Flow Curve Name + \note optional + \note if this field has value, then the sensivle effectiveness for cooling + \note will be the value in N4 multiplied by this curve value + \type object-list + \object-list UnivariateFunctions + A14;\field Latent Effectiveness of Cooling Air Flow Curve Name + \note optional + \note if this field has value, then the latent effectiveness for cooling + \note will be the value in N5 multiplied by this curve value + \type object-list + \object-list UnivariateFunctions HeatExchanger:Desiccant:BalancedFlow, \memo This object models a balanced desiccant heat exchanger. @@ -63393,6 +63489,14 @@ AirLoopHVAC:UnitarySystem, \minimum 0.0 \note Enter the supply air volume flow rate as a fraction of the heating capacity. \note Required field when No Load Supply Air Flow Rate Method is FlowPerHeatingCapacity. + A23, \field No Load Supply Air Flow Rate Control Set To Low Speed + \type choice + \key Yes + \key No + \default Yes + \note This field is not used when Design Specification Multispeed Object Type input is present + \note When Yes is selected the minimum air flow rate is used. + \note When No is selected the maximum air flow rate is used. N17, \field Maximum Supply Air Temperature \type real \units C @@ -63405,7 +63509,7 @@ AirLoopHVAC:UnitarySystem, \units C \default 21.0 \note Enter the maximum outdoor dry-bulb temperature for supplemental heater operation. - A23, \field Outdoor Dry-Bulb Temperature Sensor Node Name + A24, \field Outdoor Dry-Bulb Temperature Sensor Node Name \type node \note If this field is blank, outdoor temperature from the weather file is used. \note If this field is not blank, the node name specified determines the outdoor temperature used @@ -63437,17 +63541,17 @@ AirLoopHVAC:UnitarySystem, \minimum 0.0 \default 80.0 \note Enter the maximum heat recovery inlet temperature allowed for heat recovery. - A24, \field Heat Recovery Water Inlet Node Name + A25, \field Heat Recovery Water Inlet Node Name \type node \note Enter the name of the heat recovery water inlet node if plant water loop connections are present. - A25, \field Heat Recovery Water Outlet Node Name + A26, \field Heat Recovery Water Outlet Node Name \type node \note Enter the name of the heat recovery water outlet node if plant water loop connections are present. - A26, \field Design Specification Multispeed Object Type + A27, \field Design Specification Multispeed Object Type \type choice \key UnitarySystemPerformance:Multispeed \note Enter the type of performance specification object used to describe the multispeed coil. - A27; \field Design Specification Multispeed Object Name + A28; \field Design Specification Multispeed Object Name \type object-list \object-list UnitarySystemPerformanceNames \note The name of the performance specification object used to describe the multispeed coil. @@ -72779,7 +72883,6 @@ Boiler:HotWater, \required-field \type real \minimum> 0.0 - \maximum 1.0 \note Based on the higher heating value of fuel. A3 , \field Efficiency Curve Temperature Evaluation Variable \type choice @@ -79886,7 +79989,6 @@ WaterHeater:Mixed, \required-field \type real \minimum> 0.0 - \maximum 1.0 A5 , \field Part Load Factor Curve Name \type object-list \object-list UnivariateFunctions @@ -80151,7 +80253,6 @@ WaterHeater:Stratified, \required-field \type real \minimum> 0.0 - \maximum 1.0 N12, \field Off Cycle Parasitic Fuel Consumption Rate \type real \units W @@ -84849,9 +84950,17 @@ ZoneHVAC:ForcedAir:UserDefined, A2 , \field Overall Model Simulation Program Calling Manager Name \type object-list \object-list ProgramNames + \note For use with the API (Library, Callback) workflow, this field should be the same string that the user + \note provides when registering a callback function using the API. In this workflow, the callback name is not entered + \note elsewhere in the IDF, so the object-list will not include this user-specified function identifier. This will + \note cause a warning when editing this field in IDF-Editor. A3 , \field Model Setup and Sizing Program Calling Manager Name \type object-list \object-list ProgramNames + \note For use with the API (Library, Callback) workflow, this field should be the same string that the user + \note provides when registering a callback function using the API. In this workflow, the callback name is not entered + \note elsewhere in the IDF, so the object-list will not include this user-specified function identifier. This will + \note cause a warning when editing this field in IDF-Editor. A4 , \field Primary Air Inlet Node Name \required-field \type node @@ -84910,9 +85019,17 @@ AirTerminal:SingleDuct:UserDefined, A2 , \field Overall Model Simulation Program Calling Manager Name \type object-list \object-list ProgramNames + \note For use with the API (Library, Callback) workflow, this field should be the same string that the user + \note provides when registering a callback function using the API. In this workflow, the callback name is not entered + \note elsewhere in the IDF, so the object-list will not include this user-specified function identifier. This will + \note cause a warning when editing this field in IDF-Editor. A3 , \field Model Setup and Sizing Program Calling Manager Name \type object-list \object-list ProgramNames + \note For use with the API (Library, Callback) workflow, this field should be the same string that the user + \note provides when registering a callback function using the API. In this workflow, the callback name is not entered + \note elsewhere in the IDF, so the object-list will not include this user-specified function identifier. This will + \note cause a warning when editing this field in IDF-Editor. A4 , \field Primary Air Inlet Node Name \required-field \type node @@ -84971,6 +85088,12 @@ Coil:UserDefined, A2 , \field Overall Model Simulation Program Calling Manager Name \type object-list \object-list ProgramNames + \note This is the name of a program to run that defines the user-defined functionality for this component. + \note This can match the name of an EnergyManagementSystem:Program or PythonPlugin:Instance object as defined in the input file. + \note For use with the API (Library, Callback) workflow, this field should be the same string that the user + \note provides when registering a callback function using the API. In this workflow, the callback name is not entered + \note elsewhere in the IDF, so the object-list will not include this user-specified function identifier. This will + \note cause a warning when editing this field in IDF-Editor. A3 , \field Model Setup and Sizing Program Calling Manager Name \type object-list \object-list ProgramNames @@ -85032,6 +85155,10 @@ PlantComponent:UserDefined, A2 , \field Main Model Program Calling Manager Name \type object-list \object-list ProgramNames + \note For use with the API (Library, Callback) workflow, this field should be the same string that the user + \note provides when registering a callback function using the API. In this workflow, the callback name is not entered + \note elsewhere in the IDF, so the object-list will not include this user-specified function identifier. This will + \note cause a warning when editing this field in IDF-Editor. N1 , \field Number of Plant Loop Connections \type integer \minimum 1 @@ -85060,9 +85187,17 @@ PlantComponent:UserDefined, A7 , \field Plant Connection 1 Initialization Program Calling Manager Name \type object-list \object-list ProgramNames + \note For use with the API (Library, Callback) workflow, this field should be the same string that the user + \note provides when registering a callback function using the API. In this workflow, the callback name is not entered + \note elsewhere in the IDF, so the object-list will not include this user-specified function identifier. This will + \note cause a warning when editing this field in IDF-Editor. A8 ,\field Plant Connection 1 Simulation Program Calling Manager Name \type object-list \object-list ProgramNames + \note For use with the API (Library, Callback) workflow, this field should be the same string that the user + \note provides when registering a callback function using the API. In this workflow, the callback name is not entered + \note elsewhere in the IDF, so the object-list will not include this user-specified function identifier. This will + \note cause a warning when editing this field in IDF-Editor. A9 , \field Plant Connection 2 Inlet Node Name \type node A10, \field Plant Connection 2 Outlet Node Name @@ -106352,6 +106487,7 @@ OutputControl:Table:Style, \key JtoMJ \key JtoGJ \key InchPound + \key InchPoundExceptElectricity \default None OutputControl:ReportingTolerances, @@ -106941,6 +107077,7 @@ Output:SQLite, \key JtoMJ \key JtoGJ \key InchPound + \key InchPoundExceptElectricity \default UseOutputControlTableStyle Output:EnvironmentalImpactFactors, diff --git a/idd/schema/generate_epJSON_schema.py b/idd/schema/generate_epJSON_schema.py index de430798287..53e7eb8cc20 100644 --- a/idd/schema/generate_epJSON_schema.py +++ b/idd/schema/generate_epJSON_schema.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/idd/schema/idd_parser.py b/idd/schema/idd_parser.py index c65a3a222a7..893218e3a78 100644 --- a/idd/schema/idd_parser.py +++ b/idd/schema/idd_parser.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- @@ -805,7 +805,7 @@ def next_token(data): return TOKEN_UNITS return TOKEN_NONE - elif c.isalpha() or c in '-:.#/\[]{}_@$%^&*()|+=<>?\'"~': + elif c.isalpha() or c in r'-:.#/\[]{}_@$%^&*()|+=<>?\'"~': if c == 'A': if parse_number(data) is not None: return TOKEN_A diff --git a/idd/schema/modify_schema.py b/idd/schema/modify_schema.py index e20e60e3267..b93173cf8e4 100644 --- a/idd/schema/modify_schema.py +++ b/idd/schema/modify_schema.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/idd/schema/test_idd_parser.py b/idd/schema/test_idd_parser.py index 74ebdd3e525..5a330f35786 100644 --- a/idd/schema/test_idd_parser.py +++ b/idd/schema/test_idd_parser.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/performance_tests/15zonePTAC.idf b/performance_tests/15zonePTAC.idf index 99da1480b36..609f1e96e23 100644 --- a/performance_tests/15zonePTAC.idf +++ b/performance_tests/15zonePTAC.idf @@ -2031,6 +2031,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2540,6 +2541,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -3049,6 +3051,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -3558,6 +3561,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -4067,6 +4071,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -4576,6 +4581,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -5085,6 +5091,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -5594,6 +5601,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -6103,6 +6111,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -6612,6 +6621,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -7121,6 +7131,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -7630,6 +7641,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -8118,6 +8130,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -8572,6 +8585,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -9060,6 +9074,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/performance_tests/30zonePTAC.idf b/performance_tests/30zonePTAC.idf index 3084302e18b..06e11e3e4bc 100644 --- a/performance_tests/30zonePTAC.idf +++ b/performance_tests/30zonePTAC.idf @@ -2031,6 +2031,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2540,6 +2541,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -3049,6 +3051,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -3558,6 +3561,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -4067,6 +4071,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -4576,6 +4581,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -5085,6 +5091,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -5594,6 +5601,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -6103,6 +6111,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -6612,6 +6621,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -7121,6 +7131,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -7630,6 +7641,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -8139,6 +8151,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -8648,6 +8661,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -9157,6 +9171,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -9666,6 +9681,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -10175,6 +10191,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -10684,6 +10701,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -11193,6 +11211,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -11702,6 +11721,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -12211,6 +12231,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -12720,6 +12741,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -13229,6 +13251,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -13738,6 +13761,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -14226,6 +14250,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -14714,6 +14739,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -15168,6 +15194,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -15622,6 +15649,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -16110,6 +16138,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -16598,6 +16627,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/performance_tests/45zonePTAC.idf b/performance_tests/45zonePTAC.idf index 589632c96f2..4df06dea1cb 100644 --- a/performance_tests/45zonePTAC.idf +++ b/performance_tests/45zonePTAC.idf @@ -2031,6 +2031,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2540,6 +2541,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -3049,6 +3051,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -3558,6 +3561,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -4067,6 +4071,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -4576,6 +4581,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -5085,6 +5091,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -5594,6 +5601,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -6103,6 +6111,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -6612,6 +6621,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -7121,6 +7131,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -7630,6 +7641,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -8139,6 +8151,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -8648,6 +8661,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -9157,6 +9171,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -9666,6 +9681,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -10175,6 +10191,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -10684,6 +10701,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -11193,6 +11211,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -11702,6 +11721,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -12211,6 +12231,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -12720,6 +12741,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -13229,6 +13251,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -13738,6 +13761,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -14247,6 +14271,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -14756,6 +14781,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -15265,6 +15291,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -15774,6 +15801,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -16283,6 +16311,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -16792,6 +16821,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -17301,6 +17331,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -17810,6 +17841,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18319,6 +18351,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18828,6 +18861,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19337,6 +19371,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19846,6 +19881,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -20334,6 +20370,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -20822,6 +20859,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21310,6 +21348,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21764,6 +21803,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -22218,6 +22258,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -22672,6 +22713,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -23160,6 +23202,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -23648,6 +23691,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -24136,6 +24180,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/performance_tests/PipingSystem_Underground_FHX.idf b/performance_tests/PipingSystem_Underground_FHX.idf index 3e107c8fde2..1fafe2e73ad 100644 --- a/performance_tests/PipingSystem_Underground_FHX.idf +++ b/performance_tests/PipingSystem_Underground_FHX.idf @@ -812,6 +812,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -1031,6 +1032,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000000..9968de6fe52 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +# requirements for building an EnergyPlus wheel +wheel \ No newline at end of file diff --git a/scripts/dev/analyze_state.py b/scripts/dev/analyze_state.py index d0b726aac1f..f77390509be 100755 --- a/scripts/dev/analyze_state.py +++ b/scripts/dev/analyze_state.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/scripts/dev/api_debug_helper.py b/scripts/dev/api_debug_helper.py new file mode 100644 index 00000000000..64e7e4dd153 --- /dev/null +++ b/scripts/dev/api_debug_helper.py @@ -0,0 +1,104 @@ +#!/usr/bin/env python3 +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University +# of Illinois, The Regents of the University of California, through Lawrence +# Berkeley National Laboratory (subject to receipt of any required approvals +# from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- +# Battelle, Alliance for Sustainable Energy, LLC, and other contributors. All +# rights reserved. +# +# NOTICE: This Software was developed under funding from the U.S. Department of +# Energy and the U.S. Government consequently retains certain rights. As such, +# the U.S. Government has been granted for itself and others acting on its +# behalf a paid-up, nonexclusive, irrevocable, worldwide license in the +# Software to reproduce, distribute copies to the public, prepare derivative +# works, and perform publicly and display publicly, and to permit others to do +# so. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# (1) Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# (2) Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# (3) Neither the name of the University of California, Lawrence Berkeley +# National Laboratory, the University of Illinois, U.S. Dept. of Energy nor +# the names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# (4) Use of EnergyPlus(TM) Name. If Licensee (i) distributes the software in +# stand-alone form without changes from the version obtained under this +# License, or (ii) Licensee makes a reference solely to the software +# portion of its product, Licensee must refer to the software as +# "EnergyPlus version X" software, where "X" is the version number Licensee +# obtained under this License and may not use a different name for the +# software. Except as specifically required in this Section (4), Licensee +# shall not use in a company name, a product name, in advertising, +# publicity, or other promotional activities any name, trade name, +# trademark, logo, or other designation of "EnergyPlus", "E+", "e+" or +# confusingly similar designation, without the U.S. Department of Energy's +# prior written consent. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +# This is just a small script that allows for easily running EnergyPlus for API calling debugging purposes +# It is currently set up for a Unix-ish environment, but could be adapted for all platforms +# To start debugging, follow these simple steps +# - You probably want to run from within a Python venv, so that you can quickly install custom dependencies. +# To do that, just run `python -m venv /path/to/venv` +# Then activate it with `. /path/to/venv/bin/activate` +# Then pip install whatever you want with `pip install something` or `pip install -r requirements.txt` +# - Next prepare this file, setting the build directory, products directory, and IDF to test +# - Next prepare the build folder, make sure cmake is set up and run and it builds OK already +# - Now run the debugger by simply passing the Python binary to it: `gdb /path/to/venv/bin/python` +# - Inside the debugger, you set the command line args to run this file with `set args /path/to/this/file.py` +# - You can try to immediately run and see what happens by entering `r`, it should run EnergyPlus straight through +# - You can add breakpoints at any time, like `break SimulationManager.cc:188`, though it may ask you to confirm +# - You can change the E+ code in this repo, kill the current Python run with `k`, and then re-run this script with `r` +# Because this script starts with a make command, it will then build the updated code before trying to call the API +# This allows for rapid debugging iteration + +from os import cpu_count +from pathlib import Path +from subprocess import check_call +from sys import exit, path +from tempfile import mkdtemp + +repo_root = Path(__file__).resolve().parent.parent.parent +build_dir = repo_root / 'builds' / 'r' +products_dir = build_dir / 'Products' +file_to_run = repo_root / 'testfiles' / 'PythonPluginCustomOutputVariable.idf' + +# this will automatically build E+ each run, so you can quickly make changes and re-execute inside the debugger +check_call(['make', '-j', str(cpu_count() - 2), 'energyplus'], cwd=str(build_dir)) + +path.insert(0, str(products_dir)) +from pyenergyplus.api import EnergyPlusAPI + +api = EnergyPlusAPI() +state = api.state_manager.new_state() +run_dir = mkdtemp() +print(f"EnergyPlus starting with outputs in directory: {run_dir}") +return_value = api.runtime.run_energyplus( + state, [ + '-d', + run_dir, + '-D', + str(file_to_run) + ] +) +print(f"EnergyPlus finished with outputs in directory: {run_dir}") +exit(return_value) diff --git a/scripts/dev/change_version.py b/scripts/dev/change_version.py index d8277ef0373..2a15746993a 100755 --- a/scripts/dev/change_version.py +++ b/scripts/dev/change_version.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/scripts/dev/check_constexpr.py b/scripts/dev/check_constexpr.py index 8acb52efde9..2557e6daca7 100644 --- a/scripts/dev/check_constexpr.py +++ b/scripts/dev/check_constexpr.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/scripts/dev/check_for_bom_in_idfs.py b/scripts/dev/check_for_bom_in_idfs.py index d83270dd980..e29ec7311dd 100755 --- a/scripts/dev/check_for_bom_in_idfs.py +++ b/scripts/dev/check_for_bom_in_idfs.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/scripts/dev/check_for_c_style_comments.py b/scripts/dev/check_for_c_style_comments.py index 2d5e257542c..57c9a794ae2 100644 --- a/scripts/dev/check_for_c_style_comments.py +++ b/scripts/dev/check_for_c_style_comments.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/scripts/dev/check_for_enum_scope_usage.py b/scripts/dev/check_for_enum_scope_usage.py index 5dfaa7018a4..73653bbc3e5 100755 --- a/scripts/dev/check_for_enum_scope_usage.py +++ b/scripts/dev/check_for_enum_scope_usage.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/scripts/dev/check_for_malformed_enums.py b/scripts/dev/check_for_malformed_enums.py index ad55eb53b63..86f0e252d3b 100644 --- a/scripts/dev/check_for_malformed_enums.py +++ b/scripts/dev/check_for_malformed_enums.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- @@ -143,7 +143,7 @@ def process_enum_str(input_str: str, file_name: str, line_no: int, print_errors: # check for "unknown" in names if "UNKNOWN" in keys_uc: # exceptions listed by : - exceptions = ["OutputProcessor.hh:Unit"] + exceptions = ["DataGlobalConstants.hh:Units"] if f"{file_name}:{name}" not in exceptions: error_str += "\tUNKNOWN in enum names\n" @@ -162,12 +162,14 @@ def process_enum_str(input_str: str, file_name: str, line_no: int, print_errors: if any([str(x[0]).islower() for x in keys]): # exceptions listed by : - exceptions = ["FileSystem.hh:FileTypes", "OutputProcessor.hh:Unit"] + exceptions = ["FileSystem.hh:FileTypes", "DataGlobalConstants.hh:Units"] if f"{file_name}:{name}" not in exceptions: error_str += "\tenum keys must begin with upper case letter\n" if difflib.get_close_matches(name, keys, cutoff=0.7): - error_str += "\tenum keys are too similar to enum name\n" + exceptions = ["DataGlobalConstants.hh:HeatOrCool"] + if f"{file_name}:{name}" not in exceptions: + error_str += "\tenum keys are too similar to enum name\n" # # check for non-allowed enum values # if any([x != -1 for x in values if type(x) == int]): diff --git a/scripts/dev/check_for_switch_case_parentheses.py b/scripts/dev/check_for_switch_case_parentheses.py index 8329a36d1f4..3b7b9b5338c 100644 --- a/scripts/dev/check_for_switch_case_parentheses.py +++ b/scripts/dev/check_for_switch_case_parentheses.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/scripts/dev/check_for_tabs.py b/scripts/dev/check_for_tabs.py index 5b3fe1836c6..d4df5a39475 100755 --- a/scripts/dev/check_for_tabs.py +++ b/scripts/dev/check_for_tabs.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/scripts/dev/check_format_strings.py b/scripts/dev/check_format_strings.py index 96a579772f1..03de2f98594 100644 --- a/scripts/dev/check_format_strings.py +++ b/scripts/dev/check_format_strings.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/scripts/dev/check_non_utf8.py b/scripts/dev/check_non_utf8.py index fc7825d3f70..a8f3e8ea651 100755 --- a/scripts/dev/check_non_utf8.py +++ b/scripts/dev/check_non_utf8.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/scripts/dev/check_stray_fields_in_idd.py b/scripts/dev/check_stray_fields_in_idd.py index 0fa95f72079..fda6051d030 100755 --- a/scripts/dev/check_stray_fields_in_idd.py +++ b/scripts/dev/check_stray_fields_in_idd.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/scripts/dev/clear_coverage_results.py b/scripts/dev/clear_coverage_results.py index 6058542bf44..1a0e9354dbe 100644 --- a/scripts/dev/clear_coverage_results.py +++ b/scripts/dev/clear_coverage_results.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/scripts/dev/compare_output_reports.py b/scripts/dev/compare_output_reports.py index 0bdeab30bf2..da384d0cc43 100644 --- a/scripts/dev/compare_output_reports.py +++ b/scripts/dev/compare_output_reports.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/scripts/dev/find_byref_bool_override.py b/scripts/dev/find_byref_bool_override.py index 9535c74ba34..31cc542baf1 100755 --- a/scripts/dev/find_byref_bool_override.py +++ b/scripts/dev/find_byref_bool_override.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/scripts/dev/find_included_cc_files.py b/scripts/dev/find_included_cc_files.py index abae71450ab..4b832553121 100755 --- a/scripts/dev/find_included_cc_files.py +++ b/scripts/dev/find_included_cc_files.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/scripts/dev/license-check.py b/scripts/dev/license-check.py index 52f1eb00bb3..a4d0357d439 100755 --- a/scripts/dev/license-check.py +++ b/scripts/dev/license-check.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/scripts/dev/license-update.py b/scripts/dev/license-update.py index 1319fc83ad0..7128e183487 100755 --- a/scripts/dev/license-update.py +++ b/scripts/dev/license-update.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/scripts/dev/licensetext.py b/scripts/dev/licensetext.py index 466031b2347..e658a5010b2 100644 --- a/scripts/dev/licensetext.py +++ b/scripts/dev/licensetext.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- @@ -63,7 +63,7 @@ # # The previous year that is in the license. It should be a string # -_previous_year = '2022' +_previous_year = '2023' # # From file "EnergyPlus License DRAFT 112015 100 fixed.txt" # diff --git a/scripts/dev/update_nist_escalation.py b/scripts/dev/update_nist_escalation.py index 7cfcbef72e4..c5b51c54354 100644 --- a/scripts/dev/update_nist_escalation.py +++ b/scripts/dev/update_nist_escalation.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/scripts/dev/validate_idd_units.py b/scripts/dev/validate_idd_units.py index 72194287860..8c54aa8e125 100755 --- a/scripts/dev/validate_idd_units.py +++ b/scripts/dev/validate_idd_units.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/scripts/dev/verify_cmake_dirs.py b/scripts/dev/verify_cmake_dirs.py index 6b1a311aa8a..953b43e6436 100755 --- a/scripts/dev/verify_cmake_dirs.py +++ b/scripts/dev/verify_cmake_dirs.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/scripts/dev/verify_file_encodings.py b/scripts/dev/verify_file_encodings.py index d30f3fbcaec..5d792353d3b 100755 --- a/scripts/dev/verify_file_encodings.py +++ b/scripts/dev/verify_file_encodings.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/scripts/dev/verify_idfs_in_cmake.py b/scripts/dev/verify_idfs_in_cmake.py index 60e87158375..2c48a107401 100755 --- a/scripts/dev/verify_idfs_in_cmake.py +++ b/scripts/dev/verify_idfs_in_cmake.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- @@ -69,22 +69,27 @@ contents = f.read() matches = re.findall(r'\(([^)]+)\)', contents, re.MULTILINE) for match in matches: - if 'IDF_FILE' not in match: - continue - cleaned_match = match.replace('\n', '') - tokens = cleaned_match.split() # special case that allows multiple whitespace delimiters - filename = tokens[1] - cmake_list_idf_files.add(filename) + if 'IDF_FILE' in match: + cleaned_match = match.replace('\n', '') + tokens = cleaned_match.split() # special case that allows multiple whitespace delimiters + filename = tokens[1] + cmake_list_idf_files.add(filename) + elif 'PYTHON_FILE' in match: # API-based IDF runs + cleaned_match = match.replace('\n', '') + tokens = cleaned_match.split() # special case that allows multiple whitespace delimiters + filename = tokens[1] + filename = 'API/' + filename.replace('.py', '.idf') # assuming the file is named the same as the py file + cmake_list_idf_files.add(filename) found_idf_files = set() for root, dirs, files in os.walk(test_files_dir): - for sfile in files: - if sfile.endswith('.idf') or sfile.endswith('.imf'): + for s_file in files: + if s_file.endswith('.idf') or s_file.endswith('.imf'): if root == test_files_dir: - found_idf_files.add(sfile) + found_idf_files.add(s_file) else: folder = os.path.basename(os.path.normpath(root)) - found_idf_files.add(os.path.join(folder, sfile)) + found_idf_files.add(os.path.join(folder, s_file)) # there are a few files we purposely skip files_to_skip = {"_1a-Long0.0.idf", "_ExternalInterface-actuator.idf", "_ExternalInterface-schedule.idf", @@ -92,8 +97,8 @@ "HVAC3ZoneGeometry.imf", "HVAC3ZoneMat-Const.imf"} found_idf_files_trimmed = found_idf_files - files_to_skip -# the CMakeLists file will always have forward slashes -# on Linux and Mac, the found_idfs will also have forward slashes +# the CMakeLists file will always have "forward" slashes +# on Linux and Mac, the list of found IDFs will also have "forward" slashes # but on Windows, the path delimiter will be a backslash # so replace all backslashes here before comparing anything. found_idf_files_refined = set() diff --git a/scripts/diagnostics/afn_auditor.py b/scripts/diagnostics/afn_auditor.py index 27df199e200..b81dd0b0b0e 100644 --- a/scripts/diagnostics/afn_auditor.py +++ b/scripts/diagnostics/afn_auditor.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/scripts/diagnostics/auditor.py b/scripts/diagnostics/auditor.py index a1b07c488a9..6df7cee13cd 100644 --- a/scripts/diagnostics/auditor.py +++ b/scripts/diagnostics/auditor.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/setup.py b/setup.py new file mode 100644 index 00000000000..2db904ed868 --- /dev/null +++ b/setup.py @@ -0,0 +1,235 @@ +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University +# of Illinois, The Regents of the University of California, through Lawrence +# Berkeley National Laboratory (subject to receipt of any required approvals +# from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- +# Battelle, Alliance for Sustainable Energy, LLC, and other contributors. All +# rights reserved. +# +# NOTICE: This Software was developed under funding from the U.S. Department of +# Energy and the U.S. Government consequently retains certain rights. As such, +# the U.S. Government has been granted for itself and others acting on its +# behalf a paid-up, nonexclusive, irrevocable, worldwide license in the +# Software to reproduce, distribute copies to the public, prepare derivative +# works, and perform publicly and display publicly, and to permit others to do +# so. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# (1) Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# (2) Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# (3) Neither the name of the University of California, Lawrence Berkeley +# National Laboratory, the University of Illinois, U.S. Dept. of Energy nor +# the names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# (4) Use of EnergyPlus(TM) Name. If Licensee (i) distributes the software in +# stand-alone form without changes from the version obtained under this +# License, or (ii) Licensee makes a reference solely to the software +# portion of its product, Licensee must refer to the software as +# "EnergyPlus version X" software, where "X" is the version number Licensee +# obtained under this License and may not use a different name for the +# software. Except as specifically required in this Section (4), Licensee +# shall not use in a company name, a product name, in advertising, +# publicity, or other promotional activities any name, trade name, +# trademark, logo, or other designation of "EnergyPlus", "E+", "e+" or +# confusingly similar designation, without the U.S. Department of Energy's +# prior written consent. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +""" +Cross-platform setup.py for building the EnergyPlus Python module. +Bare-bones library, no pre- or post-processing tools. +""" + +from setuptools import setup, Extension +from setuptools.command.build_ext import build_ext +from shutil import rmtree, copy +from platform import machine, system +from os import cpu_count +from pathlib import Path +from subprocess import check_call, CalledProcessError +from re import findall + +from wheel.bdist_wheel import bdist_wheel + + +def get_ep_version_string(repository_root_dir: Path) -> str: + version_info_file = repository_root_dir / 'cmake' / 'Version.cmake' + version_contents = version_info_file.read_text() + version_major = findall(r'CMAKE_VERSION_MAJOR (\d+)', version_contents)[0] + version_minor = findall(r'CMAKE_VERSION_MINOR (\d+)', version_contents)[0] + version_patch = findall(r'CMAKE_VERSION_PATCH (\d+)', version_contents)[0] + return f"{version_major}.{version_minor}.{version_patch}" + + +def get_current_wheel_details(): + wheels = { + "Darwin": { + "x86_64": { + "wheel": "macosx_10_13_x86_64", # TODO: Dynamically determine Mac version numbers? + "zip_tag": "OSX", + "build_tool": "Unix Makefiles", + "extension": "dylib", + }, + "arm64": { + "wheel": "macosx_11_0_arm64", + "zip_tag": "OSX_arm64", + "build_tool": "Unix Makefiles", + "extension": "dylib", + }, + }, + "Linux": { + "x86_64": { + "wheel": "manylinux_2_17_x86_64", + "zip_tag": "Linux", + "build_tool": "Unix Makefiles", + "extension": "so", + } + }, + "Windows": { + "i386": { # I would love to not build 32-bit, but I know there is a good amount of 32 bit Python out there + "wheel": "win32", + "zip_tag": "Windows", + "arch": "Win32", + "build_tool": "Visual Studio 16 2019", + "extension": "dll", + }, + "AMD64": { + "wheel": "win_amd64", + "zip_tag": "Windows", + "arch": "x64", + "build_tool": "Visual Studio 16 2019", + "extension": "dll", + }, + }, + } + return wheels[system()][machine()] + + +class PyenergyplusBDistWheel(bdist_wheel): + def get_tag(self): + return "py3", "none", get_current_wheel_details()["wheel"] + + +class EnergyPlusBuild(build_ext): + @staticmethod + def cmake_configure_command() -> list[str]: + current_config = get_current_wheel_details() + cmake_cmd = ["cmake", "-G", current_config["build_tool"]] + if "arch" in current_config: + cmake_cmd += ["-A", current_config['arch']] + cmake_cmd.append("-DBUILD_FORTRAN=OFF") + if system() != "Windows": + cmake_cmd.append("-DCMAKE_BUILD_TYPE=Release") + cmake_cmd.append(str(repo_root_directory)) + return cmake_cmd + + @staticmethod + def cmake_build_command() -> list[str]: + cmake_build_cmd = ["cmake", "--build", "."] + if system() == "Windows": # VS builds require specifying the build config + cmake_build_cmd.extend(["--config", "Release"]) + else: # MSBuild doesn't like the -j passed in, so only do this on Non-Windows + cmake_build_cmd.extend(['--', '-j', f"{cpu_count() - 1}"]) + return cmake_build_cmd + + @staticmethod + def fixup_copied_python_file(python_file: Path): + t = python_file.read_text() + t = t.replace('from pyenergyplus.', 'from energyplus.') + t = t.replace( + 'api_dll_dir = os.path.dirname(os.path.normpath(this_script_dir))', + 'api_dll_dir = os.path.normpath(this_script_dir)' + ) + python_file.write_text(t) + + def run(self): + self.build_lib = 'build/energyplus' # I feel like this variable has meaning on this class, so leaving it + + try: + cmake_cmd = self.cmake_configure_command() + check_call(cmake_cmd, cwd=build_root_directory) + except CalledProcessError as cpe: + raise Exception( + f"CMake failed to configure EnergyPlus, check error logs, raw error message: {cpe}" + ) from None + + try: + cmake_build_cmd = self.cmake_build_command() + check_call(cmake_build_cmd, cwd=build_root_directory) + except CalledProcessError as cpe: + raise Exception( + f"CMake failed to build EnergyPlus, check error logs, raw error message: {cpe}" + ) from None + + # while EnergyPlus is built in the repo/build-wheel folder, set up the path to the actual wheel build + # this will be in repo/build-wheel/build/energyplus to avoid conflicting with dev's normal repo/build folders + # we will wipe this folder each build to get a clean wheel + wheel_build_directory = Path(build_root_directory / self.build_lib) + if wheel_build_directory.exists(): + rmtree(wheel_build_directory) + wheel_build_directory.unlink(missing_ok=True) + wheel_build_directory.mkdir(parents=True) + + # Copy the shared library files and Python API files to the output directory + products_dir = build_root_directory / 'Products' + if system() == "Windows": + products_dir /= 'Release' + built_shared_libraries = products_dir.glob(f"*.{get_current_wheel_details()['extension']}*") + for lib in built_shared_libraries: + copy(lib, wheel_build_directory) + + # Copy the Python source code files to the output directory + energyplus_py_dir = products_dir / "pyenergyplus" + # TODO: Include some weather files and example files? But where? Inside the wheel, API functions to access? + # TODO: Consider adding install_requires to get the extra EnergyPlus stuff...and fixing it up after install! + # TODO: Try uploading to test-pypi and see what happens! + for lib in energyplus_py_dir.glob("*.py"): + copy(lib, wheel_build_directory) + # do quick fix-ups on the copied file to work in the pip installed configuration + self.fixup_copied_python_file(wheel_build_directory / lib.name) + + +# find the repository root early, and set up a new build-directory called build-wheel where all build ops will occur +repo_root_directory = Path(__file__).resolve().parent +build_root_directory = repo_root_directory / 'build-wheel' +build_root_directory.mkdir(exist_ok=True) + +setup( + name="energyplus", + version=get_ep_version_string(repo_root_directory), + packages=[], + license="Modified BSD", + author="United States Department of Energy", + author_email="", + url="https://github.com/NREL/EnergyPlus", + description="EnergyPlus is a building simulation program for modeling energy and water use in buildings.", + long_description=(repo_root_directory / "README.md").read_text(), + long_description_content_type='text/markdown', + ext_modules=[Extension("energyplus", sources=[])], + cmdclass={ + "build_ext": EnergyPlusBuild, + "bdist_wheel": PyenergyplusBDistWheel, + }, + options={ + 'bdist_wheel': {'bdist_dir': str(build_root_directory / 'build')} + }, + build_base='.' +) diff --git a/src/ConvertInputFormat/main.cpp b/src/ConvertInputFormat/main.cpp index 3efc0f46fa9..d53e6d81790 100644 --- a/src/ConvertInputFormat/main.cpp +++ b/src/ConvertInputFormat/main.cpp @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/ConvertInputFormat/test_convert_input_format.py b/src/ConvertInputFormat/test_convert_input_format.py index 45e1e711032..92caef0cd48 100644 --- a/src/ConvertInputFormat/test_convert_input_format.py +++ b/src/ConvertInputFormat/test_convert_input_format.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/src/EnergyPlus/AirLoopHVACDOAS.cc b/src/EnergyPlus/AirLoopHVACDOAS.cc index 6ab4644868e..035e958751a 100644 --- a/src/EnergyPlus/AirLoopHVACDOAS.cc +++ b/src/EnergyPlus/AirLoopHVACDOAS.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -247,7 +247,15 @@ namespace AirLoopHVACDOAS { for (auto const &NodeDOASName : NodeArray) { num += 1; std::string name = Util::makeUPPER(NodeDOASName.at("inlet_node_name").get()); - int NodeNum = Util::FindItemInList(name, state.dataLoopNodes->NodeID); + int NodeNum = NodeInputManager::GetOnlySingleNode(state, + name, + errorsFound, + DataLoopNode::ConnectionObjectType::AirLoopHVACMixer, + thisObjectName, + DataLoopNode::NodeFluidType::Air, + DataLoopNode::ConnectionType::Inlet, + NodeInputManager::CompFluidStream::Primary, + DataLoopNode::ObjectIsParent); if (NodeNum > 0 && num <= thisMixer.numOfInletNodes) { thisMixer.InletNodeName.push_back(name); thisMixer.InletNodeNum.push_back(NodeNum); @@ -383,7 +391,15 @@ namespace AirLoopHVACDOAS { thisSplitter.name = Util::makeUPPER(thisObjectName); thisSplitter.InletNodeName = Util::makeUPPER(fields.at("inlet_node_name").get()); - thisSplitter.InletNodeNum = Util::FindItemInList(thisSplitter.InletNodeName, state.dataLoopNodes->NodeID); + thisSplitter.InletNodeNum = NodeInputManager::GetOnlySingleNode(state, + thisSplitter.InletNodeName, + errorsFound, + DataLoopNode::ConnectionObjectType::AirLoopHVACSplitter, + thisObjectName, + DataLoopNode::NodeFluidType::Air, + DataLoopNode::ConnectionType::Inlet, + NodeInputManager::CompFluidStream::Primary, + DataLoopNode::ObjectIsParent); thisSplitter.m_AirLoopSplitter_Num = AirLoopSplitterNum - 1; auto NodeNames = fields.find("nodes"); @@ -395,7 +411,15 @@ namespace AirLoopHVACDOAS { num += 1; std::string name = Util::makeUPPER(NodeDOASName.at("outlet_node_name").get()); - int NodeNum = Util::FindItemInList(name, state.dataLoopNodes->NodeID); + int NodeNum = NodeInputManager::GetOnlySingleNode(state, + name, + errorsFound, + DataLoopNode::ConnectionObjectType::AirLoopHVACSplitter, + thisObjectName, + DataLoopNode::NodeFluidType::Air, + DataLoopNode::ConnectionType::Inlet, + NodeInputManager::CompFluidStream::Primary, + DataLoopNode::ObjectIsParent); if (NodeNum > 0 && num <= thisSplitter.numOfOutletNodes) { thisSplitter.OutletNodeName.push_back(name); thisSplitter.OutletNodeNum.push_back(NodeNum); @@ -853,7 +877,6 @@ namespace AirLoopHVACDOAS { if (state.dataGlobal->BeginEnvrnFlag && this->MyEnvrnFlag) { bool ErrorsFound = false; Real64 rho; - state.dataSize->CurSysNum = this->m_OASystemNum; for (int CompNum = 1; CompNum <= state.dataAirLoop->OutsideAirSys(this->m_OASystemNum).NumComponents; ++CompNum) { std::string CompType = state.dataAirLoop->OutsideAirSys(this->m_OASystemNum).ComponentType(CompNum); std::string CompName = state.dataAirLoop->OutsideAirSys(this->m_OASystemNum).ComponentName(CompNum); diff --git a/src/EnergyPlus/AirLoopHVACDOAS.hh b/src/EnergyPlus/AirLoopHVACDOAS.hh index d1a3afde366..a0c18bc2399 100644 --- a/src/EnergyPlus/AirLoopHVACDOAS.hh +++ b/src/EnergyPlus/AirLoopHVACDOAS.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/AirTerminalUnit.hh b/src/EnergyPlus/AirTerminalUnit.hh index ecda32827b7..34e6ed80d7f 100644 --- a/src/EnergyPlus/AirTerminalUnit.hh +++ b/src/EnergyPlus/AirTerminalUnit.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Elements.hpp b/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Elements.hpp index 7733762e8ff..5b81ec5ac1a 100644 --- a/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Elements.hpp +++ b/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Elements.hpp @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Properties.hpp b/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Properties.hpp index e3c1b5f51af..08dc94048ce 100644 --- a/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Properties.hpp +++ b/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Properties.hpp @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Solver.hpp b/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Solver.hpp index ca07ba8d4c1..9600513db67 100644 --- a/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Solver.hpp +++ b/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Solver.hpp @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/AirflowNetwork/src/Elements.cpp b/src/EnergyPlus/AirflowNetwork/src/Elements.cpp index 0f86bae1a40..de3b3903279 100644 --- a/src/EnergyPlus/AirflowNetwork/src/Elements.cpp +++ b/src/EnergyPlus/AirflowNetwork/src/Elements.cpp @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/AirflowNetwork/src/Properties.cpp b/src/EnergyPlus/AirflowNetwork/src/Properties.cpp index 7175ba75217..6ed944c200a 100644 --- a/src/EnergyPlus/AirflowNetwork/src/Properties.cpp +++ b/src/EnergyPlus/AirflowNetwork/src/Properties.cpp @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/AirflowNetwork/src/Solver.cpp b/src/EnergyPlus/AirflowNetwork/src/Solver.cpp index 78ea4d05d6a..cfe4184c47b 100644 --- a/src/EnergyPlus/AirflowNetwork/src/Solver.cpp +++ b/src/EnergyPlus/AirflowNetwork/src/Solver.cpp @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -3582,9 +3582,9 @@ namespace AirflowNetwork { // Assign occupant ventilation control number from zone to surface for (int i = 1; i <= AirflowNetworkNumOfSurfaces; ++i) { int j = MultizoneSurfaceData(i).SurfNum; - if (m_state.dataSurface->SurfWinOriginalClass(j) == SurfaceClass::Window || - m_state.dataSurface->SurfWinOriginalClass(j) == SurfaceClass::Door || - m_state.dataSurface->SurfWinOriginalClass(j) == SurfaceClass::GlassDoor) { + auto const &surf = m_state.dataSurface->Surface(j); + if (surf.OriginalClass == SurfaceClass::Window || surf.OriginalClass == SurfaceClass::Door || + surf.OriginalClass == SurfaceClass::GlassDoor) { for (n = 1; n <= AirflowNetworkNumOfZones; ++n) { if (MultizoneZoneData(n).ZoneNum == m_state.dataSurface->Surface(j).Zone) { if (MultizoneZoneData(n).OccupantVentilationControlNum > 0 && MultizoneSurfaceData(i).OccupantVentilationControlNum == 0) { @@ -4621,6 +4621,8 @@ namespace AirflowNetwork { int compnum = compnum_iter->second; AirflowNetworkLinkageData(count).CompNum = compnum; + auto &surf = m_state.dataSurface->Surface(MultizoneSurfaceData(count).SurfNum); + switch (AirflowNetworkLinkageData(count).element->type()) { case ComponentType::DOP: { // if (AirflowNetworkLinkageData(count).CompName == @@ -4630,26 +4632,23 @@ namespace AirflowNetwork { // if (AirflowNetworkCompData(i).CompTypeNum == iComponentTypeNum::DOP) { ++j; AirflowNetworkLinkageData(count).DetOpenNum = j; - MultizoneSurfaceData(count).Multiplier = m_state.dataSurface->Surface(MultizoneSurfaceData(count).SurfNum).Multiplier; - if (m_state.dataSurface->Surface(MultizoneSurfaceData(count).SurfNum).Tilt < 10.0 || - m_state.dataSurface->Surface(MultizoneSurfaceData(count).SurfNum).Tilt > 170.0) { + MultizoneSurfaceData(count).Multiplier = surf.Multiplier; + if (surf.Tilt < 10.0 || surf.Tilt > 170.0) { ShowWarningError(m_state, "An AirflowNetwork:Multizone:Surface object has an air-flow opening corresponding to"); ShowContinueError(m_state, "window or door = " + MultizoneSurfaceData(count).SurfName + ", which is within "); ShowContinueError(m_state, "10 deg of being horizontal. Airflows through large horizontal openings are poorly"); ShowContinueError(m_state, "modeled in the AirflowNetwork model resulting in only one-way airflow."); } - if (!(m_state.dataSurface->SurfWinOriginalClass(MultizoneSurfaceData(count).SurfNum) == SurfaceClass::Window || - m_state.dataSurface->SurfWinOriginalClass(MultizoneSurfaceData(count).SurfNum) == SurfaceClass::GlassDoor || - m_state.dataSurface->SurfWinOriginalClass(MultizoneSurfaceData(count).SurfNum) == SurfaceClass::Door || - m_state.dataSurface->Surface(MultizoneSurfaceData(count).SurfNum).IsAirBoundarySurf)) { + if (!(surf.OriginalClass == SurfaceClass::Window || surf.OriginalClass == SurfaceClass::GlassDoor || + surf.OriginalClass == SurfaceClass::Door || surf.IsAirBoundarySurf)) { ShowSevereError(m_state, format(RoutineName) + "AirflowNetworkComponent: The opening must be assigned to a window, door, glassdoor or air boundary at " + AirflowNetworkLinkageData(count).Name); ErrorsFound = true; } - if (m_state.dataSurface->SurfWinOriginalClass(MultizoneSurfaceData(count).SurfNum) == SurfaceClass::Door || - m_state.dataSurface->SurfWinOriginalClass(MultizoneSurfaceData(count).SurfNum) == SurfaceClass::GlassDoor) { + + if (surf.OriginalClass == SurfaceClass::Door || surf.OriginalClass == SurfaceClass::GlassDoor) { if (MultizoneCompDetOpeningData(AirflowNetworkCompData(compnum).TypeNum).LVOType == 2) { ShowSevereError(m_state, format(RoutineName) + @@ -4662,9 +4661,8 @@ namespace AirflowNetwork { } break; case ComponentType::SOP: { // if (AirflowNetworkCompData(i).CompTypeNum == iComponentTypeNum::SOP) { - MultizoneSurfaceData(count).Multiplier = m_state.dataSurface->Surface(MultizoneSurfaceData(count).SurfNum).Multiplier; - if (m_state.dataSurface->Surface(MultizoneSurfaceData(count).SurfNum).Tilt < 10.0 || - m_state.dataSurface->Surface(MultizoneSurfaceData(count).SurfNum).Tilt > 170.0) { + MultizoneSurfaceData(count).Multiplier = surf.Multiplier; + if (surf.Tilt < 10.0 || surf.Tilt > 170.0) { ShowSevereError(m_state, "An AirflowNetwork:Multizone:Surface object has an air-flow opening corresponding to"); ShowContinueError(m_state, "window or door = " + MultizoneSurfaceData(count).SurfName + ", which is within"); ShowContinueError(m_state, "10 deg of being horizontal. Airflows through horizontal openings are not allowed."); @@ -4672,10 +4670,8 @@ namespace AirflowNetwork { ErrorsFound = true; } - if (!(m_state.dataSurface->SurfWinOriginalClass(MultizoneSurfaceData(count).SurfNum) == SurfaceClass::Window || - m_state.dataSurface->SurfWinOriginalClass(MultizoneSurfaceData(count).SurfNum) == SurfaceClass::GlassDoor || - m_state.dataSurface->SurfWinOriginalClass(MultizoneSurfaceData(count).SurfNum) == SurfaceClass::Door || - m_state.dataSurface->Surface(MultizoneSurfaceData(count).SurfNum).IsAirBoundarySurf)) { + if (!(surf.OriginalClass == SurfaceClass::Window || surf.OriginalClass == SurfaceClass::GlassDoor || + surf.OriginalClass == SurfaceClass::Door || surf.IsAirBoundarySurf)) { ShowSevereError(m_state, format(RoutineName) + "AirflowNetworkComponent: The opening must be assigned to a window, door, glassdoor or air boundary at " + @@ -4685,7 +4681,7 @@ namespace AirflowNetwork { } break; case ComponentType::HOP: { // if (AirflowNetworkCompData(i).CompTypeNum == iComponentTypeNum::HOP) { - MultizoneSurfaceData(count).Multiplier = m_state.dataSurface->Surface(MultizoneSurfaceData(count).SurfNum).Multiplier; + MultizoneSurfaceData(count).Multiplier = surf.Multiplier; // Get linkage height from upper and lower zones if (MultizoneZoneData(AirflowNetworkLinkageData(count).NodeNums[0]).ZoneNum > 0) { AirflowNetworkLinkageData(count).NodeHeights[0] = @@ -4714,10 +4710,7 @@ namespace AirflowNetwork { ErrorsFound = true; } } - if (!(m_state.dataSurface->Surface(MultizoneSurfaceData(count).SurfNum).Tilt > 170.0 && - m_state.dataSurface->Surface(MultizoneSurfaceData(count).SurfNum).Tilt < 190.0) && - !(m_state.dataSurface->Surface(MultizoneSurfaceData(count).SurfNum).Tilt > -10.0 && - m_state.dataSurface->Surface(MultizoneSurfaceData(count).SurfNum).Tilt < 10.0)) { + if (!(surf.Tilt > 170.0 && surf.Tilt < 190.0) && !(surf.Tilt > -10.0 && surf.Tilt < 10.0)) { ShowWarningError(m_state, "An AirflowNetwork:Multizone:Surface object has an air-flow opening corresponding to"); ShowContinueError(m_state, "window or door = " + MultizoneSurfaceData(count).SurfName + ", which is above"); ShowContinueError(m_state, "10 deg of being horizontal. Airflows through non-horizontal openings are not modeled"); @@ -4725,10 +4718,8 @@ namespace AirflowNetwork { "with the object of AirflowNetwork:Multizone:Component:HorizontalOpening = " + AirflowNetworkCompData(compnum).Name); } - if (!(m_state.dataSurface->SurfWinOriginalClass(MultizoneSurfaceData(count).SurfNum) == SurfaceClass::Window || - m_state.dataSurface->SurfWinOriginalClass(MultizoneSurfaceData(count).SurfNum) == SurfaceClass::GlassDoor || - m_state.dataSurface->SurfWinOriginalClass(MultizoneSurfaceData(count).SurfNum) == SurfaceClass::Door || - m_state.dataSurface->Surface(MultizoneSurfaceData(count).SurfNum).IsAirBoundarySurf)) { + if (!(surf.OriginalClass == SurfaceClass::Window || surf.OriginalClass == SurfaceClass::GlassDoor || + surf.OriginalClass == SurfaceClass::Door || surf.IsAirBoundarySurf)) { ShowSevereError(m_state, format(RoutineName) + "AirflowNetworkComponent: The opening must be assigned to a window, door, glassdoor or air boundary at " + @@ -5284,35 +5275,35 @@ namespace AirflowNetwork { for (i = 1; i <= m_state.dataGlobal->NumOfZones; ++i) { SetupOutputVariable(m_state, "AFN Zone Outdoor Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, exchangeData(i).SumMHr, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Mixing Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, exchangeData(i).SumMMHr, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Outdoor Air CO2 Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, exchangeData(i).SumMHrCO, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Mixing CO2 Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, exchangeData(i).SumMMHrCO, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Total CO2 Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, exchangeData(i).TotalCO2, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5324,14 +5315,14 @@ namespace AirflowNetwork { if (!m_state.dataContaminantBalance->Contaminant.CO2Simulation) { SetupOutputVariable(m_state, "AFN Zone Outdoor Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, exchangeData(i).SumMHr, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Mixing Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, exchangeData(i).SumMMHr, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5339,21 +5330,21 @@ namespace AirflowNetwork { } SetupOutputVariable(m_state, "AFN Zone Outdoor Air Generic Air Contaminant Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, exchangeData(i).SumMHrGC, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Mixing Generic Air Contaminant Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, exchangeData(i).SumMMHrGC, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Total Generic Air Contaminant Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, exchangeData(i).TotalGC, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5584,14 +5575,14 @@ namespace AirflowNetwork { for (i = 1; i <= AirflowNetworkNumOfNodes; ++i) { SetupOutputVariable(m_state, "AFN Node Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, AirflowNetworkNodeSimu(i).TZ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, AirflowNetworkNodeData(i).Name); SetupOutputVariable(m_state, "AFN Node Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, AirflowNetworkNodeSimu(i).WZ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5599,7 +5590,7 @@ namespace AirflowNetwork { if (m_state.dataContaminantBalance->Contaminant.CO2Simulation) { SetupOutputVariable(m_state, "AFN Node CO2 Concentration", - OutputProcessor::Unit::ppm, + Constant::Units::ppm, AirflowNetworkNodeSimu(i).CO2Z, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5608,7 +5599,7 @@ namespace AirflowNetwork { if (m_state.dataContaminantBalance->Contaminant.GenericContamSimulation) { SetupOutputVariable(m_state, "AFN Node Generic Air Contaminant Concentration", - OutputProcessor::Unit::ppm, + Constant::Units::ppm, AirflowNetworkNodeSimu(i).GCZ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5617,7 +5608,7 @@ namespace AirflowNetwork { if (!(SupplyFanType == FanType_SimpleOnOff && i <= AirflowNetworkNumOfZones)) { SetupOutputVariable(m_state, "AFN Node Total Pressure", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, AirflowNetworkNodeSimu(i).PZ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5626,7 +5617,7 @@ namespace AirflowNetwork { if (AirflowNetworkNodeData(i).ExtNodeNum > 0) { SetupOutputVariable(m_state, "AFN Node Wind Pressure", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, AirflowNetworkNodeSimu(i).PZ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5638,35 +5629,35 @@ namespace AirflowNetwork { if (!(SupplyFanType == FanType_SimpleOnOff && i <= AirflowNetworkNumOfSurfaces)) { SetupOutputVariable(m_state, "AFN Linkage Node 1 to Node 2 Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, linkReport(i).FLOW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, AirflowNetworkLinkageData(i).Name); SetupOutputVariable(m_state, "AFN Linkage Node 2 to Node 1 Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, linkReport(i).FLOW2, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, AirflowNetworkLinkageData(i).Name); SetupOutputVariable(m_state, "AFN Linkage Node 1 to Node 2 Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, linkReport(i).VolFLOW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, AirflowNetworkLinkageData(i).Name); SetupOutputVariable(m_state, "AFN Linkage Node 2 to Node 1 Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, linkReport(i).VolFLOW2, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, AirflowNetworkLinkageData(i).Name); SetupOutputVariable(m_state, "AFN Linkage Node 1 to Node 2 Pressure Difference", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, AirflowNetworkLinkSimu(i).DP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5685,7 +5676,7 @@ namespace AirflowNetwork { SurfNum = MultizoneSurfaceData(i).SurfNum; SetupOutputVariable(m_state, "AFN Surface Venting Window or Door Opening Factor", - OutputProcessor::Unit::None, + Constant::Units::None, MultizoneSurfaceData(i).OpenFactor, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5701,21 +5692,21 @@ namespace AirflowNetwork { } SetupOutputVariable(m_state, "AFN Surface Venting Window or Door Opening Modulation Multiplier", - OutputProcessor::Unit::None, + Constant::Units::None, m_state.dataSurface->SurfWinVentingOpenFactorMultRep(SurfNum), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, m_state.dataSurface->Surface(SurfNum).Name); SetupOutputVariable(m_state, "AFN Surface Venting Inside Setpoint Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, m_state.dataSurface->SurfWinInsideTempForVentingRep(SurfNum), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, m_state.dataSurface->Surface(SurfNum).Name); SetupOutputVariable(m_state, "AFN Surface Venting Availability Status", - OutputProcessor::Unit::None, + Constant::Units::None, m_state.dataSurface->SurfWinVentingAvailabilityRep(SurfNum), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5723,49 +5714,49 @@ namespace AirflowNetwork { if (MultizoneSurfaceData(i).OccupantVentilationControlNum > 0) { SetupOutputVariable(m_state, "AFN Surface Venting Window or Door Opening Factor at Previous Time Step", - OutputProcessor::Unit::None, + Constant::Units::None, MultizoneSurfaceData(i).OpenFactorLast, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, MultizoneSurfaceData(i).SurfName); SetupOutputVariable(m_state, "AFN Surface Opening Elapsed Time", - OutputProcessor::Unit::min, + Constant::Units::min, MultizoneSurfaceData(i).OpenElapsedTime, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, MultizoneSurfaceData(i).SurfName); SetupOutputVariable(m_state, "AFN Surface Closing Elapsed Time", - OutputProcessor::Unit::min, + Constant::Units::min, MultizoneSurfaceData(i).CloseElapsedTime, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, MultizoneSurfaceData(i).SurfName); SetupOutputVariable(m_state, "AFN Surface Opening Status at Previous Time Step", - OutputProcessor::Unit::None, + Constant::Units::None, MultizoneSurfaceData(i).PrevOpeningstatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, MultizoneSurfaceData(i).SurfName); SetupOutputVariable(m_state, "AFN Surface Opening Status", - OutputProcessor::Unit::None, + Constant::Units::None, MultizoneSurfaceData(i).OpeningStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, MultizoneSurfaceData(i).SurfName); SetupOutputVariable(m_state, "AFN Surface Opening Probability Status", - OutputProcessor::Unit::None, + Constant::Units::None, MultizoneSurfaceData(i).OpeningProbStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, MultizoneSurfaceData(i).SurfName); SetupOutputVariable(m_state, "AFN Surface Closing Probability Status", - OutputProcessor::Unit::None, + Constant::Units::None, MultizoneSurfaceData(i).ClosingProbStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5778,168 +5769,168 @@ namespace AirflowNetwork { // Multizone losses due to force air systems SetupOutputVariable(m_state, "AFN Zone Infiltration Sensible Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).MultiZoneInfiSenGainW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Infiltration Sensible Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).MultiZoneInfiSenGainJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Ventilation Sensible Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).MultiZoneVentSenGainW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Ventilation Sensible Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).MultiZoneVentSenGainJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Mixing Sensible Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).MultiZoneMixSenGainW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Mixing Sensible Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).MultiZoneMixSenGainJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Infiltration Sensible Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).MultiZoneInfiSenLossW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Infiltration Sensible Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).MultiZoneInfiSenLossJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Ventilation Sensible Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).MultiZoneVentSenLossW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Ventilation Sensible Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).MultiZoneVentSenLossJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Mixing Sensible Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).MultiZoneMixSenLossW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Mixing Sensible Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).MultiZoneMixSenLossJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Infiltration Latent Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).MultiZoneInfiLatGainW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Infiltration Latent Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).MultiZoneInfiLatGainJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Infiltration Latent Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).MultiZoneInfiLatLossW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Infiltration Latent Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).MultiZoneInfiLatLossJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Ventilation Latent Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).MultiZoneVentLatGainW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Ventilation Latent Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).MultiZoneVentLatGainJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Ventilation Latent Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).MultiZoneVentLatLossW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Ventilation Latent Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).MultiZoneVentLatLossJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Mixing Latent Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).MultiZoneMixLatGainW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Mixing Latent Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).MultiZoneMixLatGainJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Mixing Latent Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).MultiZoneMixLatLossW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Mixing Latent Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).MultiZoneInfiLatLossJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -5947,56 +5938,56 @@ namespace AirflowNetwork { // Supply leak losses due to force air systems SetupOutputVariable(m_state, "AFN Zone Duct Leaked Air Sensible Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).LeakSenGainW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Duct Leaked Air Sensible Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).LeakSenGainJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Duct Leaked Air Sensible Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).LeakSenLossW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Duct Leaked Air Sensible Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).LeakSenLossJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Duct Leaked Air Latent Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).LeakLatGainW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Duct Leaked Air Latent Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).LeakLatGainJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Duct Leaked Air Latent Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).LeakLatLossW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Duct Leaked Air Latent Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).LeakLatLossJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -6004,56 +5995,56 @@ namespace AirflowNetwork { // Conduction losses due to force air systems SetupOutputVariable(m_state, "AFN Zone Duct Conduction Sensible Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).CondSenGainW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Duct Conduction Sensible Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).CondSenGainJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Duct Conduction Sensible Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).CondSenLossW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Duct Conduction Sensible Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).CondSenLossJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Duct Diffusion Latent Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).DiffLatGainW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Duct Diffusion Latent Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).DiffLatGainJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Duct Diffusion Latent Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).DiffLatLossW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Duct Diffusion Latent Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).DiffLatLossJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -6061,28 +6052,28 @@ namespace AirflowNetwork { // Radiation losses due to forced air systems SetupOutputVariable(m_state, "AFN Zone Duct Radiation Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).RadGainW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Duct Radiation Sensible Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).RadGainJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Duct Radiation Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).RadLossW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Duct Radiation Sensible Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).RadLossJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -6090,56 +6081,56 @@ namespace AirflowNetwork { // Total losses due to force air systems SetupOutputVariable(m_state, "AFN Distribution Sensible Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).TotalSenGainW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Distribution Sensible Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).TotalSenGainJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Distribution Sensible Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).TotalSenLossW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Distribution Sensible Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).TotalSenLossJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Distribution Latent Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).TotalLatGainW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Distribution Latent Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).TotalLatGainJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Distribution Latent Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkReportData(i).TotalLatLossW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Distribution Latent Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, AirflowNetworkReportData(i).TotalLatLossJ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -6149,56 +6140,56 @@ namespace AirflowNetwork { for (i = 1; i <= m_state.dataGlobal->NumOfZones; ++i) { SetupOutputVariable(m_state, "AFN Zone Infiltration Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, AirflowNetworkZnRpt(i).InfilVolume, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Infiltration Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, AirflowNetworkZnRpt(i).InfilMass, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Infiltration Air Change Rate", - OutputProcessor::Unit::ach, + Constant::Units::ach, AirflowNetworkZnRpt(i).InfilAirChangeRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Ventilation Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, AirflowNetworkZnRpt(i).VentilVolume, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Ventilation Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, AirflowNetworkZnRpt(i).VentilMass, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Ventilation Air Change Rate", - OutputProcessor::Unit::ach, + Constant::Units::ach, AirflowNetworkZnRpt(i).VentilAirChangeRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Mixing Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, AirflowNetworkZnRpt(i).MixVolume, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Mixing Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, AirflowNetworkZnRpt(i).MixMass, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -6206,21 +6197,21 @@ namespace AirflowNetwork { SetupOutputVariable(m_state, "AFN Zone Exfiltration Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkZnRpt(i).ExfilTotalLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Exfiltration Sensible Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkZnRpt(i).ExfilSensiLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Exfiltration Latent Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, AirflowNetworkZnRpt(i).ExfilLatentLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -6231,21 +6222,21 @@ namespace AirflowNetwork { for (i = 1; i <= AirflowNetworkNumOfZones; ++i) { SetupOutputVariable(m_state, "AFN Zone Average Pressure", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, nodeReport(i).PZ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone On Cycle Pressure", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, nodeReport(i).PZON, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(i).Name); SetupOutputVariable(m_state, "AFN Zone Off Cycle Pressure", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, nodeReport(i).PZOFF, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -6254,49 +6245,49 @@ namespace AirflowNetwork { for (i = 1; i <= AirflowNetworkNumOfSurfaces; ++i) { SetupOutputVariable(m_state, "AFN Linkage Node 1 to 2 Average Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, linkReport1(i).FLOW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, MultizoneSurfaceData(i).SurfName); SetupOutputVariable(m_state, "AFN Linkage Node 2 to 1 Average Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, linkReport1(i).FLOW2, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, MultizoneSurfaceData(i).SurfName); SetupOutputVariable(m_state, "AFN Linkage Node 1 to 2 Average Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, linkReport1(i).VolFLOW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, MultizoneSurfaceData(i).SurfName); SetupOutputVariable(m_state, "AFN Linkage Node 2 to 1 Average Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, linkReport1(i).VolFLOW2, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, MultizoneSurfaceData(i).SurfName); SetupOutputVariable(m_state, "AFN Surface Average Pressure Difference", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, linkReport1(i).DP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, MultizoneSurfaceData(i).SurfName); SetupOutputVariable(m_state, "AFN Surface On Cycle Pressure Difference", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, linkReport1(i).DPON, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, MultizoneSurfaceData(i).SurfName); SetupOutputVariable(m_state, "AFN Surface Off Cycle Pressure Difference", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, linkReport1(i).DPOFF, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -6432,9 +6423,9 @@ namespace AirflowNetwork { } if (MultizoneSurfaceData(i).OccupantVentilationControlNum == 0) MultizoneSurfaceData(i).OpenFactor = 0.0; j = MultizoneSurfaceData(i).SurfNum; - if (m_state.dataSurface->SurfWinOriginalClass(j) == SurfaceClass::Window || - m_state.dataSurface->SurfWinOriginalClass(j) == SurfaceClass::Door || - m_state.dataSurface->SurfWinOriginalClass(j) == SurfaceClass::GlassDoor || m_state.dataSurface->Surface(j).IsAirBoundarySurf) { + auto const &surf = m_state.dataSurface->Surface(j); + if (surf.OriginalClass == SurfaceClass::Window || surf.OriginalClass == SurfaceClass::Door || + surf.OriginalClass == SurfaceClass::GlassDoor || surf.IsAirBoundarySurf) { if (MultizoneSurfaceData(i).OccupantVentilationControlNum > 0) { if (MultizoneSurfaceData(i).OpeningStatus == OpenStatus::FreeOperation) { if (MultizoneSurfaceData(i).OpeningProbStatus == ProbabilityCheck::ForceChange) { @@ -6513,9 +6504,9 @@ namespace AirflowNetwork { for (i = 1; i <= AirflowNetworkNumOfSurfaces; ++i) { if (i > AirflowNetworkNumOfSurfaces - NumOfLinksIntraZone) continue; j = MultizoneSurfaceData(i).SurfNum; - if (m_state.dataSurface->SurfWinOriginalClass(j) == SurfaceClass::Window || - m_state.dataSurface->SurfWinOriginalClass(j) == SurfaceClass::Door || - m_state.dataSurface->SurfWinOriginalClass(j) == SurfaceClass::GlassDoor) { + auto const &surf = m_state.dataSurface->Surface(j); + if (surf.OriginalClass == SurfaceClass::Window || surf.OriginalClass == SurfaceClass::Door || + surf.OriginalClass == SurfaceClass::GlassDoor) { if (MultizoneSurfaceData(i).HybridCtrlGlobal) { MultizoneSurfaceData(i).OpenFactor = GlobalOpenFactor; } @@ -10311,7 +10302,11 @@ namespace AirflowNetwork { ErrorsFound = true; } else { NodeFound(i) = true; - AirflowNetworkNodeData(zoneNum).EPlusNodeNum = i; + for (int iZone = 1; iZone <= AirflowNetworkNumOfZones; iZone++) { + if (MultizoneZoneData(iZone).ZoneNum == zoneNum) { + AirflowNetworkNodeData(iZone).EPlusNodeNum = i; + } + } } break; } @@ -10635,7 +10630,22 @@ namespace AirflowNetwork { } else { SetDXCoilAirLoopNumber(m_state, DisSysCompCoilData(i).name, DisSysCompCoilData(i).AirLoopNum); } - + } else if (SELECT_CASE_var == "COIL:HEATING:ELECTRIC:MULTISTAGE") { + ValidateComponent( + m_state, "Coil:Heating:Electric:MultiStage", DisSysCompCoilData(i).name, IsNotOK, format(RoutineName) + CurrentModuleObject); + if (IsNotOK) { + ErrorsFound = true; + } else { + SetHeatingCoilAirLoopNumber(m_state, DisSysCompCoilData(i).name, DisSysCompCoilData(i).AirLoopNum, ErrorsFound); + } + } else if (SELECT_CASE_var == "COIL:HEATING:GAS:MULTISTAGE") { + ValidateComponent( + m_state, "Coil:Heating:Gas:MultiStage", DisSysCompCoilData(i).name, IsNotOK, format(RoutineName) + CurrentModuleObject); + if (IsNotOK) { + ErrorsFound = true; + } else { + SetHeatingCoilAirLoopNumber(m_state, DisSysCompCoilData(i).name, DisSysCompCoilData(i).AirLoopNum, ErrorsFound); + } } else { ShowSevereError(m_state, format(RoutineName) + CurrentModuleObject + " Invalid coil type = " + DisSysCompCoilData(i).name); ErrorsFound = true; @@ -10905,7 +10915,7 @@ namespace AirflowNetwork { DisSysCompCVFData(i).FanTypeNum != FanType_SimpleOnOff) { SetupOutputVariable(m_state, "AFN Node Total Pressure", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, AirflowNetworkNodeSimu(j).PZ, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -10922,35 +10932,35 @@ namespace AirflowNetwork { DisSysCompCVFData(j).FanTypeNum != FanType_SimpleOnOff) { SetupOutputVariable(m_state, "AFN Linkage Node 1 to Node 2 Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, linkReport(i).FLOW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, AirflowNetworkLinkageData(i).Name); SetupOutputVariable(m_state, "AFN Linkage Node 2 to Node 1 Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, linkReport(i).FLOW2, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, AirflowNetworkLinkageData(i).Name); SetupOutputVariable(m_state, "AFN Linkage Node 1 to Node 2 Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, linkReport(i).VolFLOW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, AirflowNetworkLinkageData(i).Name); SetupOutputVariable(m_state, "AFN Linkage Node 2 to Node 1 Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, linkReport(i).VolFLOW2, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, AirflowNetworkLinkageData(i).Name); SetupOutputVariable(m_state, "AFN Linkage Node 1 to Node 2 Pressure Difference", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, AirflowNetworkLinkSimu(i).DP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -10977,35 +10987,35 @@ namespace AirflowNetwork { if (SupplyFanType == FanType_SimpleConstVolume) { SetupOutputVariable(m_state, "AFN Linkage Node 1 to Node 2 Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, linkReport(i).FLOW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, AirflowNetworkLinkageData(i).Name); SetupOutputVariable(m_state, "AFN Linkage Node 2 to Node 1 Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, linkReport(i).FLOW2, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, AirflowNetworkLinkageData(i).Name); SetupOutputVariable(m_state, "AFN Linkage Node 1 to Node 2 Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, linkReport(i).VolFLOW, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, AirflowNetworkLinkageData(i).Name); SetupOutputVariable(m_state, "AFN Linkage Node 2 to Node 1 Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, linkReport(i).VolFLOW2, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, AirflowNetworkLinkageData(i).Name); SetupOutputVariable(m_state, "AFN Linkage Node 1 to Node 2 Pressure Difference", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, AirflowNetworkLinkSimu(i).DP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -11302,7 +11312,9 @@ namespace AirflowNetwork { if (ActualZoneNum > 0) { for (ANSurfaceNum = 1; ANSurfaceNum <= AirflowNetworkNumOfSurfaces; ++ANSurfaceNum) { SurfNum = MultizoneSurfaceData(ANSurfaceNum).SurfNum; - if (m_state.dataSurface->Surface(SurfNum).Zone == ActualZoneNum) { + auto const &surf = m_state.dataSurface->Surface(SurfNum); + + if (surf.Zone == ActualZoneNum) { if (VentilationCtrl == HybridVentCtrl_Close) { MultizoneSurfaceData(ANSurfaceNum).HybridVentClose = true; } else { @@ -11312,10 +11324,9 @@ namespace AirflowNetwork { if (ControlType == GlobalCtrlType) { MultizoneSurfaceData(ANSurfaceNum).HybridCtrlGlobal = true; if (HybridVentSysAvailMaster(SysAvailNum) == ActualZoneNum) { - if ((m_state.dataSurface->SurfWinOriginalClass(SurfNum) == SurfaceClass::Window || - m_state.dataSurface->SurfWinOriginalClass(SurfNum) == SurfaceClass::Door || - m_state.dataSurface->SurfWinOriginalClass(SurfNum) == SurfaceClass::GlassDoor) && - m_state.dataSurface->Surface(SurfNum).ExtBoundCond == ExternalEnvironment) { + if ((surf.OriginalClass == SurfaceClass::Window || surf.OriginalClass == SurfaceClass::Door || + surf.OriginalClass == SurfaceClass::GlassDoor) && + surf.ExtBoundCond == ExternalEnvironment) { MultizoneSurfaceData(ANSurfaceNum).HybridCtrlMaster = true; Found = true; } diff --git a/src/EnergyPlus/Autosizing/All_Simple_Sizing.cc b/src/EnergyPlus/Autosizing/All_Simple_Sizing.cc index 5daebe7c5e1..e27eec1fc9a 100644 --- a/src/EnergyPlus/Autosizing/All_Simple_Sizing.cc +++ b/src/EnergyPlus/Autosizing/All_Simple_Sizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/All_Simple_Sizing.hh b/src/EnergyPlus/Autosizing/All_Simple_Sizing.hh index f1047327c6d..8a692f422ba 100644 --- a/src/EnergyPlus/Autosizing/All_Simple_Sizing.hh +++ b/src/EnergyPlus/Autosizing/All_Simple_Sizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/Base.cc b/src/EnergyPlus/Autosizing/Base.cc index b0efa813d25..abf4d3640b6 100644 --- a/src/EnergyPlus/Autosizing/Base.cc +++ b/src/EnergyPlus/Autosizing/Base.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/Base.hh b/src/EnergyPlus/Autosizing/Base.hh index 8c51b9e1b61..fcba936ab26 100644 --- a/src/EnergyPlus/Autosizing/Base.hh +++ b/src/EnergyPlus/Autosizing/Base.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/BaseSizerWithFanHeatInputs.cc b/src/EnergyPlus/Autosizing/BaseSizerWithFanHeatInputs.cc index 5367c26344e..c61064735f7 100644 --- a/src/EnergyPlus/Autosizing/BaseSizerWithFanHeatInputs.cc +++ b/src/EnergyPlus/Autosizing/BaseSizerWithFanHeatInputs.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/BaseSizerWithFanHeatInputs.hh b/src/EnergyPlus/Autosizing/BaseSizerWithFanHeatInputs.hh index 7e828c09057..2e9a64c7d11 100644 --- a/src/EnergyPlus/Autosizing/BaseSizerWithFanHeatInputs.hh +++ b/src/EnergyPlus/Autosizing/BaseSizerWithFanHeatInputs.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/BaseSizerWithScalableInputs.cc b/src/EnergyPlus/Autosizing/BaseSizerWithScalableInputs.cc index a0c858aec71..bc2df0136ba 100644 --- a/src/EnergyPlus/Autosizing/BaseSizerWithScalableInputs.cc +++ b/src/EnergyPlus/Autosizing/BaseSizerWithScalableInputs.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/BaseSizerWithScalableInputs.hh b/src/EnergyPlus/Autosizing/BaseSizerWithScalableInputs.hh index 6fffd02c496..47f77c1f1c7 100644 --- a/src/EnergyPlus/Autosizing/BaseSizerWithScalableInputs.hh +++ b/src/EnergyPlus/Autosizing/BaseSizerWithScalableInputs.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/CoolingAirFlowSizing.cc b/src/EnergyPlus/Autosizing/CoolingAirFlowSizing.cc index e9136c89af3..6953c9e6238 100644 --- a/src/EnergyPlus/Autosizing/CoolingAirFlowSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingAirFlowSizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/CoolingAirFlowSizing.hh b/src/EnergyPlus/Autosizing/CoolingAirFlowSizing.hh index 1828413b652..cc76cfd0ff0 100644 --- a/src/EnergyPlus/Autosizing/CoolingAirFlowSizing.hh +++ b/src/EnergyPlus/Autosizing/CoolingAirFlowSizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/CoolingCapacitySizing.cc b/src/EnergyPlus/Autosizing/CoolingCapacitySizing.cc index 09da95767c8..f5a658627c5 100644 --- a/src/EnergyPlus/Autosizing/CoolingCapacitySizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingCapacitySizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/CoolingCapacitySizing.hh b/src/EnergyPlus/Autosizing/CoolingCapacitySizing.hh index d878cf7671e..d079ec57f9f 100644 --- a/src/EnergyPlus/Autosizing/CoolingCapacitySizing.hh +++ b/src/EnergyPlus/Autosizing/CoolingCapacitySizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/CoolingSHRSizing.cc b/src/EnergyPlus/Autosizing/CoolingSHRSizing.cc index dc94e078a4a..3bf310fcdfd 100644 --- a/src/EnergyPlus/Autosizing/CoolingSHRSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingSHRSizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/CoolingSHRSizing.hh b/src/EnergyPlus/Autosizing/CoolingSHRSizing.hh index 348e4c258e2..ffc392c8280 100644 --- a/src/EnergyPlus/Autosizing/CoolingSHRSizing.hh +++ b/src/EnergyPlus/Autosizing/CoolingSHRSizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletHumRatSizing.cc b/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletHumRatSizing.cc index 09a071af43d..dc5c5f5768e 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletHumRatSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletHumRatSizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletHumRatSizing.hh b/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletHumRatSizing.hh index 29e86f4724a..8cdf1516642 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletHumRatSizing.hh +++ b/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletHumRatSizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletTempSizing.cc b/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletTempSizing.cc index 81b50de9125..0143e75977c 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletTempSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletTempSizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletTempSizing.hh b/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletTempSizing.hh index d2a571c303d..eac0eec8b28 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletTempSizing.hh +++ b/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletTempSizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletHumRatSizing.cc b/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletHumRatSizing.cc index 3b679372927..a095e23ad4e 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletHumRatSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletHumRatSizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletHumRatSizing.hh b/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletHumRatSizing.hh index 2d466b502a8..5c62a5d1c41 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletHumRatSizing.hh +++ b/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletHumRatSizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.cc b/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.cc index 10762f44026..a3c030e45e7 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.hh b/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.hh index 73f8705cb03..1d20b924ac1 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.hh +++ b/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/CoolingWaterDesWaterInletTempSizing.cc b/src/EnergyPlus/Autosizing/CoolingWaterDesWaterInletTempSizing.cc index 895f3924662..0527073ca0b 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterDesWaterInletTempSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingWaterDesWaterInletTempSizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/CoolingWaterDesWaterInletTempSizing.hh b/src/EnergyPlus/Autosizing/CoolingWaterDesWaterInletTempSizing.hh index b37a4cfc04b..f63a1cfd42a 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterDesWaterInletTempSizing.hh +++ b/src/EnergyPlus/Autosizing/CoolingWaterDesWaterInletTempSizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/CoolingWaterNumofTubesPerRowSizing.cc b/src/EnergyPlus/Autosizing/CoolingWaterNumofTubesPerRowSizing.cc index 26f94e26c29..668dc22fa32 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterNumofTubesPerRowSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingWaterNumofTubesPerRowSizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/CoolingWaterNumofTubesPerRowSizing.hh b/src/EnergyPlus/Autosizing/CoolingWaterNumofTubesPerRowSizing.hh index f786591ef44..faa83168c3d 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterNumofTubesPerRowSizing.hh +++ b/src/EnergyPlus/Autosizing/CoolingWaterNumofTubesPerRowSizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/CoolingWaterflowSizing.cc b/src/EnergyPlus/Autosizing/CoolingWaterflowSizing.cc index 5aba3f51d81..f8ba2c00b97 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterflowSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingWaterflowSizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/CoolingWaterflowSizing.hh b/src/EnergyPlus/Autosizing/CoolingWaterflowSizing.hh index b197f6220b4..2432d420ad1 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterflowSizing.hh +++ b/src/EnergyPlus/Autosizing/CoolingWaterflowSizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/HeatingAirFlowSizing.cc b/src/EnergyPlus/Autosizing/HeatingAirFlowSizing.cc index 2324b09f2c5..95e9c533130 100644 --- a/src/EnergyPlus/Autosizing/HeatingAirFlowSizing.cc +++ b/src/EnergyPlus/Autosizing/HeatingAirFlowSizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/HeatingAirFlowSizing.hh b/src/EnergyPlus/Autosizing/HeatingAirFlowSizing.hh index 519d755f30e..83f38b923a1 100644 --- a/src/EnergyPlus/Autosizing/HeatingAirFlowSizing.hh +++ b/src/EnergyPlus/Autosizing/HeatingAirFlowSizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/HeatingAirflowUASizing.cc b/src/EnergyPlus/Autosizing/HeatingAirflowUASizing.cc index 85d7c8c56f7..2368543ed6a 100644 --- a/src/EnergyPlus/Autosizing/HeatingAirflowUASizing.cc +++ b/src/EnergyPlus/Autosizing/HeatingAirflowUASizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/HeatingAirflowUASizing.hh b/src/EnergyPlus/Autosizing/HeatingAirflowUASizing.hh index 86954424549..a4b8f254d48 100644 --- a/src/EnergyPlus/Autosizing/HeatingAirflowUASizing.hh +++ b/src/EnergyPlus/Autosizing/HeatingAirflowUASizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/HeatingCapacitySizing.cc b/src/EnergyPlus/Autosizing/HeatingCapacitySizing.cc index 3be70d31aab..46c3c8d3b19 100644 --- a/src/EnergyPlus/Autosizing/HeatingCapacitySizing.cc +++ b/src/EnergyPlus/Autosizing/HeatingCapacitySizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -451,7 +451,7 @@ Real64 HeatingCapacitySizer::size(EnergyPlusData &state, Real64 _originalValue, this->selectSizerOutput(state, errorsFound); - if (this->isCoilReportObject && this->curSysNum <= state.dataHVACGlobal->NumPrimaryAirSys) { + if (this->isCoilReportObject) { if (CoilInTemp > -999.0) { // set inlet air properties used during capacity sizing if available, allow for negative winter temps state.dataRptCoilSelection->coilSelectionReportObj->setCoilEntAirTemp( state, this->compName, this->compType, CoilInTemp, this->curSysNum, this->curZoneEqNum); @@ -461,6 +461,7 @@ Real64 HeatingCapacitySizer::size(EnergyPlusData &state, Real64 _originalValue, state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgAirTemp(state, this->compName, this->compType, CoilOutTemp); state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgAirHumRat(state, this->compName, this->compType, CoilOutHumRat); } + state.dataRptCoilSelection->coilSelectionReportObj->setCoilAirFlow(state, this->compName, this->compType, DesVolFlow, this->wasAutoSized); Real64 constexpr FanCoolLoad = 0.0; Real64 constexpr TotCapTempModFac = 1.0; state.dataRptCoilSelection->coilSelectionReportObj->setCoilHeatingCapacity(state, diff --git a/src/EnergyPlus/Autosizing/HeatingCapacitySizing.hh b/src/EnergyPlus/Autosizing/HeatingCapacitySizing.hh index 7da4477dc22..c759d785ec5 100644 --- a/src/EnergyPlus/Autosizing/HeatingCapacitySizing.hh +++ b/src/EnergyPlus/Autosizing/HeatingCapacitySizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletHumRatSizing.cc b/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletHumRatSizing.cc index f87cc6d79d3..71b105e2702 100644 --- a/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletHumRatSizing.cc +++ b/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletHumRatSizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletHumRatSizing.hh b/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletHumRatSizing.hh index dcd1528d780..a97a7ab6e89 100644 --- a/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletHumRatSizing.hh +++ b/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletHumRatSizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletTempSizing.cc b/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletTempSizing.cc index 8a4360775a8..5b68f60913f 100644 --- a/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletTempSizing.cc +++ b/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletTempSizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletTempSizing.hh b/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletTempSizing.hh index deb40eb6904..f5f2e0a67c3 100644 --- a/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletTempSizing.hh +++ b/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletTempSizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.cc b/src/EnergyPlus/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.cc index 9c94ebf5080..336dc37c5d3 100644 --- a/src/EnergyPlus/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.cc +++ b/src/EnergyPlus/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.hh b/src/EnergyPlus/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.hh index f8eb2616930..43b53437ddd 100644 --- a/src/EnergyPlus/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.hh +++ b/src/EnergyPlus/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/HeatingWaterDesCoilWaterVolFlowUsedForUASizing.cc b/src/EnergyPlus/Autosizing/HeatingWaterDesCoilWaterVolFlowUsedForUASizing.cc index 801790158aa..d250f3396d4 100644 --- a/src/EnergyPlus/Autosizing/HeatingWaterDesCoilWaterVolFlowUsedForUASizing.cc +++ b/src/EnergyPlus/Autosizing/HeatingWaterDesCoilWaterVolFlowUsedForUASizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/HeatingWaterDesCoilWaterVolFlowUsedForUASizing.hh b/src/EnergyPlus/Autosizing/HeatingWaterDesCoilWaterVolFlowUsedForUASizing.hh index e060477ad80..e8ff1561d91 100644 --- a/src/EnergyPlus/Autosizing/HeatingWaterDesCoilWaterVolFlowUsedForUASizing.hh +++ b/src/EnergyPlus/Autosizing/HeatingWaterDesCoilWaterVolFlowUsedForUASizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/HeatingWaterflowSizing.cc b/src/EnergyPlus/Autosizing/HeatingWaterflowSizing.cc index a334f76be73..7f6b9fe6fdb 100644 --- a/src/EnergyPlus/Autosizing/HeatingWaterflowSizing.cc +++ b/src/EnergyPlus/Autosizing/HeatingWaterflowSizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/HeatingWaterflowSizing.hh b/src/EnergyPlus/Autosizing/HeatingWaterflowSizing.hh index 96fa00a3f1c..aa2f6a4378b 100644 --- a/src/EnergyPlus/Autosizing/HeatingWaterflowSizing.hh +++ b/src/EnergyPlus/Autosizing/HeatingWaterflowSizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/SystemAirFlowSizing.cc b/src/EnergyPlus/Autosizing/SystemAirFlowSizing.cc index 750df592dbc..924726485aa 100644 --- a/src/EnergyPlus/Autosizing/SystemAirFlowSizing.cc +++ b/src/EnergyPlus/Autosizing/SystemAirFlowSizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/SystemAirFlowSizing.hh b/src/EnergyPlus/Autosizing/SystemAirFlowSizing.hh index c4f8c1685d8..16a8d108606 100644 --- a/src/EnergyPlus/Autosizing/SystemAirFlowSizing.hh +++ b/src/EnergyPlus/Autosizing/SystemAirFlowSizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/WaterHeatingCapacitySizing.cc b/src/EnergyPlus/Autosizing/WaterHeatingCapacitySizing.cc index 91c90d888ec..342293b358a 100644 --- a/src/EnergyPlus/Autosizing/WaterHeatingCapacitySizing.cc +++ b/src/EnergyPlus/Autosizing/WaterHeatingCapacitySizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/WaterHeatingCapacitySizing.hh b/src/EnergyPlus/Autosizing/WaterHeatingCapacitySizing.hh index 82e62e165ce..3e24d939a41 100644 --- a/src/EnergyPlus/Autosizing/WaterHeatingCapacitySizing.hh +++ b/src/EnergyPlus/Autosizing/WaterHeatingCapacitySizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/WaterHeatingCoilUASizing.cc b/src/EnergyPlus/Autosizing/WaterHeatingCoilUASizing.cc index b14c5a9aa9b..33135fe863a 100644 --- a/src/EnergyPlus/Autosizing/WaterHeatingCoilUASizing.cc +++ b/src/EnergyPlus/Autosizing/WaterHeatingCoilUASizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Autosizing/WaterHeatingCoilUASizing.hh b/src/EnergyPlus/Autosizing/WaterHeatingCoilUASizing.hh index f0b47f496e5..b38b2f9e3c2 100644 --- a/src/EnergyPlus/Autosizing/WaterHeatingCoilUASizing.hh +++ b/src/EnergyPlus/Autosizing/WaterHeatingCoilUASizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/BaseboardElectric.cc b/src/EnergyPlus/BaseboardElectric.cc index f3192cf7353..8607126a5d1 100644 --- a/src/EnergyPlus/BaseboardElectric.cc +++ b/src/EnergyPlus/BaseboardElectric.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -346,20 +346,19 @@ namespace BaseboardElectric { auto &thisBaseboard = baseboard->baseboards(BaseboardNum); SetupOutputVariable(state, "Baseboard Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisBaseboard.Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisBaseboard.EquipName, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Baseboard, {}, - eResourceSOV::EnergyTransfer, - EndUseCatSOV::Baseboard, - {}, - GroupSOV::HVAC); // "System"); + OutputProcessor::SOVGroup::HVAC); // "System"); SetupOutputVariable(state, "Baseboard Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisBaseboard.Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -367,20 +366,19 @@ namespace BaseboardElectric { SetupOutputVariable(state, "Baseboard Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisBaseboard.ElecUseLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisBaseboard.EquipName, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - eResourceSOV::Electricity, - EndUseCatSOV::Heating, - {}, - GroupSOV::HVAC); // "System"); + OutputProcessor::SOVGroup::HVAC); // "System"); SetupOutputVariable(state, "Baseboard Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisBaseboard.ElecUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/BaseboardElectric.hh b/src/EnergyPlus/BaseboardElectric.hh index 43f0827cd47..020c7df06d4 100644 --- a/src/EnergyPlus/BaseboardElectric.hh +++ b/src/EnergyPlus/BaseboardElectric.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/BaseboardRadiator.cc b/src/EnergyPlus/BaseboardRadiator.cc index 399f7ca335f..e01c77cf400 100644 --- a/src/EnergyPlus/BaseboardRadiator.cc +++ b/src/EnergyPlus/BaseboardRadiator.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -432,33 +432,31 @@ namespace BaseboardRadiator { auto &thisBaseboard = state.dataBaseboardRadiator->baseboards(BaseboardNum); SetupOutputVariable(state, "Baseboard Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisBaseboard.Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisBaseboard.EquipID, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Baseboard, {}, - eResourceSOV::EnergyTransfer, - EndUseCatSOV::Baseboard, - {}, - GroupSOV::HVAC); // "System"); + OutputProcessor::SOVGroup::HVAC); // "System"); SetupOutputVariable(state, "Baseboard Hot Water Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisBaseboard.Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisBaseboard.EquipID, + Constant::eResource::PlantLoopHeatingDemand, + OutputProcessor::SOVEndUseCat::Baseboard, {}, - eResourceSOV::PlantLoopHeatingDemand, - EndUseCatSOV::Baseboard, - {}, - GroupSOV::HVAC); // "System"); + OutputProcessor::SOVGroup::HVAC); // "System"); SetupOutputVariable(state, "Baseboard Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisBaseboard.Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -466,7 +464,7 @@ namespace BaseboardRadiator { SetupOutputVariable(state, "Baseboard Hot Water Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisBaseboard.WaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -474,7 +472,7 @@ namespace BaseboardRadiator { SetupOutputVariable(state, "Baseboard Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisBaseboard.AirMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -482,7 +480,7 @@ namespace BaseboardRadiator { SetupOutputVariable(state, "Baseboard Air Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisBaseboard.AirInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -490,7 +488,7 @@ namespace BaseboardRadiator { SetupOutputVariable(state, "Baseboard Air Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisBaseboard.AirOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -498,7 +496,7 @@ namespace BaseboardRadiator { SetupOutputVariable(state, "Baseboard Water Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisBaseboard.WaterInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -506,7 +504,7 @@ namespace BaseboardRadiator { SetupOutputVariable(state, "Baseboard Water Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisBaseboard.WaterOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/BaseboardRadiator.hh b/src/EnergyPlus/BaseboardRadiator.hh index 3ec134e0dba..acd019520db 100644 --- a/src/EnergyPlus/BaseboardRadiator.hh +++ b/src/EnergyPlus/BaseboardRadiator.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/BoilerSteam.cc b/src/EnergyPlus/BoilerSteam.cc index fe894e86b64..a634f444dfb 100644 --- a/src/EnergyPlus/BoilerSteam.cc +++ b/src/EnergyPlus/BoilerSteam.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -410,66 +410,65 @@ namespace BoilerSteam { std::string_view sFuelType = Constant::eFuelNames[static_cast(this->FuelType)]; SetupOutputVariable(state, "Boiler Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->BoilerLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); + SetupOutputVariable(state, "Boiler Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->BoilerEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Boilers, {}, - "ENERGYTRANSFER", - "BOILERS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, format("Boiler {} Rate", sFuelType), - OutputProcessor::Unit::W, + Constant::Units::W, this->FuelUsed, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, format("Boiler {} Energy", sFuelType), - OutputProcessor::Unit::J, + Constant::Units::J, this->FuelConsumed, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - sFuelType, - "Heating", + Constant::eFuel2eResource[(int)this->FuelType], + OutputProcessor::SOVEndUseCat::Heating, this->EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Boiler Steam Efficiency", - OutputProcessor::Unit::None, + Constant::Units::None, this->BoilerEff, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Boiler Steam Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->BoilerInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Boiler Steam Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->BoilerOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Boiler Steam Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->BoilerMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/BoilerSteam.hh b/src/EnergyPlus/BoilerSteam.hh index 830377a81f8..b77cc14e181 100644 --- a/src/EnergyPlus/BoilerSteam.hh +++ b/src/EnergyPlus/BoilerSteam.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Boilers.cc b/src/EnergyPlus/Boilers.cc index 91dc27ffa02..a717b4561eb 100644 --- a/src/EnergyPlus/Boilers.cc +++ b/src/EnergyPlus/Boilers.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -227,6 +227,13 @@ void GetBoilerInput(EnergyPlusData &state) ShowContinueError(state, format("Invalid {}={:.3R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); ShowSevereError(state, format("...{} must be greater than 0.0", state.dataIPShortCut->cNumericFieldNames(2))); ErrorsFound = true; + } else if (state.dataIPShortCut->rNumericArgs(2) > 1.0) { + ShowWarningError(state, + fmt::format("{} = {}: {}={} should not typically be greater than 1.", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(2), + state.dataIPShortCut->rNumericArgs(2))); } if (state.dataIPShortCut->cAlphaArgs(3) == "ENTERINGBOILER") { @@ -370,113 +377,109 @@ void BoilerSpecs::SetupOutputVars(EnergyPlusData &state) std::string_view const sFuelType = Constant::eFuelNames[static_cast(this->FuelType)]; SetupOutputVariable(state, "Boiler Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->BoilerLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Boiler Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->BoilerEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Boilers, {}, - eResourceSOV::EnergyTransfer, - EndUseCatSOV::Boilers, - {}, - GroupSOV::Plant); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, format("Boiler {} Rate", sFuelType), - OutputProcessor::Unit::W, + Constant::Units::W, this->FuelUsed, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, format("Boiler {} Energy", sFuelType), - OutputProcessor::Unit::J, + Constant::Units::J, this->FuelConsumed, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - sFuelType, - "Heating", + Constant::eFuel2eResource[(int)this->FuelType], + OutputProcessor::SOVEndUseCat::Heating, this->EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Boiler Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->BoilerInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Boiler Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->BoilerOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Boiler Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->BoilerMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Boiler Ancillary Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->ParasiticElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Boiler Ancillary Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->ParasiticElecConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - eResourceSOV::Electricity, - EndUseCatSOV::Heating, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, "Boiler Parasitic", - GroupSOV::Plant); + OutputProcessor::SOVGroup::Plant); if (this->FuelType != Constant::eFuel::Electricity) { SetupOutputVariable(state, format("Boiler Ancillary {} Rate", sFuelType), - OutputProcessor::Unit::W, + Constant::Units::W, this->ParasiticFuelRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, format("Boiler Ancillary {} Energy", sFuelType), - OutputProcessor::Unit::J, + Constant::Units::J, this->ParasiticFuelConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - sFuelType, - "Heating", + Constant::eFuel2eResource[(int)this->FuelType], + OutputProcessor::SOVEndUseCat::Heating, "Boiler Parasitic", - "Plant"); + OutputProcessor::SOVGroup::Plant); } SetupOutputVariable(state, "Boiler Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->BoilerPLR, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Boiler Efficiency", - OutputProcessor::Unit::None, + Constant::Units::None, this->BoilerEff, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -963,7 +966,8 @@ void BoilerSpecs::CalcBoilerModel(EnergyPlusData &state, // warn if overall efficiency greater than 1.1 if (!state.dataGlobal->WarmupFlag && BoilerEff > 1.1) { - if (this->BoilerLoad > 0.0 && this->EfficiencyCurvePtr > 0) { + if (this->BoilerLoad > 0.0 && this->EfficiencyCurvePtr > 0 && + NomEffic <= 1.0) { // NomEffic > 1 warning occurs elsewhere; avoid cascading warnings if (this->CalculatedEffError < 1) { ++this->CalculatedEffError; ShowWarningError(state, format("Boiler:HotWater \"{}\"", this->Name)); diff --git a/src/EnergyPlus/Boilers.hh b/src/EnergyPlus/Boilers.hh index c65d424f36a..e718ce5ad1f 100644 --- a/src/EnergyPlus/Boilers.hh +++ b/src/EnergyPlus/Boilers.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/BranchInputManager.cc b/src/EnergyPlus/BranchInputManager.cc index e73b79d2808..73548a5765c 100644 --- a/src/EnergyPlus/BranchInputManager.cc +++ b/src/EnergyPlus/BranchInputManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/BranchInputManager.hh b/src/EnergyPlus/BranchInputManager.hh index ca0edc368b4..40378e5dc86 100644 --- a/src/EnergyPlus/BranchInputManager.hh +++ b/src/EnergyPlus/BranchInputManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/BranchNodeConnections.cc b/src/EnergyPlus/BranchNodeConnections.cc index 7ea51f218c6..4f5a6c3c547 100644 --- a/src/EnergyPlus/BranchNodeConnections.cc +++ b/src/EnergyPlus/BranchNodeConnections.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -86,6 +86,7 @@ constexpr std::array(DataLoopNode::Connection "AirLoopHVAC:OutdoorAirSystem", "AirLoopHVAC:ReturnPath", "AirLoopHVAC:ReturnPlenum", + "AirLoopHVAC:Splitter", "AirLoopHVAC:SupplyPath", "AirLoopHVAC:SupplyPlenum", "AirLoopHVAC:Unitary:Furnace:HeatCool", @@ -367,6 +368,7 @@ constexpr std::array(DataLoopNode::Connection "AIRLOOPHVAC:OUTDOORAIRSYSTEM", "AIRLOOPHVAC:RETURNPATH", "AIRLOOPHVAC:RETURNPLENUM", + "AIALOOPHVAC:SPLITTER", "AIRLOOPHVAC:SUPPLYPATH", "AIRLOOPHVAC:SUPPLYPLENUM", "AIRLOOPHVAC:UNITARY:FURNACE:HEATCOOL", diff --git a/src/EnergyPlus/BranchNodeConnections.hh b/src/EnergyPlus/BranchNodeConnections.hh index b8919c55bf2..44af9c25f18 100644 --- a/src/EnergyPlus/BranchNodeConnections.hh +++ b/src/EnergyPlus/BranchNodeConnections.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/CMakeLists.txt b/src/EnergyPlus/CMakeLists.txt index 64ee8b1aedc..80b8b8004f1 100644 --- a/src/EnergyPlus/CMakeLists.txt +++ b/src/EnergyPlus/CMakeLists.txt @@ -385,6 +385,8 @@ set(SRC ICEngineElectricGenerator.hh IceThermalStorage.cc IceThermalStorage.hh + IndoorGreen.cc + IndoorGreen.hh InputProcessing/CsvParser.cc InputProcessing/CsvParser.hh InputProcessing/DataStorage.hh @@ -565,8 +567,6 @@ set(SRC SolarReflectionManager.hh SolarShading.cc SolarShading.hh - SortAndStringUtilities.cc - SortAndStringUtilities.hh SplitterComponent.cc SplitterComponent.hh StandardRatings.cc @@ -1113,16 +1113,17 @@ if(BUILD_TESTING) set(PY_FILE "${EXAMPLES_FILES_DIR}/${TEST_CASE}.py") configure_file(${PY_FILE} "${INPUT_TEST_DIR}/${TEST_CASE}.py" COPYONLY) - add_test(NAME energyplus.TestNonASCIIDirsAndFiles.PythonPlugin.FromWithin - COMMAND energyplus -D -d "${CLI_TEST_DIR}/PythonPlugin.FromWithin/out-${NON_ASCII_DIRNAME}" ${TEST_CASE}.idf - WORKING_DIRECTORY "${CLI_TEST_DIR}/${NON_ASCII_DIRNAME}" - ) - - add_test(NAME energyplus.TestNonASCIIDirsAndFiles.PythonPlugin.FromOutside - COMMAND energyplus -D -d "${CLI_TEST_DIR}/PythonPlugin.FromOutside/out-${NON_ASCII_DIRNAME}" ${NON_ASCII_DIRNAME}/${TEST_CASE}.idf - WORKING_DIRECTORY "${CLI_TEST_DIR}" - ) - + if(LINK_WITH_PYTHON) + add_test(NAME energyplus.TestNonASCIIDirsAndFiles.PythonPlugin.FromWithin + COMMAND energyplus -D -d "${CLI_TEST_DIR}/PythonPlugin.FromWithin/out-${NON_ASCII_DIRNAME}" ${TEST_CASE}.idf + WORKING_DIRECTORY "${CLI_TEST_DIR}/${NON_ASCII_DIRNAME}" + ) + + add_test(NAME energyplus.TestNonASCIIDirsAndFiles.PythonPlugin.FromOutside + COMMAND energyplus -D -d "${CLI_TEST_DIR}/PythonPlugin.FromOutside/out-${NON_ASCII_DIRNAME}" ${NON_ASCII_DIRNAME}/${TEST_CASE}.idf + WORKING_DIRECTORY "${CLI_TEST_DIR}" + ) + endif() endif() if(UNIX AND NOT APPLE) diff --git a/src/EnergyPlus/CTElectricGenerator.cc b/src/EnergyPlus/CTElectricGenerator.cc index c07b1a2000d..c6583fdd294 100644 --- a/src/EnergyPlus/CTElectricGenerator.cc +++ b/src/EnergyPlus/CTElectricGenerator.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -361,7 +361,7 @@ namespace CTElectricGenerator { std::string_view const sFuelType = Constant::eFuelNames[static_cast(this->FuelType)]; SetupOutputVariable(state, "Generator Produced AC Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->ElecPowerGenerated, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -369,20 +369,19 @@ namespace CTElectricGenerator { SetupOutputVariable(state, "Generator Produced AC Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->ElecEnergyGenerated, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::ElectricityProduced, + OutputProcessor::SOVEndUseCat::Cogeneration, {}, - "ElectricityProduced", - "COGENERATION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, format("Generator {} Rate", sFuelType), - OutputProcessor::Unit::W, + Constant::Units::W, this->FuelEnergyUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -390,21 +389,20 @@ namespace CTElectricGenerator { SetupOutputVariable(state, format("Generator {} Energy", sFuelType), - OutputProcessor::Unit::J, + Constant::Units::J, this->FuelEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eFuel2eResource[(int)this->FuelType], + OutputProcessor::SOVEndUseCat::Cogeneration, {}, - sFuelType, - "COGENERATION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); // general fuel use report (to match other generators) SetupOutputVariable(state, "Generator Fuel HHV Basis Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->FuelEnergyUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -412,7 +410,7 @@ namespace CTElectricGenerator { SetupOutputVariable(state, "Generator Fuel HHV Basis Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->FuelEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -420,7 +418,7 @@ namespace CTElectricGenerator { SetupOutputVariable(state, format("Generator {} Mass Flow Rate", sFuelType), - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->FuelMdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -428,7 +426,7 @@ namespace CTElectricGenerator { SetupOutputVariable(state, "Generator Exhaust Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->ExhaustStackTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -437,7 +435,7 @@ namespace CTElectricGenerator { if (this->HeatRecActive) { SetupOutputVariable(state, "Generator Exhaust Heat Recovery Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QExhaustRecovered, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -445,20 +443,19 @@ namespace CTElectricGenerator { SetupOutputVariable(state, "Generator Exhaust Heat Recovery Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->ExhaustEnergyRec, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRecovery, {}, - "ENERGYTRANSFER", - "HEATRECOVERY", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Generator Lube Heat Recovery Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QLubeOilRecovered, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -466,20 +463,19 @@ namespace CTElectricGenerator { SetupOutputVariable(state, "Generator Lube Heat Recovery Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->LubeOilEnergyRec, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRecovery, {}, - "ENERGYTRANSFER", - "HEATRECOVERY", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Generator Produced Thermal Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QTotalHeatRecovered, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -487,7 +483,7 @@ namespace CTElectricGenerator { SetupOutputVariable(state, "Generator Produced Thermal Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->TotalHeatEnergyRec, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -495,7 +491,7 @@ namespace CTElectricGenerator { SetupOutputVariable(state, "Generator Heat Recovery Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->HeatRecInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -503,7 +499,7 @@ namespace CTElectricGenerator { SetupOutputVariable(state, "Generator Heat Recovery Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->HeatRecOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -511,7 +507,7 @@ namespace CTElectricGenerator { SetupOutputVariable(state, "Generator Heat Recovery Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->HeatRecMdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/CTElectricGenerator.hh b/src/EnergyPlus/CTElectricGenerator.hh index 8d259dfd3f0..1bfbc6a8fc7 100644 --- a/src/EnergyPlus/CTElectricGenerator.hh +++ b/src/EnergyPlus/CTElectricGenerator.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ChilledCeilingPanelSimple.cc b/src/EnergyPlus/ChilledCeilingPanelSimple.cc index ba177fedbd5..731d59aed37 100644 --- a/src/EnergyPlus/ChilledCeilingPanelSimple.cc +++ b/src/EnergyPlus/ChilledCeilingPanelSimple.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -639,6 +639,7 @@ void GetCoolingPanelInput(EnergyPlusData &state) } if (thisCP.SurfacePtr(SurfNum) != 0) { state.dataSurface->surfIntConv(thisCP.SurfacePtr(SurfNum)).getsRadiantHeat = true; + state.dataSurface->allGetsRadiantHeatSurfaceList.emplace_back(thisCP.SurfacePtr(SurfNum)); } AllFracsSummed += thisCP.FracDistribToSurf(SurfNum); @@ -685,28 +686,28 @@ void GetCoolingPanelInput(EnergyPlusData &state) auto &thisCP = state.dataChilledCeilingPanelSimple->CoolingPanel(CoolingPanelNum); SetupOutputVariable(state, "Cooling Panel Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCP.Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCP.Name); SetupOutputVariable(state, "Cooling Panel Total System Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCP.TotPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCP.Name); SetupOutputVariable(state, "Cooling Panel Convective Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCP.ConvPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCP.Name); SetupOutputVariable(state, "Cooling Panel Radiant Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCP.RadPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -714,38 +715,36 @@ void GetCoolingPanelInput(EnergyPlusData &state) SetupOutputVariable(state, "Cooling Panel Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCP.Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisCP.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::CoolingPanel, {}, - "ENERGYTRANSFER", - "COOLINGPANEL", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Panel Total System Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCP.TotEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisCP.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::CoolingPanel, {}, - "ENERGYTRANSFER", - "COOLINGPANEL", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Panel Convective Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCP.ConvEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisCP.Name); SetupOutputVariable(state, "Cooling Panel Radiant Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCP.RadEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -753,21 +752,21 @@ void GetCoolingPanelInput(EnergyPlusData &state) SetupOutputVariable(state, "Cooling Panel Water Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisCP.WaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCP.Name); SetupOutputVariable(state, "Cooling Panel Water Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisCP.WaterInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCP.Name); SetupOutputVariable(state, "Cooling Panel Water Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisCP.WaterOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1588,13 +1587,15 @@ void DistributeCoolingPanelRadGains(EnergyPlusData &state) Real64 constexpr SmallestArea(0.001); // Smallest area in meters squared (to avoid a divide by zero) // Initialize arrays - state.dataHeatBalFanSys->SurfQCoolingPanel = 0.0; + for (auto &thisCP : state.dataChilledCeilingPanelSimple->CoolingPanel) { + for (int radSurfNum = 1; radSurfNum <= thisCP.TotSurfToDistrib; ++radSurfNum) { + int surfNum = thisCP.SurfacePtr(radSurfNum); + state.dataHeatBalFanSys->surfQRadFromHVAC(surfNum).CoolingPanel = 0.0; + } + } state.dataHeatBalFanSys->ZoneQCoolingPanelToPerson = 0.0; - for (int CoolingPanelNum = 1; CoolingPanelNum <= (int)state.dataChilledCeilingPanelSimple->CoolingPanel.size(); ++CoolingPanelNum) { - - auto &thisCP(state.dataChilledCeilingPanelSimple->CoolingPanel(CoolingPanelNum)); - + for (auto &thisCP : state.dataChilledCeilingPanelSimple->CoolingPanel) { int ZoneNum = thisCP.ZonePtr; if (ZoneNum <= 0) continue; state.dataHeatBalFanSys->ZoneQCoolingPanelToPerson(ZoneNum) += thisCP.CoolingPanelSource * thisCP.FracDistribPerson; @@ -1604,8 +1605,7 @@ void DistributeCoolingPanelRadGains(EnergyPlusData &state) auto &ThisSurf(state.dataSurface->Surface(SurfNum)); if (ThisSurf.Area > SmallestArea) { Real64 ThisSurfIntensity = (thisCP.CoolingPanelSource * thisCP.FracDistribToSurf(RadSurfNum) / ThisSurf.Area); - state.dataHeatBalFanSys->SurfQCoolingPanel(SurfNum) += ThisSurfIntensity; - state.dataHeatBalSurf->AnyRadiantSystems = true; + state.dataHeatBalFanSys->surfQRadFromHVAC(SurfNum).CoolingPanel += ThisSurfIntensity; // CR 8074, trap for excessive intensity (throws off surface balance ) if (ThisSurfIntensity > DataHeatBalFanSys::MaxRadHeatFlux) { ShowSevereError(state, "DistributeCoolingPanelRadGains: excessive thermal radiation heat flux intensity detected"); diff --git a/src/EnergyPlus/ChilledCeilingPanelSimple.hh b/src/EnergyPlus/ChilledCeilingPanelSimple.hh index 67419a304b9..e577f92bb46 100644 --- a/src/EnergyPlus/ChilledCeilingPanelSimple.hh +++ b/src/EnergyPlus/ChilledCeilingPanelSimple.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ChillerAbsorption.cc b/src/EnergyPlus/ChillerAbsorption.cc index 6ff850fe5d0..a38a2973ef5 100644 --- a/src/EnergyPlus/ChillerAbsorption.cc +++ b/src/EnergyPlus/ChillerAbsorption.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -494,59 +494,57 @@ void BLASTAbsorberSpecs::setupOutputVars(EnergyPlusData &state) { SetupOutputVariable(state, "Chiller Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.PumpingPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.PumpingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "ELECTRICITY", - "Cooling", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Evaporator Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.QEvap, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Evaporator Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.EvapEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Chillers, {}, - "ENERGYTRANSFER", - "CHILLERS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Evaporator Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.EvapInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Evaporator Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.EvapOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Evaporator Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->Report.Evapmdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -554,40 +552,39 @@ void BLASTAbsorberSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Condenser Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.QCond, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Condenser Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.CondEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "ENERGYTRANSFER", - "HEATREJECTION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Condenser Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.CondInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Condenser Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.CondOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Condenser Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->Report.Condmdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -596,70 +593,67 @@ void BLASTAbsorberSpecs::setupOutputVars(EnergyPlusData &state) if (this->GenHeatSourceType == DataLoopNode::NodeFluidType::Water) { SetupOutputVariable(state, "Chiller Hot Water Consumption Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.QGenerator, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Source Hot Water Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.GeneratorEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::PlantLoopHeatingDemand, + OutputProcessor::SOVEndUseCat::Chillers, {}, - "PLANTLOOPHEATINGDEMAND", - "CHILLERS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } else { if (this->GenInputOutputNodesUsed) { SetupOutputVariable(state, "Chiller Source Steam Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.QGenerator, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Source Steam Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.GeneratorEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::PlantLoopHeatingDemand, + OutputProcessor::SOVEndUseCat::Chillers, {}, - "PLANTLOOPHEATINGDEMAND", - "CHILLERS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } else { SetupOutputVariable(state, "Chiller Source Steam Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.QGenerator, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Source Steam Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.GeneratorEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::DistrictHeatingSteam, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "DistrictHeatingSteam", - "Cooling", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } } SetupOutputVariable(state, "Chiller COP", - OutputProcessor::Unit::W_W, + Constant::Units::W_W, this->Report.ActualCOP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/ChillerAbsorption.hh b/src/EnergyPlus/ChillerAbsorption.hh index 0bf1c2b51f1..32e1f88db66 100644 --- a/src/EnergyPlus/ChillerAbsorption.hh +++ b/src/EnergyPlus/ChillerAbsorption.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ChillerElectricASHRAE205.cc b/src/EnergyPlus/ChillerElectricASHRAE205.cc index bb77fd6d01a..007dc8991b5 100644 --- a/src/EnergyPlus/ChillerElectricASHRAE205.cc +++ b/src/EnergyPlus/ChillerElectricASHRAE205.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -963,7 +963,7 @@ void ASHRAE205ChillerSpecs::setOutputVariables(EnergyPlusData &state) { SetupOutputVariable(state, "Chiller Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->ChillerPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -971,7 +971,7 @@ void ASHRAE205ChillerSpecs::setOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Cycling Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->ChillerCyclingRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -979,7 +979,7 @@ void ASHRAE205ChillerSpecs::setOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Minimum Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->MinPartLoadRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -987,7 +987,7 @@ void ASHRAE205ChillerSpecs::setOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -995,20 +995,19 @@ void ASHRAE205ChillerSpecs::setOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - "ELECTRICITY", - "Cooling", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, this->EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Evaporator Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QEvaporator, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1016,20 +1015,19 @@ void ASHRAE205ChillerSpecs::setOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Evaporator Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->EvapEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Chillers, {}, - "ENERGYTRANSFER", - "CHILLERS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Evaporator Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->EvapInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1037,7 +1035,7 @@ void ASHRAE205ChillerSpecs::setOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Evaporator Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->EvapOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1045,7 +1043,7 @@ void ASHRAE205ChillerSpecs::setOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Evaporator Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->EvapMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1053,7 +1051,7 @@ void ASHRAE205ChillerSpecs::setOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Condenser Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QCondenser, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1061,20 +1059,19 @@ void ASHRAE205ChillerSpecs::setOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Condenser Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->CondEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "ENERGYTRANSFER", - "HEATREJECTION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller COP", - OutputProcessor::Unit::W_W, + Constant::Units::W_W, this->ActualCOP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1082,7 +1079,7 @@ void ASHRAE205ChillerSpecs::setOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Condenser Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->CondInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1090,7 +1087,7 @@ void ASHRAE205ChillerSpecs::setOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Condenser Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->CondOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1098,7 +1095,7 @@ void ASHRAE205ChillerSpecs::setOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Condenser Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->CondMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1106,7 +1103,7 @@ void ASHRAE205ChillerSpecs::setOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Effective Heat Rejection Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->ChillerCondAvgTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1114,7 +1111,7 @@ void ASHRAE205ChillerSpecs::setOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Zone Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->AmbientZoneGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1122,7 +1119,7 @@ void ASHRAE205ChillerSpecs::setOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Zone Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->AmbientZoneGainEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1130,7 +1127,7 @@ void ASHRAE205ChillerSpecs::setOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Oil Cooler Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QOilCooler, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1138,7 +1135,7 @@ void ASHRAE205ChillerSpecs::setOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Oil Cooler Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->OilCoolerEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1146,7 +1143,7 @@ void ASHRAE205ChillerSpecs::setOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Auxiliary Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QAuxiliary, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1154,7 +1151,7 @@ void ASHRAE205ChillerSpecs::setOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Auxiliary Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->AuxiliaryEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, diff --git a/src/EnergyPlus/ChillerElectricASHRAE205.hh b/src/EnergyPlus/ChillerElectricASHRAE205.hh index ea9796d0cd2..e64ff963fa2 100644 --- a/src/EnergyPlus/ChillerElectricASHRAE205.hh +++ b/src/EnergyPlus/ChillerElectricASHRAE205.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ChillerElectricEIR.cc b/src/EnergyPlus/ChillerElectricEIR.cc index ba382b95d54..42a705ce393 100644 --- a/src/EnergyPlus/ChillerElectricEIR.cc +++ b/src/EnergyPlus/ChillerElectricEIR.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -759,7 +759,7 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) { SetupOutputVariable(state, "Chiller Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->ChillerPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -767,7 +767,7 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Cycling Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->ChillerCyclingRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -775,7 +775,7 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -783,20 +783,19 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - "ELECTRICITY", - "Cooling", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, this->EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Evaporator Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QEvaporator, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -804,20 +803,19 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Evaporator Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->EvapEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Chillers, {}, - "ENERGYTRANSFER", - "CHILLERS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller False Load Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->ChillerFalseLoadRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -825,7 +823,7 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller False Load Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->ChillerFalseLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -833,7 +831,7 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Evaporator Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->EvapInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -841,7 +839,7 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Evaporator Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->EvapOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -849,7 +847,7 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Evaporator Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->EvapMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -857,7 +855,7 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Condenser Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QCondenser, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -865,20 +863,19 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Condenser Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->CondEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "ENERGYTRANSFER", - "HEATREJECTION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller COP", - OutputProcessor::Unit::W_W, + Constant::Units::W_W, this->ActualCOP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -886,7 +883,7 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Capacity Temperature Modifier Multiplier", - OutputProcessor::Unit::None, + Constant::Units::None, this->ChillerCapFT, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -894,7 +891,7 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller EIR Temperature Modifier Multiplier", - OutputProcessor::Unit::None, + Constant::Units::None, this->ChillerEIRFT, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -902,7 +899,7 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller EIR Part Load Modifier Multiplier", - OutputProcessor::Unit::None, + Constant::Units::None, this->ChillerEIRFPLR, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -912,7 +909,7 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) if (this->CondenserType == DataPlant::CondenserType::WaterCooled) { SetupOutputVariable(state, "Chiller Condenser Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->CondInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -920,7 +917,7 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Condenser Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->CondOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -928,7 +925,7 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Condenser Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->CondMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -938,7 +935,7 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) if (this->HeatRecActive) { SetupOutputVariable(state, "Chiller Total Recovered Heat Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QHeatRecovered, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -946,20 +943,19 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Total Recovered Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->EnergyHeatRecovery, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRecovery, {}, - "ENERGYTRANSFER", - "HEATRECOVERY", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Heat Recovery Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->HeatRecInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -967,7 +963,7 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heat Recovery Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->HeatRecOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -975,7 +971,7 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heat Recovery Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->HeatRecMassFlow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -983,7 +979,7 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Effective Heat Rejection Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->ChillerCondAvgTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -993,7 +989,7 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) } else { SetupOutputVariable(state, "Chiller Condenser Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->CondInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1002,7 +998,7 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) if (this->CondenserFanPowerRatio > 0) { SetupOutputVariable(state, "Chiller Condenser Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->CondenserFanPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1010,48 +1006,45 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Condenser Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->CondenserFanEnergyConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "ELECTRICITY", - "Cooling", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } if (this->CondenserType == DataPlant::CondenserType::EvapCooled) { SetupOutputVariable(state, "Chiller Evaporative Condenser Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->EvapWaterConsump, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Water", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Chiller Evaporative Condenser Mains Supply Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->EvapWaterConsump, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::MainsWater, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "MainsWater", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); if (this->BasinHeaterPowerFTempDiff > 0.0) { SetupOutputVariable(state, "Chiller Basin Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->BasinHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1059,16 +1052,15 @@ void ElectricEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Basin Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->BasinHeaterConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Chillers, {}, - "Electricity", - "CHILLERS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } } } diff --git a/src/EnergyPlus/ChillerElectricEIR.hh b/src/EnergyPlus/ChillerElectricEIR.hh index 69d9461aa16..510e0a6336e 100644 --- a/src/EnergyPlus/ChillerElectricEIR.hh +++ b/src/EnergyPlus/ChillerElectricEIR.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ChillerExhaustAbsorption.cc b/src/EnergyPlus/ChillerExhaustAbsorption.cc index fc1e6939d65..abb1e367c89 100644 --- a/src/EnergyPlus/ChillerExhaustAbsorption.cc +++ b/src/EnergyPlus/ChillerExhaustAbsorption.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -534,67 +534,64 @@ void ExhaustAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater Evaporator Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->CoolingLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ChillerName); SetupOutputVariable(state, "Chiller Heater Evaporator Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->CoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, ChillerName, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Chillers, {}, - "ENERGYTRANSFER", - "CHILLERS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Heater Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->HeatingLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ChillerName); SetupOutputVariable(state, "Chiller Heater Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->HeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, ChillerName, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Boilers, {}, - "ENERGYTRANSFER", - "BOILERS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Heater Condenser Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->TowerLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ChillerName); SetupOutputVariable(state, "Chiller Heater Condenser Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->TowerEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, ChillerName, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "ENERGYTRANSFER", - "HEATREJECTION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Heater Cooling Source Heat COP", - OutputProcessor::Unit::W_W, + Constant::Units::W_W, this->ThermalEnergyCOP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -602,7 +599,7 @@ void ExhaustAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->ElectricPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -610,7 +607,7 @@ void ExhaustAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) // Do not include this on meters, this would duplicate the cool electric and heat electric SetupOutputVariable(state, "Chiller Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->ElectricEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -618,61 +615,59 @@ void ExhaustAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater Cooling Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->CoolElectricPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ChillerName); SetupOutputVariable(state, "Chiller Heater Cooling Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->CoolElectricEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, ChillerName, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "Cooling", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Heater Heating Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->HeatElectricPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ChillerName); SetupOutputVariable(state, "Chiller Heater Heating Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->HeatElectricEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, ChillerName, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "Heating", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Heater Evaporator Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->ChillReturnTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ChillerName); SetupOutputVariable(state, "Chiller Heater Evaporator Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->ChillSupplyTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ChillerName); SetupOutputVariable(state, "Chiller Heater Evaporator Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->ChillWaterFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -681,21 +676,21 @@ void ExhaustAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) if (this->isWaterCooled) { SetupOutputVariable(state, "Chiller Heater Condenser Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->CondReturnTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ChillerName); SetupOutputVariable(state, "Chiller Heater Condenser Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->CondSupplyTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ChillerName); SetupOutputVariable(state, "Chiller Heater Condenser Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->CondWaterFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -703,7 +698,7 @@ void ExhaustAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) } else { SetupOutputVariable(state, "Chiller Heater Condenser Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->CondReturnTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -712,21 +707,21 @@ void ExhaustAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater Heating Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->HotWaterReturnTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ChillerName); SetupOutputVariable(state, "Chiller Heater Heating Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->HotWaterSupplyTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ChillerName); SetupOutputVariable(state, "Chiller Heater Heating Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->HotWaterFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -734,28 +729,28 @@ void ExhaustAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater Cooling Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->CoolPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ChillerName); SetupOutputVariable(state, "Chiller Heater Maximum Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->CoolingCapacity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ChillerName); SetupOutputVariable(state, "Chiller Heater Heating Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->HeatPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ChillerName); SetupOutputVariable(state, "Chiller Heater Maximum Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->HeatingCapacity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -763,7 +758,7 @@ void ExhaustAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, this->FractionOfPeriodRunning, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -771,14 +766,14 @@ void ExhaustAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater Source Exhaust Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->ExhaustInTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ChillerName); SetupOutputVariable(state, "Chiller Heater Source Exhaust Inlet Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->ExhaustInFlow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -786,14 +781,14 @@ void ExhaustAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater Heating Heat Recovery Potential Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->ExhHeatRecPotentialHeat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ChillerName); SetupOutputVariable(state, "Chiller Heater Cooling Heat Recovery Potential Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->ExhHeatRecPotentialCool, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -801,14 +796,14 @@ void ExhaustAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater Cooling Source Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->CoolThermalEnergyUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ChillerName); SetupOutputVariable(state, "Chiller Heater Heating Source Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->HeatThermalEnergyUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/ChillerExhaustAbsorption.hh b/src/EnergyPlus/ChillerExhaustAbsorption.hh index 126b88cddab..f9545cb948e 100644 --- a/src/EnergyPlus/ChillerExhaustAbsorption.hh +++ b/src/EnergyPlus/ChillerExhaustAbsorption.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ChillerGasAbsorption.cc b/src/EnergyPlus/ChillerGasAbsorption.cc index 550973c0fca..42bb82b4bf4 100644 --- a/src/EnergyPlus/ChillerGasAbsorption.cc +++ b/src/EnergyPlus/ChillerGasAbsorption.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -535,67 +535,64 @@ void GasAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater Evaporator Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->CoolingLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Heater Evaporator Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->CoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Chillers, {}, - "ENERGYTRANSFER", - "CHILLERS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Heater Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->HeatingLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Heater Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->HeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Boilers, {}, - "ENERGYTRANSFER", - "BOILERS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Heater Condenser Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->TowerLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Heater Condenser Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->TowerEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "ENERGYTRANSFER", - "HEATREJECTION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, format("Chiller Heater {} Rate", sFuelType), - OutputProcessor::Unit::W, + Constant::Units::W, this->FuelUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -603,7 +600,7 @@ void GasAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) // Do not include this on meters, this would duplicate the cool fuel and heat fuel SetupOutputVariable(state, format("Chiller Heater {} Energy", sFuelType), - OutputProcessor::Unit::J, + Constant::Units::J, this->FuelEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -611,27 +608,26 @@ void GasAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater Cooling {} Rate", sFuelType), - OutputProcessor::Unit::W, + Constant::Units::W, this->CoolFuelUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, format("Chiller Heater Cooling {} Energy", sFuelType), - OutputProcessor::Unit::J, + Constant::Units::J, this->CoolFuelEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eFuel2eResource[(int)this->FuelType], + OutputProcessor::SOVEndUseCat::Cooling, {}, - sFuelType, - "Cooling", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Heater Cooling COP", - OutputProcessor::Unit::W_W, + Constant::Units::W_W, this->FuelCOP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -639,27 +635,26 @@ void GasAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater Heating {} Rate", sFuelType), - OutputProcessor::Unit::W, + Constant::Units::W, this->HeatFuelUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, format("Chiller Heater Heating {} Energy", sFuelType), - OutputProcessor::Unit::J, + Constant::Units::J, this->HeatFuelEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eFuel2eResource[(int)this->FuelType], + OutputProcessor::SOVEndUseCat::Heating, {}, - sFuelType, - "Heating", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->ElectricPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -667,7 +662,7 @@ void GasAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) // Do not include this on meters, this would duplicate the cool electric and heat electric SetupOutputVariable(state, "Chiller Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->ElectricEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -675,61 +670,59 @@ void GasAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater Cooling Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->CoolElectricPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Heater Cooling Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->CoolElectricEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "Cooling", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Heater Heating Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->HeatElectricPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Heater Heating Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->HeatElectricEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "Heating", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Heater Evaporator Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->ChillReturnTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Heater Evaporator Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->ChillSupplyTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Heater Evaporator Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->ChillWaterFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -738,21 +731,21 @@ void GasAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) if (this->isWaterCooled) { SetupOutputVariable(state, "Chiller Heater Condenser Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->CondReturnTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Heater Condenser Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->CondSupplyTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Heater Condenser Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->CondWaterFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -760,7 +753,7 @@ void GasAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) } else { SetupOutputVariable(state, "Chiller Heater Condenser Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->CondReturnTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -769,21 +762,21 @@ void GasAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater Heating Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->HotWaterReturnTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Heater Heating Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->HotWaterSupplyTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Heater Heating Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->HotWaterFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -791,28 +784,28 @@ void GasAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater Cooling Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->CoolPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Heater Maximum Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->CoolingCapacity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Heater Heating Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->HeatPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Heater Maximum Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->HeatingCapacity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -820,7 +813,7 @@ void GasAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, this->FractionOfPeriodRunning, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/ChillerGasAbsorption.hh b/src/EnergyPlus/ChillerGasAbsorption.hh index d7c40f1b12c..cc709f933ff 100644 --- a/src/EnergyPlus/ChillerGasAbsorption.hh +++ b/src/EnergyPlus/ChillerGasAbsorption.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ChillerIndirectAbsorption.cc b/src/EnergyPlus/ChillerIndirectAbsorption.cc index cbc1c1edb50..1318627dd9d 100644 --- a/src/EnergyPlus/ChillerIndirectAbsorption.cc +++ b/src/EnergyPlus/ChillerIndirectAbsorption.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -573,7 +573,7 @@ void IndirectAbsorberSpecs::setupOutputVars(EnergyPlusData &state) { SetupOutputVariable(state, "Chiller Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.PumpingPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -581,20 +581,19 @@ void IndirectAbsorberSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.PumpingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "ELECTRICITY", - "Cooling", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Evaporator Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.QEvap, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -602,20 +601,19 @@ void IndirectAbsorberSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Evaporator Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.EvapEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Chillers, {}, - "ENERGYTRANSFER", - "CHILLERS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Evaporator Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.EvapInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -623,7 +621,7 @@ void IndirectAbsorberSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Evaporator Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.EvapOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -631,7 +629,7 @@ void IndirectAbsorberSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Evaporator Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->Report.Evapmdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -639,7 +637,7 @@ void IndirectAbsorberSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Condenser Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.QCond, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -647,20 +645,19 @@ void IndirectAbsorberSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Condenser Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.CondEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "ENERGYTRANSFER", - "HEATREJECTION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Condenser Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.CondInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -668,7 +665,7 @@ void IndirectAbsorberSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Condenser Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.CondOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -676,7 +673,7 @@ void IndirectAbsorberSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Condenser Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->Report.Condmdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -685,7 +682,7 @@ void IndirectAbsorberSpecs::setupOutputVars(EnergyPlusData &state) if (this->GenHeatSourceType == DataLoopNode::NodeFluidType::Water) { SetupOutputVariable(state, "Chiller Hot Water Consumption Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.QGenerator, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -693,21 +690,20 @@ void IndirectAbsorberSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Source Hot Water Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.GeneratorEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "EnergyTransfer", - "Cooling", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } else { if (this->GenInputOutputNodesUsed) { SetupOutputVariable(state, "Chiller Source Steam Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.QGenerator, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -715,20 +711,19 @@ void IndirectAbsorberSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Source Steam Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.GeneratorEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::PlantLoopHeatingDemand, + OutputProcessor::SOVEndUseCat::Chillers, {}, - "PLANTLOOPHEATINGDEMAND", - "CHILLERS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } else { SetupOutputVariable(state, "Chiller Source Steam Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.QGenerator, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -736,22 +731,21 @@ void IndirectAbsorberSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Source Steam Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.GeneratorEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::DistrictHeatingSteam, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "DistrictHeatingSteam", - "Cooling", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } } SetupOutputVariable(state, "Chiller COP", - OutputProcessor::Unit::W_W, + Constant::Units::W_W, this->Report.ActualCOP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -759,7 +753,7 @@ void IndirectAbsorberSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->Report.ChillerPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -767,7 +761,7 @@ void IndirectAbsorberSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Cycling Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->Report.ChillerCyclingFrac, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -775,7 +769,7 @@ void IndirectAbsorberSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Steam Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.LoopLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/ChillerIndirectAbsorption.hh b/src/EnergyPlus/ChillerIndirectAbsorption.hh index 9ddd9acc8ea..96147d7a5bd 100644 --- a/src/EnergyPlus/ChillerIndirectAbsorption.hh +++ b/src/EnergyPlus/ChillerIndirectAbsorption.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ChillerReformulatedEIR.cc b/src/EnergyPlus/ChillerReformulatedEIR.cc index 774a7e74c01..0409c1726cb 100644 --- a/src/EnergyPlus/ChillerReformulatedEIR.cc +++ b/src/EnergyPlus/ChillerReformulatedEIR.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -639,7 +639,7 @@ void ReformulatedEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) { SetupOutputVariable(state, "Chiller Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->ChillerPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -647,7 +647,7 @@ void ReformulatedEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Cycling Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->ChillerCyclingRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -655,7 +655,7 @@ void ReformulatedEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -663,20 +663,19 @@ void ReformulatedEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - "ELECTRICITY", - "Cooling", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, this->EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Evaporator Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QEvaporator, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -684,20 +683,19 @@ void ReformulatedEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Evaporator Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->EvapEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Chillers, {}, - "ENERGYTRANSFER", - "CHILLERS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller False Load Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->ChillerFalseLoadRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -705,7 +703,7 @@ void ReformulatedEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller False Load Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->ChillerFalseLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -713,7 +711,7 @@ void ReformulatedEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Evaporator Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->EvapInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -721,7 +719,7 @@ void ReformulatedEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Evaporator Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->EvapOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -729,7 +727,7 @@ void ReformulatedEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Evaporator Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->EvapMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -737,7 +735,7 @@ void ReformulatedEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Condenser Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QCondenser, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -745,20 +743,19 @@ void ReformulatedEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Condenser Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->CondEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "ENERGYTRANSFER", - "HEATREJECTION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller COP", - OutputProcessor::Unit::W_W, + Constant::Units::W_W, this->ActualCOP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -766,7 +763,7 @@ void ReformulatedEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Capacity Temperature Modifier Multiplier", - OutputProcessor::Unit::None, + Constant::Units::None, this->ChillerCapFT, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -774,7 +771,7 @@ void ReformulatedEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller EIR Temperature Modifier Multiplier", - OutputProcessor::Unit::None, + Constant::Units::None, this->ChillerEIRFT, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -782,7 +779,7 @@ void ReformulatedEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller EIR Part Load Modifier Multiplier", - OutputProcessor::Unit::None, + Constant::Units::None, this->ChillerEIRFPLR, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -790,7 +787,7 @@ void ReformulatedEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Condenser Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->CondInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -798,7 +795,7 @@ void ReformulatedEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Condenser Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->CondOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -806,7 +803,7 @@ void ReformulatedEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Condenser Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->CondMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -816,7 +813,7 @@ void ReformulatedEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) if (this->HeatRecActive) { SetupOutputVariable(state, "Chiller Total Recovered Heat Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QHeatRecovery, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -824,20 +821,19 @@ void ReformulatedEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Total Recovered Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->EnergyHeatRecovery, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "ENERGYTRANSFER", - "HEATRECOVERY", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Heat Recovery Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->HeatRecInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -845,7 +841,7 @@ void ReformulatedEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heat Recovery Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->HeatRecOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -853,7 +849,7 @@ void ReformulatedEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heat Recovery Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->HeatRecMassFlow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -861,7 +857,7 @@ void ReformulatedEIRChillerSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Effective Heat Rejection Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->ChillerCondAvgTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/ChillerReformulatedEIR.hh b/src/EnergyPlus/ChillerReformulatedEIR.hh index 44dd6e46aca..050c0f60a8e 100644 --- a/src/EnergyPlus/ChillerReformulatedEIR.hh +++ b/src/EnergyPlus/ChillerReformulatedEIR.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Coils/CoilCoolingDX.cc b/src/EnergyPlus/Coils/CoilCoolingDX.cc index 753cc507f88..adc30cf4964 100644 --- a/src/EnergyPlus/Coils/CoilCoolingDX.cc +++ b/src/EnergyPlus/Coils/CoilCoolingDX.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -244,201 +244,197 @@ void CoilCoolingDX::oneTimeInit(EnergyPlusData &state) // setup output variables, needs to be done after object is instantiated and emplaced SetupOutputVariable(state, "Cooling Coil Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->totalCoolingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Cooling Coil Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->totalCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "ENERGYTRANSFER", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->sensCoolingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->sensCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->latCoolingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->latCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->name); SetupOutputVariable(state, "Cooling Coil Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->performance.powerUse, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Cooling Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->performance.electricityConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); if (this->performance.compressorFuelType != Constant::eFuel::Electricity) { - std::string_view const sFuelType = Constant::eFuelNames[static_cast(this->performance.compressorFuelType)]; + std::string_view const sFuelType = Constant::eFuelNames[(int)this->performance.compressorFuelType]; SetupOutputVariable(state, format("Cooling Coil {} Rate", sFuelType), - OutputProcessor::Unit::W, + Constant::Units::W, this->performance.compressorFuelRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, format("Cooling Coil {} Energy", sFuelType), - OutputProcessor::Unit::J, + Constant::Units::J, this->performance.compressorFuelConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->name, + Constant::eFuel2eResource[(int)this->performance.compressorFuelType], + OutputProcessor::SOVEndUseCat::Cooling, {}, - sFuelType, - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } SetupOutputVariable(state, "Cooling Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, this->coolingCoilRuntimeFraction, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Cooling Coil Crankcase Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->performance.crankcaseHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Cooling Coil Crankcase Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->performance.crankcaseHeaterElectricityConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); // Ported from variable speed coil SetupOutputVariable(state, "Cooling Coil Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->airMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Cooling Coil Air Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->inletAirDryBulbTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Cooling Coil Air Inlet Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, this->inletAirHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Cooling Coil Air Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->outletAirDryBulbTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Cooling Coil Air Outlet Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, this->outletAirHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Cooling Coil Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->partLoadRatioReport, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Cooling Coil Upper Speed Level", - OutputProcessor::Unit::None, + Constant::Units::None, this->speedNumReport, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Cooling Coil Neighboring Speed Levels Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->speedRatioReport, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Cooling Coil Condenser Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->condenserInletTemperature, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Cooling Coil Dehumidification Mode", - OutputProcessor::Unit::None, + Constant::Units::None, this->dehumidificationMode, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Cooling Coil Waste Heat Power", - OutputProcessor::Unit::W, + Constant::Units::W, this->wasteHeatEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Cooling Coil Waste Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->wasteHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -447,137 +443,131 @@ void CoilCoolingDX::oneTimeInit(EnergyPlusData &state) if (this->performance.evapCondBasinHeatCap > 0) { SetupOutputVariable(state, "Cooling Coil Basin Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->performance.basinHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Cooling Coil Basin Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->performance.basinHeaterElectricityConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } if (this->condensateTankIndex > 0) { SetupOutputVariable(state, "Cooling Coil Condensate Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->condensateVolumeFlow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Cooling Coil Condensate Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->condensateVolumeConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->name, + Constant::eResource::OnSiteWater, + OutputProcessor::SOVEndUseCat::Condensate, {}, - "OnSiteWater", - "Condensate", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } if (this->evaporativeCondSupplyTankIndex > 0) { SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->evapCondPumpElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->evapCondPumpElecConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Condensate, {}, - "Electricity", - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->evaporativeCondSupplyTankVolumeFlow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->evaporativeCondSupplyTankConsump, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->name, + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::Condensate, {}, - "Water", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Mains Supply Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->evaporativeCondSupplyTankConsump, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->name, + Constant::eResource::MainsWater, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "MainsWater", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } if (this->SubcoolReheatFlag) { SetupOutputVariable(state, "SubcoolReheat Cooling Coil Operation Mode", - OutputProcessor::Unit::None, + Constant::Units::None, this->performance.OperatingMode, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "SubcoolReheat Cooling Coil Operation Mode Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->performance.ModeRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "SubcoolReheat Cooling Coil Recovered Heat Energy Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->recoveredHeatEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "SubcoolReheat Cooling Coil Recovered Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->recoveredHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRecovery, {}, - "ENERGYTRANSFER", - "HEATRECOVERY", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } if (this->isSecondaryDXCoilInZone) { SetupOutputVariable(state, "Secondary Coil Heat Rejection Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->secCoilSensHeatRejEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -585,7 +575,7 @@ void CoilCoolingDX::oneTimeInit(EnergyPlusData &state) SetupOutputVariable(state, "Secondary Coil Heat Rejection Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->secCoilSensHeatRejEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, diff --git a/src/EnergyPlus/Coils/CoilCoolingDX.hh b/src/EnergyPlus/Coils/CoilCoolingDX.hh index f2bedfd4d58..c84a2438f60 100644 --- a/src/EnergyPlus/Coils/CoilCoolingDX.hh +++ b/src/EnergyPlus/Coils/CoilCoolingDX.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitOperatingMode.cc b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitOperatingMode.cc index 0261d690593..b8b4ac5e59e 100644 --- a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitOperatingMode.cc +++ b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitOperatingMode.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitOperatingMode.hh b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitOperatingMode.hh index df25bc3a7db..fdf2daac4b9 100644 --- a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitOperatingMode.hh +++ b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitOperatingMode.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitPerformance.cc b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitPerformance.cc index 201b64503b8..e6883298d49 100644 --- a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitPerformance.cc +++ b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitPerformance.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitPerformance.hh b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitPerformance.hh index 34df8cb65de..b705945991d 100644 --- a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitPerformance.hh +++ b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitPerformance.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.cc b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.cc index 9d62b2a6762..6b1c4ca1f40 100644 --- a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.cc +++ b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.hh b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.hh index 57ec8f0d3f6..a6c2bcc3d69 100644 --- a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.hh +++ b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/CommandLineInterface.cc b/src/EnergyPlus/CommandLineInterface.cc index f7cd2b65fa5..2c77e37a702 100644 --- a/src/EnergyPlus/CommandLineInterface.cc +++ b/src/EnergyPlus/CommandLineInterface.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/CommandLineInterface.hh b/src/EnergyPlus/CommandLineInterface.hh index f2c9cf397cd..d0d17907653 100644 --- a/src/EnergyPlus/CommandLineInterface.hh +++ b/src/EnergyPlus/CommandLineInterface.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/CondenserLoopTowers.cc b/src/EnergyPlus/CondenserLoopTowers.cc index 81d4e7e0e8b..c7ad4fc5fea 100644 --- a/src/EnergyPlus/CondenserLoopTowers.cc +++ b/src/EnergyPlus/CondenserLoopTowers.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -586,12 +586,11 @@ namespace CondenserLoopTowers { ErrorsFound = true; } } else { // Tower performance input method is not specified as a valid "choice" - ShowSevereError( - state, - format("{} \"{}{}", - cCurrentModuleObject, - tower.Name, - R"(". Tower Performance Input Method must be "UFactorTimesAreaAndDesignWaterFlowRate" or "NominalCapacity".)")); + ShowSevereError(state, + format("{} \"{}{}", + cCurrentModuleObject, + tower.Name, + ". Tower Performance Input Method must be \"UFactorTimesAreaAndDesignWaterFlowRate\" or \"NominalCapacity\"")); ShowContinueError(state, format("Tower Performanace Input Method currently specified as: {}", AlphArray(4))); ErrorsFound = true; } @@ -1867,69 +1866,68 @@ namespace CondenserLoopTowers { if (this->TowerType == DataPlant::PlantEquipmentType::CoolingTower_SingleSpd) { SetupOutputVariable(state, "Cooling Tower Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->InletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->OutletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->WaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Qactual, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->FanPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->FanEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - "Electricity", - "HeatRejection", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::HeatRejection, this->EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); // Added for fluid bypass SetupOutputVariable(state, "Cooling Tower Bypass Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, this->BypassFraction, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Operating Cells Count", - OutputProcessor::Unit::None, + Constant::Units::None, this->NumCellOn, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Fan Cycling Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->FanCyclingRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1937,23 +1935,22 @@ namespace CondenserLoopTowers { if (this->BasinHeaterPowerFTempDiff > 0.0) { SetupOutputVariable(state, "Cooling Tower Basin Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->BasinHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Basin Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->BasinHeaterConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - "Electricity", - "HeatRejection", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::HeatRejection, "BasinHeater", - "Plant"); + OutputProcessor::SOVGroup::Plant); } } @@ -1961,68 +1958,67 @@ namespace CondenserLoopTowers { if (this->TowerType == DataPlant::PlantEquipmentType::CoolingTower_TwoSpd) { SetupOutputVariable(state, "Cooling Tower Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->InletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->OutletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->WaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Qactual, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->FanPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->FanEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - "Electricity", - "HeatRejection", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::HeatRejection, this->EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Cooling Tower Fan Cycling Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->FanCyclingRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Fan Speed Level", - OutputProcessor::Unit::None, + Constant::Units::None, this->SpeedSelected, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Operating Cells Count", - OutputProcessor::Unit::None, + Constant::Units::None, this->NumCellOn, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -2030,23 +2026,22 @@ namespace CondenserLoopTowers { if (this->BasinHeaterPowerFTempDiff > 0.0) { SetupOutputVariable(state, "Cooling Tower Basin Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->BasinHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Basin Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->BasinHeaterConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - "Electricity", - "HeatRejection", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::HeatRejection, "BasinHeater", - "Plant"); + OutputProcessor::SOVGroup::Plant); } } @@ -2054,68 +2049,67 @@ namespace CondenserLoopTowers { if (this->TowerType == DataPlant::PlantEquipmentType::CoolingTower_VarSpd) { SetupOutputVariable(state, "Cooling Tower Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->InletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->OutletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->WaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Qactual, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->FanPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->FanEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - "Electricity", - "HeatRejection", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::HeatRejection, this->EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Cooling Tower Air Flow Rate Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->AirFlowRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Fan Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->FanCyclingRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Operating Cells Count", - OutputProcessor::Unit::None, + Constant::Units::None, this->NumCellOn, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -2123,23 +2117,22 @@ namespace CondenserLoopTowers { if (this->BasinHeaterPowerFTempDiff > 0.0) { SetupOutputVariable(state, "Cooling Tower Basin Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->BasinHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Basin Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->BasinHeaterConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - "Electricity", - "HeatRejection", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::HeatRejection, "BasinHeater", - "Plant"); + OutputProcessor::SOVGroup::Plant); } } @@ -2147,54 +2140,53 @@ namespace CondenserLoopTowers { if (this->TowerType == DataPlant::PlantEquipmentType::CoolingTower_VarSpdMerkel) { SetupOutputVariable(state, "Cooling Tower Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->InletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->OutletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->WaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Qactual, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->FanPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->FanEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - "Electricity", - "HeatRejection", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::HeatRejection, this->EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Cooling Tower Fan Speed Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->AirFlowRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -2202,7 +2194,7 @@ namespace CondenserLoopTowers { SetupOutputVariable(state, "Cooling Tower Operating Cells Count", - OutputProcessor::Unit::None, + Constant::Units::None, this->NumCellOn, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -2210,158 +2202,153 @@ namespace CondenserLoopTowers { if (this->BasinHeaterPowerFTempDiff > 0.0) { SetupOutputVariable(state, "Cooling Tower Basin Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->BasinHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Basin Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->BasinHeaterConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - "Electricity", - "HeatRejection", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::HeatRejection, "BasinHeater", - "Plant"); + OutputProcessor::SOVGroup::Plant); } } // setup common water reporting for all types of towers. if (this->SuppliedByWaterSystem) { SetupOutputVariable(state, "Cooling Tower Make Up Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->MakeUpVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Make Up Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->MakeUpVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name); SetupOutputVariable(state, "Cooling Tower Storage Tank Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->TankSupplyVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Storage Tank Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->TankSupplyVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "Water", - "HeatRejection", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Cooling Tower Starved Storage Tank Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->StarvedMakeUpVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Starved Storage Tank Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->StarvedMakeUpVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name); SetupOutputVariable(state, "Cooling Tower Make Up Mains Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->StarvedMakeUpVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::MainsWater, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "MainsWater", - "HeatRejection", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } else { // tower water from mains and gets metered SetupOutputVariable(state, "Cooling Tower Make Up Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->MakeUpVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Make Up Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->MakeUpVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "Water", - "HeatRejection", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Cooling Tower Make Up Mains Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->MakeUpVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::MainsWater, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "MainsWater", - "HeatRejection", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } SetupOutputVariable(state, "Cooling Tower Water Evaporation Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->EvaporationVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Water Evaporation Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->EvaporationVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name); SetupOutputVariable(state, "Cooling Tower Water Drift Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->DriftVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Water Drift Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->DriftVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name); SetupOutputVariable(state, "Cooling Tower Water Blowdown Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->BlowdownVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Water Blowdown Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->BlowdownVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, diff --git a/src/EnergyPlus/CondenserLoopTowers.hh b/src/EnergyPlus/CondenserLoopTowers.hh index fd937bdadc4..2c794edafeb 100644 --- a/src/EnergyPlus/CondenserLoopTowers.hh +++ b/src/EnergyPlus/CondenserLoopTowers.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ConfiguredFunctions.hh b/src/EnergyPlus/ConfiguredFunctions.hh index 77c84f39ae5..c3397e05375 100644 --- a/src/EnergyPlus/ConfiguredFunctions.hh +++ b/src/EnergyPlus/ConfiguredFunctions.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ConfiguredFunctions.in.cc b/src/EnergyPlus/ConfiguredFunctions.in.cc index 6766281d5c2..ba331a4d2de 100644 --- a/src/EnergyPlus/ConfiguredFunctions.in.cc +++ b/src/EnergyPlus/ConfiguredFunctions.in.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Construction.cc b/src/EnergyPlus/Construction.cc index 23336708256..0f20fcd4fba 100644 --- a/src/EnergyPlus/Construction.cc +++ b/src/EnergyPlus/Construction.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Construction.hh b/src/EnergyPlus/Construction.hh index 1955d076215..a0a56b321ac 100644 --- a/src/EnergyPlus/Construction.hh +++ b/src/EnergyPlus/Construction.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ConvectionCoefficients.cc b/src/EnergyPlus/ConvectionCoefficients.cc index 2e0ab2be729..c2a27169d11 100644 --- a/src/EnergyPlus/ConvectionCoefficients.cc +++ b/src/EnergyPlus/ConvectionCoefficients.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ConvectionCoefficients.hh b/src/EnergyPlus/ConvectionCoefficients.hh index 5b5f421e004..ef75309f702 100644 --- a/src/EnergyPlus/ConvectionCoefficients.hh +++ b/src/EnergyPlus/ConvectionCoefficients.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ConvectionConstants.hh b/src/EnergyPlus/ConvectionConstants.hh index c35b379daad..2509cfac75f 100644 --- a/src/EnergyPlus/ConvectionConstants.hh +++ b/src/EnergyPlus/ConvectionConstants.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/CoolTower.cc b/src/EnergyPlus/CoolTower.cc index d6cab55cede..15c7531471d 100644 --- a/src/EnergyPlus/CoolTower.cc +++ b/src/EnergyPlus/CoolTower.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -436,161 +436,158 @@ namespace CoolTower { for (int CoolTowerNum = 1; CoolTowerNum <= NumCoolTowers; ++CoolTowerNum) { SetupOutputVariable(state, "Zone Cooltower Sensible Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataCoolTower->CoolTowerSys(CoolTowerNum).SenHeatLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr).Name); SetupOutputVariable(state, "Zone Cooltower Sensible Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataCoolTower->CoolTowerSys(CoolTowerNum).SenHeatPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr).Name); SetupOutputVariable(state, "Zone Cooltower Latent Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataCoolTower->CoolTowerSys(CoolTowerNum).LatHeatLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr).Name); SetupOutputVariable(state, "Zone Cooltower Latent Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataCoolTower->CoolTowerSys(CoolTowerNum).LatHeatPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr).Name); SetupOutputVariable(state, "Zone Cooltower Air Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataCoolTower->CoolTowerSys(CoolTowerNum).CoolTAirVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr).Name); SetupOutputVariable(state, "Zone Cooltower Current Density Air Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataCoolTower->CoolTowerSys(CoolTowerNum).AirVolFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr).Name); SetupOutputVariable(state, "Zone Cooltower Standard Density Air Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataCoolTower->CoolTowerSys(CoolTowerNum).AirVolFlowRateStd, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr).Name); SetupOutputVariable(state, "Zone Cooltower Air Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, state.dataCoolTower->CoolTowerSys(CoolTowerNum).CoolTAirMass, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr).Name); SetupOutputVariable(state, "Zone Cooltower Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataCoolTower->CoolTowerSys(CoolTowerNum).AirMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr).Name); SetupOutputVariable(state, "Zone Cooltower Air Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataCoolTower->CoolTowerSys(CoolTowerNum).InletDBTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr).Name); SetupOutputVariable(state, "Zone Cooltower Air Inlet Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, state.dataCoolTower->CoolTowerSys(CoolTowerNum).InletHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr).Name); SetupOutputVariable(state, "Zone Cooltower Air Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataCoolTower->CoolTowerSys(CoolTowerNum).OutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr).Name); SetupOutputVariable(state, "Zone Cooltower Air Outlet Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, state.dataCoolTower->CoolTowerSys(CoolTowerNum).OutletHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr).Name); SetupOutputVariable(state, "Zone Cooltower Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataCoolTower->CoolTowerSys(CoolTowerNum).PumpElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Zone(state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr).Name); SetupOutputVariable(state, "Zone Cooltower Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataCoolTower->CoolTowerSys(CoolTowerNum).PumpElecConsump, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr).Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - eResourceSOV::Electricity, - EndUseCatSOV::Cooling, - {}, - GroupSOV::HVAC); //"System"); + OutputProcessor::SOVGroup::HVAC); //"System"); if (state.dataCoolTower->CoolTowerSys(CoolTowerNum).CoolTWaterSupplyMode == WaterSupplyMode::FromMains) { SetupOutputVariable(state, "Zone Cooltower Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataCoolTower->CoolTowerSys(CoolTowerNum).CoolTWaterConsump, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr).Name); SetupOutputVariable(state, "Zone Cooltower Mains Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataCoolTower->CoolTowerSys(CoolTowerNum).CoolTWaterConsump, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr).Name, + Constant::eResource::MainsWater, + OutputProcessor::SOVEndUseCat::Cooling, {}, - eResourceSOV::MainsWater, - EndUseCatSOV::Cooling, - {}, - GroupSOV::HVAC); // "System"); + OutputProcessor::SOVGroup::HVAC); // "System"); } else if (state.dataCoolTower->CoolTowerSys(CoolTowerNum).CoolTWaterSupplyMode == WaterSupplyMode::FromTank) { SetupOutputVariable(state, "Zone Cooltower Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataCoolTower->CoolTowerSys(CoolTowerNum).CoolTWaterConsump, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr).Name); SetupOutputVariable(state, "Zone Cooltower Storage Tank Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataCoolTower->CoolTowerSys(CoolTowerNum).CoolTWaterConsump, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr).Name); SetupOutputVariable(state, "Zone Cooltower Starved Mains Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataCoolTower->CoolTowerSys(CoolTowerNum).CoolTWaterStarvMakeup, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Zone(state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr).Name, + Constant::eResource::MainsWater, + OutputProcessor::SOVEndUseCat::Cooling, {}, - eResourceSOV::MainsWater, - EndUseCatSOV::Cooling, - {}, - GroupSOV::HVAC); // "System"); + OutputProcessor::SOVGroup::HVAC); // "System"); } } } diff --git a/src/EnergyPlus/CoolTower.hh b/src/EnergyPlus/CoolTower.hh index 2effe4c3e87..b3668b434ab 100644 --- a/src/EnergyPlus/CoolTower.hh +++ b/src/EnergyPlus/CoolTower.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/CostEstimateManager.cc b/src/EnergyPlus/CostEstimateManager.cc index 40b8e41d3c0..6a132a16014 100644 --- a/src/EnergyPlus/CostEstimateManager.cc +++ b/src/EnergyPlus/CostEstimateManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -59,11 +59,12 @@ #include #include #include -#include +// #include #include #include #include #include +#include #include #include #include @@ -453,7 +454,7 @@ namespace CostEstimateManager { } else { ThisZoneID = Util::FindItem(state.dataCostEstimateManager->CostLineItem(Item).ParentObjName, Zone); if (ThisZoneID > 0) { - state.dataCostEstimateManager->CostLineItem(Item).Qty = state.dataDaylightingData->ZoneDaylight(ThisZoneID).totRefPts; + state.dataCostEstimateManager->CostLineItem(Item).Qty = state.dataDayltg->ZoneDaylight(ThisZoneID).totRefPts; } else { ShowSevereError(state, format("ComponentCost:LineItem: \"{}\", Daylighting:Controls, need to specify a valid zone name", @@ -879,12 +880,11 @@ namespace CostEstimateManager { } break; case ParentObject::DaylightingControls: { if (state.dataCostEstimateManager->CostLineItem(Item).ParentObjName == "*") { // wildcard, apply to all such components - state.dataCostEstimateManager->CostLineItem(Item).Qty = - sum(state.dataDaylightingData->ZoneDaylight, &Dayltg::ZoneDaylightCalc::totRefPts); + state.dataCostEstimateManager->CostLineItem(Item).Qty = sum(state.dataDayltg->ZoneDaylight, &Dayltg::ZoneDaylightCalc::totRefPts); } else if (!state.dataCostEstimateManager->CostLineItem(Item).ParentObjName.empty()) { ThisZoneID = Util::FindItem(state.dataCostEstimateManager->CostLineItem(Item).ParentObjName, Zone); if (ThisZoneID > 0) { - state.dataCostEstimateManager->CostLineItem(Item).Qty = state.dataDaylightingData->ZoneDaylight(ThisZoneID).totRefPts; + state.dataCostEstimateManager->CostLineItem(Item).Qty = state.dataDayltg->ZoneDaylight(ThisZoneID).totRefPts; } } diff --git a/src/EnergyPlus/CostEstimateManager.hh b/src/EnergyPlus/CostEstimateManager.hh index e2e59df998c..9e55eb62fab 100644 --- a/src/EnergyPlus/CostEstimateManager.hh +++ b/src/EnergyPlus/CostEstimateManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/CrossVentMgr.cc b/src/EnergyPlus/CrossVentMgr.cc index 7843cc084d2..0ef75a15575 100644 --- a/src/EnergyPlus/CrossVentMgr.cc +++ b/src/EnergyPlus/CrossVentMgr.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/CrossVentMgr.hh b/src/EnergyPlus/CrossVentMgr.hh index 82987f4cb8b..4437bc608ef 100644 --- a/src/EnergyPlus/CrossVentMgr.hh +++ b/src/EnergyPlus/CrossVentMgr.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/CurveManager.cc b/src/EnergyPlus/CurveManager.cc index 1a6f70cbe83..8b2fdf043c9 100644 --- a/src/EnergyPlus/CurveManager.cc +++ b/src/EnergyPlus/CurveManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -2721,7 +2721,7 @@ namespace Curve { std::string numStr = fmt::to_string(dim); SetupOutputVariable(state, format("Performance Curve Input Variable {} Value", numStr), - OutputProcessor::Unit::None, + Constant::Units::None, thisCurve->inputs[dim - 1], OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, @@ -2730,7 +2730,7 @@ namespace Curve { // set the output up last so it shows up after the input in the csv file SetupOutputVariable(state, "Performance Curve Output Value", - OutputProcessor::Unit::None, + Constant::Units::None, thisCurve->output, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, @@ -2740,28 +2740,28 @@ namespace Curve { for (auto &thisPressCurve : state.dataBranchAirLoopPlant->PressureCurve) { SetupOutputVariable(state, "Performance Curve Input Variable 1 Value", - OutputProcessor::Unit::None, + Constant::Units::None, thisPressCurve.CurveInput1, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, thisPressCurve.Name); SetupOutputVariable(state, "Performance Curve Input Variable 2 Value", - OutputProcessor::Unit::None, + Constant::Units::None, thisPressCurve.CurveInput2, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, thisPressCurve.Name); SetupOutputVariable(state, "Performance Curve Input Variable 3 Value", - OutputProcessor::Unit::None, + Constant::Units::None, thisPressCurve.CurveInput3, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, thisPressCurve.Name); SetupOutputVariable(state, "Performance Curve Output Value", - OutputProcessor::Unit::None, + Constant::Units::None, thisPressCurve.CurveOutput, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/CurveManager.hh b/src/EnergyPlus/CurveManager.hh index 87c10fb9f33..7622c60f8bd 100644 --- a/src/EnergyPlus/CurveManager.hh +++ b/src/EnergyPlus/CurveManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DElightManagerF.cc b/src/EnergyPlus/DElightManagerF.cc index 6074d11d40c..245bab94b24 100644 --- a/src/EnergyPlus/DElightManagerF.cc +++ b/src/EnergyPlus/DElightManagerF.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -60,13 +60,14 @@ #include #include #include -#include +// #include #include #include #include #include #include #include +#include #include #include #include @@ -148,7 +149,7 @@ namespace DElightManagerF { Real64 SinZoneRelNorth; // Sine of Zone rotation Real64 Xb; // temp var for transformation calc Real64 Yb; // temp var for transformation calc - Array1D RefPt_WCS_Coord(3); + Vector3 RefPt_WCS_Coord; Array1D_int iWndoConstIndexes(100); bool lWndoConstFound; // Flag for non-unique window const index std::string cNameWOBlanks; // Name without blanks @@ -236,7 +237,7 @@ namespace DElightManagerF { SinBldgRelNorth = std::sin(-state.dataHeatBal->BuildingAzimuth * Constant::DegToRadians); // Loop through the Daylighting:Controls objects that use DElight checking for a host Zone - for (auto &znDayl : state.dataDaylightingData->daylightControl) { + for (auto &znDayl : state.dataDayltg->daylightControl) { if (znDayl.DaylightMethod == Dayltg::DaylightingMethod::DElight) { // Register Error if 0 DElight RefPts have been input for valid DElight object @@ -252,15 +253,21 @@ namespace DElightManagerF { ShowWarningError(state, format("Maximum of 100 Reference Points exceeded for daylighting zone using DElight ={}", znDayl.Name)); ShowWarningError(state, " Only first 100 Reference Points included in DElight analysis"); } - znDayl.DaylRefPtAbsCoord.allocate(znDayl.TotalDaylRefPoints); - std::fill(znDayl.DaylRefPtAbsCoord.begin(), znDayl.DaylRefPtAbsCoord.end(), Vector3(0.0)); + + // Should already be allocated + assert((int)znDayl.refPts.size() == znDayl.TotalDaylRefPoints); + for (auto &refPt : znDayl.refPts) { + refPt.absCoords = {0.0, 0.0, 0.0}; + refPt.lums[(int)Lum::Illum] = 0.0; + refPt.glareIndex = 0.0; + } // RJH 2008-03-07: Allocate and Init DaylIllumAtRefPt array for this DElight zone - znDayl.DaylIllumAtRefPt.allocate(znDayl.TotalDaylRefPoints); - znDayl.DaylIllumAtRefPt = 0.0; - // following not used in DElight but allocated for convenience - znDayl.GlareIndexAtRefPt.allocate(znDayl.TotalDaylRefPoints); - znDayl.GlareIndexAtRefPt = 0.0; + // znDayl.DaylIllumAtRefPt.allocate(znDayl.TotalDaylRefPoints); + // znDayl.DaylIllumAtRefPt = 0.0; + // The following not used in DElight but allocated for convenience + // znDayl.GlareIndexAtRefPt.allocate(znDayl.TotalDaylRefPoints); + // znDayl.GlareIndexAtRefPt = 0.0; // Increment counter of Thermal Zones with valid hosted DElight object ++iNumDElightZones; @@ -272,7 +279,7 @@ namespace DElightManagerF { // Loop through the Daylighting:DElight objects searching for a match to the current Zone - for (auto &znDayl : state.dataDaylightingData->daylightControl) { + for (auto &znDayl : state.dataDayltg->daylightControl) { if (znDayl.DaylightMethod == Dayltg::DaylightingMethod::DElight) { int const izone = Util::FindItemInList(znDayl.ZoneName, state.dataHeatBal->Zone); if (izone != 0) { @@ -402,7 +409,7 @@ namespace DElightManagerF { // Loop through all Doppelganger Surface Names to ignore these Windows lWndoIsDoppelganger = false; - for (auto const &cfs : state.dataDaylightingData->DElightComplexFene) { + for (auto const &cfs : state.dataDayltg->DElightComplexFene) { // Is the current Window Surface a Doppelganger? if (wndo.Name == cfs.wndwName) { @@ -436,7 +443,7 @@ namespace DElightManagerF { // Loop through all Doppelganger Surface Names to ignore these Windows lWndoIsDoppelganger = false; - for (auto const &cfs : state.dataDaylightingData->DElightComplexFene) { + for (auto const &cfs : state.dataDayltg->DElightComplexFene) { // Is the current Window Surface a Doppelganger? if (wndo2.Name == cfs.wndwName) { @@ -489,7 +496,7 @@ namespace DElightManagerF { iHostedCFS = 0; // Loop through the input CFS objects searching for a match to the current Opaque Bounding Surface - for (auto const &cfs : state.dataDaylightingData->DElightComplexFene) { + for (auto const &cfs : state.dataDayltg->DElightComplexFene) { // Does the current Opaque Bounding Surface host the current CFS object? if (surf.Name == cfs.surfName) { @@ -502,7 +509,7 @@ namespace DElightManagerF { // Now write each of the hosted CFS data // Loop through the input CFS objects searching for a match to the current Opaque Bounding Surface - for (auto const &cfs : state.dataDaylightingData->DElightComplexFene) { + for (auto const &cfs : state.dataDayltg->DElightComplexFene) { // Does the current Opaque Bounding Surface host the current CFS object? if (surf.Name == cfs.surfName) { @@ -559,7 +566,7 @@ namespace DElightManagerF { print(delightInFile, Format_912, znDayl.TotalDaylRefPoints); // Loop through the Daylighting:DElight:Reference Point objects checking for the current DElight Zone host - for (auto &refPt : state.dataDaylightingData->DaylRefPt) { + for (auto &refPt : state.dataDayltg->DaylRefPt) { // Is this RefPt hosted by current DElight Zone? if (izone == refPt.ZoneNum) { @@ -569,20 +576,18 @@ namespace DElightManagerF { if (znDayl.TotalDaylRefPoints <= 100) { if (state.dataSurface->DaylRefWorldCoordSystem) { - RefPt_WCS_Coord(1) = refPt.x; - RefPt_WCS_Coord(2) = refPt.y; - RefPt_WCS_Coord(3) = refPt.z; + RefPt_WCS_Coord = refPt.coords; } else { // Transform reference point coordinates into building coordinate system - Xb = refPt.x * CosZoneRelNorth - refPt.y * SinZoneRelNorth + thisZone.OriginX; - Yb = refPt.x * SinZoneRelNorth + refPt.y * CosZoneRelNorth + thisZone.OriginY; + Xb = refPt.coords.x * CosZoneRelNorth - refPt.coords.y * SinZoneRelNorth + thisZone.OriginX; + Yb = refPt.coords.x * SinZoneRelNorth + refPt.coords.y * CosZoneRelNorth + thisZone.OriginY; // Transform into World Coordinate System - RefPt_WCS_Coord(1) = Xb * CosBldgRelNorth - Yb * SinBldgRelNorth; - RefPt_WCS_Coord(2) = Xb * SinBldgRelNorth + Yb * CosBldgRelNorth; - RefPt_WCS_Coord(3) = refPt.z + thisZone.OriginZ; - if (ldoTransform) { // Geometry transform - Xo = RefPt_WCS_Coord(1); // world coordinates.... shifted by relative north angle... - Yo = RefPt_WCS_Coord(2); + RefPt_WCS_Coord.x = Xb * CosBldgRelNorth - Yb * SinBldgRelNorth; + RefPt_WCS_Coord.y = Xb * SinBldgRelNorth + Yb * CosBldgRelNorth; + RefPt_WCS_Coord.z = refPt.coords.z + thisZone.OriginZ; + if (ldoTransform) { // Geometry transform + Xo = RefPt_WCS_Coord.x; // world coordinates.... shifted by relative north angle... + Yo = RefPt_WCS_Coord.y; // next derotate the building XnoRot = Xo * CosBldgRelNorth + Yo * SinBldgRelNorth; YnoRot = Yo * CosBldgRelNorth - Xo * SinBldgRelNorth; @@ -590,42 +595,42 @@ namespace DElightManagerF { Xtrans = XnoRot * std::sqrt(rnewAspectRatio / roldAspectRatio); Ytrans = YnoRot * std::sqrt(roldAspectRatio / rnewAspectRatio); // rerotate - RefPt_WCS_Coord(1) = Xtrans * CosBldgRelNorth - Ytrans * SinBldgRelNorth; + RefPt_WCS_Coord.x = Xtrans * CosBldgRelNorth - Ytrans * SinBldgRelNorth; - RefPt_WCS_Coord(2) = Xtrans * SinBldgRelNorth + Ytrans * CosBldgRelNorth; + RefPt_WCS_Coord.y = Xtrans * SinBldgRelNorth + Ytrans * CosBldgRelNorth; } } - znDayl.DaylRefPtAbsCoord(refPt.indexToFracAndIllum) = {RefPt_WCS_Coord(1), RefPt_WCS_Coord(2), RefPt_WCS_Coord(3)}; + znDayl.refPts(refPt.indexToFracAndIllum).absCoords = RefPt_WCS_Coord; // Validate that Reference Point coordinates are within the host Zone - if (RefPt_WCS_Coord(1) < thisZone.MinimumX || RefPt_WCS_Coord(1) > thisZone.MaximumX) { + if (RefPt_WCS_Coord.x < thisZone.MinimumX || RefPt_WCS_Coord.x > thisZone.MaximumX) { ShowWarningError( state, format("DElightInputGenerator:Reference point X Value outside Zone Min/Max X, Zone={}", zn.Name)); ShowSevereError(state, format("...X Reference Point= {:.2R}, Zone Minimum X= {:.2R}, Zone Maximum X= {:.2R}", thisZone.MinimumX, - RefPt_WCS_Coord(1), + RefPt_WCS_Coord.x, thisZone.MaximumX)); ErrorsFound = true; } - if (RefPt_WCS_Coord(2) < thisZone.MinimumY || RefPt_WCS_Coord(2) > thisZone.MaximumY) { + if (RefPt_WCS_Coord.y < thisZone.MinimumY || RefPt_WCS_Coord.y > thisZone.MaximumY) { ShowWarningError( state, format("DElightInputGenerator:Reference point Y Value outside Zone Min/Max Y, Zone={}", zn.Name)); ShowSevereError(state, format("...Y Reference Point= {:.2R}, Zone Minimum Y= {:.2R}, Zone Maximum Y= {:.2R}", thisZone.MinimumY, - RefPt_WCS_Coord(2), + RefPt_WCS_Coord.y, thisZone.MaximumY)); ErrorsFound = true; } - if (RefPt_WCS_Coord(3) < state.dataHeatBal->Zone(izone).MinimumZ || RefPt_WCS_Coord(3) > thisZone.MaximumZ) { + if (RefPt_WCS_Coord.z < state.dataHeatBal->Zone(izone).MinimumZ || RefPt_WCS_Coord.z > thisZone.MaximumZ) { ShowWarningError( state, format("DElightInputGenerator:Reference point Z Value outside Zone Min/Max Z, Zone={}", thisZone.Name)); ShowSevereError(state, format("...Z Reference Point= {:.2R}, Zone Minimum Z= {:.2R}, Zone Maximum Z= {:.2R}", thisZone.MinimumZ, - RefPt_WCS_Coord(3), + RefPt_WCS_Coord.z, thisZone.MaximumZ)); ErrorsFound = true; } @@ -638,17 +643,17 @@ namespace DElightManagerF { print(delightInFile, Format_913, cNameWOBlanks, - RefPt_WCS_Coord(1) * M2FT, - RefPt_WCS_Coord(2) * M2FT, - RefPt_WCS_Coord(3) * M2FT, - znDayl.FracZoneDaylit(refPt.indexToFracAndIllum), - znDayl.IllumSetPoint(refPt.indexToFracAndIllum) * LUX2FC, + RefPt_WCS_Coord.x * M2FT, + RefPt_WCS_Coord.y * M2FT, + RefPt_WCS_Coord.z * M2FT, + znDayl.refPts(refPt.indexToFracAndIllum).fracZoneDaylit, + znDayl.refPts(refPt.indexToFracAndIllum).illumSetPoint * LUX2FC, znDayl.LightControlType); // RJH 2008-03-07: Set up DaylIllumAtRefPt for output for this DElight zone RefPt SetupOutputVariable(state, "Daylighting Reference Point Illuminance", - OutputProcessor::Unit::lux, - znDayl.DaylIllumAtRefPt(refPt.indexToFracAndIllum), + Constant::Units::lux, + znDayl.refPts(refPt.indexToFracAndIllum).lums[(int)Lum::Illum], OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, refPt.Name); @@ -656,9 +661,9 @@ namespace DElightManagerF { print(delightInFile, Format_913, cNameWOBlanks, - RefPt_WCS_Coord(1) * M2FT, - RefPt_WCS_Coord(2) * M2FT, - RefPt_WCS_Coord(3) * M2FT, + RefPt_WCS_Coord.x * M2FT, + RefPt_WCS_Coord.y * M2FT, + RefPt_WCS_Coord.z * M2FT, 0.0, 0.0 * LUX2FC, znDayl.LightControlType); // should never happen but just in case send zero fraction and illuminance @@ -725,8 +730,8 @@ namespace DElightManagerF { constexpr std::string_view cCurrentModuleObject("Daylighting:DELight:ComplexFenestration"); int TotDElightCFS = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject); - state.dataDaylightingData->DElightComplexFene.allocate(TotDElightCFS); - for (auto &cfs : state.dataDaylightingData->DElightComplexFene) { + state.dataDayltg->DElightComplexFene.allocate(TotDElightCFS); + for (auto &cfs : state.dataDayltg->DElightComplexFene) { state.dataInputProcessing->inputProcessor->getObjectItem(state, cCurrentModuleObject, ++CFSNum, diff --git a/src/EnergyPlus/DElightManagerF.hh b/src/EnergyPlus/DElightManagerF.hh index 5ecf69cf80f..7925e7c56d4 100644 --- a/src/EnergyPlus/DElightManagerF.hh +++ b/src/EnergyPlus/DElightManagerF.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DXCoils.cc b/src/EnergyPlus/DXCoils.cc index 29be1fed671..e8170e723bb 100644 --- a/src/EnergyPlus/DXCoils.cc +++ b/src/EnergyPlus/DXCoils.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -5427,73 +5427,71 @@ void GetDXCoils(EnergyPlusData &state) // CurrentModuleObject='Coil:Cooling:DX:SingleSpeed/Coil:Cooling:DX:TwoStageWithHumidityControlMode' SetupOutputVariable(state, "Cooling Coil Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.TotalCoolingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.TotalCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "ENERGYTRANSFER", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.SensCoolingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.SensCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.LatCoolingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.LatCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.ElecCoolingPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.ElecCoolingConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, thisDXCoil.CoolingCoilRuntimeFraction, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5501,7 +5499,7 @@ void GetDXCoils(EnergyPlusData &state) if (thisDXCoil.IsSecondaryDXCoilInZone) { SetupOutputVariable(state, "Secondary Coil Heat Rejection Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.SecCoilSensibleHeatGainRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5512,96 +5510,91 @@ void GetDXCoils(EnergyPlusData &state) if (thisDXCoil.CondensateCollectMode == CondensateCollectAction::ToTank) { SetupOutputVariable(state, "Cooling Coil Condensate Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, thisDXCoil.CondensateVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Condensate Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisDXCoil.CondensateVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::OnSiteWater, + OutputProcessor::SOVEndUseCat::Condensate, {}, - "OnSiteWater", - "Condensate", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } if (thisDXCoil.ReportEvapCondVars) { SetupOutputVariable(state, "Cooling Coil Condenser Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisDXCoil.CondInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisDXCoil.EvapWaterConsump, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Water", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Mains Supply Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisDXCoil.EvapWaterConsump, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::MainsWater, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "MainsWater", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.EvapCondPumpElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.EvapCondPumpElecConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); if (thisDXCoil.BasinHeaterPowerFTempDiff > 0.0) { SetupOutputVariable(state, "Cooling Coil Basin Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.BasinHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Basin Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.BasinHeaterConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } } @@ -5610,14 +5603,14 @@ void GetDXCoils(EnergyPlusData &state) // CurrentModuleObject='Cooling:DX:TwoStageWithHumidityControlMode' SetupOutputVariable(state, "Cooling Coil Stage 2 Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, thisDXCoil.CoolingCoilStg2RuntimeFrac, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Dehumidification Mode", - OutputProcessor::Unit::None, + Constant::Units::None, thisDXCoil.DehumidificationMode, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5631,83 +5624,79 @@ void GetDXCoils(EnergyPlusData &state) // CurrentModuleObject='Coil:Heating:DX:SingleSpeed' SetupOutputVariable(state, "Heating Coil Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.TotalHeatingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Heating Coil Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.TotalHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "ENERGYTRANSFER", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.ElecHeatingPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Heating Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.ElecHeatingConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "HEATING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Defrost Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.DefrostPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Heating Coil Defrost Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.DefrostConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "HEATING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Crankcase Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.CrankcaseHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Heating Coil Crankcase Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.CrankcaseHeaterConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "HEATING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, thisDXCoil.HeatingCoilRuntimeFraction, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5715,35 +5704,35 @@ void GetDXCoils(EnergyPlusData &state) if (thisDXCoil.IsSecondaryDXCoilInZone) { SetupOutputVariable(state, "Secondary Coil Total Heat Removal Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.SecCoilTotalHeatRemovalRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Secondary Coil Sensible Heat Removal Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.SecCoilSensibleHeatRemovalRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Secondary Coil Latent Heat Removal Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.SecCoilLatentHeatRemovalRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Secondary Coil Sensible Heat Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisDXCoil.SecCoilSHR, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Secondary Coil Compressor Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisDXCoil.CompressorPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5756,73 +5745,71 @@ void GetDXCoils(EnergyPlusData &state) // CurrentModuleObject='Coil:Cooling:DX:TwoSpeed' SetupOutputVariable(state, "Cooling Coil Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.TotalCoolingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.TotalCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "ENERGYTRANSFER", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.SensCoolingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.SensCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.LatCoolingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.LatCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.ElecCoolingPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.ElecCoolingConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, thisDXCoil.CoolingCoilRuntimeFraction, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5830,7 +5817,7 @@ void GetDXCoils(EnergyPlusData &state) if (thisDXCoil.IsSecondaryDXCoilInZone) { SetupOutputVariable(state, "Secondary Coil Heat Rejection Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.SecCoilSensibleHeatGainRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5840,74 +5827,70 @@ void GetDXCoils(EnergyPlusData &state) if (thisDXCoil.ReportEvapCondVars) { SetupOutputVariable(state, "Cooling Coil Condenser Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisDXCoil.CondInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisDXCoil.EvapWaterConsump, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Water", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Mains Supply Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisDXCoil.EvapWaterConsump, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::MainsWater, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "MainsWater", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.EvapCondPumpElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.EvapCondPumpElecConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); if (thisDXCoil.BasinHeaterPowerFTempDiff > 0.0) { SetupOutputVariable(state, "Cooling Coil Basin Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.BasinHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Basin Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.BasinHeaterConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } } @@ -5919,7 +5902,7 @@ void GetDXCoils(EnergyPlusData &state) // or 'Coil:WaterHeating:AirToWaterHeatPump:Wrapped' SetupOutputVariable(state, "Cooling Coil Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.TotalCoolingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5928,20 +5911,19 @@ void GetDXCoils(EnergyPlusData &state) if (thisDXCoil.IsDXCoilInZone) { SetupOutputVariable(state, "Cooling Coil Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.TotalCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "ENERGYTRANSFER", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } else { SetupOutputVariable(state, "Cooling Coil Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.TotalCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -5950,35 +5932,35 @@ void GetDXCoils(EnergyPlusData &state) SetupOutputVariable(state, "Cooling Coil Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.SensCoolingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.SensCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.LatCoolingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.LatCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, thisDXCoil.CoolingCoilRuntimeFraction, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5987,36 +5969,35 @@ void GetDXCoils(EnergyPlusData &state) if (thisDXCoil.ReportCoolingCoilCrankcasePower) { SetupOutputVariable(state, "Cooling Coil Crankcase Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.CrankcaseHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Crankcase Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.CrankcaseHeaterConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::WaterSystem, //"DHW" {}, - "Electricity", - "WaterSystems", //"DHW", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } // new report variables for a HP water heater DX coil SetupOutputVariable(state, "Cooling Coil Total Water Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.TotalHeatingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Total Water Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.TotalHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -6024,23 +6005,22 @@ void GetDXCoils(EnergyPlusData &state) // ResourceTypeKey='ENERGYTRANSFER',EndUseKey='HEATING',GroupKey='Plant') SetupOutputVariable(state, "Cooling Coil Water Heating Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.ElecWaterHeatingPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Water Heating Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.ElecWaterHeatingConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::WaterSystem, // "DHW", {}, - "Electricity", - "WaterSystems", // "DHW", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } else if (thisDXCoil.DXCoilType_Num == CoilDX_MultiSpeedCooling) { @@ -6048,97 +6028,94 @@ void GetDXCoils(EnergyPlusData &state) // CurrentModuleObject='Coil:Cooling:DX:MultiSpeed' SetupOutputVariable(state, "Cooling Coil Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.TotalCoolingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.TotalCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "ENERGYTRANSFER", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.SensCoolingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.SensCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.LatCoolingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.LatCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.ElecCoolingPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.ElecCoolingConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); if (thisDXCoil.FuelType != Constant::eFuel::Electricity) { std::string_view sFuelType = Constant::eFuelNames[static_cast(thisDXCoil.FuelType)]; SetupOutputVariable(state, format("Cooling Coil {} Rate", sFuelType), - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.FuelUsed, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, format("Cooling Coil {} Energy", sFuelType), - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.FuelConsumed, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eFuel2eResource[(int)thisDXCoil.FuelType], + OutputProcessor::SOVEndUseCat::Cooling, {}, - sFuelType, - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } SetupOutputVariable(state, "Cooling Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, thisDXCoil.CoolingCoilRuntimeFraction, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -6147,80 +6124,76 @@ void GetDXCoils(EnergyPlusData &state) if (thisDXCoil.ReportEvapCondVars) { SetupOutputVariable(state, "Cooling Coil Condenser Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisDXCoil.CondInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisDXCoil.EvapWaterConsump, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Water", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Mains Supply Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisDXCoil.EvapWaterConsump, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::MainsWater, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "MainsWater", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.EvapCondPumpElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.EvapCondPumpElecConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); if (thisDXCoil.BasinHeaterPowerFTempDiff > 0.0) { SetupOutputVariable(state, "Cooling Coil Basin Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.BasinHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Basin Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.BasinHeaterConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } } if (thisDXCoil.IsSecondaryDXCoilInZone) { SetupOutputVariable(state, "Secondary Coil Heat Rejection Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.SecCoilSensibleHeatGainRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -6234,131 +6207,125 @@ void GetDXCoils(EnergyPlusData &state) // CurrentModuleObject='Coil:Heating:DX:MultiSpeed' SetupOutputVariable(state, "Heating Coil Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.TotalHeatingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Heating Coil Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.TotalHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "ENERGYTRANSFER", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.ElecHeatingPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Heating Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.ElecHeatingConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "HEATING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); if (thisDXCoil.FuelType != Constant::eFuel::Electricity) { std::string_view sFuelType = Constant::eFuelNames[static_cast(thisDXCoil.FuelType)]; SetupOutputVariable(state, format("Heating Coil {} Rate", sFuelType), - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.FuelUsed, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, format("Heating Coil {} Energy", sFuelType), - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.FuelConsumed, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eFuel2eResource[(int)thisDXCoil.FuelType], + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - sFuelType, - "HEATING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } if (thisDXCoil.FuelType != Constant::eFuel::Electricity && thisDXCoil.DefrostStrategy == StandardRatings::DefrostStrat::ReverseCycle) { std::string_view sFuelType = Constant::eFuelNames[static_cast(thisDXCoil.FuelType)]; SetupOutputVariable(state, format("Heating Coil Defrost {} Rate", sFuelType), - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.DefrostPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, format("Heating Coil Defrost {} Energy", sFuelType), - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.DefrostConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eFuel2eResource[(int)thisDXCoil.FuelType], + OutputProcessor::SOVEndUseCat::Heating, {}, - sFuelType, - "HEATING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } else { SetupOutputVariable(state, "Heating Coil Defrost Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.DefrostPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Heating Coil Defrost Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.DefrostConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "HEATING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } SetupOutputVariable(state, "Heating Coil Crankcase Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.CrankcaseHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Heating Coil Crankcase Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.CrankcaseHeaterConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "HEATING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, thisDXCoil.HeatingCoilRuntimeFraction, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -6367,28 +6334,28 @@ void GetDXCoils(EnergyPlusData &state) if (thisDXCoil.IsSecondaryDXCoilInZone) { SetupOutputVariable(state, "Secondary Coil Total Heat Removal Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.SecCoilTotalHeatRemovalRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Secondary Coil Sensible Heat Removal Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.SecCoilSensibleHeatRemovalRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Secondary Coil Latent Heat Removal Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.SecCoilLatentHeatRemovalRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Secondary Coil Sensible Heat Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisDXCoil.SecCoilSHR, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -6402,54 +6369,53 @@ void GetDXCoils(EnergyPlusData &state) // CurrentModuleObject='Coil:Cooling:DX:VariableRefrigerantFlow SetupOutputVariable(state, "Cooling Coil Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.TotalCoolingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.TotalCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "ENERGYTRANSFER", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.SensCoolingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.SensCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.LatCoolingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.LatCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, thisDXCoil.CoolingCoilRuntimeFraction, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -6457,23 +6423,22 @@ void GetDXCoils(EnergyPlusData &state) if (thisDXCoil.CondensateCollectMode == CondensateCollectAction::ToTank) { SetupOutputVariable(state, "Cooling Coil Condensate Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, thisDXCoil.CondensateVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Condensate Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisDXCoil.CondensateVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::OnSiteWater, + OutputProcessor::SOVEndUseCat::Condensate, {}, - "OnSiteWater", - "Condensate", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } } @@ -6483,26 +6448,25 @@ void GetDXCoils(EnergyPlusData &state) // CurrentModuleObject='Coil:Heating:DX:VariableRefrigerantFlow SetupOutputVariable(state, "Heating Coil Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.TotalHeatingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Heating Coil Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.TotalHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "ENERGYTRANSFER", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, thisDXCoil.HeatingCoilRuntimeFraction, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -6515,54 +6479,53 @@ void GetDXCoils(EnergyPlusData &state) // CurrentModuleObject='Coil:Cooling:DX:VariableRefrigerantFlow:FluidTemperatureControl SetupOutputVariable(state, "Cooling Coil Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.TotalCoolingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.TotalCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "ENERGYTRANSFER", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.SensCoolingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.SensCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.LatCoolingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.LatCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, thisDXCoil.CoolingCoilRuntimeFraction, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -6570,14 +6533,14 @@ void GetDXCoils(EnergyPlusData &state) // Followings for VRF_FluidTCtrl Only SetupOutputVariable(state, "Cooling Coil VRF Evaporating Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisDXCoil.EvaporatingTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil VRF Super Heating Degrees", - OutputProcessor::Unit::C, + Constant::Units::C, thisDXCoil.ActualSH, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -6586,23 +6549,22 @@ void GetDXCoils(EnergyPlusData &state) if (thisDXCoil.CondensateCollectMode == CondensateCollectAction::ToTank) { SetupOutputVariable(state, "Cooling Coil Condensate Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, thisDXCoil.CondensateVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Cooling Coil Condensate Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisDXCoil.CondensateVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::OnSiteWater, + OutputProcessor::SOVEndUseCat::Condensate, {}, - "OnSiteWater", - "Condensate", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } } @@ -6612,26 +6574,25 @@ void GetDXCoils(EnergyPlusData &state) // CurrentModuleObject='Coil:Heating:DX:VariableRefrigerantFlow:FluidTemperatureControl SetupOutputVariable(state, "Heating Coil Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisDXCoil.TotalHeatingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Heating Coil Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisDXCoil.TotalHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisDXCoil.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "ENERGYTRANSFER", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, thisDXCoil.HeatingCoilRuntimeFraction, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -6639,14 +6600,14 @@ void GetDXCoils(EnergyPlusData &state) // Followings for VRF_FluidTCtrl Only SetupOutputVariable(state, "Heating Coil VRF Condensing Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisDXCoil.CondensingTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, "Heating Coil VRF Subcooling Degrees", - OutputProcessor::Unit::C, + Constant::Units::C, thisDXCoil.ActualSC, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -6848,23 +6809,22 @@ void InitDXCoil(EnergyPlusData &state, int const DXCoilNum) // number of the cur if (state.dataDXCoils->DXCoil(DXCoilNumTemp).ReportCoolingCoilCrankcasePower) { SetupOutputVariable(state, "Cooling Coil Crankcase Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataDXCoils->DXCoil(DXCoilNumTemp).CrankcaseHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataDXCoils->DXCoil(DXCoilNumTemp).Name); SetupOutputVariable(state, "Cooling Coil Crankcase Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataDXCoils->DXCoil(DXCoilNumTemp).CrankcaseHeaterConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataDXCoils->DXCoil(DXCoilNumTemp).Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); state.dataDXCoils->DXCoil(DXCoilNumTemp).ReportCoolingCoilCrankcasePower = false; } } diff --git a/src/EnergyPlus/DXCoils.hh b/src/EnergyPlus/DXCoils.hh index 3b31c3b8b92..dabf66524fd 100644 --- a/src/EnergyPlus/DXCoils.hh +++ b/src/EnergyPlus/DXCoils.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DXFEarClipping.cc b/src/EnergyPlus/DXFEarClipping.cc index b4cbe54bec1..29722ed3e75 100644 --- a/src/EnergyPlus/DXFEarClipping.cc +++ b/src/EnergyPlus/DXFEarClipping.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DXFEarClipping.hh b/src/EnergyPlus/DXFEarClipping.hh index 6cafc2318cd..63b150750ec 100644 --- a/src/EnergyPlus/DXFEarClipping.hh +++ b/src/EnergyPlus/DXFEarClipping.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Data/BaseData.hh b/src/EnergyPlus/Data/BaseData.hh index 65d36858852..f95eb60e9c9 100644 --- a/src/EnergyPlus/Data/BaseData.hh +++ b/src/EnergyPlus/Data/BaseData.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Data/CommonIncludes.hh b/src/EnergyPlus/Data/CommonIncludes.hh index fc3e915bc6b..05bc1fac8aa 100644 --- a/src/EnergyPlus/Data/CommonIncludes.hh +++ b/src/EnergyPlus/Data/CommonIncludes.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -195,6 +195,7 @@ #include #include #include +#include #include #include #include diff --git a/src/EnergyPlus/Data/EnergyPlusData.cc b/src/EnergyPlus/Data/EnergyPlusData.cc index 42bcdbcafa3..0271951cc33 100644 --- a/src/EnergyPlus/Data/EnergyPlusData.cc +++ b/src/EnergyPlus/Data/EnergyPlusData.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -90,10 +90,9 @@ EnergyPlusData::EnergyPlusData() this->dataCurveManager = std::make_unique(); this->dataDXCoils = std::make_unique(); this->dataDXFEarClipping = std::make_unique(); - this->dataDaylightingData = std::make_unique(); this->dataDaylightingDevices = std::make_unique(); this->dataDaylightingDevicesData = std::make_unique(); - this->dataDaylightingManager = std::make_unique(); + this->dataDayltg = std::make_unique(); this->dataDefineEquipment = std::make_unique(); this->dataDemandManager = std::make_unique(); this->dataDesiccantDehumidifiers = std::make_unique(); @@ -168,6 +167,7 @@ EnergyPlusData::EnergyPlusData() this->dataHybridUnitaryAC = std::make_unique(); this->dataHysteresisPhaseChange = std::make_unique(); this->dataICEngElectGen = std::make_unique(); + this->dataIndoorGreen = std::make_unique(); this->dataInputProcessing = std::make_unique(); this->dataIPShortCut = std::make_unique(); this->dataIceThermalStorage = std::make_unique(); @@ -346,10 +346,9 @@ void EnergyPlusData::clear_state() this->dataCurveManager->clear_state(); this->dataDXCoils->clear_state(); this->dataDXFEarClipping->clear_state(); - this->dataDaylightingData->clear_state(); this->dataDaylightingDevices->clear_state(); this->dataDaylightingDevicesData->clear_state(); - this->dataDaylightingManager->clear_state(); + this->dataDayltg->clear_state(); this->dataDefineEquipment->clear_state(); this->dataDemandManager->clear_state(); this->dataDesiccantDehumidifiers->clear_state(); @@ -426,6 +425,7 @@ void EnergyPlusData::clear_state() this->dataICEngElectGen->clear_state(); this->dataIPShortCut->clear_state(); this->dataIceThermalStorage->clear_state(); + this->dataIndoorGreen->clear_state(); this->dataInputProcessing->clear_state(); this->dataIntegratedHP->clear_state(); this->dataInternalHeatGains->clear_state(); diff --git a/src/EnergyPlus/Data/EnergyPlusData.hh b/src/EnergyPlus/Data/EnergyPlusData.hh index b2419e8bc8b..f052bcb4a2c 100644 --- a/src/EnergyPlus/Data/EnergyPlusData.hh +++ b/src/EnergyPlus/Data/EnergyPlusData.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -108,9 +108,8 @@ struct DataWaterData; struct DataZoneControlsData; struct DataZoneEnergyDemandsData; struct DataZoneEquipmentData; -struct DaylightingData; struct DaylightingDevicesData; -struct DaylightingManagerData; +struct DaylightingData; struct DefineEquipData; struct DemandManagerData; struct DesiccantDehumidifiersData; @@ -186,6 +185,7 @@ struct HysteresisPhaseChangeData; struct ICEngineElectricGeneratorData; struct IPShortCutsData; struct IceThermalStorageData; +struct IndoorGreenData; struct IntegratedHeatPumpGlobalData; struct InternalHeatGainsData; struct LoopNodeData; @@ -365,9 +365,8 @@ struct EnergyPlusData : BaseGlobalStruct std::unique_ptr dataZoneCtrls; std::unique_ptr dataZoneEnergyDemand; std::unique_ptr dataZoneEquip; - std::unique_ptr dataDaylightingData; std::unique_ptr dataDaylightingDevices; - std::unique_ptr dataDaylightingManager; + std::unique_ptr dataDayltg; std::unique_ptr dataDefineEquipment; std::unique_ptr dataDemandManager; std::unique_ptr dataDesiccantDehumidifiers; @@ -443,6 +442,7 @@ struct EnergyPlusData : BaseGlobalStruct std::unique_ptr dataICEngElectGen; std::unique_ptr dataIPShortCut; std::unique_ptr dataIceThermalStorage; + std::unique_ptr dataIndoorGreen; std::unique_ptr dataIntegratedHP; std::unique_ptr dataInternalHeatGains; std::unique_ptr dataLoopNodes; diff --git a/src/EnergyPlus/DataAirLoop.hh b/src/EnergyPlus/DataAirLoop.hh index 760ee2b2874..7dbbdef2b64 100644 --- a/src/EnergyPlus/DataAirLoop.hh +++ b/src/EnergyPlus/DataAirLoop.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataAirSystems.cc b/src/EnergyPlus/DataAirSystems.cc index cabc09d56c7..837c8960a87 100644 --- a/src/EnergyPlus/DataAirSystems.cc +++ b/src/EnergyPlus/DataAirSystems.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataAirSystems.hh b/src/EnergyPlus/DataAirSystems.hh index 47d0d11c243..37a50ce4298 100644 --- a/src/EnergyPlus/DataAirSystems.hh +++ b/src/EnergyPlus/DataAirSystems.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -68,8 +68,8 @@ struct EnergyPlusData; namespace DataAirSystems { // Using/Aliasing - using DataPlant::MeterData; using DataPlant::SubcomponentData; + using OutputProcessor::MeterData; // Data // MODULE PARAMETER DEFINITIONS: diff --git a/src/EnergyPlus/DataBSDFWindow.hh b/src/EnergyPlus/DataBSDFWindow.hh index c77766380a5..f6640231925 100644 --- a/src/EnergyPlus/DataBSDFWindow.hh +++ b/src/EnergyPlus/DataBSDFWindow.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataBranchAirLoopPlant.hh b/src/EnergyPlus/DataBranchAirLoopPlant.hh index 28d5467eacb..bb0c59c82e4 100644 --- a/src/EnergyPlus/DataBranchAirLoopPlant.hh +++ b/src/EnergyPlus/DataBranchAirLoopPlant.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataBranchNodeConnections.hh b/src/EnergyPlus/DataBranchNodeConnections.hh index 4e19d9eaa01..9bd99fa9dfe 100644 --- a/src/EnergyPlus/DataBranchNodeConnections.hh +++ b/src/EnergyPlus/DataBranchNodeConnections.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataComplexFenestration.hh b/src/EnergyPlus/DataComplexFenestration.hh index 61f1e6b46f9..22e339e9c65 100644 --- a/src/EnergyPlus/DataComplexFenestration.hh +++ b/src/EnergyPlus/DataComplexFenestration.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataContaminantBalance.hh b/src/EnergyPlus/DataContaminantBalance.hh index 0538ca3e5da..789fe5b12e1 100644 --- a/src/EnergyPlus/DataContaminantBalance.hh +++ b/src/EnergyPlus/DataContaminantBalance.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataConvergParams.hh b/src/EnergyPlus/DataConvergParams.hh index 817fc173f12..4fb12f2619b 100644 --- a/src/EnergyPlus/DataConvergParams.hh +++ b/src/EnergyPlus/DataConvergParams.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataConversions.hh b/src/EnergyPlus/DataConversions.hh index aad6da983ce..6724482d3a6 100644 --- a/src/EnergyPlus/DataConversions.hh +++ b/src/EnergyPlus/DataConversions.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataDElight.hh b/src/EnergyPlus/DataDElight.hh index 77e42f8b2c0..3b6aea53f35 100644 --- a/src/EnergyPlus/DataDElight.hh +++ b/src/EnergyPlus/DataDElight.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataDaylighting.hh b/src/EnergyPlus/DataDaylighting.hh index 2132e361c9d..187e07670bb 100644 --- a/src/EnergyPlus/DataDaylighting.hh +++ b/src/EnergyPlus/DataDaylighting.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -52,7 +52,6 @@ #include #include #include -#include // EnergyPlus Headers #include @@ -65,6 +64,8 @@ namespace EnergyPlus { namespace Dayltg { + using DataSurfaces::Lum; + // Two kinds of reference points: used directly in daylighting, used to show illuminance map of zone constexpr int MaxMapRefPoints(2500); // Maximum number of Illuminance Map Ref Points @@ -81,6 +82,8 @@ namespace Dayltg { struct Illums { std::array sky = {0.0, 0.0, 0.0, 0.0}; + Real64 sun = 0.0; + Real64 sunDisk = 0.0; }; enum class ExtWinType @@ -155,6 +158,29 @@ namespace Dayltg { EPVector daylightControlIndexes; // Indexes to daylighting:controls object operating in this enclosure }; + struct DaylRefPtExtWin + { + Real64 solidAng = 0.0; + Real64 solidAngWtd = 0.0; + std::array, (int)Lum::Num> lums; + }; + + struct DaylRefPt + { + int num = 0; + Vector3 absCoords = {0.0, 0.0, 0.0}; + bool inBounds = true; + Real64 fracZoneDaylit = 0.0; + Real64 illumSetPoint = 0.0; + Real64 powerReductionFactor = 0.0; + Real64 timeExceedingGlareIndexSetPoint = 0.0; + Real64 timeExceedingDaylightIlluminanceSetPoint = 0.0; + std::array lums = {0.0, 0.0, 0.0}; + Real64 glareIndex = 0.0; + + Array1D extWins; + }; + struct DaylightingControl { std::string Name; // Name of the daylighting:controls object @@ -165,39 +191,21 @@ namespace Dayltg { Dayltg::DaylightingMethod DaylightMethod = DaylightingMethod::None; // Type of Daylighting (1=SplitFlux, 2=DElight) int AvailSchedNum = 0; // pointer to availability schedule if present int TotalExtWindows = 0; - int TotalDaylRefPoints = 0; // Number of daylighting reference points for this control - Array1D_int DaylRefPtNum; // Reference number to DaylRefPt array that stores Daylighting:ReferencePoint - Array1D> DaylRefPtAbsCoord; // =0.0 ! X,Y,Z coordinates of all daylighting reference points - // in absolute coordinate system (m) - // Points 1 and 2 are the control reference points - Array1D_bool DaylRefPtInBounds; // True when coordinates are in bounds of zone coordinates - Array1D FracZoneDaylit; // =0.0 ! Fraction of zone controlled by each reference point + int TotalDaylRefPoints = 0; // Number of daylighting reference points for this control + + Array1D refPts; // Points 1 and 2 are the control reference points Real64 sumFracLights = 0.0; // Sum of lighting control fractions for this daylighting control - Array1D IllumSetPoint; // =0.0 ! Illuminance setpoint at each reference point (lux) LtgCtrlType LightControlType = LtgCtrlType::Continuous; // Lighting control type (same for all reference points) - // (1=continuous, 2=stepped, 3=continuous/off) - int glareRefPtNumber = 0; // from field: Glare Calculation Daylighting Reference Point Name - Real64 ViewAzimuthForGlare = 0.0; // View direction relative to window for glare calculation (deg) - int MaxGlareallowed = 0; // Maximum allowable discomfort glare index - Real64 MinPowerFraction = 0.0; // Minimum fraction of power input that continuous dimming system can dim down to - Real64 MinLightFraction = 0.0; // Minimum fraction of light output that continuous dimming system can dim down to - int LightControlSteps = 0; // Number of levels (excluding zero) of stepped control system - Real64 LightControlProbability = 0.0; // For manual control of stepped systems, probability that lighting will - Real64 PowerReductionFactor = 1.0; // Electric power reduction factor for this control due to daylighting - Real64 DElightGriddingResolution = 0.0; // Field: Delight Gridding Resolution - Array1D RefPtPowerReductionFactor; // =1.0 ! Electric power reduction factor at reference points - // due to daylighting - Array1D DaylIllumAtRefPt; // =0.0 ! Daylight illuminance at reference points (lux) - Array1D GlareIndexAtRefPt; // =0.0 ! Glare index at reference points - Array1D BacLum; // =0.0 ! Background luminance at each reference point (cd/m2) - Array2D SolidAngAtRefPt; // (Number of Zones, Total Daylighting Reference Points) - Array2D SolidAngAtRefPtWtd; // (Number of Zones, Total Daylighting Reference Points) - Array2D> IllumFromWinAtRefPt; // (Number of Zones, 2, Total Daylighting Reference Points) - Array2D> - BackLumFromWinAtRefPt; // (Number of Zones, 2, Total Daylighting Reference Points) - Array2D> - SourceLumFromWinAtRefPt; // (Number of Zones, 2, Total Daylighting Reference Points) - Array1D TimeExceedingGlareIndexSPAtRefPt; + int glareRefPtNumber = 0; // from field: Glare Calculation Daylighting Reference Point Name + Real64 ViewAzimuthForGlare = 0.0; // View direction relative to window for glare calculation (deg) + int MaxGlareallowed = 0; // Maximum allowable discomfort glare index + Real64 MinPowerFraction = 0.0; // Minimum fraction of power input that continuous dimming system can dim down to + Real64 MinLightFraction = 0.0; // Minimum fraction of light output that continuous dimming system can dim down to + int LightControlSteps = 0; // Number of levels (excluding zero) of stepped control system + Real64 LightControlProbability = 0.0; // For manual control of stepped systems, probability that lighting will + Real64 PowerReductionFactor = 1.0; // Electric power reduction factor for this control due to daylighting + Real64 DElightGriddingResolution = 0.0; // Field: Delight Gridding Resolution + // Allocatable daylight factor arrays // Arguments (dimensions) for Dayl---Sky are: // 1: Sun position index / HourOfDay (1 to 24) @@ -206,23 +214,10 @@ namespace Dayltg { // 3: Reference point number (1 to Total Daylighting Reference Points) // 4: Sky type (1 to 4; 1 = clear, 2 = clear turbid, 3 = intermediate, 4 = overcast // 5: Daylit window number (1 to NumOfDayltgExtWins) - Array4D DaylIllFacSky; - Array4D DaylSourceFacSky; - Array4D DaylBackFacSky; - // Arguments (dimensions) for Dayl---Sun are: - // 1: Sun position index / HourOfDay (1 to 24) - // 2: Shading index (1 to MaxSlatAngs+1; 1 = bare window; 2 = with shade, or, if blinds - // 2 = first slat position, 3 = second position, ..., MaxSlatAngs+1 = last position) - // 3: Reference point number (1 to Total Daylighting Reference Points) - // 4: Daylit window number (1 to NumOfDayltgExtWins) - Array4D DaylIllFacSun; - Array4D DaylIllFacSunDisk; - Array4D DaylSourceFacSun; - Array4D DaylSourceFacSunDisk; - Array4D DaylBackFacSun; - Array4D DaylBackFacSunDisk; + std::array>, (int)Constant::HoursInDay + 1> daylFac; + // Time exceeding daylight illuminance setpoint at reference points (hours) - Array1D TimeExceedingDaylightIlluminanceSPAtRefPt; + // Array1D TimeExceedingDaylightIlluminanceSPAtRefPt; std::vector> ShadeDeployOrderExtWins; // describes how the fenestration surfaces should deploy the shades. // It is a list of lists. Each sublist is a group of fenestration surfaces that should be deployed together. Many times the // sublists a just a single index to a fenestration surface if they are deployed one at a time. @@ -236,11 +231,21 @@ namespace Dayltg { int totRefPts = 0.0; // For VisualResilienceSummary total number of rereference points }; - struct IllumMapData + struct DaylMapPt + { + Vector3 absCoords = {0.0, 0.0, 0.0}; + bool inBounds = true; + std::array lums = {0.0, 0.0, 0.0}; + std::array lumsHr = {0.0, 0.0, 0.0}; + + Array1D> winLums; + }; + + struct IllumMap { // Members std::string Name; // Map name - int zoneIndex; // Index to zone being mapped + int zoneIndex = 0; // Index to zone being mapped int enclIndex = 0; // Index to enclosure for this map Real64 Z = 0.0; // Elevation or height Real64 Xmin = 0.0; // Minimum X value @@ -255,47 +260,23 @@ namespace Dayltg { bool HeaderXLineLengthNeeded = true; // X header will likely be the longest line in the file int HeaderXLineLength = 0; // actual length of this X header line std::string pointsHeader; // part of the header that lists the reference points in the same zone - }; - struct MapCalcData - { - // Members - int TotalMapRefPoints = 0; // Number of illuminance map reference points in this zone (up to 100) - int zoneIndex = 0; // Pointer to zone being mapped - int enclIndex = 0; // Index to enclosure for this map - Array1D> MapRefPtAbsCoord; // X,Y,Z coordinates of all illuminance map reference points - // in absolute coordinate system (m) - // Points 1 and 2 are the control reference points - Array1D_bool MapRefPtInBounds; // True when coordinates are in bounds of zone coordinates - Array1D DaylIllumAtMapPt; // Daylight illuminance at illuminance map points (lux) - // following Hr - report avg hr - Array1D DaylIllumAtMapPtHr; // Daylight illuminance at illuminance map points (lux) - Array2D> IllumFromWinAtMapPt; // (Number of Zones, Total Map Reference Points) + int TotalMapRefPoints = 0; // Number of illuminance map reference points in this zone (up to 100) + Array1D refPts; // Arguments (dimensions) for Dayl---Sky are: // 1: Sun position index / HourOfDay (1 to 24) // 2: Daylit window number (1 to NumOfDayltgExtWins) // 3: Reference point number (1 to Total Map Reference Points) // 4: Shading index (1 to MaxSlatAngs+1; 1 = bare window; 2 = with shade, or, if blinds // 2 = first slat position, 3 = second position, ..., MaxSlatAngs+1 = last position) - // 5: Sky type (1 to 4; 1 = clear, 2 = clear turbid, 3 = intermediate, 4 = overcast - Array4D DaylIllFacSky; - // Arguments (dimensions) for Dayl---Sun are: - // 1: Sun position index / HourOfDay (1 to 24) - // 2: Daylit window number (1 to NumOfDayltgExtWins) - // 3: Reference point number (1 to Total Map Reference Points) - // 4: Shading index (1 to MaxSlatAngs+1; 1 = bare window; 2 = with shade, or, if blinds - // 2 = first slat position, 3 = second position, ..., MaxSlatAngs+1 = last position) - Array4D DaylIllFacSun; - Array4D DaylIllFacSunDisk; + std::array, (int)Constant::HoursInDay + 1> daylFac; }; struct RefPointData { - std::string Name; // Map name - int ZoneNum = 0; // Pointer to zone being referenced - Real64 x = 0.0; // x coordinate - Real64 y = 0.0; // y coordinate - Real64 z = 0.0; // z coordinate + std::string Name; // Map name + int ZoneNum = 0; // Pointer to zone being referenced + Vector3 coords = {0.0, 0.0, 0.0}; // x coordinate int indexToFracAndIllum = 0; }; @@ -310,30 +291,6 @@ namespace Dayltg { } // namespace Dayltg -struct DaylightingData : BaseGlobalStruct -{ - int maxRefPointsPerControl = 0; - bool mapResultsToReport = false; // used when only partial hour has "sun up" - bool mapResultsReported = false; // when no map results are ever reported this will still be false - char MapColSep; // Character for separating map columns (tab, space, comma) - bool DFSReportSizingDays = false; - bool DFSReportAllShadowCalculationDays = false; - - Array1D enclDaylight; - Array1D ZoneDaylight; - Array1D daylightControl; - Array1D IllumMap; - Array1D IllumMapCalc; - Array1D DaylRefPt; - Array1D DElightComplexFene; - Array1D spacePowerReductionFactor; // Average electric power reduction factor for space due to daylighting - - void clear_state() override - { - *this = DaylightingData(); - } -}; - } // namespace EnergyPlus #endif diff --git a/src/EnergyPlus/DataDaylightingDevices.hh b/src/EnergyPlus/DataDaylightingDevices.hh index 764db36db18..d42e165b797 100644 --- a/src/EnergyPlus/DataDaylightingDevices.hh +++ b/src/EnergyPlus/DataDaylightingDevices.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataDefineEquip.hh b/src/EnergyPlus/DataDefineEquip.hh index dc7f690cc5f..5f969faf87e 100644 --- a/src/EnergyPlus/DataDefineEquip.hh +++ b/src/EnergyPlus/DataDefineEquip.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataEnvironment.cc b/src/EnergyPlus/DataEnvironment.cc index abafad58b54..64efcd6e26d 100644 --- a/src/EnergyPlus/DataEnvironment.cc +++ b/src/EnergyPlus/DataEnvironment.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataEnvironment.hh b/src/EnergyPlus/DataEnvironment.hh index 15c9af46954..41b9942527c 100644 --- a/src/EnergyPlus/DataEnvironment.hh +++ b/src/EnergyPlus/DataEnvironment.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataErrorTracking.hh b/src/EnergyPlus/DataErrorTracking.hh index b0b827bc995..f5f150f10fe 100644 --- a/src/EnergyPlus/DataErrorTracking.hh +++ b/src/EnergyPlus/DataErrorTracking.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataGenerators.hh b/src/EnergyPlus/DataGenerators.hh index 7860a314a29..e69401fd45e 100644 --- a/src/EnergyPlus/DataGenerators.hh +++ b/src/EnergyPlus/DataGenerators.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataGlobalConstants.hh b/src/EnergyPlus/DataGlobalConstants.hh index 6abbaff76a7..faf76d6d07e 100644 --- a/src/EnergyPlus/DataGlobalConstants.hh +++ b/src/EnergyPlus/DataGlobalConstants.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -76,6 +76,21 @@ namespace Constant { Num }; + static constexpr std::array endUseNamesUC = {"HEATING", + "COOLING", + "INTERIORLIGHTS", + "EXTERIORLIGHTS", + "INTERIOREQUIPMENT", + "EXTERIOREQUIPMENT", + "FANS", + "PUMPS", + "HEATREJECTION", + "HUMIDIFIER", + "HEATRECOVERY", + "WATERSYSTEMS", + "REFRIGERATION", + "COGENERATION"}; + enum class eResource { Invalid = -1, @@ -200,153 +215,321 @@ namespace Constant { eFuel::Invalid, eFuel::Invalid}; - constexpr std::array(eFuel::Num)> eFuel2eResource = {eResource::Electricity, - eResource::NaturalGas, - eResource::Gasoline, - eResource::Diesel, - eResource::Coal, - eResource::Propane, - eResource::FuelOilNo1, - eResource::FuelOilNo2, - eResource::OtherFuel1, - eResource::OtherFuel2, - eResource::DistrictCooling, - eResource::DistrictHeatingWater, - eResource::DistrictHeatingSteam, - eResource::Water, - eResource::None}; + constexpr std::array eFuel2eResource = {eResource::Electricity, + eResource::NaturalGas, + eResource::Gasoline, + eResource::Diesel, + eResource::Coal, + eResource::Propane, + eResource::FuelOilNo1, + eResource::FuelOilNo2, + eResource::OtherFuel1, + eResource::OtherFuel2, + eResource::DistrictCooling, + eResource::DistrictHeatingWater, + eResource::DistrictHeatingSteam, + eResource::Water, + eResource::None}; + + static constexpr std::array eResourceNamesUC = {"ELECTRICITY", + "NATURALGAS", + "GASOLINE", + "DIESEL", + "COAL", + "PROPANE", + "FUELOILNO1", + "FUELOILNO2", + "OTHERFUEL1", + "OTHERFUEL2", + "DISTRICTCOOLING", + "DISTRICTHEATINGWATER", + "DISTRICTHEATINGSTEAM", + "WATER", + "NONE", + "ENERGYTRANSFER", + "ELECTRICITYPRODUCED", + "ELECTRICITYPURCHASED", + "ELECTRICITYSURPLUSSOLD", + "ELECTRICITYNET", + "SOLARWATER", + "SOLARAIR", + "CARBON EQUIVALENT", + "PLANTLOOPHEATINGDEMAND", + "PLANTLOOPCOOLINGDEMAND", + "ONSITEWATER", + "MAINSWATER", + "RAINWATER", + "WELLWATER", + "CONDENSATE", + "WATERENVIRONMENTALFACTORS", + "SOURCE", + "GENERIC", + "SO2", + "NOX", + "N2O", + "PM", + "PM2.5", + "PM10", + "CO", + "CO2", + "CH4", + "NH3", + "NMVOC", + "HG", + "PB", + "NUCLEAR HIGH", + "NUCLEAR LOW"}; - static constexpr std::array(eResource::Num)> eResourceNamesUC = {"ELECTRICITY", - "NATURALGAS", - "GASOLINE", - "DIESEL", - "COAL", - "PROPANE", - "FUELOILNO1", - "FUELOILNO2", - "OTHERFUEL1", - "OTHERFUEL2", - "DISTRICTCOOLING", - "DISTRICTHEATINGWATER", - "DISTRICTHEATINGSTEAM", - "WATER", - "NONE", - "ENERGYTRANSFER", - "ELECTRICITYPRODUCED", - "ELECTRICITYPURCHASED", - "ELECTRICITYSURPLUSSOLD", - "ELECTRICITYNET", - "SOLARWATER", - "SOLARAIR", - "CARBON EQUIVALENT", - "PLANTLOOPHEATINGDEMAND", - "PLANTLOOPCOOLINGDEMAND", - "ONSITEWATER", - "MAINSWATER", - "RAINWATER", - "WELLWATER", - "CONDENSATE", - "WATERENVIRONMENTALFACTORS", - "SOURCE", - "GENERIC", - "SO2", - "NOX", - "N2O", - "PM", - "PM2.5", - "PM10", - "CO", - "CO2", - "CH4", - "NH3", - "NMVOC", - "HG", - "PB", - "NUCLEAR HIGH", - "NUCLEAR LOW"}; + static constexpr std::array eResourceNames = {"Electricity", + "NaturalGas", + "Gasoline", + "Diesel", + "Coal", + "Propane", + "FuelOilNo1", + "FuelOilNo2", + "OtherFuel1", + "OtherFuel2", + "DistrictCooling", + "DistrictHeatingWater", + "DistrictHeatingSteam", + "Water", + "None", + "EnergyTransfer", + "ElectricityProduced", + "ElectricityPurchased", + "ElectricitySurplusSold", + "ElectricityNet", + "SolarWater", + "SolarAir", + "Carbon Equivalent", + "PlantLoopHeatingDemand", + "PlantLoopCoolingDemand", + "OnSiteWater", + "MainsWater", + "RainWater", + "WellWater", + "Condensate", + "WaterEnvironmentalFactors", + "Source", + "Generic", + "SO2", + "NOx", + "N2O", + "PM", + "PM2.5", + "PM10", + "CO", + "CO2", + "CH4", + "NH3", + "NMVOC", + "Hg", + "Pb", + "Nuclear High", + "Nuclear Low"}; - static constexpr std::array(eResource::Num)> eResourceNames = {"Electricity", - "NaturalGas", - "Gasoline", - "Diesel", - "Coal", - "Propane", - "FuelOilNo1", - "FuelOilNo2", - "OtherFuel1", - "OtherFuel2", - "DistrictCooling", - "DistrictHeatingWater", - "DistrictHeatingSteam", - "Water", - "None", - "EnergyTransfer", - "ElectricityProduced", - "ElectricityPurchased", - "ElectricitySurplusSold", - "ElectricityNet", - "SolarWater", - "SolarAir", - "Carbon Equivalent", - "PlantLoopHeatingDemand", - "PlantLoopCoolingDemand", - "OnSiteWater", - "MainsWater", - "RainWater", - "WellWater", - "Condensate", - "WaterEnvironmentalFactors", - "Source", - "Generic", - "SO2", - "NOx", - "N2O", - "PM", - "PM2.5", - "PM10", - "CO", - "CO2", - "CH4", - "NH3", - "NMVOC", - "Hg", - "Pb", - "Nuclear High", - "Nuclear Low"}; + static constexpr std::array eFuelNamesUC = { + eResourceNamesUC[(int)eFuel2eResource[(int)eFuel::Electricity]], + eResourceNamesUC[(int)eFuel2eResource[(int)eFuel::NaturalGas]], + eResourceNamesUC[(int)eFuel2eResource[(int)eFuel::Gasoline]], + eResourceNamesUC[(int)eFuel2eResource[(int)eFuel::Diesel]], + eResourceNamesUC[(int)eFuel2eResource[(int)eFuel::Coal]], + eResourceNamesUC[(int)eFuel2eResource[(int)eFuel::Propane]], + eResourceNamesUC[(int)eFuel2eResource[(int)eFuel::FuelOilNo1]], + eResourceNamesUC[(int)eFuel2eResource[(int)eFuel::FuelOilNo2]], + eResourceNamesUC[(int)eFuel2eResource[(int)eFuel::OtherFuel1]], + eResourceNamesUC[(int)eFuel2eResource[(int)eFuel::OtherFuel2]], + eResourceNamesUC[(int)eFuel2eResource[(int)eFuel::DistrictCooling]], + eResourceNamesUC[(int)eFuel2eResource[(int)eFuel::DistrictHeatingWater]], + eResourceNamesUC[(int)eFuel2eResource[(int)eFuel::DistrictHeatingSteam]], + eResourceNamesUC[(int)eFuel2eResource[(int)eFuel::Water]], + eResourceNamesUC[(int)eFuel2eResource[(int)eFuel::None]]}; - static constexpr std::array(eFuel::Num)> eFuelNamesUC = { - eResourceNamesUC[static_cast(eFuel2eResource[static_cast(eFuel::Electricity)])], - eResourceNamesUC[static_cast(eFuel2eResource[static_cast(eFuel::NaturalGas)])], - eResourceNamesUC[static_cast(eFuel2eResource[static_cast(eFuel::Gasoline)])], - eResourceNamesUC[static_cast(eFuel2eResource[static_cast(eFuel::Diesel)])], - eResourceNamesUC[static_cast(eFuel2eResource[static_cast(eFuel::Coal)])], - eResourceNamesUC[static_cast(eFuel2eResource[static_cast(eFuel::Propane)])], - eResourceNamesUC[static_cast(eFuel2eResource[static_cast(eFuel::FuelOilNo1)])], - eResourceNamesUC[static_cast(eFuel2eResource[static_cast(eFuel::FuelOilNo2)])], - eResourceNamesUC[static_cast(eFuel2eResource[static_cast(eFuel::OtherFuel1)])], - eResourceNamesUC[static_cast(eFuel2eResource[static_cast(eFuel::OtherFuel2)])], - eResourceNamesUC[static_cast(eFuel2eResource[static_cast(eFuel::DistrictCooling)])], - eResourceNamesUC[static_cast(eFuel2eResource[static_cast(eFuel::DistrictHeatingWater)])], - eResourceNamesUC[static_cast(eFuel2eResource[static_cast(eFuel::DistrictHeatingSteam)])], - eResourceNamesUC[static_cast(eFuel2eResource[static_cast(eFuel::Water)])], - eResourceNamesUC[static_cast(eFuel2eResource[static_cast(eFuel::None)])]}; + static constexpr std::array eFuelNames = { + eResourceNames[(int)eFuel2eResource[(int)eFuel::Electricity]], + eResourceNames[(int)eFuel2eResource[(int)eFuel::NaturalGas]], + eResourceNames[(int)eFuel2eResource[(int)eFuel::Gasoline]], + eResourceNames[(int)eFuel2eResource[(int)eFuel::Diesel]], + eResourceNames[(int)eFuel2eResource[(int)eFuel::Coal]], + eResourceNames[(int)eFuel2eResource[(int)eFuel::Propane]], + eResourceNames[(int)eFuel2eResource[(int)eFuel::FuelOilNo1]], + eResourceNames[(int)eFuel2eResource[(int)eFuel::FuelOilNo2]], + eResourceNames[(int)eFuel2eResource[(int)eFuel::OtherFuel1]], + eResourceNames[(int)eFuel2eResource[(int)eFuel::OtherFuel2]], + eResourceNames[(int)eFuel2eResource[(int)eFuel::DistrictCooling]], + eResourceNames[(int)eFuel2eResource[(int)eFuel::DistrictHeatingWater]], + eResourceNames[(int)eFuel2eResource[(int)eFuel::DistrictHeatingSteam]], + eResourceNames[(int)eFuel2eResource[(int)eFuel::Water]], + eResourceNames[(int)eFuel2eResource[(int)eFuel::None]]}; + + enum class Units + { + Invalid = -1, + kg_s, + C, + kgWater_kgDryAir, + ppm, + Pa, + m3_s, + None, + min, + W, + J, + m3, + kg, + ach, + W_W, + lux, + lum_W, + hr, + cd_m2, + J_kgWater, + m_s, + W_m2, + m, + Ah, + A, + V, + deltaC, + kmol_s, + umol_m2s, + rev_min, + Btu_h_W, + W_m2K, + J_kg, + kg_kg, + Perc, + deg, + s, + kg_m3, + kg_m2s, + J_kgK, + L, + K_m, + m2, + W_m2C, + rad, + J_m2, + clo, + W_mK, + W_K, + K_W, + kgWater_s, + unknown, + customEMS, + Num + }; - static constexpr std::array(eFuel::Num)> eFuelNames = { - eResourceNames[static_cast(eFuel2eResource[static_cast(eFuel::Electricity)])], - eResourceNames[static_cast(eFuel2eResource[static_cast(eFuel::NaturalGas)])], - eResourceNames[static_cast(eFuel2eResource[static_cast(eFuel::Gasoline)])], - eResourceNames[static_cast(eFuel2eResource[static_cast(eFuel::Diesel)])], - eResourceNames[static_cast(eFuel2eResource[static_cast(eFuel::Coal)])], - eResourceNames[static_cast(eFuel2eResource[static_cast(eFuel::Propane)])], - eResourceNames[static_cast(eFuel2eResource[static_cast(eFuel::FuelOilNo1)])], - eResourceNames[static_cast(eFuel2eResource[static_cast(eFuel::FuelOilNo2)])], - eResourceNames[static_cast(eFuel2eResource[static_cast(eFuel::OtherFuel1)])], - eResourceNames[static_cast(eFuel2eResource[static_cast(eFuel::OtherFuel2)])], - eResourceNames[static_cast(eFuel2eResource[static_cast(eFuel::DistrictCooling)])], - eResourceNames[static_cast(eFuel2eResource[static_cast(eFuel::DistrictHeatingWater)])], - eResourceNames[static_cast(eFuel2eResource[static_cast(eFuel::DistrictHeatingSteam)])], - eResourceNames[static_cast(eFuel2eResource[static_cast(eFuel::Water)])], - eResourceNames[static_cast(eFuel2eResource[static_cast(eFuel::None)])]}; + constexpr std::array unitNames = { + "kg/s", // kg_s + "C", // C + "kgWater/kgDryAir", // kgWater_kgDryAir + "ppm", // ppm + "Pa", // Pa + "m3/s", // m3_s + "", // None + "min", // min + "W", // W + "J", // J + "m3", // m3 + "kg", // kg + "ach", // ach + "W/W", // W_W + "lux", // lux + "lum/W", // lum_W + "hr", // hr + "cd/m2", // cd_m2 + "J/kgWater", // J_kgWater + "m/s", // m_s + "W/m2", // W_m2 + "m", // m + "Ah", // Ah + "A", // A + "V", // V + "deltaC", // deltaC + "kmol/s", // kmol_s + "umol/m2-s", // umol_m2s (micromol_m2s) + "rev/min", // rev_min + "Btu/h-W", // Btu_h_W + "W/m2-K", // W_m2K + "J/kg", // J_kg + "kg/kg", // kg_kg + "%", // Perc + "deg", // deg + "s", // s + "kg/m3", // kg_m3 + "kg/m2-s", // kg_m2s + "J/kg-K", // J_kgK + "L", // L + "K/m", // K_m + "m2", // m2 + "W/m2-C", // W_m2C + "rad", // rad + "J/m2", // J_m2 + "clo", // clo + "W/m-K", // W_mK + "W/K", // W_K + "K/W", // K_W + "kgWater/s", // kgWater_s + "unknown", // unknown + "customEMS" // customEMS + }; + + constexpr std::array unitNamesUC = { + "KG/S", // kg_s + "C", // C + "KGWATER/KGDRYAIR", // kgWater_kgDryAir + "PPM", // ppm + "PA", // Pa + "M3/S", // m3_s + "", // None + "MIN", // min + "W", // W + "J", // J + "M3", // m3 + "KG", // kg + "ACH", // ach + "W/W", // W_W + "LUX", // lux + "LUM/W", // lum_W + "HR", // hr + "CD/M2", // cd_m2 + "J/KGWATER", // J_kgWater + "M/S", // m_s + "W/M2", // W_m2 + "M", // m + "AH", // Ah + "A", // A + "V", // V + "DELTAC", // deltaC + "KMOL/S", // kmol_s + "UMOL/M2-S", // umol_m2s (micromol_m2s) + "REV/MIN", // rev_min + "BTH/H-W", // Btu_h_W + "W/M2-K", // W_m2K + "J/KG", // J_kg + "KG/KG", // kg_kg + "%", // Perc + "DEG", // deg + "S", // s + "KG/M3", // kg_m3 + "KG/M2-S", // kg_m2s + "J/KG-K", // J_kgK + "L", // L + "K/M", // K_m + "M2", // m2 + "W/M2-C", // W_m2C + "RAD", // rad + "J/M2", // J_m2 + "CLO", // clo + "W/M-K", // W_mK + "W/K", // W_K + "K/W", // K_W + "KGWATER/S", // kgWater_s + "UNKNOWN", // unknown + "CUSTOMEMS" // customEMS + }; enum class CallIndicator { @@ -359,6 +542,16 @@ namespace Constant { Num }; + enum class HeatOrCool + { + Invalid = -1, + NoHeatNoCool, + CoolingOnly, + HeatingOnly, + HeatAndCool, + Num + }; + // Parameters for KindOfSim enum class KindOfSim { diff --git a/src/EnergyPlus/DataGlobals.hh b/src/EnergyPlus/DataGlobals.hh index de332949f02..49c9370652f 100644 --- a/src/EnergyPlus/DataGlobals.hh +++ b/src/EnergyPlus/DataGlobals.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataHVACControllers.hh b/src/EnergyPlus/DataHVACControllers.hh index 428aa227011..a0052239425 100644 --- a/src/EnergyPlus/DataHVACControllers.hh +++ b/src/EnergyPlus/DataHVACControllers.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataHVACGlobals.cc b/src/EnergyPlus/DataHVACGlobals.cc index 08fd51ad6e2..aad320a1d5a 100644 --- a/src/EnergyPlus/DataHVACGlobals.cc +++ b/src/EnergyPlus/DataHVACGlobals.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataHVACGlobals.hh b/src/EnergyPlus/DataHVACGlobals.hh index 6fb2789f328..2b7d6e1989f 100644 --- a/src/EnergyPlus/DataHVACGlobals.hh +++ b/src/EnergyPlus/DataHVACGlobals.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataHVACSystems.hh b/src/EnergyPlus/DataHVACSystems.hh index cb2ddef362a..c06a2c42bd3 100644 --- a/src/EnergyPlus/DataHVACSystems.hh +++ b/src/EnergyPlus/DataHVACSystems.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataHeatBalFanSys.hh b/src/EnergyPlus/DataHeatBalFanSys.hh index f19cca58c6f..e519ef3da87 100644 --- a/src/EnergyPlus/DataHeatBalFanSys.hh +++ b/src/EnergyPlus/DataHeatBalFanSys.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -89,6 +89,15 @@ namespace DataHeatBalFanSys { int DualPMVErrIndex = 0; // Dual PMV setpoint error index }; + struct SurfQRadFromHVACData + { + Real64 HTRadSys; // Current radiant heat flux to surface from high temperature radiant heaters + Real64 HWBaseboard; // Current radiant heat flux to surface from hot water baseboard heaters + Real64 SteamBaseboard; // Current radiant heat flux to surface from steam baseboard heaters + Real64 ElecBaseboard; // Current radiant heat flux to surface from electric baseboard heaters + Real64 CoolingPanel; // Current radiant heat flux to surface from simple cooling panels + }; + } // namespace DataHeatBalFanSys struct HeatBalFanSysData : BaseGlobalStruct @@ -121,17 +130,8 @@ struct HeatBalFanSysData : BaseGlobalStruct // temperature at source Array1D CTFTuserConstPart; // Constant Outside Portion of the CTF calculation of // temperature at the user specified location - Array1D SurfQHTRadSys; // Current radiant heat flux at a surface due to the presence - // of high temperature radiant heaters - Array1D SurfQHWBaseboard; // Current radiant heat flux at a surface due to the presence - // of hot water baseboard heaters - Array1D SurfQSteamBaseboard; // Current radiant heat flux at a surface due to the presence - // of steam baseboard heaters - Array1D SurfQElecBaseboard; // Current radiant heat flux at a surface due to the presence - // of electric baseboard heaters - Array1D SurfQCoolingPanel; // Current radiant heat flux at a surface due to the presence - // of simple cooling panels - Array1D QRadSurfAFNDuct; // Current radiant heat flux at a surface due to radiation from AFN ducts + EPVector surfQRadFromHVAC; // Radiant heat flux to surface from radiant HVAC equipment + Array1D QRadSurfAFNDuct; // Current radiant heat flux at a surface due to radiation from AFN ducts Array1D QPoolSurfNumerator; // Current pool heat flux impact at the surface (numerator of surface heat balance) Array1D PoolHeatTransCoefs; // Current pool heat transfer coefficients (denominator of surface heat balance) Array1D RadSysTiHBConstCoef; // Inside heat balance coefficient that is constant diff --git a/src/EnergyPlus/DataHeatBalSurface.hh b/src/EnergyPlus/DataHeatBalSurface.hh index cd28b5f7ffe..cbde885b5d3 100644 --- a/src/EnergyPlus/DataHeatBalSurface.hh +++ b/src/EnergyPlus/DataHeatBalSurface.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -140,7 +140,6 @@ struct HeatBalSurfData : BaseGlobalStruct Array1D SurfQRadIntGainsInRep; // Surface thermal radiation heat gain at Inside face [J] Array1D SurfQdotRadIntGainsInRep; // Surface thermal radiation heat transfer inside face surface [W] // these next four all are for Radiative HVAC sources of radiation gains on inside face - Array1D AnyRadiantSystems; // True if there are any radiant systems Array1D SurfQRadHVACInRep; // Surface thermal radiation heat gain at Inside face [J] Array1D SurfQdotRadHVACInRep; // Surface thermal radiation heat transfer inside face surface [W] Array1D SurfQdotRadHVACInPerArea; // [W/m2]Surface thermal radiation heat transfer rate per m2 at Inside face surf diff --git a/src/EnergyPlus/DataHeatBalance.cc b/src/EnergyPlus/DataHeatBalance.cc index 0b0e3197b92..69cc2c4d750 100644 --- a/src/EnergyPlus/DataHeatBalance.cc +++ b/src/EnergyPlus/DataHeatBalance.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -55,11 +55,11 @@ // EnergyPlus Headers #include #include -#include #include #include #include #include +#include #include #include #include @@ -202,81 +202,81 @@ void ZoneData::SetWindDirAt(Real64 const fac) WindDir = fac; } -void AirReportVars::setUpOutputVars(EnergyPlusData &state, std::string_view prefix, std::string_view name) +void AirReportVars::setUpOutputVars(EnergyPlusData &state, std::string_view prefix, std::string const &name) { SetupOutputVariable(state, format("{} Mean Air Temperature", prefix), - OutputProcessor::Unit::C, + Constant::Units::C, this->MeanAirTemp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} Operative Temperature", prefix), - OutputProcessor::Unit::C, + Constant::Units::C, this->OperativeTemp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} Mean Air Dewpoint Temperature", prefix), - OutputProcessor::Unit::C, + Constant::Units::C, this->MeanAirDewPointTemp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} Mean Air Humidity Ratio", prefix), - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, this->MeanAirHumRat, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} Air Heat Balance Internal Convective Heat Gain Rate", prefix), - OutputProcessor::Unit::W, + Constant::Units::W, this->SumIntGains, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} Air Heat Balance Surface Convection Rate", prefix), - OutputProcessor::Unit::W, + Constant::Units::W, this->SumHADTsurfs, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} Air Heat Balance Interzone Air Transfer Rate", prefix), - OutputProcessor::Unit::W, + Constant::Units::W, this->SumMCpDTzones, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} Air Heat Balance Outdoor Air Transfer Rate", prefix), - OutputProcessor::Unit::W, + Constant::Units::W, this->SumMCpDtInfil, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} Air Heat Balance System Air Transfer Rate", prefix), - OutputProcessor::Unit::W, + Constant::Units::W, this->SumMCpDTsystem, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} Air Heat Balance System Convective Heat Gain Rate", prefix), - OutputProcessor::Unit::W, + Constant::Units::W, this->SumNonAirSystem, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} Air Heat Balance Air Energy Storage Rate", prefix), - OutputProcessor::Unit::W, + Constant::Units::W, this->CzdTdt, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -284,7 +284,7 @@ void AirReportVars::setUpOutputVars(EnergyPlusData &state, std::string_view pref if (state.dataGlobal->DisplayAdvancedReportVariables) { SetupOutputVariable(state, format("{} Air Heat Balance Deviation Rate", prefix), - OutputProcessor::Unit::W, + Constant::Units::W, this->imBalance, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1039,7 +1039,7 @@ void CalcScreenTransmittance(EnergyPlusData &state, ShowFatalError(state, "Syntax error, optional arguments Theta and Phi must be present when optional ScreenNumber is used."); } } else { - ScNum = state.dataSurface->SurfWinScreenNumber(SurfaceNum); + ScNum = state.dataSurface->SurfaceWindow(SurfaceNum).screenNum; } if (present(Theta)) { @@ -1053,7 +1053,7 @@ void CalcScreenTransmittance(EnergyPlusData &state, } NormalAzimuth = SunAzimuthToScreenNormal; } else { - SunAzimuth = std::atan2(state.dataEnvrn->SOLCOS(1), state.dataEnvrn->SOLCOS(2)); + SunAzimuth = std::atan2(state.dataEnvrn->SOLCOS.x, state.dataEnvrn->SOLCOS.y); if (SunAzimuth < 0.0) SunAzimuth += 2.0 * Constant::Pi; SurfaceAzimuth = state.dataSurface->Surface(SurfaceNum).Azimuth * Constant::DegToRadians; NormalAzimuth = SunAzimuth - SurfaceAzimuth; @@ -1386,7 +1386,7 @@ void AllocateIntGains(EnergyPlusData &state) state.dataHeatBal->ZoneIntGain.allocate(state.dataGlobal->NumOfZones); state.dataHeatBal->spaceIntGain.allocate(state.dataGlobal->numSpaces); state.dataHeatBal->spaceIntGainDevices.allocate(state.dataGlobal->numSpaces); - state.dataDaylightingData->spacePowerReductionFactor.dimension(state.dataGlobal->numSpaces, 1.0); + state.dataDayltg->spacePowerReductionFactor.dimension(state.dataGlobal->numSpaces, 1.0); } } // namespace EnergyPlus::DataHeatBalance diff --git a/src/EnergyPlus/DataHeatBalance.hh b/src/EnergyPlus/DataHeatBalance.hh index 7dc58674e9a..d7dd761083f 100644 --- a/src/EnergyPlus/DataHeatBalance.hh +++ b/src/EnergyPlus/DataHeatBalance.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -54,7 +54,6 @@ #include #include #include -#include // EnergyPlus Headers #include @@ -278,6 +277,7 @@ namespace DataHeatBalance { SecHeatingDXCoilMultiSpeed, ElectricLoadCenterConverter, FanSystemModel, + IndoorGreen, Num }; @@ -358,7 +358,8 @@ namespace DataHeatBalance { "COIL:COOLING:DX:MULTISPEED", "COIL:HEATING:DX:MULTISPEED", "ELECTRICLOADCENTER:STORAGE:CONVERTER", - "FAN:SYSTEMMODEL"}; + "FAN:SYSTEMMODEL", + "INDOORGREEN"}; static constexpr std::array(DataHeatBalance::IntGainType::Num)> IntGainTypeNamesCC = { "People", @@ -414,7 +415,8 @@ namespace DataHeatBalance { "Coil:Cooling:DX:MultiSpeed", "Coil:Heating:DX:MultiSpeed", "ElectricLoadCenter:Storage:Converter", - "Fan:SystemModel"}; + "Fan:SystemModel", + "IndoorGreen"}; // Parameters for checking surface heat transfer models constexpr Real64 HighDiffusivityThreshold(1.e-5); // used to check if Material properties are out of line. @@ -481,8 +483,8 @@ namespace DataHeatBalance { Real64 minOccupants = 0.0; // minimum occupancy (sum of NomMinNumberPeople for the space People objects, not multiplied) Real64 maxOccupants = 0.0; // maximum occupancy (sum of NomMaxNumberPeople for the space People objects, not multiplied) bool isRemainderSpace = false; // True if this space is auto-generated "-Remainder" space + std::vector otherEquipFuelTypeNums; // List of fuel types used by other equipment in this space - std::vector otherEquipFuelTypeNames; // List of fuel types used by other equipment in this space // Pointers to Surface Data Structure // |AllSurfF |AllSurfL @@ -667,7 +669,6 @@ namespace DataHeatBalance { int ZoneContamControllerSchedIndex = 0; // Index for this schedule bool FlagCustomizedZoneCap = false; // True if customized Zone Capacitance Multiplier is used std::vector otherEquipFuelTypeNums; // List of fuel types used by other equipment in this zone - std::vector otherEquipFuelTypeNames; // List of fuel types used by other equipment in this zone // Hybrid Modeling Real64 ZoneMeasuredTemperature = 0.0; // Measured zone air temperature input by user @@ -698,10 +699,8 @@ namespace DataHeatBalance { int zoneOABalanceIndex = 0; // Index to ZoneAirBalance for this zone, if any // Spaces - bool anySurfacesWithoutSpace = false; // True if any surfaces in a zone do not have a space assigned in input - bool anySurfacesWithSpace = false; // True if any surfaces in a zone have a space assigned in input - EPVector spaceIndexes; // Indexes to spaces in this zone - int numSpaces = 0; // Number of spaces in this zone + EPVector spaceIndexes; // Indexes to spaces in this zone + int numSpaces = 0; // Number of spaces in this zone // Default Constructor ZoneData() : Centroid(0.0, 0.0, 0.0) @@ -1478,7 +1477,7 @@ namespace DataHeatBalance { Real64 SumEnthalpyM = 0.0; // Zone sum of EnthalpyM Real64 SumEnthalpyH = 0.0; // Zone sum of EnthalpyH - void setUpOutputVars(EnergyPlusData &state, std::string_view prefix, std::string_view name); + void setUpOutputVars(EnergyPlusData &state, std::string_view prefix, std::string const &name); }; struct ZonePreDefRepType diff --git a/src/EnergyPlus/DataIPShortCuts.hh b/src/EnergyPlus/DataIPShortCuts.hh index 9c3af30d8ad..2739705497a 100644 --- a/src/EnergyPlus/DataIPShortCuts.hh +++ b/src/EnergyPlus/DataIPShortCuts.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataLoopNode.hh b/src/EnergyPlus/DataLoopNode.hh index ee5dc3f6313..38be0da362f 100644 --- a/src/EnergyPlus/DataLoopNode.hh +++ b/src/EnergyPlus/DataLoopNode.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -154,6 +154,7 @@ namespace DataLoopNode { AirLoopHVACOutdoorAirsystem, AirLoopHVACReturnPath, AirLoopHVACReturnPlenum, + AirLoopHVACSplitter, AirLoopHVACSupplyPath, AirLoopHVACSupplyPlenum, AirLoopHVACUnitaryFurnaceHeatCool, diff --git a/src/EnergyPlus/DataMoistureBalance.hh b/src/EnergyPlus/DataMoistureBalance.hh index a1d7be29d0b..21b92918d6c 100644 --- a/src/EnergyPlus/DataMoistureBalance.hh +++ b/src/EnergyPlus/DataMoistureBalance.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataMoistureBalanceEMPD.hh b/src/EnergyPlus/DataMoistureBalanceEMPD.hh index 9242929368d..13a94c1a786 100644 --- a/src/EnergyPlus/DataMoistureBalanceEMPD.hh +++ b/src/EnergyPlus/DataMoistureBalanceEMPD.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataOutputs.cc b/src/EnergyPlus/DataOutputs.cc index fd6c152edb8..e39e78ac61e 100644 --- a/src/EnergyPlus/DataOutputs.cc +++ b/src/EnergyPlus/DataOutputs.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataOutputs.hh b/src/EnergyPlus/DataOutputs.hh index 5aee8a683ab..9c5100919bf 100644 --- a/src/EnergyPlus/DataOutputs.hh +++ b/src/EnergyPlus/DataOutputs.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataPhotovoltaics.hh b/src/EnergyPlus/DataPhotovoltaics.hh index 9fe063d5203..ec73e0116fa 100644 --- a/src/EnergyPlus/DataPhotovoltaics.hh +++ b/src/EnergyPlus/DataPhotovoltaics.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataPrecisionGlobals.hh b/src/EnergyPlus/DataPrecisionGlobals.hh index 9029934d57b..db28bd6bbdd 100644 --- a/src/EnergyPlus/DataPrecisionGlobals.hh +++ b/src/EnergyPlus/DataPrecisionGlobals.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataReportingFlags.hh b/src/EnergyPlus/DataReportingFlags.hh index 0c97a548f0f..09c2d4d210f 100644 --- a/src/EnergyPlus/DataReportingFlags.hh +++ b/src/EnergyPlus/DataReportingFlags.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataRoomAirModel.hh b/src/EnergyPlus/DataRoomAirModel.hh index 11a9291bc77..98b1e56beca 100644 --- a/src/EnergyPlus/DataRoomAirModel.hh +++ b/src/EnergyPlus/DataRoomAirModel.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataRootFinder.hh b/src/EnergyPlus/DataRootFinder.hh index 2f86add199d..f7561089ef3 100644 --- a/src/EnergyPlus/DataRootFinder.hh +++ b/src/EnergyPlus/DataRootFinder.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataRuntimeLanguage.cc b/src/EnergyPlus/DataRuntimeLanguage.cc index ca33fe54a4c..ed1c56e3da1 100644 --- a/src/EnergyPlus/DataRuntimeLanguage.cc +++ b/src/EnergyPlus/DataRuntimeLanguage.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataRuntimeLanguage.hh b/src/EnergyPlus/DataRuntimeLanguage.hh index 63c509ce3ed..acfba475cf6 100644 --- a/src/EnergyPlus/DataRuntimeLanguage.hh +++ b/src/EnergyPlus/DataRuntimeLanguage.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -56,7 +56,6 @@ // ObjexxFCL Headers #include #include -#include // EnergyPlus Headers #include @@ -254,7 +253,7 @@ namespace DataRuntimeLanguage { // INTEGER :: VarType = 0 // Default Constructor - OutputVarSensorType() : CheckedOkay(false), VariableType(OutputProcessor::VariableType::NotFound), Index(0), VariableNum(0), SchedNum(0) + OutputVarSensorType() : CheckedOkay(false), VariableType(OutputProcessor::VariableType::Invalid), Index(0), VariableNum(0), SchedNum(0) { } }; diff --git a/src/EnergyPlus/DataShadowingCombinations.hh b/src/EnergyPlus/DataShadowingCombinations.hh index ec314a7edaf..2d631d6f454 100644 --- a/src/EnergyPlus/DataShadowingCombinations.hh +++ b/src/EnergyPlus/DataShadowingCombinations.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataSizing.cc b/src/EnergyPlus/DataSizing.cc index 14cfe97cf32..1a35d2db443 100644 --- a/src/EnergyPlus/DataSizing.cc +++ b/src/EnergyPlus/DataSizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataSizing.hh b/src/EnergyPlus/DataSizing.hh index c6cba2c1cd1..310333b75b6 100644 --- a/src/EnergyPlus/DataSizing.hh +++ b/src/EnergyPlus/DataSizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -120,6 +120,7 @@ namespace DataSizing { // parameters for sizing constexpr int NonCoincident(1); constexpr int Coincident(2); + constexpr int Combination(3); // parameters for Cooling Peak Load Type enum class PeakLoad @@ -654,6 +655,16 @@ namespace DataSizing { Real64 applyTermUnitSizingHeatFlow(Real64 heatFlowWithOA, // Heating flow rate with MinOA limit applied Real64 heatFlowNoOA // Heating flow rate without MinOA limit applied ); + + Real64 applyTermUnitSizingCoolLoad(Real64 coolLoad) const + { + return coolLoad * this->SpecDesSensCoolingFrac; // Apply DesignSpecification:AirTerminal:Sizing to cooling load + } + + Real64 applyTermUnitSizingHeatLoad(Real64 heatLoad) const + { + return heatLoad * this->SpecDesSensHeatingFrac; // Apply DesignSpecification:AirTerminal:Sizing to heating load + } }; struct ZoneEqSizingData // data saved from zone eq component sizing and passed to subcomponents diff --git a/src/EnergyPlus/DataStringGlobals.hh b/src/EnergyPlus/DataStringGlobals.hh index 41fd5fdc9e3..c3d87faff07 100644 --- a/src/EnergyPlus/DataStringGlobals.hh +++ b/src/EnergyPlus/DataStringGlobals.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataStringGlobals.in.cc b/src/EnergyPlus/DataStringGlobals.in.cc index ac8ab21092e..9a0fba0684e 100644 --- a/src/EnergyPlus/DataStringGlobals.in.cc +++ b/src/EnergyPlus/DataStringGlobals.in.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataSurfaceColors.cc b/src/EnergyPlus/DataSurfaceColors.cc index b3e009f57ef..922911dc967 100644 --- a/src/EnergyPlus/DataSurfaceColors.cc +++ b/src/EnergyPlus/DataSurfaceColors.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataSurfaceColors.hh b/src/EnergyPlus/DataSurfaceColors.hh index ae92d06f4b3..42b7112bfa8 100644 --- a/src/EnergyPlus/DataSurfaceColors.hh +++ b/src/EnergyPlus/DataSurfaceColors.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataSurfaceLists.cc b/src/EnergyPlus/DataSurfaceLists.cc index 6b31f7ad9fe..124ca4dfeff 100644 --- a/src/EnergyPlus/DataSurfaceLists.cc +++ b/src/EnergyPlus/DataSurfaceLists.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataSurfaceLists.hh b/src/EnergyPlus/DataSurfaceLists.hh index 22c60254abd..d4be6b263c1 100644 --- a/src/EnergyPlus/DataSurfaceLists.hh +++ b/src/EnergyPlus/DataSurfaceLists.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataSurfaces.cc b/src/EnergyPlus/DataSurfaces.cc index 591ef18772f..586094b4164 100644 --- a/src/EnergyPlus/DataSurfaces.cc +++ b/src/EnergyPlus/DataSurfaces.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataSurfaces.hh b/src/EnergyPlus/DataSurfaces.hh index 97803efe7b5..1ee72ebdea5 100644 --- a/src/EnergyPlus/DataSurfaces.hh +++ b/src/EnergyPlus/DataSurfaces.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -177,6 +177,10 @@ namespace DataSurfaces { Num }; + int constexpr iFWC_Floor = (int)FWC::Floor; + int constexpr iFWC_Wall = (int)FWC::Wall; + int constexpr iFWC_Ceiling = (int)FWC::Ceiling; + enum class SurfaceFilter { Invalid = -1, @@ -214,6 +218,9 @@ namespace DataSurfaces { Num }; + constexpr int iWinCover_Bare = (int)WinCover::Bare; + constexpr int iWinCover_Shaded = (int)WinCover::Shaded; + enum class WinShadingType { Invalid = -1, @@ -338,6 +345,21 @@ namespace DataSurfaces { "KivaFoundation - TwoDimensionalFiniteDifference", "Air Boundary - No Heat Transfer"}; + // Daylighting illuminance components + enum class Lum + { + Invalid = -1, + Illum, + Back, + Source, + Num + }; + + // Trying out this new pattern to make code look less gnarly + constexpr int iLum_Illum = (int)Lum::Illum; + constexpr int iLum_Back = (int)Lum::Back; + constexpr int iLum_Source = (int)Lum::Source; + // IS_SHADED is the flag to indicate window has no shading device or shading device is off, and no daylight glare control // original expression: SHADE_FLAG == ShadeOff || SHADE_FLAG == ShadeOff constexpr bool NOT_SHADED(WinShadingType const ShadingFlag) @@ -679,6 +701,7 @@ namespace DataSurfaces { std::vector ConstituentSurfaceNums; // A vector of surface numbers which reference this surface for representative calculations int ConstructionStoredInputValue; // holds the original value for Construction per surface input SurfaceClass Class; + SurfaceClass OriginalClass; // Geometry related parameters SurfaceShape Shape; // Surface shape (Triangle=1,Quadrilateral=2,Rectangle=3, @@ -706,23 +729,23 @@ namespace DataSurfaces { // Vertices Array1D NewVertex; - Vertices Vertex; // Surface Vertices are represented by Number of Sides and Vector (type) - Vector Centroid; // computed centroid (also known as center of mass or surface balance point) - Vector lcsx; - Vector lcsy; - Vector lcsz; - Vector NewellAreaVector; - Vector NewellSurfaceNormalVector; // same as OutNormVec in vector notation - Array1D OutNormVec; // Direction cosines (outward normal vector) for surface - Real64 SinAzim; // Sine of surface azimuth angle - Real64 CosAzim; // Cosine of surface azimuth angle - Real64 SinTilt; // Sine of surface tilt angle - Real64 CosTilt; // Cosine of surface tilt angle - bool IsConvex; // true if the surface is convex. - bool IsDegenerate; // true if the surface is degenerate. - bool VerticesProcessed; // true if vertices have been processed (only used for base surfaces) - Real64 XShift; // relative coordinate shift data - used by child subsurfaces - Real64 YShift; // relative coordinate shift data - used by child subsurfaces + Vertices Vertex; // Surface Vertices are represented by Number of Sides and Vector (type) + Vector3 Centroid; // computed centroid (also known as center of mass or surface balance point) + Vector3 lcsx; + Vector3 lcsy; + Vector3 lcsz; + Vector3 NewellAreaVector; + Vector3 NewellSurfaceNormalVector; // same as OutNormVec in vector notation + Vector3 OutNormVec; // Direction cosines (outward normal vector) for surface + Real64 SinAzim; // Sine of surface azimuth angle + Real64 CosAzim; // Cosine of surface azimuth angle + Real64 SinTilt; // Sine of surface tilt angle + Real64 CosTilt; // Cosine of surface tilt angle + bool IsConvex; // true if the surface is convex. + bool IsDegenerate; // true if the surface is degenerate. + bool VerticesProcessed; // true if vertices have been processed (only used for base surfaces) + Real64 XShift; // relative coordinate shift data - used by child subsurfaces + Real64 YShift; // relative coordinate shift data - used by child subsurfaces // Boundary conditions and interconnections bool HeatTransSurf; // True if surface is a heat transfer surface (light shelf can also be IsShadowing) @@ -809,7 +832,7 @@ namespace DataSurfaces { : Construction(0), RepresentativeCalcSurfNum(-1), ConstructionStoredInputValue(0), Class(SurfaceClass::None), Shape(SurfaceShape::None), Sides(0), Area(0.0), GrossArea(0.0), NetAreaShadowCalc(0.0), Perimeter(0.0), Azimuth(0.0), Height(0.0), Reveal(0.0), Tilt(0.0), Width(0.0), shapeCat(ShapeCat::Invalid), plane(0.0, 0.0, 0.0, 0.0), Centroid(0.0, 0.0, 0.0), lcsx(0.0, 0.0, 0.0), lcsy(0.0, 0.0, 0.0), - lcsz(0.0, 0.0, 0.0), NewellAreaVector(0.0, 0.0, 0.0), NewellSurfaceNormalVector(0.0, 0.0, 0.0), OutNormVec(3, 0.0), SinAzim(0.0), + lcsz(0.0, 0.0, 0.0), NewellAreaVector(0.0, 0.0, 0.0), NewellSurfaceNormalVector(0.0, 0.0, 0.0), OutNormVec(0.0, 0.0, 0.0), SinAzim(0.0), CosAzim(0.0), SinTilt(0.0), CosTilt(0.0), IsConvex(true), IsDegenerate(false), VerticesProcessed(false), XShift(0.0), YShift(0.0), HeatTransSurf(false), OutsideHeatSourceTermSchedule(0), InsideHeatSourceTermSchedule(0), HeatTransferAlgorithm(HeatTransferModel::Invalid), BaseSurf(0), NumSubSurfaces(0), Zone(0), spaceNum(0), ExtBoundCond(0), @@ -855,45 +878,62 @@ namespace DataSurfaces { Surface2D computed_surface2d() const; }; + struct SurfaceWindowRefPt + { + Real64 solidAng = 0.0; // Solid angle subtended by window from daylit ref points 1 and 2 + Real64 solidAngWtd = 0.0; // Solid angle subtended by window from ref pts weighted by glare pos factor + std::array, (int)Lum::Num> lums = {{0.0, 0.0}}; + Real64 illumFromWinRep = 0.0; // Illuminance from window at reference point N [lux] + Real64 lumWinRep = 0.0; // Window luminance as viewed from reference point N [cd/m2] + }; + struct SurfaceWindowCalc // Calculated window-related values { // Members - Array1D SolidAngAtRefPt; // Solid angle subtended by window from daylit ref points 1 and 2 - Array1D SolidAngAtRefPtWtd; // Solid angle subtended by window from ref pts weighted by glare pos factor - EPVector> - IllumFromWinAtRefPt; // Illuminance from window at ref pts for window with and w/o shade (lux) - EPVector> - BackLumFromWinAtRefPt; // Window background luminance from window wrt ref pts (cd/m2) with and w/o shade (cd/m2) - EPVector> SourceLumFromWinAtRefPt; // Window luminance at ref pts for window with and w/o shade (cd/m2) - Vector3 WinCenter = {0.0, 0.0, 0.0}; // X,Y,Z coordinates of window center point in building coord system - Array1D ThetaFace; // Face temperatures of window layers (K) - - Array1D OutProjSLFracMult; // Multiplier on sunlit fraction due to shadowing of glass by frame - // and divider outside projections - Array1D InOutProjSLFracMult; // Multiplier on sunlit fraction due to shadowing of glass by frame - // and divider inside and outside projections - Array1D EffShBlindEmiss; // Effective emissivity of interior blind or shade - Array1D EffGlassEmiss; // Effective emissivity of glass adjacent to interior blind or shade - - Array1D IllumFromWinAtRefPtRep; // Illuminance from window at reference point N [lux] - Array1D LumWinFromRefPtRep; // Window luminance as viewed from reference point N [cd/m2] + Array1D refPts; + + Vector3 WinCenter = {0.0, 0.0, 0.0}; // X,Y,Z coordinates of window center point in building coord system + + Real64 theta = 0.0; // Azimuth of window normal (rad) + Real64 phi = 0.0; // Altitude of window normal (rad) + Real64 rhoCeilingWall = 0.0; // Average interior reflectance seen by light moving up across horizontal plane thru center of window + Real64 rhoFloorWall = 0.0; // Same as above, but for light moving down + Real64 fractionUpgoing = 0.0; // Fraction light entering window that goes upward + + Real64 glazedFrac = 1.0; // (Glazed area)/(Glazed area + divider area) + Real64 centerGlassArea = 0.0; // Center of glass area (m2); area of glass where 1-D conduction dominates + Real64 edgeGlassCorrFac = 1.0; // Correction factor to center-of-glass conductance to account for 2-D glass conduction thermal bridging + // effects near frame and divider + + int screenNum = 0; // Screen number for a window with a screen (do not confuse with material number) + Real64 lightWellEff = 1.0; // Light well efficiency (multiplier on exterior window vis trans due to light well losses) + + // What is 10 here? + std::array thetaFace = {296.15}; // Face temperatures of window layers (K) + + // Multiplier on sunlit fraction due to shadowing of glass by + // frame and divider outside projections + std::array OutProjSLFracMult = {1.0}; + // Multiplier on sunlit fraction due to shadowing of glass by + // frame and divider inside and outside projections + std::array InOutProjSLFracMult = {1.0}; + std::array EffShBlindEmiss = {0.0}; // Effective emissivity of interior blind or shade + std::array EffGlassEmiss = {0.0}; // Effective emissivity of glass adjacent to interior blind or shade + // for shadowing of ground by building and obstructions [W/m2] - std::array EnclAreaMinusThisSurf = { - 0.0, 0.0, 0.0}; // Enclosure inside surface area minus this surface and its subsurfaces - // for floor/wall/ceiling (m2) - std::array EnclAreaReflProdMinusThisSurf = { - 0.0, 0.0, 0.0}; // Enclosure product of inside surface area times vis reflectance - // minus this surface and its subsurfaces, - // for floor/wall/ceiling (m2) + // Enclosure inside surface area minus this surface and its + // subsurfaces for floor/wall/ceiling (m2) + std::array EnclAreaMinusThisSurf = {0.0, 0.0, 0.0}; + // Enclosure product of inside surface area times vis + // reflectance minus this surface and its subsurfaces, for + // floor/wall/ceiling (m2) + std::array EnclAreaReflProdMinusThisSurf = {0.0, 0.0, 0.0}; BSDFWindowDescript ComplexFen; // Data for complex fenestration, see DataBSDFWindow.cc for declaration + }; - // Default Constructor - SurfaceWindowCalc() - : ThetaFace(10, 296.15), OutProjSLFracMult(24, 1.0), InOutProjSLFracMult(24, 1.0), EffShBlindEmiss(Material::MaxSlatAngs, 0.0), - EffGlassEmiss(Material::MaxSlatAngs, 0.0) - { - } + struct SurfaceWindowFrameDiv + { }; enum class NfrcProductOptions : int @@ -1425,8 +1465,6 @@ struct SurfacesData : BaseGlobalStruct bool AirflowWindows = false; // TRUE if one or more airflow windows bool ShadingTransmittanceVaries = false; // overall, shading transmittance varies for the building bool UseRepresentativeSurfaceCalculations = false; // Use Representative Surfaces for Calculations - bool AnyHeatBalanceInsideSourceTerm = false; // True if any SurfaceProperty:HeatBalanceSourceTerm inside face used - bool AnyHeatBalanceOutsideSourceTerm = false; // True if any SurfaceProperty:HeatBalanceSourceTerm outside face used bool AnyMovableInsulation = false; // True if any movable insulation presents bool AnyMovableSlat = false; // True if there are any movable slats for window blinds presented @@ -1451,6 +1489,9 @@ struct SurfacesData : BaseGlobalStruct std::vector AllHTKivaSurfaceList; // List of all Kiva foundation surfaces std::vector AllSurfaceListReportOrder; // List of all surfaces - output reporting order std::vector AllVaryAbsOpaqSurfaceList; // List of all opaque exterior surfaces with dynamic coating + std::vector allInsideSourceSurfaceList; // List of all surfaces with SurfaceProperty:HeatBalanceSourceTerm for inside face + std::vector allOutsideSourceSurfaceList; // List of all surfaces with SurfaceProperty:HeatBalanceSourceTerm for outside face + std::vector allGetsRadiantHeatSurfaceList; // List of all surfaces that receive radiant HVAC output std::array, static_cast(DataSurfaces::SurfaceFilter::Num)> SurfaceFilterLists; @@ -1657,18 +1698,13 @@ struct SurfacesData : BaseGlobalStruct Array1D SurfWinDaylFacPoint; // Pointer to daylight factors for the window Array1D SurfWinVisTransSelected; // Window vis trans at normal incidence selected for use in dayltg calculation Array1D SurfWinSwitchingFactor; // Window switching factor (0.0 = unswitched; 1.0 = fully switched) - Array1D SurfWinTheta; // Azimuth of window normal (rad) - Array1D SurfWinPhi; // Altitude of window normal (rad) - Array1D SurfWinRhoCeilingWall; // Average interior reflectance seen by light moving up across horizontal plane thru center of window - Array1D SurfWinRhoFloorWall; // Same as above, but for light moving down - Array1D SurfWinFractionUpgoing; // Fraction light entering window that goes upward - Array1D SurfWinVisTransRatio; // For windows with switchable glazing, - // ratio of normal transmittance in switched state to that in unswitched state - Array1D SurfWinFrameArea; // Frame projected area (m2) - Array1D SurfWinFrameConductance; // Frame conductance [no air films] (W/m2-K) - Array1D SurfWinFrameSolAbsorp; // Frame solar absorptance (assumed same inside and outside) - Array1D SurfWinFrameVisAbsorp; // Frame visible absorptance (assumed same inside and outside) - Array1D SurfWinFrameEmis; // Frame thermal emissivity (thermal absorptance) (assumed same inside and outside) + Array1D SurfWinVisTransRatio; // For windows with switchable glazing, + // ratio of normal transmittance in switched state to that in unswitched state + Array1D SurfWinFrameArea; // Frame projected area (m2) + Array1D SurfWinFrameConductance; // Frame conductance [no air films] (W/m2-K) + Array1D SurfWinFrameSolAbsorp; // Frame solar absorptance (assumed same inside and outside) + Array1D SurfWinFrameVisAbsorp; // Frame visible absorptance (assumed same inside and outside) + Array1D SurfWinFrameEmis; // Frame thermal emissivity (thermal absorptance) (assumed same inside and outside) Array1D SurfWinFrEdgeToCenterGlCondRatio; // Ratio of frame edge of glass conductance (without air films) to center of glass conductance // (without air films) Array1D SurfWinFrameEdgeArea; // Area of glass near frame (m2) @@ -1691,11 +1727,6 @@ struct SurfacesData : BaseGlobalStruct Array1D SurfWinDividerTempSurfOut; // Divider outside surface temperature (C) Array1D SurfWinProjCorrDivOut; // Correction factor to absorbed radiation due to divider outside projection Array1D SurfWinProjCorrDivIn; // Correction factor to absorbed radiation due to divider inside projection - Array1D SurfWinGlazedFrac; // (Glazed area)/(Glazed area + divider area) - Array1D SurfWinCenterGlArea; // Center of glass area (m2); area of glass where 1-D conduction dominates - Array1D SurfWinEdgeGlCorrFac; // Correction factor to center-of-glass conductance to account for 2-D glass conduction thermal bridging - // effects near frame and divider - EPVector SurfWinOriginalClass; // 0 or if entered originally as: Array1D SurfWinShadeAbsFacFace1; // Fraction of short-wave radiation incident that is absorbed by face 1 when total absorbed radiation is // apportioned to the two faces Array1D SurfWinShadeAbsFacFace2; // Fraction of short-wave radiation incident that is absorbed by face 2 when total absorbed radiation is @@ -1727,7 +1758,6 @@ struct SurfacesData : BaseGlobalStruct Array1D SurfWinInsideSillSolAbs; // Solar absorptance of inside sill Array1D SurfWinInsideRevealSolAbs; // Solar absorptance of inside reveal Array1D SurfWinOutsideRevealSolAbs; // Solar absorptance of outside reveal - Array1D SurfWinScreenNumber; // Screen number for a window with a screen (do not confuse with material number) Array1D SurfWinAirflowSource; // Source of gap airflow (INSIDEAIR, OUTSIDEAIR, etc.) Array1D SurfWinAirflowDestination; // Destination of gap airflow (INSIDEAIR, OUTSIDEAIR, etc.) Array1D SurfWinAirflowReturnNodePtr; // Return node pointer for destination = ReturnAir @@ -1745,7 +1775,6 @@ struct SurfacesData : BaseGlobalStruct // true, accounts for shadowing of ground by building and obstructions [W/m2] Array1D SurfWinBmGndSolarInc; // Incident diffuse solar from ground-reflected beam radiation; used for Complex Fen; if CalcSolRefl is // true, accounts for shadowing of ground by building and obstructions [W/m2] - Array1D SurfWinLightWellEff; // Light well efficiency (multiplier on exterior window vis trans due to light well losses) Array1D SurfWinSolarDiffusing; // True if exterior window with a construction that contains a diffusing glass layer Array1D SurfWinFrameHeatGain; Array1D SurfWinFrameHeatLoss; diff --git a/src/EnergyPlus/DataSystemVariables.cc b/src/EnergyPlus/DataSystemVariables.cc index ac18ad21823..2d13588b361 100644 --- a/src/EnergyPlus/DataSystemVariables.cc +++ b/src/EnergyPlus/DataSystemVariables.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataSystemVariables.hh b/src/EnergyPlus/DataSystemVariables.hh index 7a07ce647fa..4bb85321141 100644 --- a/src/EnergyPlus/DataSystemVariables.hh +++ b/src/EnergyPlus/DataSystemVariables.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataTimings.hh b/src/EnergyPlus/DataTimings.hh index 7f20718556a..77710c2618c 100644 --- a/src/EnergyPlus/DataTimings.hh +++ b/src/EnergyPlus/DataTimings.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataVectorTypes.hh b/src/EnergyPlus/DataVectorTypes.hh index 8794ab56674..4af56321ac6 100644 --- a/src/EnergyPlus/DataVectorTypes.hh +++ b/src/EnergyPlus/DataVectorTypes.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataViewFactorInformation.hh b/src/EnergyPlus/DataViewFactorInformation.hh index e5853e9cc14..1a228002c1d 100644 --- a/src/EnergyPlus/DataViewFactorInformation.hh +++ b/src/EnergyPlus/DataViewFactorInformation.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataWater.hh b/src/EnergyPlus/DataWater.hh index 88ae2d158fa..260bb1d89f1 100644 --- a/src/EnergyPlus/DataWater.hh +++ b/src/EnergyPlus/DataWater.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataWindowEquivalentLayer.hh b/src/EnergyPlus/DataWindowEquivalentLayer.hh index 32e86020004..469c2f49511 100644 --- a/src/EnergyPlus/DataWindowEquivalentLayer.hh +++ b/src/EnergyPlus/DataWindowEquivalentLayer.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataZoneControls.hh b/src/EnergyPlus/DataZoneControls.hh index df21c93c162..fa2514d67bc 100644 --- a/src/EnergyPlus/DataZoneControls.hh +++ b/src/EnergyPlus/DataZoneControls.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataZoneEnergyDemands.cc b/src/EnergyPlus/DataZoneEnergyDemands.cc index cecc780aff0..fc74e3dba0b 100644 --- a/src/EnergyPlus/DataZoneEnergyDemands.cc +++ b/src/EnergyPlus/DataZoneEnergyDemands.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -97,7 +97,7 @@ void ZoneSystemMoistureDemand::beginEnvironmentInit() } void ZoneSystemSensibleDemand::setUpOutputVars(EnergyPlusData &state, std::string_view prefix, - std::string_view name, + std::string const &name, bool const staged, bool const attachMeters, int const zoneMult, @@ -106,45 +106,43 @@ void ZoneSystemSensibleDemand::setUpOutputVars(EnergyPlusData &state, if (attachMeters) { SetupOutputVariable(state, format("{} Air System Sensible Heating Energy", prefix), - OutputProcessor::Unit::J, + Constant::Units::J, this->airSysHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Heating, {}, - "ENERGYTRANSFER", - "Heating", - {}, - "Building", + OutputProcessor::SOVGroup::Building, name, zoneMult, listMult); SetupOutputVariable(state, format("{} Air System Sensible Cooling Energy", prefix), - OutputProcessor::Unit::J, + Constant::Units::J, this->airSysCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "ENERGYTRANSFER", - "Cooling", - {}, - "Building", + OutputProcessor::SOVGroup::Building, name, zoneMult, listMult); } else { SetupOutputVariable(state, format("{} Air System Sensible Heating Energy", prefix), - OutputProcessor::Unit::J, + Constant::Units::J, this->airSysHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name); SetupOutputVariable(state, format("{} Air System Sensible Cooling Energy", prefix), - OutputProcessor::Unit::J, + Constant::Units::J, this->airSysCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -152,14 +150,14 @@ void ZoneSystemSensibleDemand::setUpOutputVars(EnergyPlusData &state, } SetupOutputVariable(state, format("{} Air System Sensible Heating Rate", prefix), - OutputProcessor::Unit::W, + Constant::Units::W, this->airSysHeatRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} Air System Sensible Cooling Rate", prefix), - OutputProcessor::Unit::W, + Constant::Units::W, this->airSysCoolRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -169,21 +167,21 @@ void ZoneSystemSensibleDemand::setUpOutputVars(EnergyPlusData &state, // not. First, these report variables are NOT multiplied by zone and group multipliers SetupOutputVariable(state, format("{} Predicted Sensible Load to Setpoint Heat Transfer Rate", prefix), - OutputProcessor::Unit::W, + Constant::Units::W, this->predictedRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} Predicted Sensible Load to Heating Setpoint Heat Transfer Rate", prefix), - OutputProcessor::Unit::W, + Constant::Units::W, this->predictedHSPRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} Predicted Sensible Load to Cooling Setpoint Heat Transfer Rate", prefix), - OutputProcessor::Unit::W, + Constant::Units::W, this->predictedCSPRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -191,21 +189,21 @@ void ZoneSystemSensibleDemand::setUpOutputVars(EnergyPlusData &state, // Second, these report variable ARE multiplied by zone and group multipliers SetupOutputVariable(state, format("{} System Predicted Sensible Load to Setpoint Heat Transfer Rate", prefix), - OutputProcessor::Unit::W, + Constant::Units::W, this->TotalOutputRequired, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} System Predicted Sensible Load to Heating Setpoint Heat Transfer Rate", prefix), - OutputProcessor::Unit::W, + Constant::Units::W, this->OutputRequiredToHeatingSP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} System Predicted Sensible Load to Cooling Setpoint Heat Transfer Rate", prefix), - OutputProcessor::Unit::W, + Constant::Units::W, this->OutputRequiredToCoolingSP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -213,7 +211,7 @@ void ZoneSystemSensibleDemand::setUpOutputVars(EnergyPlusData &state, if (staged) { SetupOutputVariable(state, format("{} Thermostat Staged Number", prefix), - OutputProcessor::Unit::None, + Constant::Units::None, this->StageNum, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -223,7 +221,7 @@ void ZoneSystemSensibleDemand::setUpOutputVars(EnergyPlusData &state, void ZoneSystemMoistureDemand::setUpOutputVars(EnergyPlusData &state, std::string_view prefix, - std::string_view name, + std::string const &name, [[maybe_unused]] bool const staged, [[maybe_unused]] bool const attachMeters, [[maybe_unused]] int const zoneMult, @@ -232,28 +230,28 @@ void ZoneSystemMoistureDemand::setUpOutputVars(EnergyPlusData &state, if (state.dataHeatBal->DoLatentSizing) { SetupOutputVariable(state, format("{} Air System Latent Heating Energy", prefix), - OutputProcessor::Unit::J, + Constant::Units::J, this->airSysHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name); SetupOutputVariable(state, format("{} Air System Latent Cooling Energy", prefix), - OutputProcessor::Unit::J, + Constant::Units::J, this->airSysCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name); SetupOutputVariable(state, format("{} Air System Latent Heating Rate", prefix), - OutputProcessor::Unit::W, + Constant::Units::W, this->airSysHeatRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} Air System Latent Cooling Rate", prefix), - OutputProcessor::Unit::W, + Constant::Units::W, this->airSysCoolRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -261,14 +259,14 @@ void ZoneSystemMoistureDemand::setUpOutputVars(EnergyPlusData &state, // temporarily hide these behind DoLatentSizing flag SetupOutputVariable(state, format("{} Air System Sensible Heat Ratio", prefix), - OutputProcessor::Unit::None, + Constant::Units::None, this->airSysSensibleHeatRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} Air Vapor Pressure Difference", prefix), - OutputProcessor::Unit::Pa, + Constant::Units::Pa, this->vaporPressureDifference, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -279,21 +277,21 @@ void ZoneSystemMoistureDemand::setUpOutputVars(EnergyPlusData &state, // not. First, these report variables are NOT multiplied by zone and group multipliers SetupOutputVariable(state, format("{} Predicted Moisture Load Moisture Transfer Rate", prefix), - OutputProcessor::Unit::kgWater_s, + Constant::Units::kgWater_s, this->predictedRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} Predicted Moisture Load to Humidifying Setpoint Moisture Transfer Rate", prefix), - OutputProcessor::Unit::kgWater_s, + Constant::Units::kgWater_s, this->predictedHumSPRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} Predicted Moisture Load to Dehumidifying Setpoint Moisture Transfer Rate", prefix), - OutputProcessor::Unit::kgWater_s, + Constant::Units::kgWater_s, this->predictedDehumSPRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -301,21 +299,21 @@ void ZoneSystemMoistureDemand::setUpOutputVars(EnergyPlusData &state, // Second, these report variable ARE multiplied by zone and group multipliers SetupOutputVariable(state, format("{} System Predicted Moisture Load Moisture Transfer Rate", prefix), - OutputProcessor::Unit::kgWater_s, + Constant::Units::kgWater_s, this->TotalOutputRequired, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} System Predicted Moisture Load to Humidifying Setpoint Moisture Transfer Rate", prefix), - OutputProcessor::Unit::kgWater_s, + Constant::Units::kgWater_s, this->OutputRequiredToHumidifyingSP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} System Predicted Moisture Load to Dehumidifying Setpoint Moisture Transfer Rate", prefix), - OutputProcessor::Unit::kgWater_s, + Constant::Units::kgWater_s, this->OutputRequiredToDehumidifyingSP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/DataZoneEnergyDemands.hh b/src/EnergyPlus/DataZoneEnergyDemands.hh index 7ab1935bb21..a5aedf38add 100644 --- a/src/EnergyPlus/DataZoneEnergyDemands.hh +++ b/src/EnergyPlus/DataZoneEnergyDemands.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -75,7 +75,7 @@ namespace DataZoneEnergyDemands { virtual void beginEnvironmentInit() = 0; virtual void setUpOutputVars( - EnergyPlusData &state, std::string_view prefix, std::string_view name, bool staged, bool attachMeters, int zoneMult, int listMult) = 0; + EnergyPlusData &state, std::string_view prefix, std::string const &name, bool staged, bool attachMeters, int zoneMult, int listMult) = 0; }; struct ZoneSystemSensibleDemand : ZoneSystemDemandData // Sensible cooling/heating loads to be met (watts) @@ -105,7 +105,7 @@ namespace DataZoneEnergyDemands { void setUpOutputVars(EnergyPlusData &state, std::string_view prefix, - std::string_view name, + std::string const &name, bool staged, bool attachMeters, int zoneMult, @@ -146,7 +146,7 @@ namespace DataZoneEnergyDemands { void setUpOutputVars(EnergyPlusData &state, std::string_view prefix, - std::string_view name, + std::string const &name, [[maybe_unused]] bool staged = false, [[maybe_unused]] bool attachMeters = false, [[maybe_unused]] int zoneMult = 0, diff --git a/src/EnergyPlus/DataZoneEquipment.cc b/src/EnergyPlus/DataZoneEquipment.cc index 799718eb1cb..a7652c1348a 100644 --- a/src/EnergyPlus/DataZoneEquipment.cc +++ b/src/EnergyPlus/DataZoneEquipment.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataZoneEquipment.hh b/src/EnergyPlus/DataZoneEquipment.hh index 59a459abcfe..cf21a6def33 100644 --- a/src/EnergyPlus/DataZoneEquipment.hh +++ b/src/EnergyPlus/DataZoneEquipment.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -215,28 +215,6 @@ namespace DataZoneEquipment { Num }; - struct EquipMeterData - { - // Members - std::string ReportVarName; - OutputProcessor::Unit ReportVarUnits; - Constant::eResource ResourceType = Constant::eResource::Invalid; - std::string EndUse; - SystemReports::EndUseType EndUse_CompMode; - std::string Group; - int ReportVarIndex; - OutputProcessor::TimeStepType ReportVarIndexType; - OutputProcessor::VariableType ReportVarType; - Real64 CurMeterReading; - - // Default Constructor - EquipMeterData() - : ReportVarUnits(OutputProcessor::Unit::None), EndUse_CompMode(SystemReports::EndUseType::NoHeatNoCool), ReportVarIndex(0), - ReportVarIndexType(OutputProcessor::TimeStepType::Zone), ReportVarType(OutputProcessor::VariableType::NotFound), CurMeterReading(0.0) - { - } - }; - struct SubSubEquipmentData // data for an individual component { // Members @@ -247,9 +225,9 @@ namespace DataZoneEquipment { int InletNodeNum; int OutletNodeNum; int NumMeteredVars; - Array1D MeteredVar; // Index of energy output report data - int EnergyTransComp; // 1=EnergyTransfer, 0=No EnergyTransfer Flag needed for reporting - int ZoneEqToPlantPtr; // 0=No plant loop connection, >=0 index to ZoneEqToPlant array + Array1D MeteredVar; // Index of energy output report data + int EnergyTransComp; // 1=EnergyTransfer, 0=No EnergyTransfer Flag needed for reporting + int ZoneEqToPlantPtr; // 0=No plant loop connection, >=0 index to ZoneEqToPlant array int OpMode; Real64 Capacity; Real64 Efficiency; @@ -277,10 +255,10 @@ namespace DataZoneEquipment { int InletNodeNum; int OutletNodeNum; int NumMeteredVars; - Array1D MeteredVar; // Index of energy output report data - Array1D SubSubEquipData; // Component list - int EnergyTransComp; // 1=EnergyTransfer, 0=No EnergyTransfer Flag needed for reporting - int ZoneEqToPlantPtr; // 0=No plant loop connection, >0 index to ZoneEqToPlant array + Array1D MeteredVar; // Index of energy output report data + Array1D SubSubEquipData; // Component list + int EnergyTransComp; // 1=EnergyTransfer, 0=No EnergyTransfer Flag needed for reporting + int ZoneEqToPlantPtr; // 0=No plant loop connection, >0 index to ZoneEqToPlant array int OpMode; Real64 Capacity; Real64 Efficiency; @@ -405,10 +383,10 @@ namespace DataZoneEquipment { Array1D_int InletNodeNums; Array1D_int OutletNodeNums; int NumMeteredVars; - Array1D MeteredVar; // Index of energy output report data - Array1D SubEquipData; // Component list - int EnergyTransComp; // 1=EnergyTransfer, 0=No EnergyTransfer Flag needed for reporting - int ZoneEqToPlantPtr; // 0=No plant loop connection, >0 index to ZoneEqToPlant array + Array1D MeteredVar; // Index of energy output report data + Array1D SubEquipData; // Component list + int EnergyTransComp; // 1=EnergyTransfer, 0=No EnergyTransfer Flag needed for reporting + int ZoneEqToPlantPtr; // 0=No plant loop connection, >0 index to ZoneEqToPlant array Real64 TotPlantSupplyElec; Real64 TotPlantSupplyGas; Real64 TotPlantSupplyPurch; diff --git a/src/EnergyPlus/DaylightingDevices.cc b/src/EnergyPlus/DaylightingDevices.cc index b84417e16ee..34a686f9fd3 100644 --- a/src/EnergyPlus/DaylightingDevices.cc +++ b/src/EnergyPlus/DaylightingDevices.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -300,28 +300,28 @@ namespace Dayltg { // Setup report variables: CurrentModuleObject='DaylightingDevice:Tubular' SetupOutputVariable(state, "Tubular Daylighting Device Transmitted Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataDaylightingDevicesData->TDDPipe(PipeNum).TransmittedSolar, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataDaylightingDevicesData->TDDPipe(PipeNum).Name); SetupOutputVariable(state, "Tubular Daylighting Device Pipe Absorbed Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataDaylightingDevicesData->TDDPipe(PipeNum).PipeAbsorbedSolar, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataDaylightingDevicesData->TDDPipe(PipeNum).Name); SetupOutputVariable(state, "Tubular Daylighting Device Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataDaylightingDevicesData->TDDPipe(PipeNum).HeatGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataDaylightingDevicesData->TDDPipe(PipeNum).Name); SetupOutputVariable(state, "Tubular Daylighting Device Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataDaylightingDevicesData->TDDPipe(PipeNum).HeatLoss, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -329,28 +329,28 @@ namespace Dayltg { SetupOutputVariable(state, "Tubular Daylighting Device Beam Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataDaylightingDevicesData->TDDPipe(PipeNum).TransSolBeam, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataDaylightingDevicesData->TDDPipe(PipeNum).Name); SetupOutputVariable(state, "Tubular Daylighting Device Beam Visible Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataDaylightingDevicesData->TDDPipe(PipeNum).TransVisBeam, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataDaylightingDevicesData->TDDPipe(PipeNum).Name); SetupOutputVariable(state, "Tubular Daylighting Device Diffuse Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataDaylightingDevicesData->TDDPipe(PipeNum).TransSolDiff, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataDaylightingDevicesData->TDDPipe(PipeNum).Name); SetupOutputVariable(state, "Tubular Daylighting Device Diffuse Visible Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataDaylightingDevicesData->TDDPipe(PipeNum).TransVisDiff, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -434,7 +434,8 @@ namespace Dayltg { // METHODOLOGY EMPLOYED: // Standard EnergyPlus methodology. - auto &cCurrentModuleObject = state.dataIPShortCut->cCurrentModuleObject; + auto &ipsc = state.dataIPShortCut; + auto &cCurrentModuleObject = ipsc->cCurrentModuleObject; cCurrentModuleObject = "DaylightingDevice:Tubular"; int NumOfTDDPipes = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject); @@ -449,35 +450,31 @@ namespace Dayltg { state.dataInputProcessing->inputProcessor->getObjectItem(state, cCurrentModuleObject, PipeNum, - state.dataIPShortCut->cAlphaArgs, + ipsc->cAlphaArgs, NumAlphas, - state.dataIPShortCut->rNumericArgs, + ipsc->rNumericArgs, NumNumbers, IOStatus, - state.dataIPShortCut->lNumericFieldBlanks, - state.dataIPShortCut->lAlphaFieldBlanks, - state.dataIPShortCut->cAlphaFieldNames, - state.dataIPShortCut->cNumericFieldNames); + ipsc->lNumericFieldBlanks, + ipsc->lAlphaFieldBlanks, + ipsc->cAlphaFieldNames, + ipsc->cNumericFieldNames); // Pipe name - state.dataDaylightingDevicesData->TDDPipe(PipeNum).Name = state.dataIPShortCut->cAlphaArgs(1); + state.dataDaylightingDevicesData->TDDPipe(PipeNum).Name = ipsc->cAlphaArgs(1); // Get TDD:DOME object - int SurfNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(2), state.dataSurface->Surface); + int SurfNum = Util::FindItemInList(ipsc->cAlphaArgs(2), state.dataSurface->Surface); if (SurfNum == 0) { - ShowSevereError(state, - format("{} = {}: Dome {} not found.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(2))); + ShowSevereError(state, format("{} = {}: Dome {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } else { if (FindTDDPipe(state, SurfNum) > 0) { ShowSevereError(state, format("{} = {}: Dome {} is referenced by more than one TDD.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(2))); + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } @@ -485,8 +482,8 @@ namespace Dayltg { ShowSevereError(state, format("{} = {}: Dome {} is not of surface type TubularDaylightDome.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(2))); + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } @@ -494,8 +491,8 @@ namespace Dayltg { ShowSevereError(state, format("{} = {}: Dome {} construction ({}) must have only 1 glass layer.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(2), + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2), state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).Name)); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } @@ -504,17 +501,16 @@ namespace Dayltg { ShowSevereError(state, format("{} = {}: Dome {} must not have a shading control.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(2))); + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } if (state.dataSurface->Surface(SurfNum).FrameDivider > 0) { - ShowSevereError(state, - format("{} = {}: Dome {} must not have a frame/divider.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(2))); + ShowSevereError( + state, + format( + "{} = {}: Dome {} must not have a frame/divider.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } @@ -522,8 +518,8 @@ namespace Dayltg { ShowSevereError(state, format("{} = {}: Dome {} Equivalent Layer Window is not supported.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(2))); + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } // Window multiplier is already handled in SurfaceGeometry.cc @@ -532,8 +528,8 @@ namespace Dayltg { ShowWarningError(state, format("{} = {}: Dome {} is not exposed to exterior radiation.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(2))); + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2))); } state.dataDaylightingDevicesData->TDDPipe(PipeNum).Dome = SurfNum; @@ -541,31 +537,28 @@ namespace Dayltg { } // Get TDD:DIFFUSER object - SurfNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(3), state.dataSurface->Surface); + SurfNum = Util::FindItemInList(ipsc->cAlphaArgs(3), state.dataSurface->Surface); if (SurfNum == 0) { ShowSevereError(state, - format("{} = {}: Diffuser {} not found.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3))); + format("{} = {}: Diffuser {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(3))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } else { if (FindTDDPipe(state, SurfNum) > 0) { ShowSevereError(state, format("{} = {}: Diffuser {} is referenced by more than one TDD.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3))); + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(3))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } - if (state.dataSurface->SurfWinOriginalClass(SurfNum) != SurfaceClass::TDD_Diffuser) { + if (state.dataSurface->Surface(SurfNum).OriginalClass != SurfaceClass::TDD_Diffuser) { ShowSevereError(state, format("{} = {}: Diffuser {} is not of surface type TubularDaylightDiffuser.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3))); + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(3))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } @@ -573,8 +566,8 @@ namespace Dayltg { ShowSevereError(state, format("{} = {}: Diffuser {} construction ({}) must have only 1 glass layer.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3), + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(3), state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).Name)); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } @@ -583,8 +576,8 @@ namespace Dayltg { ShowSevereError(state, format("{} = {}: Diffuser {} construction ({}) invalid value.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3), + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(3), state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).Name)); ShowContinueError(state, format("Diffuse solar transmittance of construction [{:.4R}] too small for calculations.", @@ -602,17 +595,15 @@ namespace Dayltg { ShowSevereError(state, format("{} = {}: Dome and diffuser areas are significantly different (>10%).", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + ipsc->cAlphaArgs(1))); ShowContinueError(state, format("...Diffuser Area=[{:.4R}]; Dome Area=[{:.4R}].", state.dataSurface->Surface(SurfNum).Area, state.dataSurface->Surface(state.dataDaylightingDevicesData->TDDPipe(PipeNum).Dome).Area)); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } else { - ShowWarningError(state, - format("{} = {}: Dome and diffuser areas differ by > .1 m2.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError( + state, format("{} = {}: Dome and diffuser areas differ by > .1 m2.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); ShowContinueError(state, format("...Diffuser Area=[{:.4R}]; Dome Area=[{:.4R}].", state.dataSurface->Surface(SurfNum).Area, @@ -624,8 +615,8 @@ namespace Dayltg { ShowSevereError(state, format("{} = {}: Diffuser {} must not have a shading control.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3))); + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(3))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } @@ -633,8 +624,8 @@ namespace Dayltg { ShowSevereError(state, format("{} = {}: Diffuser {} must not have a frame/divider.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3))); + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(3))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } @@ -642,8 +633,8 @@ namespace Dayltg { ShowSevereError(state, format("{} = {}: Diffuser {} Equivalent Layer Window is not supported.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(2))); + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } @@ -655,25 +646,20 @@ namespace Dayltg { // Construction state.dataDaylightingDevicesData->TDDPipe(PipeNum).Construction = - Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(4), state.dataConstruction->Construct); + Util::FindItemInList(ipsc->cAlphaArgs(4), state.dataConstruction->Construct); if (state.dataDaylightingDevicesData->TDDPipe(PipeNum).Construction == 0) { - ShowSevereError(state, - format("{} = {}: Pipe construction {} not found.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(4))); + ShowSevereError( + state, format("{} = {}: Pipe construction {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(4))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } else { state.dataConstruction->Construct(state.dataDaylightingDevicesData->TDDPipe(PipeNum).Construction).IsUsed = true; } - if (state.dataIPShortCut->rNumericArgs(1) > 0) { - state.dataDaylightingDevicesData->TDDPipe(PipeNum).Diameter = state.dataIPShortCut->rNumericArgs(1); + if (ipsc->rNumericArgs(1) > 0) { + state.dataDaylightingDevicesData->TDDPipe(PipeNum).Diameter = ipsc->rNumericArgs(1); } else { - ShowSevereError( - state, - format("{} = {}: Pipe diameter must be greater than zero.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, format("{} = {}: Pipe diameter must be greater than zero.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } @@ -686,17 +672,15 @@ namespace Dayltg { ShowSevereError(state, format("{} = {}: Pipe and dome/diffuser areas are significantly different (>10%).", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + ipsc->cAlphaArgs(1))); ShowContinueError(state, format("...Pipe Area=[{:.4R}]; Dome/Diffuser Area=[{:.4R}].", PipeArea, state.dataSurface->Surface(state.dataDaylightingDevicesData->TDDPipe(PipeNum).Dome).Area)); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } else { - ShowWarningError(state, - format("{} = {}: Pipe and dome/diffuser areas differ by > .1 m2.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError( + state, format("{} = {}: Pipe and dome/diffuser areas differ by > .1 m2.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); ShowContinueError(state, format("...Pipe Area=[{:.4R}]; Dome/Diffuser Area=[{:.4R}].", PipeArea, @@ -704,21 +688,20 @@ namespace Dayltg { } } - if (state.dataIPShortCut->rNumericArgs(2) > 0) { - state.dataDaylightingDevicesData->TDDPipe(PipeNum).TotLength = state.dataIPShortCut->rNumericArgs(2); + if (ipsc->rNumericArgs(2) > 0) { + state.dataDaylightingDevicesData->TDDPipe(PipeNum).TotLength = ipsc->rNumericArgs(2); } else { - ShowSevereError( - state, format("{} = {}: Pipe length must be greater than zero.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, format("{} = {}: Pipe length must be greater than zero.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } - if (state.dataIPShortCut->rNumericArgs(3) > 0) { - state.dataDaylightingDevicesData->TDDPipe(PipeNum).Reff = state.dataIPShortCut->rNumericArgs(3); + if (ipsc->rNumericArgs(3) > 0) { + state.dataDaylightingDevicesData->TDDPipe(PipeNum).Reff = ipsc->rNumericArgs(3); } else { ShowSevereError(state, format("{} = {}: Effective thermal resistance (R value) must be greater than zero.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + ipsc->cAlphaArgs(1))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } @@ -729,11 +712,10 @@ namespace Dayltg { ShowWarningError(state, format("{} = {}: No transition zones specified. All pipe absorbed solar goes to exterior.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + ipsc->cAlphaArgs(1))); } else if (state.dataDaylightingDevicesData->TDDPipe(PipeNum).NumOfTZones > MaxTZones) { - ShowSevereError( - state, - format("{} = {}: Maximum number of transition zones exceeded.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + format("{} = {}: Maximum number of transition zones exceeded.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } else { state.dataDaylightingDevicesData->TDDPipe(PipeNum).TZone.allocate(state.dataDaylightingDevicesData->TDDPipe(PipeNum).NumOfTZones); @@ -747,22 +729,20 @@ namespace Dayltg { state.dataDaylightingDevicesData->TDDPipe(PipeNum).TZoneHeatGain = 0.0; for (int TZoneNum = 1; TZoneNum <= state.dataDaylightingDevicesData->TDDPipe(PipeNum).NumOfTZones; ++TZoneNum) { - std::string const TZoneName = state.dataIPShortCut->cAlphaArgs(TZoneNum + 4); + std::string const TZoneName = ipsc->cAlphaArgs(TZoneNum + 4); state.dataDaylightingDevicesData->TDDPipe(PipeNum).TZone(TZoneNum) = Util::FindItemInList(TZoneName, state.dataHeatBal->Zone); if (state.dataDaylightingDevicesData->TDDPipe(PipeNum).TZone(TZoneNum) == 0) { - ShowSevereError( - state, - format( - "{} = {}: Transition zone {} not found.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1), TZoneName)); + ShowSevereError(state, + format("{} = {}: Transition zone {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), TZoneName)); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } - state.dataDaylightingDevicesData->TDDPipe(PipeNum).TZoneLength(TZoneNum) = state.dataIPShortCut->rNumericArgs(TZoneNum + 3); + state.dataDaylightingDevicesData->TDDPipe(PipeNum).TZoneLength(TZoneNum) = ipsc->rNumericArgs(TZoneNum + 3); if (state.dataDaylightingDevicesData->TDDPipe(PipeNum).TZoneLength(TZoneNum) < 0) { ShowSevereError(state, format("{} = {}: Transition zone length for {} must be zero or greater.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), + ipsc->cAlphaArgs(1), TZoneName)); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } @@ -772,14 +752,14 @@ namespace Dayltg { } // PipeNum if (state.dataDaylightingDevices->GetTDDInputErrorsFound) ShowFatalError(state, "Errors in DaylightingDevice:Tubular input."); - state.dataDaylightingManager->TDDTransVisBeam.allocate(Constant::HoursInDay, NumOfTDDPipes); - state.dataDaylightingManager->TDDFluxInc.allocate(Constant::HoursInDay, NumOfTDDPipes); - state.dataDaylightingManager->TDDFluxTrans.allocate(Constant::HoursInDay, NumOfTDDPipes); + state.dataDayltg->TDDTransVisBeam.allocate(Constant::HoursInDay, NumOfTDDPipes); + state.dataDayltg->TDDFluxInc.allocate(Constant::HoursInDay, NumOfTDDPipes); + state.dataDayltg->TDDFluxTrans.allocate(Constant::HoursInDay, NumOfTDDPipes); for (int hr = 1; hr <= Constant::HoursInDay; ++hr) { for (int tddNum = 1; tddNum <= NumOfTDDPipes; ++tddNum) { - state.dataDaylightingManager->TDDTransVisBeam(hr, tddNum) = 0.0; - state.dataDaylightingManager->TDDFluxInc(hr, tddNum) = Illums(); - state.dataDaylightingManager->TDDFluxTrans(hr, tddNum) = Illums(); + state.dataDayltg->TDDTransVisBeam(hr, tddNum) = 0.0; + state.dataDayltg->TDDFluxInc(hr, tddNum) = Illums(); + state.dataDayltg->TDDFluxTrans(hr, tddNum) = Illums(); } // for (tddNum) } // for (hr) } @@ -798,7 +778,8 @@ namespace Dayltg { // METHODOLOGY EMPLOYED: // Standard EnergyPlus methodology. - auto &cCurrentModuleObject = state.dataIPShortCut->cCurrentModuleObject; + auto &ipsc = state.dataIPShortCut; + auto &cCurrentModuleObject = ipsc->cCurrentModuleObject; cCurrentModuleObject = "DaylightingDevice:Shelf"; int NumOfShelf = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject); @@ -813,35 +794,31 @@ namespace Dayltg { state.dataInputProcessing->inputProcessor->getObjectItem(state, cCurrentModuleObject, ShelfNum, - state.dataIPShortCut->cAlphaArgs, + ipsc->cAlphaArgs, NumAlphas, - state.dataIPShortCut->rNumericArgs, + ipsc->rNumericArgs, NumNumbers, IOStatus, - state.dataIPShortCut->lNumericFieldBlanks, - state.dataIPShortCut->lAlphaFieldBlanks, - state.dataIPShortCut->cAlphaFieldNames, - state.dataIPShortCut->cNumericFieldNames); + ipsc->lNumericFieldBlanks, + ipsc->lAlphaFieldBlanks, + ipsc->cAlphaFieldNames, + ipsc->cNumericFieldNames); // Shelf name - state.dataDaylightingDevicesData->Shelf(ShelfNum).Name = state.dataIPShortCut->cAlphaArgs(1); + state.dataDaylightingDevicesData->Shelf(ShelfNum).Name = ipsc->cAlphaArgs(1); // Get window object - int SurfNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(2), state.dataSurface->Surface); + int SurfNum = Util::FindItemInList(ipsc->cAlphaArgs(2), state.dataSurface->Surface); if (SurfNum == 0) { - ShowSevereError(state, - format("{} = {}: Window {} not found.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(2))); + ShowSevereError(state, format("{} = {}: Window {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } else { if (state.dataSurface->Surface(SurfNum).Class != SurfaceClass::Window) { ShowSevereError(state, format("{} = {}: Window {} is not of surface type WINDOW.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(2))); + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } @@ -849,8 +826,8 @@ namespace Dayltg { ShowSevereError(state, format("{} = {}: Window {} is referenced by more than one shelf.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(2))); + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } @@ -858,8 +835,8 @@ namespace Dayltg { ShowSevereError(state, format("{} = {}: Window {} must not have a shading control.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(2))); + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } @@ -867,25 +844,22 @@ namespace Dayltg { ShowSevereError(state, format("{} = {}: Window {} must not have a frame/divider.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(2))); + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } if (state.dataSurface->Surface(SurfNum).Sides != 4) { - ShowSevereError(state, - format("{} = {}: Window {} must have 4 sides.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(2))); + ShowSevereError( + state, format("{} = {}: Window {} must have 4 sides.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } if (state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).WindowTypeEQL) { ShowSevereError(state, format("{} = {}: Window {} Equivalent Layer Window is not supported.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(2))); + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } @@ -894,15 +868,12 @@ namespace Dayltg { } // Get inside shelf heat transfer surface (optional) - if (state.dataIPShortCut->cAlphaArgs(3) != "") { - SurfNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(3), state.dataSurface->Surface); + if (ipsc->cAlphaArgs(3) != "") { + SurfNum = Util::FindItemInList(ipsc->cAlphaArgs(3), state.dataSurface->Surface); if (SurfNum == 0) { - ShowSevereError(state, - format("{} = {}: Inside shelf {} not found.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3))); + ShowSevereError( + state, format("{} = {}: Inside shelf {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(3))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } else { // No error if shelf belongs to more than one window, e.g. concave corners @@ -911,17 +882,16 @@ namespace Dayltg { ShowSevereError(state, format("{} = {}: Inside shelf {} must be its own Outside Boundary Condition Object.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3))); + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(3))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } if (state.dataSurface->Surface(SurfNum).Sides != 4) { - ShowSevereError(state, - format("{} = {}: Inside shelf {} must have 4 sides.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3))); + ShowSevereError( + state, + format( + "{} = {}: Inside shelf {} must have 4 sides.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(3))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } @@ -930,15 +900,12 @@ namespace Dayltg { } // Get outside shelf attached shading surface (optional) - if (state.dataIPShortCut->cAlphaArgs(4) != "") { - SurfNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(4), state.dataSurface->Surface); + if (ipsc->cAlphaArgs(4) != "") { + SurfNum = Util::FindItemInList(ipsc->cAlphaArgs(4), state.dataSurface->Surface); if (SurfNum == 0) { - ShowSevereError(state, - format("{} = {}: Outside shelf {} not found.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(4))); + ShowSevereError( + state, format("{} = {}: Outside shelf {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(4))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } else { // No error if shelf belongs to more than one window, e.g. concave corners @@ -947,8 +914,8 @@ namespace Dayltg { ShowSevereError(state, format("{} = {}: Outside shelf {} is not a Shading:Zone:Detailed object.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(4))); + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(4))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } @@ -956,38 +923,37 @@ namespace Dayltg { ShowSevereError(state, format("{} = {}: Outside shelf {} must not have a transmittance schedule.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(4))); + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(4))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } if (state.dataSurface->Surface(SurfNum).Sides != 4) { - ShowSevereError(state, - format("{} = {}: Outside shelf {} must have 4 sides.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(4))); + ShowSevereError( + state, + format( + "{} = {}: Outside shelf {} must have 4 sides.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(4))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } int ConstrNum = 0; // Get outside shelf construction (required if outside shelf is specified) - if (state.dataIPShortCut->cAlphaArgs(5) != "") { - ConstrNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(5), state.dataConstruction->Construct); + if (ipsc->cAlphaArgs(5) != "") { + ConstrNum = Util::FindItemInList(ipsc->cAlphaArgs(5), state.dataConstruction->Construct); if (ConstrNum == 0) { ShowSevereError(state, format("{} = {}: Outside shelf construction {} not found.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(5))); + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(5))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } else if (state.dataConstruction->Construct(ConstrNum).TypeIsWindow) { ShowSevereError(state, format("{} = {}: Outside shelf construction {} must not have WindowMaterial:Glazing.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(5))); + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(5))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } else { state.dataDaylightingDevicesData->Shelf(ShelfNum).Construction = ConstrNum; @@ -997,19 +963,19 @@ namespace Dayltg { ShowSevereError(state, format("{} = {}: Outside shelf requires an outside shelf construction to be specified.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + ipsc->cAlphaArgs(1))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } // Get view factor to outside shelf (optional) if (NumNumbers > 0) { - state.dataDaylightingDevicesData->Shelf(ShelfNum).ViewFactor = state.dataIPShortCut->rNumericArgs(1); + state.dataDaylightingDevicesData->Shelf(ShelfNum).ViewFactor = ipsc->rNumericArgs(1); - if (state.dataIPShortCut->rNumericArgs(1) == 0.0) { + if (ipsc->rNumericArgs(1) == 0.0) { ShowWarningError(state, format("{} = {}: View factor to outside shelf is zero. Shelf does not reflect on window.", cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + ipsc->cAlphaArgs(1))); } } else { state.dataDaylightingDevicesData->Shelf(ShelfNum).ViewFactor = @@ -1032,9 +998,7 @@ namespace Dayltg { if (state.dataDaylightingDevicesData->Shelf(ShelfNum).InSurf == 0 && state.dataDaylightingDevicesData->Shelf(ShelfNum).OutSurf == 0) ShowWarningError(state, - format("{} = {}: No inside shelf or outside shelf was specified.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + format("{} = {}: No inside shelf or outside shelf was specified.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); } // ShelfNum diff --git a/src/EnergyPlus/DaylightingDevices.hh b/src/EnergyPlus/DaylightingDevices.hh index de296e7087e..08a3ab81634 100644 --- a/src/EnergyPlus/DaylightingDevices.hh +++ b/src/EnergyPlus/DaylightingDevices.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DaylightingManager.cc b/src/EnergyPlus/DaylightingManager.cc index 9d69df8020f..40095b7e5e4 100644 --- a/src/EnergyPlus/DaylightingManager.cc +++ b/src/EnergyPlus/DaylightingManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -171,9 +171,7 @@ void DayltgAveInteriorReflectance(EnergyPlusData &state, int const enclNum) // E // REFERENCES: // Based on DOE-2.1E subroutine DAVREF - - Real64 AREA; // Inside surface area (m2) - Real64 ETA; // Ratio of floor-to-window-center height and average floor-to-ceiling height + auto &dl = state.dataDayltg; // Total inside surface area, including windows Real64 AInsTot = 0.0; @@ -185,45 +183,41 @@ void DayltgAveInteriorReflectance(EnergyPlusData &state, int const enclNum) // E std::array ARH = {0.0, 0.0, 0.0}; // Loop over surfaces in the zone's enclosure - auto &thisEnclosure(state.dataViewFactor->EnclSolInfo(enclNum)); + auto &thisEnclosure = state.dataViewFactor->EnclSolInfo(enclNum); for (int ISurf : thisEnclosure.SurfacePtr) { - SurfaceClass IType = state.dataSurface->Surface(ISurf).Class; + auto const &surf = state.dataSurface->Surface(ISurf); + + SurfaceClass IType = surf.Class; // Error if window has multiplier > 1 since this causes incorrect illuminance calc - if (IType == SurfaceClass::Window && state.dataSurface->Surface(ISurf).Multiplier > 1.0) { + if (IType == SurfaceClass::Window && surf.Multiplier > 1.0) { if (thisEnclosure.TotalEnclosureDaylRefPoints > 0) { - ShowSevereError(state, - format("DayltgAveInteriorReflectance: Multiplier > 1.0 for window {} in Zone={}", - state.dataSurface->Surface(ISurf).Name, - state.dataSurface->Surface(ISurf).ZoneName)); + ShowSevereError(state, format("DayltgAveInteriorReflectance: Multiplier > 1.0 for window {} in Zone={}", surf.Name, surf.ZoneName)); ShowContinueError(state, "...not allowed since it is in a zone or enclosure with daylighting."); ShowFatalError(state, "Program terminates due to preceding conditions."); } else { - ShowSevereError(state, - format("DayltgAveInteriorReflectance: Multiplier > 1.0 for window {} in Zone={}", - state.dataSurface->Surface(ISurf).Name, - state.dataSurface->Surface(ISurf).ZoneName)); + ShowSevereError(state, format("DayltgAveInteriorReflectance: Multiplier > 1.0 for window {} in Zone={}", surf.Name, surf.ZoneName)); ShowContinueError(state, "...an adjacent Zone has daylighting. Simulation cannot proceed."); ShowFatalError(state, "Program terminates due to preceding conditions."); } } if (IType == SurfaceClass::Wall || IType == SurfaceClass::Floor || IType == SurfaceClass::Roof || IType == SurfaceClass::Window || IType == SurfaceClass::Door) { - AREA = state.dataSurface->Surface(ISurf).Area; + Real64 AREA = surf.Area; // In following, FrameArea and DividerArea can be non-zero only for exterior windows AInsTot += AREA + state.dataSurface->SurfWinFrameArea(ISurf) * (1.0 + 0.5 * state.dataSurface->SurfWinProjCorrFrIn(ISurf)) + state.dataSurface->SurfWinDividerArea(ISurf) * (1.0 + state.dataSurface->SurfWinProjCorrDivIn(ISurf)); - ARHTOT += AREA * state.dataConstruction->Construct(state.dataSurface->Surface(ISurf).Construction).ReflectVisDiffBack + + ARHTOT += AREA * state.dataConstruction->Construct(surf.Construction).ReflectVisDiffBack + state.dataSurface->SurfWinFrameArea(ISurf) * (1.0 + 0.5 * state.dataSurface->SurfWinProjCorrFrIn(ISurf)) * (1.0 - state.dataSurface->SurfWinFrameSolAbsorp(ISurf)) + state.dataSurface->SurfWinDividerArea(ISurf) * (1.0 + state.dataSurface->SurfWinProjCorrDivIn(ISurf)) * (1.0 - state.dataSurface->SurfWinDividerSolAbsorp(ISurf)); - FWC fwc = FWC::Ceiling; // Ceiling - if (state.dataSurface->Surface(ISurf).Tilt > 10.0 && state.dataSurface->Surface(ISurf).Tilt < 170.0) fwc = FWC::Wall; // Wall - if (state.dataSurface->Surface(ISurf).Tilt >= 170.0) fwc = FWC::Floor; // Floor + FWC fwc = FWC::Ceiling; // Ceiling + if (surf.Tilt > 10.0 && surf.Tilt < 170.0) fwc = FWC::Wall; // Wall + if (surf.Tilt >= 170.0) fwc = FWC::Floor; // Floor AR[(int)fwc] += AREA + state.dataSurface->SurfWinFrameArea(ISurf) * (1.0 + 0.5 * state.dataSurface->SurfWinProjCorrFrIn(ISurf)) + state.dataSurface->SurfWinDividerArea(ISurf) * (1.0 + state.dataSurface->SurfWinProjCorrDivIn(ISurf)); - ARH[(int)fwc] += AREA * state.dataConstruction->Construct(state.dataSurface->Surface(ISurf).Construction).ReflectVisDiffBack + + ARH[(int)fwc] += AREA * state.dataConstruction->Construct(surf.Construction).ReflectVisDiffBack + state.dataSurface->SurfWinFrameArea(ISurf) * (1.0 + 0.5 * state.dataSurface->SurfWinProjCorrFrIn(ISurf)) * (1.0 - state.dataSurface->SurfWinFrameSolAbsorp(ISurf)) + state.dataSurface->SurfWinDividerArea(ISurf) * (1.0 + state.dataSurface->SurfWinProjCorrDivIn(ISurf)) * @@ -236,97 +230,84 @@ void DayltgAveInteriorReflectance(EnergyPlusData &state, int const enclNum) // E ShowSevereError(state, format("DayltgAveInteriorReflectance: Total opaque surface area is <=0.0 in solar enclosure={}", thisEnclosure.Name)); ShowFatalError(state, "Program terminates due to preceding conditions."); } - state.dataDaylightingData->enclDaylight(enclNum).aveVisDiffReflect = ARHTOT / AInsTot; + dl->enclDaylight(enclNum).aveVisDiffReflect = ARHTOT / AInsTot; // Total inside surface area of enclosure - state.dataDaylightingData->enclDaylight(enclNum).totInsSurfArea = AInsTot; + dl->enclDaylight(enclNum).totInsSurfArea = AInsTot; // Average floor visible reflectance - state.dataDaylightingData->enclDaylight(enclNum).floorVisRefl = ARH[(int)FWC::Ceiling] / (AR[(int)FWC::Ceiling] + 1.e-6); + dl->enclDaylight(enclNum).floorVisRefl = ARH[iFWC_Ceiling] / (AR[iFWC_Ceiling] + 1.e-6); for (int ISurf : thisEnclosure.SurfacePtr) { auto const &surf = state.dataSurface->Surface(ISurf); - SurfaceClass IType = surf.Class; - if (IType == SurfaceClass::Wall || IType == SurfaceClass::Floor || IType == SurfaceClass::Roof) { - // Remove this surface from the space inside surface area and area*reflectivity - // The resulting areas are AP(ITILT). The resulting area*reflectivity is ARHP(ITILT). - // Initialize gross area of surface (including subsurfaces) - Real64 ATWL = surf.Area; // This is the surface area less subsurfaces - // Area * reflectance for this surface, excluding attached windows and doors - Real64 ARHTWL = surf.Area * state.dataConstruction->Construct(surf.Construction).ReflectVisDiffBack; - - FWC fwc; - if (surf.Tilt > 45.0 && surf.Tilt < 135.0) { - fwc = FWC::Wall; // Wall - } else if (surf.Tilt >= 135.0) { - fwc = FWC::Floor; // Floor + if (surf.Class != SurfaceClass::Wall && surf.Class != SurfaceClass::Floor && surf.Class != SurfaceClass::Roof) continue; + + // Remove this surface from the space inside surface area and area*reflectivity + // The resulting areas are AP(ITILT). The resulting area*reflectivity is ARHP(ITILT). + // Initialize gross area of surface (including subsurfaces) + Real64 ATWL = surf.Area; // This is the surface area less subsurfaces + // Area * reflectance for this surface, excluding attached windows and doors + Real64 ARHTWL = surf.Area * state.dataConstruction->Construct(surf.Construction).ReflectVisDiffBack; + + FWC fwc = (surf.Tilt > 45.0 && surf.Tilt < 135.0) ? FWC::Wall : ((surf.Tilt >= 135.0) ? FWC::Floor : FWC::Ceiling); + + // Loop over windows and doors on this wall + for (int IWinDr : thisEnclosure.SurfacePtr) { + auto const &surfWinDr = state.dataSurface->Surface(IWinDr); + if ((surfWinDr.Class != SurfaceClass::Window && surfWinDr.Class != SurfaceClass::Door) || surfWinDr.BaseSurf != ISurf) continue; + + ATWL += surfWinDr.Area + state.dataSurface->SurfWinFrameArea(IWinDr) * (1.0 + 0.5 * state.dataSurface->SurfWinProjCorrFrIn(IWinDr)) + + state.dataSurface->SurfWinDividerArea(IWinDr) * (1.0 + state.dataSurface->SurfWinProjCorrDivIn(IWinDr)); + ARHTWL += surfWinDr.Area * state.dataConstruction->Construct(surfWinDr.Construction).ReflectVisDiffBack + + state.dataSurface->SurfWinFrameArea(IWinDr) * (1.0 + 0.5 * state.dataSurface->SurfWinProjCorrFrIn(IWinDr)) * + (1.0 - state.dataSurface->SurfWinFrameSolAbsorp(IWinDr)) + + state.dataSurface->SurfWinDividerArea(IWinDr) * (1.0 + state.dataSurface->SurfWinProjCorrDivIn(IWinDr)) * + (1.0 - state.dataSurface->SurfWinDividerSolAbsorp(IWinDr)); + } + + std::array AP; + std::array ARHP; + // Inside surface area of floor, walls and ceilings, minus surface ISurf and its subsurfaces + for (int iFWC = iFWC_Floor; iFWC < (int)FWC::Num; ++iFWC) { + if (iFWC == (int)fwc) { + AP[iFWC] = AR[iFWC] - ATWL; + ARHP[iFWC] = ARH[iFWC] - ARHTWL; } else { - fwc = FWC::Ceiling; // Ceiling - } - // Loop over windows and doors on this wall - for (int IWinDr : thisEnclosure.SurfacePtr) { - if ((state.dataSurface->Surface(IWinDr).Class == SurfaceClass::Window || - state.dataSurface->Surface(IWinDr).Class == SurfaceClass::Door) && - state.dataSurface->Surface(IWinDr).BaseSurf == ISurf) { - ATWL += state.dataSurface->Surface(IWinDr).Area + - state.dataSurface->SurfWinFrameArea(IWinDr) * (1.0 + 0.5 * state.dataSurface->SurfWinProjCorrFrIn(IWinDr)) + - state.dataSurface->SurfWinDividerArea(IWinDr) * (1.0 + state.dataSurface->SurfWinProjCorrDivIn(IWinDr)); - ARHTWL += state.dataSurface->Surface(IWinDr).Area * - state.dataConstruction->Construct(state.dataSurface->Surface(IWinDr).Construction).ReflectVisDiffBack + - state.dataSurface->SurfWinFrameArea(IWinDr) * (1.0 + 0.5 * state.dataSurface->SurfWinProjCorrFrIn(IWinDr)) * - (1.0 - state.dataSurface->SurfWinFrameSolAbsorp(IWinDr)) + - state.dataSurface->SurfWinDividerArea(IWinDr) * (1.0 + state.dataSurface->SurfWinProjCorrDivIn(IWinDr)) * - (1.0 - state.dataSurface->SurfWinDividerSolAbsorp(IWinDr)); - } - } - - std::array AP; - std::array ARHP; - // Inside surface area of floor, walls and ceilings, minus surface ISurf and its subsurfaces - for (int iFWC = (int)FWC::Floor; iFWC < (int)FWC::Num; ++iFWC) { - if (iFWC == (int)fwc) { - AP[iFWC] = AR[iFWC] - ATWL; - ARHP[iFWC] = ARH[iFWC] - ARHTWL; - } else { - AP[iFWC] = AR[iFWC]; - ARHP[iFWC] = ARH[iFWC]; - } + AP[iFWC] = AR[iFWC]; + ARHP[iFWC] = ARH[iFWC]; } - state.dataSurface->SurfaceWindow(ISurf).EnclAreaMinusThisSurf = AP; - state.dataSurface->SurfaceWindow(ISurf).EnclAreaReflProdMinusThisSurf = ARHP; } - } // End of loop over opaque surfaces in enclosure + state.dataSurface->SurfaceWindow(ISurf).EnclAreaMinusThisSurf = AP; + state.dataSurface->SurfaceWindow(ISurf).EnclAreaReflProdMinusThisSurf = ARHP; + } // for (ISurf) for (int IWin : thisEnclosure.SurfacePtr) { - if (state.dataSurface->Surface(IWin).Class == SurfaceClass::Window) { - int ISurf = state.dataSurface->Surface(IWin).BaseSurf; - int zoneNum = state.dataSurface->Surface(IWin).Zone; - // Ratio of floor-to-window-center height and average floor-to-ceiling height - ETA = max(0.0, - min(1.0, - (state.dataSurface->SurfaceWindow(IWin).WinCenter.z - state.dataHeatBal->Zone(zoneNum).OriginZ) * - state.dataHeatBal->Zone(zoneNum).FloorArea / state.dataHeatBal->Zone(zoneNum).Volume)); - - std::array AP = state.dataSurface->SurfaceWindow(ISurf).EnclAreaMinusThisSurf; - std::array ARHP = state.dataSurface->SurfaceWindow(ISurf).EnclAreaReflProdMinusThisSurf; - // Average reflectance seen by light moving up (RhoCeilingWall) and down (RhoFloorWall) - // across horizontal plane through center of window - state.dataSurface->SurfWinRhoCeilingWall(IWin) = - (ARHP[(int)FWC::Wall] * (1.0 - ETA) + ARHP[(int)FWC::Ceiling]) / (AP[(int)FWC::Wall] * (1.0 - ETA) + AP[(int)FWC::Ceiling] + 1.0e-5); - state.dataSurface->SurfWinRhoFloorWall(IWin) = - (ARHP[(int)FWC::Wall] * ETA + ARHP[(int)FWC::Floor]) / (AP[(int)FWC::Wall] * ETA + AP[(int)FWC::Floor] + 1.e-9); - - // Angle factor for windows with diffusing shades. SurfaceWindow(IWin)%FractionUpgoing is - // fraction of light from the shade that goes up toward ceiling and upper part of walls. - // 1 - SurfaceWindow(IWin)%FractionUpgoing is fraction that goes down toward floor and lower part of walls. - state.dataSurface->SurfWinFractionUpgoing(IWin) = state.dataSurface->Surface(IWin).Tilt / 180.0; - - // Daylighting shelf simplification: All light goes up to the ceiling regardless of orientation of shelf - if (state.dataSurface->SurfDaylightingShelfInd(IWin) > 0) { - if (state.dataDaylightingDevicesData->Shelf(state.dataSurface->SurfDaylightingShelfInd(IWin)).InSurf > 0) - state.dataSurface->SurfWinFractionUpgoing(IWin) = 1.0; - } + auto const &surf = state.dataSurface->Surface(IWin); + if (surf.Class != SurfaceClass::Window) continue; + + auto &surfWin = state.dataSurface->SurfaceWindow(IWin); + auto const &zone = state.dataHeatBal->Zone(surf.Zone); + int ISurf = surf.BaseSurf; + + // Ratio of floor-to-window-center height and average floor-to-ceiling height + Real64 ETA = max(0.0, min(1.0, (surfWin.WinCenter.z - zone.OriginZ) * zone.FloorArea / zone.Volume)); + + std::array AP = state.dataSurface->SurfaceWindow(ISurf).EnclAreaMinusThisSurf; + std::array ARHP = state.dataSurface->SurfaceWindow(ISurf).EnclAreaReflProdMinusThisSurf; + // Average reflectance seen by light moving up (RhoCeilingWall) and down (RhoFloorWall) + // across horizontal plane through center of window + surfWin.rhoCeilingWall = (ARHP[iFWC_Wall] * (1.0 - ETA) + ARHP[iFWC_Ceiling]) / (AP[iFWC_Wall] * (1.0 - ETA) + AP[iFWC_Ceiling] + 1.0e-5); + surfWin.rhoFloorWall = (ARHP[iFWC_Wall] * ETA + ARHP[iFWC_Floor]) / (AP[iFWC_Wall] * ETA + AP[iFWC_Floor] + 1.e-9); + + // Angle factor for windows with diffusing shades. SurfaceWindow(IWin)%FractionUpgoing is + // fraction of light from the shade that goes up toward ceiling and upper part of walls. + // 1 - SurfaceWindow(IWin)%FractionUpgoing is fraction that goes down toward floor and lower part of walls. + surfWin.fractionUpgoing = surf.Tilt / 180.0; + + // Daylighting shelf simplification: All light goes up to the ceiling regardless of orientation of shelf + if (state.dataSurface->SurfDaylightingShelfInd(IWin) > 0) { + if (state.dataDaylightingDevicesData->Shelf(state.dataSurface->SurfDaylightingShelfInd(IWin)).InSurf > 0) surfWin.fractionUpgoing = 1.0; } - } -} + } // for (IWin) +} // DayltgAveInteriorReflectance() void CalcDayltgCoefficients(EnergyPlusData &state) { @@ -397,19 +378,13 @@ void CalcDayltgCoefficients(EnergyPlusData &state) // REFERENCES: // Based on DOE-2.1E subroutine DCOF. - // int IHR; // Hour of day counter - // int IWin; // Window counter - // int loop; // DO loop indices - Real64 DaylFac; // sky daylight factor at ref pt i - - Real64 SlatAngle; - int ISA; + auto &dl = state.dataDayltg; - if (state.dataDaylightingManager->CalcDayltghCoefficients_firstTime) { + if (dl->CalcDayltghCoefficients_firstTime) { GetDaylightingParametersInput(state); CheckTDDsAndLightShelvesInDaylitZones(state); AssociateWindowShadingControlWithDaylighting(state); - state.dataDaylightingManager->CalcDayltghCoefficients_firstTime = false; + dl->CalcDayltghCoefficients_firstTime = false; } // End of check if firstTime // Find the total number of exterior windows associated with all Daylighting:Detailed enclosures. @@ -421,15 +396,15 @@ void CalcDayltgCoefficients(EnergyPlusData &state) // exterior windows in Daylighting:Detailed enclosures. Note that it is possible for a // Daylighting:Detailed enclosure to have zero exterior windows of its own, but it may have an interior // through which daylight passes from adjacent enclosures with exterior windows. - if ((int)state.dataDaylightingData->DaylRefPt.size() == 0) return; + if ((int)dl->DaylRefPt.size() == 0) return; if (state.dataGlobal->BeginSimFlag) { - state.dataDaylightingManager->TotWindowsWithDayl = 0; + dl->TotWindowsWithDayl = 0; for (int enclNum = 1; enclNum <= state.dataViewFactor->NumOfSolarEnclosures; ++enclNum) { - state.dataDaylightingManager->TotWindowsWithDayl += state.dataDaylightingData->enclDaylight(enclNum).NumOfDayltgExtWins; + dl->TotWindowsWithDayl += dl->enclDaylight(enclNum).NumOfDayltgExtWins; } } - if (state.dataDaylightingManager->TotWindowsWithDayl == 0) return; + if (dl->TotWindowsWithDayl == 0) return; //-----------------------------------------! // Detailed daylighting factor calculation ! @@ -450,13 +425,13 @@ void CalcDayltgCoefficients(EnergyPlusData &state) // Warning if detailed daylighting has been requested for a zone with no associated exterior windows. for (int enclNum = 1; enclNum <= state.dataViewFactor->NumOfSolarEnclosures; ++enclNum) { - auto const &thisEnclDaylight = state.dataDaylightingData->enclDaylight(enclNum); + auto const &thisEnclDaylight = dl->enclDaylight(enclNum); if (thisEnclDaylight.NumOfDayltgExtWins == 0 && thisEnclDaylight.TotalExtWindows == 0) { for (int daylightCtrlNum : thisEnclDaylight.daylightControlIndexes) { - if (state.dataDaylightingData->daylightControl(daylightCtrlNum).TotalDaylRefPoints > 0) { - ShowWarningError(state, - format("Detailed daylighting will not be done for Daylighting:Controls={}", - state.dataDaylightingData->daylightControl(daylightCtrlNum).Name)); + if (dl->daylightControl(daylightCtrlNum).TotalDaylRefPoints > 0) { + ShowWarningError( + state, + format("Detailed daylighting will not be done for Daylighting:Controls={}", dl->daylightControl(daylightCtrlNum).Name)); ShowContinueError(state, "because it has no associated exterior windows."); } } @@ -478,9 +453,9 @@ void CalcDayltgCoefficients(EnergyPlusData &state) int iHrEnd = state.dataSysVars->DetailedSolarTimestepIntegration ? state.dataGlobal->HourOfDay : Constant::HoursInDay; for (int iHr = iHrBeg; iHr <= iHrEnd; ++iHr) { for (int iTDD = 1; iTDD <= numTDD; ++iTDD) { - state.dataDaylightingManager->TDDTransVisBeam(iHr, iTDD) = 0.0; - state.dataDaylightingManager->TDDFluxInc(iHr, iTDD) = Illums(); - state.dataDaylightingManager->TDDFluxTrans(iHr, iTDD) = Illums(); + dl->TDDTransVisBeam(iHr, iTDD) = 0.0; + dl->TDDFluxInc(iHr, iTDD) = Illums(); + dl->TDDFluxTrans(iHr, iTDD) = Illums(); } } } @@ -488,67 +463,37 @@ void CalcDayltgCoefficients(EnergyPlusData &state) if (!state.dataSysVars->DetailedSolarTimestepIntegration) { if (state.dataGlobal->BeginDayFlag) { // Calculate hourly sun angles, clear sky zenith luminance, and exterior horizontal illuminance - state.dataDaylightingManager->PHSUN = 0.0; - state.dataDaylightingManager->SPHSUN = 0.0; - state.dataDaylightingManager->CPHSUN = 0.0; - state.dataDaylightingManager->THSUN = 0.0; - - state.dataDaylightingManager->PHSUNHR = 0.0; - state.dataDaylightingManager->SPHSUNHR = 0.0; - state.dataDaylightingManager->CPHSUNHR = 0.0; - state.dataDaylightingManager->THSUNHR = 0.0; - state.dataDaylightingManager->GILSK = Illums(); - state.dataDaylightingManager->GILSU = 0.0; + dl->sunAngles = SunAngles(); + dl->sunAnglesHr = {SunAngles()}; + dl->horIllum = {Illums()}; for (int IHR = 1; IHR <= Constant::HoursInDay; ++IHR) { - if (state.dataSurface->SurfSunCosHourly(IHR).z < DataEnvironment::SunIsUpValue) + auto const &surfSunCosHr = state.dataSurface->SurfSunCosHourly(IHR); + if (surfSunCosHr.z < DataEnvironment::SunIsUpValue) continue; // Skip if sun is below horizon //Autodesk SurfSunCosHourly was uninitialized here - state.dataDaylightingManager->PHSUN = Constant::PiOvr2 - std::acos(state.dataSurface->SurfSunCosHourly(IHR).z); - state.dataDaylightingManager->PHSUNHR(IHR) = state.dataDaylightingManager->PHSUN; - state.dataDaylightingManager->SPHSUNHR(IHR) = std::sin(state.dataDaylightingManager->PHSUN); - state.dataDaylightingManager->CPHSUNHR(IHR) = std::cos(state.dataDaylightingManager->PHSUN); - state.dataDaylightingManager->THSUNHR(IHR) = - std::atan2(state.dataSurface->SurfSunCosHourly(IHR).y, state.dataSurface->SurfSunCosHourly(IHR).x); - // Get exterior horizontal illuminance from sky and sun - state.dataDaylightingManager->THSUN = state.dataDaylightingManager->THSUNHR(IHR); - state.dataDaylightingManager->SPHSUN = state.dataDaylightingManager->SPHSUNHR(IHR); - state.dataDaylightingManager->CPHSUN = state.dataDaylightingManager->CPHSUNHR(IHR); - DayltgExtHorizIllum(state, state.dataDaylightingManager->GILSK(IHR), state.dataDaylightingManager->GILSU(IHR)); + + Real64 phi = Constant::PiOvr2 - std::acos(surfSunCosHr.z); + Real64 theta = std::atan2(surfSunCosHr.y, surfSunCosHr.x); + dl->sunAngles = dl->sunAnglesHr[IHR] = {phi, std::sin(phi), std::cos(phi), theta}; + + DayltgExtHorizIllum(state, dl->horIllum[IHR]); } } } else { // timestep integrated calculations - state.dataDaylightingManager->PHSUN = 0.0; - state.dataDaylightingManager->SPHSUN = 0.0; - state.dataDaylightingManager->CPHSUN = 0.0; - state.dataDaylightingManager->THSUN = 0.0; - - state.dataDaylightingManager->PHSUNHR(state.dataGlobal->HourOfDay) = 0.0; - state.dataDaylightingManager->SPHSUNHR(state.dataGlobal->HourOfDay) = 0.0; - state.dataDaylightingManager->CPHSUNHR(state.dataGlobal->HourOfDay) = 0.0; - state.dataDaylightingManager->THSUNHR(state.dataGlobal->HourOfDay) = 0.0; - state.dataDaylightingManager->GILSK(state.dataGlobal->HourOfDay) = Illums(); - state.dataDaylightingManager->GILSU(state.dataGlobal->HourOfDay) = 0.0; - if (!(state.dataSurface->SurfSunCosHourly(state.dataGlobal->HourOfDay).z < DataEnvironment::SunIsUpValue)) { // Skip if sun is below horizon - state.dataDaylightingManager->PHSUN = Constant::PiOvr2 - std::acos(state.dataSurface->SurfSunCosHourly(state.dataGlobal->HourOfDay).z); - state.dataDaylightingManager->PHSUNHR(state.dataGlobal->HourOfDay) = state.dataDaylightingManager->PHSUN; - state.dataDaylightingManager->SPHSUNHR(state.dataGlobal->HourOfDay) = std::sin(state.dataDaylightingManager->PHSUN); - state.dataDaylightingManager->CPHSUNHR(state.dataGlobal->HourOfDay) = std::cos(state.dataDaylightingManager->PHSUN); - state.dataDaylightingManager->THSUNHR(state.dataGlobal->HourOfDay) = - std::atan2(state.dataSurface->SurfSunCosHourly(state.dataGlobal->HourOfDay).y, - state.dataSurface->SurfSunCosHourly(state.dataGlobal->HourOfDay).x); - // Get exterior horizontal illuminance from sky and sun - state.dataDaylightingManager->THSUN = state.dataDaylightingManager->THSUNHR(state.dataGlobal->HourOfDay); - state.dataDaylightingManager->SPHSUN = state.dataDaylightingManager->SPHSUNHR(state.dataGlobal->HourOfDay); - state.dataDaylightingManager->CPHSUN = state.dataDaylightingManager->CPHSUNHR(state.dataGlobal->HourOfDay); - DayltgExtHorizIllum(state, - state.dataDaylightingManager->GILSK(state.dataGlobal->HourOfDay), - state.dataDaylightingManager->GILSU(state.dataGlobal->HourOfDay)); + dl->sunAngles = dl->sunAnglesHr[state.dataGlobal->HourOfDay] = {SunAngles()}; + dl->horIllum[state.dataGlobal->HourOfDay] = Illums(); + auto const &surfSunCosHr = state.dataSurface->SurfSunCosHourly(state.dataGlobal->HourOfDay); + if (!(surfSunCosHr.z < DataEnvironment::SunIsUpValue)) { // Skip if sun is below horizon + Real64 phi = Constant::PiOvr2 - std::acos(surfSunCosHr.z); + Real64 theta = std::atan2(surfSunCosHr.y, surfSunCosHr.x); + dl->sunAngles = dl->sunAnglesHr[state.dataGlobal->HourOfDay] = {phi, std::sin(phi), std::cos(phi), theta}; + DayltgExtHorizIllum(state, dl->horIllum[state.dataGlobal->HourOfDay]); } } CalcDayltgCoeffsRefMapPoints(state); - if (state.dataDaylightingManager->doSkyReporting && (!state.dataGlobal->KickOffSizing && !state.dataGlobal->KickOffSimulation) && - (state.dataDaylightingManager->FirstTimeDaylFacCalc && state.dataDaylightingManager->TotWindowsWithDayl > 0 && + if (dl->doSkyReporting && (!state.dataGlobal->KickOffSizing && !state.dataGlobal->KickOffSimulation) && + (dl->FirstTimeDaylFacCalc && dl->TotWindowsWithDayl > 0 && (!state.dataSysVars->DetailedSolarTimestepIntegration || state.dataGlobal->HourOfDay == 12))) { // Write the bare-window four sky daylight factors at noon time to the eio file; this is done only // for first time that daylight factors are calculated and so is insensitive to possible variation @@ -556,10 +501,10 @@ void CalcDayltgCoefficients(EnergyPlusData &state) static constexpr std::string_view Format_700("! , Sky Type, MonthAndDay, Daylighting Control Name, Enclosure Name, " "Window Name, Reference Point, Daylight Factor\n"); print(state.files.eio, Format_700); - for (int controlNum = 1; controlNum <= (int)state.dataDaylightingData->daylightControl.size(); ++controlNum) { - auto &thisDaylightControl = state.dataDaylightingData->daylightControl(controlNum); - int enclNum = thisDaylightControl.enclIndex; - auto &thisEnclDaylight = state.dataDaylightingData->enclDaylight(enclNum); + for (int controlNum = 1; controlNum <= (int)dl->daylightControl.size(); ++controlNum) { + auto &thisDayltgCtrl = dl->daylightControl(controlNum); + int enclNum = thisDayltgCtrl.enclIndex; + auto &thisEnclDaylight = dl->enclDaylight(enclNum); if (thisEnclDaylight.NumOfDayltgExtWins == 0 || !thisEnclDaylight.hasSplitFluxDaylighting) continue; for (int windowCounter = 1; windowCounter <= thisEnclDaylight.NumOfDayltgExtWins; ++windowCounter) { @@ -573,48 +518,48 @@ void CalcDayltgCoefficients(EnergyPlusData &state) "Clear Sky", "Clear Turbid Sky", "Intermediate Sky", "Overcast Sky"}; for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { - for (int refPtNum = 1; refPtNum <= thisDaylightControl.TotalDaylRefPoints; ++refPtNum) { - DaylFac = thisDaylightControl.DaylIllFacSky(12, windowCounter, refPtNum, 1).sky[iSky]; + for (int refPtNum = 1; refPtNum <= thisDayltgCtrl.TotalDaylRefPoints; ++refPtNum) { + Real64 DaylFac = thisDayltgCtrl.daylFac[12](windowCounter, refPtNum, 1)[iLum_Illum].sky[iSky]; print(state.files.eio, " Sky Daylight Factors,{},{},{},{},{},{},{:.4R}\n", skyTypeStrings[iSky], state.dataEnvrn->CurMnDy, - thisDaylightControl.Name, - state.dataViewFactor->EnclSolInfo(thisDaylightControl.enclIndex).Name, + thisDayltgCtrl.Name, + state.dataViewFactor->EnclSolInfo(thisDayltgCtrl.enclIndex).Name, state.dataSurface->Surface(windowSurfNum).Name, - state.dataDaylightingData->DaylRefPt(thisDaylightControl.DaylRefPtNum(refPtNum)).Name, + dl->DaylRefPt(thisDayltgCtrl.refPts(refPtNum).num).Name, DaylFac); } // for (refPtNum) } // for (iSky) } // for (windowCounter) } // for (controlNum) - state.dataDaylightingManager->FirstTimeDaylFacCalc = false; - state.dataDaylightingManager->doSkyReporting = false; + dl->FirstTimeDaylFacCalc = false; + dl->doSkyReporting = false; } // if (detailedIntegration etc.) // Skip if no daylight windows - if (state.dataDaylightingManager->TotWindowsWithDayl == 0) return; + if (dl->TotWindowsWithDayl == 0) return; // Skip if no request of reporting - if ((!state.dataDaylightingData->DFSReportSizingDays) && (!state.dataDaylightingData->DFSReportAllShadowCalculationDays)) return; + if ((!dl->DFSReportSizingDays) && (!dl->DFSReportAllShadowCalculationDays)) return; // Skip duplicate calls if (state.dataGlobal->KickOffSizing) return; if (state.dataGlobal->DoingSizing) return; if (state.dataGlobal->KickOffSimulation) return; - if (state.dataDaylightingData->DFSReportSizingDays) { + if (dl->DFSReportSizingDays) { if (state.dataGlobal->DoWeathSim && state.dataGlobal->DoDesDaySim) { if (state.dataGlobal->KindOfSim == Constant::KindOfSim::RunPeriodWeather) return; } } - if (state.dataDaylightingData->DFSReportAllShadowCalculationDays) { + if (dl->DFSReportAllShadowCalculationDays) { if (state.dataGlobal->KindOfSim != Constant::KindOfSim::RunPeriodWeather) return; } // open a new file eplusout.dfs for saving the daylight factors - if (state.dataDaylightingManager->CreateDFSReportFile) { + if (dl->CreateDFSReportFile) { InputOutputFile &dfs = state.files.dfs.ensure_open(state, "CalcDayltgCoefficients", state.files.outputControl.dfs); print(dfs, "{}\n", "This file contains daylight factors for all exterior windows of daylight enclosures."); print(dfs, "{}\n", "MonthAndDay,Enclosure Name,Zone Name,Window Name,Window State"); @@ -622,13 +567,13 @@ void CalcDayltgCoefficients(EnergyPlusData &state) "{}\n", "Hour,Reference Point,Daylight Factor for Clear Sky,Daylight Factor for Clear Turbid Sky," "Daylight Factor for Intermediate Sky,Daylight Factor for Overcast Sky"); - state.dataDaylightingManager->CreateDFSReportFile = false; + dl->CreateDFSReportFile = false; } - for (int controlNum = 1; controlNum <= (int)state.dataDaylightingData->daylightControl.size(); ++controlNum) { - auto &thisDaylightControl = state.dataDaylightingData->daylightControl(controlNum); - int enclNum = thisDaylightControl.enclIndex; - auto &thisEnclDaylight = state.dataDaylightingData->enclDaylight(enclNum); + for (int controlNum = 1; controlNum <= (int)dl->daylightControl.size(); ++controlNum) { + auto &thisDayltgCtrl = dl->daylightControl(controlNum); + int enclNum = thisDayltgCtrl.enclIndex; + auto &thisEnclDaylight = dl->enclDaylight(enclNum); if (thisEnclDaylight.NumOfDayltgExtWins == 0) continue; for (int windowCounter = 1; windowCounter <= thisEnclDaylight.NumOfDayltgExtWins; ++windowCounter) { @@ -638,6 +583,7 @@ void CalcDayltgCoefficients(EnergyPlusData &state) // component will not be calculated for these windows until the time-step loop. if (state.dataSurface->Surface(windowSurfNum).SolarEnclIndex == enclNum) { + int ISA; if (state.dataSurface->SurfWinMovableSlats(windowSurfNum)) { // variable slat angle - MaxSlatangle sets ISA = Material::MaxSlatAngs + 1; @@ -657,7 +603,7 @@ void CalcDayltgCoefficients(EnergyPlusData &state) "{},{},{},{},Base Window\n", state.dataEnvrn->CurMnDy, state.dataViewFactor->EnclSolInfo(enclNum).Name, - state.dataHeatBal->Zone(thisDaylightControl.zoneIndex).Name, + state.dataHeatBal->Zone(thisDayltgCtrl.zoneIndex).Name, state.dataSurface->Surface(windowSurfNum).Name); } else if (ISlatAngle == 2 && ISA == 2) { // window shade or blind with fixed slat angle @@ -665,30 +611,31 @@ void CalcDayltgCoefficients(EnergyPlusData &state) "{},{},{},{},Blind or Slat Applied\n", state.dataEnvrn->CurMnDy, state.dataViewFactor->EnclSolInfo(enclNum).Name, - state.dataHeatBal->Zone(thisDaylightControl.zoneIndex).Name, + state.dataHeatBal->Zone(thisDayltgCtrl.zoneIndex).Name, state.dataSurface->Surface(windowSurfNum).Name); } else { // blind with variable slat angle - SlatAngle = 180.0 / double(Material::MaxSlatAngs - 1) * double(ISlatAngle - 2); + Real64 SlatAngle = 180.0 / double(Material::MaxSlatAngs - 1) * double(ISlatAngle - 2); print(state.files.dfs, "{},{},{},{},{:.1R}\n", state.dataEnvrn->CurMnDy, state.dataViewFactor->EnclSolInfo(enclNum).Name, - state.dataHeatBal->Zone(thisDaylightControl.zoneIndex).Name, + state.dataHeatBal->Zone(thisDayltgCtrl.zoneIndex).Name, state.dataSurface->Surface(windowSurfNum).Name, SlatAngle); } for (int IHR = 1; IHR <= Constant::HoursInDay; ++IHR) { // For each Daylight Reference Point - for (int refPtNum = 1; refPtNum <= thisDaylightControl.TotalDaylRefPoints; ++refPtNum) { - auto &illums = thisDaylightControl.DaylIllFacSky(IHR, windowCounter, refPtNum, ISlatAngle); + auto &daylFacHr = thisDayltgCtrl.daylFac[IHR]; + for (int refPtNum = 1; refPtNum <= thisDayltgCtrl.TotalDaylRefPoints; ++refPtNum) { + auto &illums = daylFacHr(windowCounter, refPtNum, ISlatAngle)[iLum_Illum]; // write daylight factors - 4 sky types for each daylight ref point print(state.files.dfs, "{},{},{:.5R},{:.5R},{:.5R},{:.5R}\n", IHR, - state.dataDaylightingData->DaylRefPt(thisDaylightControl.DaylRefPtNum(refPtNum)).Name, + dl->DaylRefPt(thisDayltgCtrl.refPts(refPtNum).num).Name, illums.sky[(int)SkyType::Clear], illums.sky[(int)SkyType::ClearTurbid], illums.sky[(int)SkyType::Intermediate], @@ -700,7 +647,7 @@ void CalcDayltgCoefficients(EnergyPlusData &state) } // if (SolarEnclIndex == enclNum) } // for (windowCounter) exterior windows in enclosure } // for (controlNum) daylighting control -} +} // CalcDayltgCoefficients() void CalcDayltgCoeffsRefMapPoints(EnergyPlusData &state) { @@ -714,14 +661,15 @@ void CalcDayltgCoeffsRefMapPoints(EnergyPlusData &state) // PURPOSE OF THIS SUBROUTINE: // This subroutine does the daylighting coefficient calculation for the // daylighting and illuminance map reference points. + auto &dl = state.dataDayltg; - if (state.dataDaylightingManager->VeryFirstTime) { + if (dl->VeryFirstTime) { // make sure all necessary surfaces match to pipes bool ErrorsFound = false; for (int enclNum = 1; enclNum <= state.dataViewFactor->NumOfSolarEnclosures; ++enclNum) { - for (int loopwin = 1; loopwin <= state.dataDaylightingData->enclDaylight(enclNum).NumOfDayltgExtWins; ++loopwin) { - int IWin = state.dataDaylightingData->enclDaylight(enclNum).DayltgExtWinSurfNums(loopwin); - if (state.dataSurface->SurfWinOriginalClass(IWin) != SurfaceClass::TDD_Diffuser) continue; + for (int loopwin = 1; loopwin <= dl->enclDaylight(enclNum).NumOfDayltgExtWins; ++loopwin) { + int IWin = dl->enclDaylight(enclNum).DayltgExtWinSurfNums(loopwin); + if (state.dataSurface->Surface(IWin).OriginalClass != SurfaceClass::TDD_Diffuser) continue; // Look up the TDD:DOME object int PipeNum = state.dataSurface->SurfWinTDDPipeNum(IWin); if (PipeNum == 0) { @@ -737,22 +685,21 @@ void CalcDayltgCoeffsRefMapPoints(EnergyPlusData &state) if (ErrorsFound) { ShowFatalError(state, "Not all TubularDaylightDome objects have corresponding DaylightingDevice:Tubular objects. Program terminates."); } - state.dataDaylightingManager->VeryFirstTime = false; + dl->VeryFirstTime = false; } // Calc for daylighting reference points for daylighting controls that use SplitFlux method - for (int daylightCtrlNum = 1; daylightCtrlNum <= (int)state.dataDaylightingData->daylightControl.size(); ++daylightCtrlNum) { - if (state.dataDaylightingData->daylightControl(daylightCtrlNum).DaylightMethod != DaylightingMethod::SplitFlux) continue; + for (int daylightCtrlNum = 1; daylightCtrlNum <= (int)dl->daylightControl.size(); ++daylightCtrlNum) { + if (dl->daylightControl(daylightCtrlNum).DaylightMethod != DaylightingMethod::SplitFlux) continue; // Skip enclosures with no exterior windows or in adjacent enclosure(s) with which an interior window is shared - if (state.dataDaylightingData->enclDaylight(state.dataDaylightingData->daylightControl(daylightCtrlNum).enclIndex).NumOfDayltgExtWins == 0) - continue; + if (dl->enclDaylight(dl->daylightControl(daylightCtrlNum).enclIndex).NumOfDayltgExtWins == 0) continue; CalcDayltgCoeffsRefPoints(state, daylightCtrlNum); } if (!state.dataGlobal->DoingSizing && !state.dataGlobal->KickOffSimulation) { // Calc for illuminance maps - if ((int)state.dataDaylightingData->IllumMap.size() > 0) { - for (int MapNum = 1; MapNum <= (int)state.dataDaylightingData->IllumMap.size(); ++MapNum) { - int mapZoneNum = state.dataDaylightingData->IllumMapCalc(MapNum).zoneIndex; + if ((int)dl->illumMaps.size() > 0) { + for (int MapNum = 1; MapNum <= (int)dl->illumMaps.size(); ++MapNum) { + int mapZoneNum = dl->illumMaps(MapNum).zoneIndex; if (state.dataGlobal->WarmupFlag) { DisplayString(state, "Calculating Daylighting Coefficients (Map Points), Zone=" + state.dataHeatBal->Zone(mapZoneNum).Name); } else { @@ -762,7 +709,7 @@ void CalcDayltgCoeffsRefMapPoints(EnergyPlusData &state) } } } -} +} // CalcDayltgCoeffsRefMapPoints() void CalcDayltgCoeffsRefPoints(EnergyPlusData &state, int const daylightCtrlNum) { @@ -774,9 +721,8 @@ void CalcDayltgCoeffsRefPoints(EnergyPlusData &state, int const daylightCtrlNum) // PURPOSE OF THIS SUBROUTINE: // Provides calculations for Daylighting Coefficients for daylighting reference points + auto &dl = state.dataDayltg; - int NRF; // Number of daylighting reference points in a zone - Real64 AZVIEW; // Azimuth of view vector in absolute coord system for // glare calculation (radians) int IConst; // Construction counter int ICtrl; // Window control counter @@ -832,65 +778,57 @@ void CalcDayltgCoeffsRefPoints(EnergyPlusData &state, int const daylightCtrlNum) int WinEl; // Current window element - if (state.dataDaylightingManager->refFirstTime && (state.dataDaylightingData->maxRefPointsPerControl > 0)) { - state.dataDaylightingManager->RefErrIndex.allocate(state.dataDaylightingData->maxRefPointsPerControl, state.dataSurface->TotSurfaces); - state.dataDaylightingManager->RefErrIndex = 0; - state.dataDaylightingManager->refFirstTime = false; + if (dl->refFirstTime && (dl->maxControlRefPoints > 0)) { + dl->RefErrIndex.allocate(dl->maxControlRefPoints, state.dataSurface->TotSurfaces); + dl->RefErrIndex = 0; + dl->refFirstTime = false; } - auto &thisDaylightControl = state.dataDaylightingData->daylightControl(daylightCtrlNum); - auto &thisEnclDaylight = state.dataDaylightingData->enclDaylight(thisDaylightControl.enclIndex); - int zoneNum = thisDaylightControl.zoneIndex; + auto &thisDayltgCtrl = dl->daylightControl(daylightCtrlNum); + auto &thisEnclDaylight = dl->enclDaylight(thisDayltgCtrl.enclIndex); + int zoneNum = thisDayltgCtrl.zoneIndex; // Azimuth of view vector in absolute coord sys - AZVIEW = (thisDaylightControl.ViewAzimuthForGlare + state.dataHeatBal->Zone(zoneNum).RelNorth + state.dataHeatBal->BuildingAzimuth + - state.dataHeatBal->BuildingRotationAppendixG) * - Constant::DegToRadians; + Real64 AZVIEW = (thisDayltgCtrl.ViewAzimuthForGlare + state.dataHeatBal->Zone(zoneNum).RelNorth + state.dataHeatBal->BuildingAzimuth + + state.dataHeatBal->BuildingRotationAppendixG) * + Constant::DegToRadians; // View vector components in absolute coord sys VIEWVC = {std::sin(AZVIEW), std::cos(AZVIEW), 0.0}; - thisDaylightControl.DaylIllumAtRefPt = 0.0; // Daylight illuminance at reference points (lux) - thisDaylightControl.GlareIndexAtRefPt = 0.0; // Glare index at reference points - thisDaylightControl.SolidAngAtRefPt = 0.0; - thisDaylightControl.SolidAngAtRefPtWtd = 0.0; - - for (int iExtWin = 1; iExtWin <= thisDaylightControl.TotalExtWindows; ++iExtWin) { - for (int iRefPt = 1; iRefPt <= thisDaylightControl.TotalDaylRefPoints; ++iRefPt) { - thisDaylightControl.IllumFromWinAtRefPt(iExtWin, iRefPt) = {0.0, 0.0}; - thisDaylightControl.BackLumFromWinAtRefPt(iExtWin, iRefPt) = {0.0, 0.0}; - thisDaylightControl.SourceLumFromWinAtRefPt(iExtWin, iRefPt) = {0.0, 0.0}; + for (auto &refPt : thisDayltgCtrl.refPts) { + refPt.lums[iLum_Illum] = 0.0; // Daylight illuminance at reference points (lux) + refPt.glareIndex = 0.0; // Glare index at reference points + for (auto &extWin : refPt.extWins) { + extWin.solidAng = extWin.solidAngWtd = 0.0; + extWin.lums[iLum_Illum] = extWin.lums[iLum_Back] = extWin.lums[iLum_Source] = {0.0, 0.0}; } } int iHrBeg = state.dataSysVars->DetailedSolarTimestepIntegration ? state.dataGlobal->HourOfDay : 1; int iHrEnd = state.dataSysVars->DetailedSolarTimestepIntegration ? state.dataGlobal->HourOfDay : Constant::HoursInDay; int numExtWins = thisEnclDaylight.NumOfDayltgExtWins; - int numRefPts = thisDaylightControl.TotalDaylRefPoints; + int numRefPts = thisDayltgCtrl.TotalDaylRefPoints; int numSlatAngs = state.dataSurface->actualMaxSlatAngs + 1; for (int iHr = iHrBeg; iHr <= iHrEnd; ++iHr) { + auto &daylFacHr = thisDayltgCtrl.daylFac[iHr]; for (int iWin = 1; iWin <= numExtWins; ++iWin) { for (int iRefPt = 1; iRefPt <= numRefPts; ++iRefPt) { for (int iSlatAng = 1; iSlatAng <= numSlatAngs; ++iSlatAng) { - thisDaylightControl.DaylIllFacSky(iHr, iWin, iRefPt, iSlatAng) = Illums(); - thisDaylightControl.DaylSourceFacSky(iHr, iWin, iRefPt, iSlatAng) = Illums(); - thisDaylightControl.DaylBackFacSky(iHr, iWin, iRefPt, iSlatAng) = Illums(); - thisDaylightControl.DaylIllFacSun(iHr, iWin, iRefPt, iSlatAng) = 0.0; - thisDaylightControl.DaylIllFacSunDisk(iHr, iWin, iRefPt, iSlatAng) = 0.0; - thisDaylightControl.DaylSourceFacSun(iHr, iWin, iRefPt, iSlatAng) = 0.0; - thisDaylightControl.DaylSourceFacSunDisk(iHr, iWin, iRefPt, iSlatAng) = 0.0; - thisDaylightControl.DaylBackFacSun(iHr, iWin, iRefPt, iSlatAng) = 0.0; - thisDaylightControl.DaylBackFacSunDisk(iHr, iWin, iRefPt, iSlatAng) = 0.0; + auto &daylFac = daylFacHr(iWin, iRefPt, iSlatAng); + daylFac[iLum_Illum] = Illums(); + daylFac[iLum_Source] = Illums(); + daylFac[iLum_Back] = Illums(); } // for (iSlatAng) } // for (iRefPt) } // for (iWin) } // for (iHr) - NRF = thisDaylightControl.TotalDaylRefPoints; BRef = 0; - for (int IL = 1; IL <= NRF; ++IL) { + for (int IL = 1; IL <= thisDayltgCtrl.TotalDaylRefPoints; ++IL) { + auto &refPt = thisDayltgCtrl.refPts(IL); // Reference point in absolute coordinate system - Vector3 RREF = thisDaylightControl.DaylRefPtAbsCoord(IL); // ( x, y, z ) + Vector3 RREF = refPt.absCoords; // ------------- // ---------- WINDOW LOOP ---------- @@ -1040,15 +978,15 @@ void CalcDayltgCoeffsRefPoints(EnergyPlusData &state, int const daylightCtrlNum) } // End of hourly sun position loop, IHR } else { // timestep integrated - if (state.dataEnvrn->SunIsUp && !state.dataDaylightingManager->MySunIsUpFlag) { + if (state.dataEnvrn->SunIsUp && !dl->MySunIsUpFlag) { ISunPos = 0; - state.dataDaylightingManager->MySunIsUpFlag = true; - } else if (state.dataEnvrn->SunIsUp && state.dataDaylightingManager->MySunIsUpFlag) { + dl->MySunIsUpFlag = true; + } else if (state.dataEnvrn->SunIsUp && dl->MySunIsUpFlag) { ISunPos = 1; - } else if (!state.dataEnvrn->SunIsUp && state.dataDaylightingManager->MySunIsUpFlag) { - state.dataDaylightingManager->MySunIsUpFlag = false; + } else if (!state.dataEnvrn->SunIsUp && dl->MySunIsUpFlag) { + dl->MySunIsUpFlag = false; ISunPos = -1; - } else if (!state.dataEnvrn->SunIsUp && !state.dataDaylightingManager->MySunIsUpFlag) { + } else if (!state.dataEnvrn->SunIsUp && !dl->MySunIsUpFlag) { ISunPos = -1; } @@ -1106,15 +1044,15 @@ void CalcDayltgCoeffsRefPoints(EnergyPlusData &state, int const daylightCtrlNum) } // End of sun position loop, IHR } else { - if (state.dataEnvrn->SunIsUp && !state.dataDaylightingManager->MySunIsUpFlag) { + if (state.dataEnvrn->SunIsUp && !dl->MySunIsUpFlag) { ISunPos = 0; - state.dataDaylightingManager->MySunIsUpFlag = true; - } else if (state.dataEnvrn->SunIsUp && state.dataDaylightingManager->MySunIsUpFlag) { + dl->MySunIsUpFlag = true; + } else if (state.dataEnvrn->SunIsUp && dl->MySunIsUpFlag) { ISunPos = 1; - } else if (!state.dataEnvrn->SunIsUp && state.dataDaylightingManager->MySunIsUpFlag) { - state.dataDaylightingManager->MySunIsUpFlag = false; + } else if (!state.dataEnvrn->SunIsUp && dl->MySunIsUpFlag) { + dl->MySunIsUpFlag = false; ISunPos = -1; - } else if (!state.dataEnvrn->SunIsUp && !state.dataDaylightingManager->MySunIsUpFlag) { + } else if (!state.dataEnvrn->SunIsUp && !dl->MySunIsUpFlag) { ISunPos = -1; } FigureRefPointDayltgFactorsToAddIllums( @@ -1139,11 +1077,11 @@ void CalcDayltgCoeffsMapPoints(EnergyPlusData &state, int const mapNum) // METHODOLOGY EMPLOYED: // Was previously part of CalcDayltgCoeffsRefMapPoints -- broken out to all multiple // maps per zone + auto &dl = state.dataDayltg; // In the following four variables, I=1 for clear sky, 2 for overcast. int numRefPts; // Number of daylighting reference points in a zone int IL; // Reference point counter - Real64 AZVIEW; // Azimuth of view vector in absolute coord system for // glare calculation (radians) int IConst; // Construction counter int ICtrl; // Window control counter @@ -1197,34 +1135,33 @@ void CalcDayltgCoeffsMapPoints(EnergyPlusData &state, int const mapNum) Vector3 U23; Vector3 VIEWVC2; - if (state.dataDaylightingManager->mapFirstTime && (int)state.dataDaylightingData->IllumMap.size() > 0) { + if (dl->mapFirstTime && (int)dl->illumMaps.size() > 0) { IL = -999; - for (int MapNum = 1; MapNum <= (int)state.dataDaylightingData->IllumMap.size(); ++MapNum) { - IL = max(IL, state.dataDaylightingData->IllumMapCalc(MapNum).TotalMapRefPoints); + for (int MapNum = 1; MapNum <= (int)dl->illumMaps.size(); ++MapNum) { + IL = max(IL, dl->illumMaps(MapNum).TotalMapRefPoints); } - state.dataDaylightingManager->MapErrIndex.dimension(IL, state.dataSurface->TotSurfaces, 0); - state.dataDaylightingManager->mapFirstTime = false; + dl->MapErrIndex.dimension(IL, state.dataSurface->TotSurfaces, 0); + dl->mapFirstTime = false; } - auto &illumMapCalc = state.dataDaylightingData->IllumMapCalc(mapNum); - int enclNum = illumMapCalc.enclIndex; - auto &thisEnclDaylight = state.dataDaylightingData->enclDaylight(enclNum); + auto &illumMap = dl->illumMaps(mapNum); + int enclNum = illumMap.enclIndex; + auto &thisEnclDaylight = dl->enclDaylight(enclNum); // Azimuth of view vector in absolute coord sys - set to zero here, because glare isn't calculated for map points // but these are arguments to some of the functions that are shared with regular reference points, so initalize here. - AZVIEW = 0.0; + Real64 AZVIEW = 0.0; // View vector components in absolute coord sys VIEWVC = {0.0, 0.0, 0.0}; - numRefPts = illumMapCalc.TotalMapRefPoints; + numRefPts = illumMap.TotalMapRefPoints; int numSlatAngs = state.dataSurface->actualMaxSlatAngs + 1; int numExtWins = thisEnclDaylight.NumOfDayltgExtWins; - illumMapCalc.DaylIllumAtMapPt = 0.0; // Daylight illuminance at reference points (lux) - - for (int iExtWin = 1; iExtWin <= (int)illumMapCalc.IllumFromWinAtMapPt.size1(); ++iExtWin) { - for (int iRefPt = 1; iRefPt <= (int)illumMapCalc.IllumFromWinAtMapPt.size2(); ++iRefPt) { - illumMapCalc.IllumFromWinAtMapPt(iExtWin, iRefPt) = {0.0, 0.0}; + for (auto &refPt : illumMap.refPts) { + refPt.lums[iLum_Illum] = 0.0; // Daylight illuminance at reference points (lux) + for (int iExtWin = 1; iExtWin <= numExtWins; ++iExtWin) { + refPt.winLums(iExtWin) = {0.0, 0.0}; } } @@ -1232,20 +1169,19 @@ void CalcDayltgCoeffsMapPoints(EnergyPlusData &state, int const mapNum) int iHrEnd = state.dataSysVars->DetailedSolarTimestepIntegration ? state.dataGlobal->HourOfDay : Constant::HoursInDay; for (int iHr = iHrBeg; iHr <= iHrEnd; ++iHr) { + auto &daylFacHr = illumMap.daylFac[iHr]; for (int iWin = 1; iWin <= numExtWins; ++iWin) { for (int iRefPt = 1; iRefPt <= numRefPts; ++iRefPt) { for (int iSlatAng = 1; iSlatAng <= numSlatAngs; ++iSlatAng) { - illumMapCalc.DaylIllFacSky(iHr, iWin, iRefPt, iSlatAng) = Illums(); - illumMapCalc.DaylIllFacSun(iHr, iWin, iRefPt, iSlatAng) = 0.0; - illumMapCalc.DaylIllFacSunDisk(iHr, iWin, iRefPt, iSlatAng) = 0.0; + daylFacHr(iWin, iRefPt, iSlatAng) = Illums(); } } } } for (int IL = 1; IL <= numRefPts; ++IL) { - - Vector3 RREF = illumMapCalc.MapRefPtAbsCoord(IL); // (x, y, z) + auto &refPt = illumMap.refPts(IL); + Vector3 RREF = refPt.absCoords; // ------------- // ---------- WINDOW LOOP ---------- @@ -1397,15 +1333,15 @@ void CalcDayltgCoeffsMapPoints(EnergyPlusData &state, int const mapNum) mapNum); } // End of hourly sun position loop, IHR } else { - if (state.dataEnvrn->SunIsUp && !state.dataDaylightingManager->CalcDayltgCoeffsMapPointsMySunIsUpFlag) { + if (state.dataEnvrn->SunIsUp && !dl->CalcDayltgCoeffsMapPointsMySunIsUpFlag) { ISunPos = 0; - state.dataDaylightingManager->CalcDayltgCoeffsMapPointsMySunIsUpFlag = true; - } else if (state.dataEnvrn->SunIsUp && state.dataDaylightingManager->CalcDayltgCoeffsMapPointsMySunIsUpFlag) { + dl->CalcDayltgCoeffsMapPointsMySunIsUpFlag = true; + } else if (state.dataEnvrn->SunIsUp && dl->CalcDayltgCoeffsMapPointsMySunIsUpFlag) { ISunPos = 1; - } else if (!state.dataEnvrn->SunIsUp && state.dataDaylightingManager->CalcDayltgCoeffsMapPointsMySunIsUpFlag) { - state.dataDaylightingManager->CalcDayltgCoeffsMapPointsMySunIsUpFlag = false; + } else if (!state.dataEnvrn->SunIsUp && dl->CalcDayltgCoeffsMapPointsMySunIsUpFlag) { + dl->CalcDayltgCoeffsMapPointsMySunIsUpFlag = false; ISunPos = -1; - } else if (!state.dataEnvrn->SunIsUp && !state.dataDaylightingManager->CalcDayltgCoeffsMapPointsMySunIsUpFlag) { + } else if (!state.dataEnvrn->SunIsUp && !dl->CalcDayltgCoeffsMapPointsMySunIsUpFlag) { ISunPos = -1; } // daylightingCtrlNum parameter is unused for map points @@ -1512,15 +1448,13 @@ void FigureDayltgCoeffsAtPointsSetupForWindow(EnergyPlusData &state, // METHODOLOGY EMPLOYED: // switch as need to serve both reference points and map points based on calledFrom + auto &dl = state.dataDayltg; int ShelfNum; // Daylighting shelf object number - Real64 WW; // Window width (m) - Real64 HW; // Window height (m) - - int NDIVX; // Number of window x divisions for daylighting calc - int NDIVY; // Number of window y divisions for daylighting calc - Real64 ALF; // Distance from reference point to window plane (m) - Real64 D1a; // Projection of vector from window origin to reference + int NDIVX; // Number of window x divisions for daylighting calc + int NDIVY; // Number of window y divisions for daylighting calc + Real64 ALF; // Distance from reference point to window plane (m) + Real64 D1a; // Projection of vector from window origin to reference // on window X axis (m) Real64 D1b; // Projection of vector from window origin to reference // on window Y axis (m) @@ -1536,19 +1470,23 @@ void FigureDayltgCoeffsAtPointsSetupForWindow(EnergyPlusData &state, Vector3 WC = {0.0, 0.0, 0.0}; if (CalledFrom == CalledFor::RefPoint) { - state.dataDaylightingData->daylightControl(daylightCtrlNum).SolidAngAtRefPt(loopwin, iRefPoint) = 0.0; - state.dataDaylightingData->daylightControl(daylightCtrlNum).SolidAngAtRefPtWtd(loopwin, iRefPoint) = 0.0; - zoneNum = state.dataDaylightingData->daylightControl(daylightCtrlNum).zoneIndex; - enclNum = state.dataDaylightingData->daylightControl(daylightCtrlNum).enclIndex; + auto &daylCtrl = dl->daylightControl(daylightCtrlNum); + daylCtrl.refPts(iRefPoint).extWins(loopwin).solidAng = 0.0; + daylCtrl.refPts(iRefPoint).extWins(loopwin).solidAngWtd = 0.0; + zoneNum = daylCtrl.zoneIndex; + enclNum = daylCtrl.enclIndex; } else if (CalledFrom == CalledFor::MapPoint) { assert(MapNum > 0); - auto const &illumMapCalc = state.dataDaylightingData->IllumMapCalc(MapNum); - zoneNum = illumMapCalc.zoneIndex; - enclNum = illumMapCalc.enclIndex; + auto const &illumMap = dl->illumMaps(MapNum); + zoneNum = illumMap.zoneIndex; + enclNum = illumMap.enclIndex; } - IWin = state.dataDaylightingData->enclDaylight(enclNum).DayltgExtWinSurfNums(loopwin); + IWin = dl->enclDaylight(enclNum).DayltgExtWinSurfNums(loopwin); + + auto &surf = state.dataSurface->Surface(IWin); + auto &surfWin = state.dataSurface->SurfaceWindow(IWin); - if (state.dataSurface->Surface(state.dataSurface->Surface(IWin).BaseSurf).SolarEnclIndex == enclNum) { + if (state.dataSurface->Surface(surf.BaseSurf).SolarEnclIndex == enclNum) { extWinType = ExtWinType::InZone; } else { extWinType = ExtWinType::AdjZone; @@ -1565,11 +1503,11 @@ void FigureDayltgCoeffsAtPointsSetupForWindow(EnergyPlusData &state, IConst = state.dataConstruction->Construct(IConst).TCMasterConst; } - ICtrl = state.dataSurface->Surface(IWin).activeWindowShadingControl; + ICtrl = surf.activeWindowShadingControl; ShType = WinShadingType::NoShade; // 'NOSHADE' BlNum = 0; // ScNum = 0; //Unused Set but never used - if (state.dataSurface->Surface(IWin).HasShadeControl) ShType = state.dataSurface->WindowShadingControl(ICtrl).ShadingType; + if (surf.HasShadeControl) ShType = state.dataSurface->WindowShadingControl(ICtrl).ShadingType; BlNum = state.dataSurface->SurfWinBlindNumber(IWin); // ScNum = SurfaceWindow( IWin ).ScreenNumber; //Unused Set but never used @@ -1583,20 +1521,20 @@ void FigureDayltgCoeffsAtPointsSetupForWindow(EnergyPlusData &state, is_Rectangle = false; is_Triangle = false; - if (state.dataSurface->Surface(IWin).Sides == 3) is_Triangle = true; - if (state.dataSurface->Surface(IWin).Sides == 4) is_Rectangle = true; + if (surf.Sides == 3) is_Triangle = true; + if (surf.Sides == 4) is_Rectangle = true; if (is_Rectangle) { // Vertices of window (numbered counter-clockwise starting at upper left as viewed // from inside of room). Assumes original vertices are numbered counter-clockwise from // upper left as viewed from outside. - W3 = state.dataSurface->Surface(IWin).Vertex(2); - W2 = state.dataSurface->Surface(IWin).Vertex(3); - W1 = state.dataSurface->Surface(IWin).Vertex(4); + W3 = surf.Vertex(2); + W2 = surf.Vertex(3); + W1 = surf.Vertex(4); } else if (is_Triangle) { - W3 = state.dataSurface->Surface(IWin).Vertex(2); - W2 = state.dataSurface->Surface(IWin).Vertex(3); - W1 = state.dataSurface->Surface(IWin).Vertex(1); + W3 = surf.Vertex(2); + W2 = surf.Vertex(3); + W1 = surf.Vertex(1); } // Shade/blind calculation flag @@ -1604,13 +1542,13 @@ void FigureDayltgCoeffsAtPointsSetupForWindow(EnergyPlusData &state, // Visible transmittance at normal incidence state.dataSurface->SurfWinVisTransSelected(IWin) = - General::POLYF(1.0, state.dataConstruction->Construct(IConst).TransVisBeamCoef) * state.dataSurface->SurfWinGlazedFrac(IWin); + General::POLYF(1.0, state.dataConstruction->Construct(IConst).TransVisBeamCoef) * surfWin.glazedFrac; // For windows with switchable glazing, ratio of visible transmittance at normal // incidence for fully switched (dark) state to that of unswitched state state.dataSurface->SurfWinVisTransRatio(IWin) = 1.0; if (ICtrl > 0) { if (ShType == WinShadingType::SwitchableGlazing) { - int IConstShaded = state.dataSurface->Surface(IWin).activeShadedConstruction; // Shaded construction counter + int IConstShaded = surf.activeShadedConstruction; // Shaded construction counter state.dataSurface->SurfWinVisTransRatio(IWin) = General::SafeDivide(General::POLYF(1.0, state.dataConstruction->Construct(IConstShaded).TransVisBeamCoef), General::POLYF(1.0, state.dataConstruction->Construct(IConst).TransVisBeamCoef)); @@ -1621,8 +1559,8 @@ void FigureDayltgCoeffsAtPointsSetupForWindow(EnergyPlusData &state, // center point of window, and vector from ref pt to center of window W21 = W1 - W2; W23 = W3 - W2; - HW = W21.magnitude(); - WW = W23.magnitude(); + Real64 HW = W21.magnitude(); + Real64 WW = W23.magnitude(); if (is_Rectangle) { WC = W2 + (W23 + W21) / 2.0; } else if (is_Triangle) { @@ -1635,7 +1573,7 @@ void FigureDayltgCoeffsAtPointsSetupForWindow(EnergyPlusData &state, W23 /= WW; // Unit vector normal to window (pointing away from room) - Vector3 WNORM = state.dataSurface->Surface(IWin).lcsz; + Vector3 WNORM = surf.lcsz; // Initialize number of window elements NDIVX = 40; @@ -1659,42 +1597,42 @@ void FigureDayltgCoeffsAtPointsSetupForWindow(EnergyPlusData &state, state, format("CalcDaylightCoeffRefPoints: Daylighting calculation cannot be done for Daylighting:Controls={} because reference point " "#{} is less than 0.15m (6\") from window plane {}", - state.dataDaylightingData->daylightControl(daylightCtrlNum).Name, + dl->daylightControl(daylightCtrlNum).Name, iRefPoint, - state.dataSurface->Surface(IWin).Name)); + surf.Name)); ShowContinueError(state, format("Distance=[{:.5R}]. This is too close; check position of reference point.", ALF)); ShowFatalError(state, "Program terminates due to preceding condition."); } } else if (ALF < 0.1524 && extWinType == ExtWinType::AdjZone) { - if (state.dataDaylightingManager->RefErrIndex(iRefPoint, IWin) == 0) { // only show error message once + if (dl->RefErrIndex(iRefPoint, IWin) == 0) { // only show error message once ShowWarningError(state, format("CalcDaylightCoeffRefPoints: For Daylghting:Controls=\"{}\" External Window=\"{}\"in Zone=\"{}\" reference " "point is less than 0.15m (6\") from window plane ", - state.dataDaylightingData->daylightControl(daylightCtrlNum).Name, - state.dataSurface->Surface(IWin).Name, - state.dataHeatBal->Zone(state.dataSurface->Surface(IWin).Zone).Name)); + dl->daylightControl(daylightCtrlNum).Name, + surf.Name, + state.dataHeatBal->Zone(surf.Zone).Name)); ShowContinueError(state, format("Distance=[{:.1R} m] to ref point=[{:.1R},{:.1R},{:.1R}], Inaccuracy in Daylighting Calcs may result.", ALF, RREF.x, RREF.y, RREF.z)); - state.dataDaylightingManager->RefErrIndex(iRefPoint, IWin) = 1; + dl->RefErrIndex(iRefPoint, IWin) = 1; } } } else if (CalledFrom == CalledFor::MapPoint) { if (ALF < 0.1524 && extWinType == ExtWinType::AdjZone) { - if (state.dataDaylightingManager->MapErrIndex(iRefPoint, IWin) == 0) { // only show error message once + if (dl->MapErrIndex(iRefPoint, IWin) == 0) { // only show error message once ShowWarningError(state, format("CalcDaylightCoeffMapPoints: For Zone=\"{}\" External Window=\"{}\"in Zone=\"{}\" map point is less than " "0.15m (6\") from window plane ", state.dataHeatBal->Zone(zoneNum).Name, - state.dataSurface->Surface(IWin).Name, - state.dataHeatBal->Zone(state.dataSurface->Surface(IWin).Zone).Name)); + surf.Name, + state.dataHeatBal->Zone(surf.Zone).Name)); ShowContinueError( state, format("Distance=[{:.1R} m] map point=[{:.1R},{:.1R},{:.1R}], Inaccuracy in Map Calcs may result.", ALF, RREF.x, RREF.y, RREF.z)); - state.dataDaylightingManager->MapErrIndex(iRefPoint, IWin) = 1; + dl->MapErrIndex(iRefPoint, IWin) = 1; } } } @@ -1707,10 +1645,8 @@ void FigureDayltgCoeffsAtPointsSetupForWindow(EnergyPlusData &state, if (extWinType == ExtWinType::AdjZone) { // Adjust number of exterior window elements to give acceptable number of rays through // interior windows in the zone (for accuracy of interior window daylighting calculation) - SolidAngExtWin = General::SafeDivide( - ((state.dataSurface->Surface(IWin).Area + state.dataSurface->SurfWinDividerArea(IWin)) / state.dataSurface->Surface(IWin).Multiplier), - pow_2(ALF)); - SolidAngMinIntWin = state.dataDaylightingData->enclDaylight(enclNum).MinIntWinSolidAng; + SolidAngExtWin = General::SafeDivide(((surf.Area + state.dataSurface->SurfWinDividerArea(IWin)) / surf.Multiplier), pow_2(ALF)); + SolidAngMinIntWin = dl->enclDaylight(enclNum).MinIntWinSolidAng; SolidAngRatio = max(1.0, SolidAngExtWin / SolidAngMinIntWin); NDIVX *= std::sqrt(SolidAngRatio); NDIVY *= std::sqrt(SolidAngRatio); @@ -1730,21 +1666,18 @@ void FigureDayltgCoeffsAtPointsSetupForWindow(EnergyPlusData &state, DWY = HW / NWY; // Azimuth and altitude of window normal - state.dataSurface->SurfWinPhi(IWin) = std::asin(WNORM.z); - if (std::abs(WNORM.x) > 1.0e-5 || std::abs(WNORM.y) > 1.0e-5) { - state.dataSurface->SurfWinTheta(IWin) = std::atan2(WNORM.y, WNORM.x); - } else { - state.dataSurface->SurfWinTheta(IWin) = 0.0; - } + surfWin.phi = std::asin(WNORM.z); + surfWin.theta = (std::abs(WNORM.x) > 1.0e-5 || std::abs(WNORM.y) > 1.0e-5) ? std::atan2(WNORM.y, WNORM.x) : 0.0; // Recalculation of values for TDD:DOME - if (state.dataSurface->SurfWinOriginalClass(IWin) == SurfaceClass::TDD_Diffuser) { + if (surf.OriginalClass == SurfaceClass::TDD_Diffuser) { // Look up the TDD:DOME object int PipeNum = state.dataSurface->SurfWinTDDPipeNum(IWin); IWin2 = state.dataDaylightingDevicesData->TDDPipe(PipeNum).Dome; auto &surf2 = state.dataSurface->Surface(IWin2); + auto &surfWin2 = state.dataSurface->SurfaceWindow(IWin2); // Calculate reference point coords relative to the diffuser coordinate system // W21, W23, and WNORM are the unit vectors @@ -1794,12 +1727,8 @@ void FigureDayltgCoeffsAtPointsSetupForWindow(EnergyPlusData &state, // Azimuth and altitude of dome normal // These are specific to the exterior. - state.dataSurface->SurfWinPhi(IWin2) = std::asin(WNORM2.z); - if (std::abs(WNORM2.x) > 1.0e-5 || std::abs(WNORM2.y) > 1.0e-5) { - state.dataSurface->SurfWinTheta(IWin2) = std::atan2(WNORM2.y, WNORM2.x); - } else { - state.dataSurface->SurfWinTheta(IWin2) = 0.0; - } + surfWin2.phi = std::asin(WNORM2.z); + surfWin2.theta = (std::abs(WNORM2.x) > 1.0e-5 || std::abs(WNORM2.y) > 1.0e-5) ? std::atan2(WNORM2.y, WNORM2.x) : 0.0; // Calculate new virtual reference point coords relative to dome coord system // W21, W23, and WNORM2 are now the unit vectors for the dome coord system @@ -1811,10 +1740,10 @@ void FigureDayltgCoeffsAtPointsSetupForWindow(EnergyPlusData &state, // Copy several values from the diffuser so that DayltgInterReflectedIllum works correctly // These are specific to the interior. - state.dataSurface->SurfWinRhoCeilingWall(IWin2) = state.dataSurface->SurfWinRhoCeilingWall(IWin); - state.dataSurface->SurfWinRhoFloorWall(IWin2) = state.dataSurface->SurfWinRhoFloorWall(IWin); - state.dataSurface->SurfWinFractionUpgoing(IWin2) = state.dataSurface->SurfWinFractionUpgoing(IWin); - state.dataSurface->SurfWinGlazedFrac(IWin2) = state.dataSurface->SurfWinGlazedFrac(IWin); + surfWin2.rhoCeilingWall = surfWin.rhoCeilingWall; + surfWin2.rhoFloorWall = surfWin.rhoFloorWall; + surfWin2.fractionUpgoing = surfWin.fractionUpgoing; + surfWin2.glazedFrac = surfWin.glazedFrac; } else { // This is not a TDD:DIFFUSER. Make sure nothing is messed up for a regular window. @@ -1833,9 +1762,9 @@ void FigureDayltgCoeffsAtPointsSetupForWindow(EnergyPlusData &state, if (!state.dataBSDFWindow->ComplexWind(IWin).DaylightingInitialized) { int NRefPts = 0; if (CalledFrom == CalledFor::MapPoint) { - NRefPts = state.dataDaylightingData->IllumMapCalc(MapNum).TotalMapRefPoints; + NRefPts = dl->illumMaps(MapNum).TotalMapRefPoints; } else if (CalledFrom == CalledFor::RefPoint) { - NRefPts = state.dataDaylightingData->daylightControl(daylightCtrlNum).TotalDaylRefPoints; + NRefPts = dl->daylightControl(daylightCtrlNum).TotalDaylRefPoints; } InitializeCFSDaylighting(state, daylightCtrlNum, IWin, NWX, NWY, RREF, NRefPts, iRefPoint, CalledFrom, MapNum); // if ((WinEl == (NWX * NWY)).and.(CalledFrom == CalledForMapPoint).and.(NRefPts == iRefPoint)) then @@ -1853,20 +1782,16 @@ void FigureDayltgCoeffsAtPointsSetupForWindow(EnergyPlusData &state, for (int iSlatAng = 1; iSlatAng <= numSlatAngs; ++iSlatAng) { // Initialize sky and sun components of direct illuminance (arrays EDIRSK, EDIRSU, EDIRSUdisk) // and average window luminance (arrays AVWLSK, AVWLSU, AVWLSUdisk), at ref pt. - state.dataDaylightingManager->EDIRSK(iHr, iSlatAng) = Illums(); - state.dataDaylightingManager->EDIRSU(iHr, iSlatAng) = 0.0; - state.dataDaylightingManager->EDIRSUdisk(iHr, iSlatAng) = 0.0; - state.dataDaylightingManager->AVWLSK(iHr, iSlatAng) = Illums(); - state.dataDaylightingManager->AVWLSU(iHr, iSlatAng) = 0.0; - state.dataDaylightingManager->AVWLSUdisk(iHr, iSlatAng) = 0.0; + dl->dirIllum(iHr, iSlatAng) = Illums(); + dl->avgWinLum(iHr, iSlatAng) = Illums(); } } if (CalledFrom == CalledFor::RefPoint) { // Initialize solid angle subtended by window wrt ref pt // and solid angle weighted by glare position factor - state.dataSurface->SurfaceWindow(IWin).SolidAngAtRefPt(iRefPoint) = 0.0; - state.dataSurface->SurfaceWindow(IWin).SolidAngAtRefPtWtd(iRefPoint) = 0.0; + state.dataSurface->SurfaceWindow(IWin).refPts(iRefPoint).solidAng = 0.0; + state.dataSurface->SurfaceWindow(IWin).refPts(iRefPoint).solidAngWtd = 0.0; } // Area of window element if (is_Rectangle) { @@ -1932,28 +1857,21 @@ void FigureDayltgCoeffsAtPointsForWindowElements( // REFERENCES: // switch as need to serve both reference points and map points based on calledFrom + auto &dl = state.dataDayltg; - Real64 DIS; // Distance between reference point and center of window element (m) - Real64 DAXY1; // For triangle, area of window element at end of column - Real64 POSFAC; // Position factor for a window element / ref point / view vector combination - Real64 RR; // Distance from ref point to intersection of view vector + Real64 RR; // Distance from ref point to intersection of view vector // and plane normal to view vector and window element (m) Real64 ASQ; // Square of distance from above intersection to window element (m2) Real64 YD; // Vertical displacement of window element wrt ref point - Real64 XR; // Horizontal displacement ratio - Real64 YR; // Vertical displacement ratio Real64 COSBIntWin; // Cos of angle between int win outward normal and ray betw ref pt and // exterior window element or between ref pt and sun - Real64 Alfa; // Intermediate variable - Real64 Beta; // Intermediate variable - Real64 HorDis; // Distance between ground hit point and proj'n of center - // of window element onto ground (m) - // Local complex fenestration variables Real64 TransBeam; // Obstructions transmittance for incoming BSDF rays (temporary variable) + auto &surfWin = state.dataSurface->SurfaceWindow(IWin); + ++LSHCAL; SkyObstructionMult = 1.0; @@ -1965,7 +1883,7 @@ void FigureDayltgCoeffsAtPointsForWindowElements( RWIN2 = U2 + (double(iXelement) - 0.5) * U23 * DWX + (double(iYelement) - 0.5) * U21 * DWY; // Distance between ref pt and window element - DIS = distance(RWIN, RREF); + Real64 DIS = distance(RWIN, RREF); // Unit vector along ray from ref pt to element Ray = (RWIN - RREF) / DIS; @@ -1975,213 +1893,203 @@ void FigureDayltgCoeffsAtPointsForWindowElements( // If COSB > 0, direct light from window can reach ref pt. Otherwise go to loop // over sun position and calculate inter-reflected component of illuminance - if (COSB > 0.0) { - // Azimuth (-pi to pi) and altitude (-pi/2 to pi/2) of ray. Azimuth = 0 is along east. - PHRAY = std::asin(Ray.z); - if (std::abs(Ray.x) > 1.0e-5 || std::abs(Ray.y) > 1.0e-5) { - THRAY = std::atan2(Ray.y, Ray.x); - } else { - THRAY = 0.0; - } - - // Solid angle subtended by element wrt ref pt. - DAXY1 = DAXY; - // For triangle, at end of Y column only one half of parallelopiped's area contributes - if (is_Triangle && iYelement == NWYlim) DAXY1 = 0.5 * DAXY; - DOMEGA = DAXY1 * COSB / (DIS * DIS); - - // Calculate position factor (used in glare calculation) for this - // win element / ref pt / view-vector combination - POSFAC = 0.0; - - // Distance from ref pt to intersection of view vector and plane - // normal to view vector containing the window element - - if (CalledFrom == CalledFor::RefPoint) { - RR = DIS * dot(Ray, VIEWVC2); - if (RR > 0.0) { - // Square of distance from above intersection point to win element - ASQ = DIS * DIS - RR * RR; - // Vertical displacement of win element wrt ref pt - YD = RWIN2.z - RREF2.z; - // Horizontal and vertical displacement ratio and position factor - XR = std::sqrt(std::abs(ASQ - YD * YD)) / RR; - YR = std::abs(YD / RR); - POSFAC = DayltgGlarePositionFactor(XR, YR); - } - } + if (COSB <= 0.0) return; - hitIntObs = false; - int IntWinHitNum = 0; // Surface number of interior window that is intersected - bool hitIntWin = false; // Ray from ref pt passes through interior window - TVISIntWinDisk = 0.0; // Init Value - TVISIntWin = 0.0; + // Azimuth (-pi to pi) and altitude (-pi/2 to pi/2) of ray. Azimuth = 0 is along east. + PHRAY = std::asin(Ray.z); + if (std::abs(Ray.x) > 1.0e-5 || std::abs(Ray.y) > 1.0e-5) { + THRAY = std::atan2(Ray.y, Ray.x); + } else { + THRAY = 0.0; + } - Vector3 HitPtIntWin = {0.0, 0.0, 0.0}; + // Solid angle subtended by element wrt ref pt. + Real64 DAXY1 = DAXY; // For triangle, area of window element at end of column + // For triangle, at end of Y column only one half of parallelopiped's area contributes + if (is_Triangle && iYelement == NWYlim) DAXY1 = 0.5 * DAXY; + DOMEGA = DAXY1 * COSB / (DIS * DIS); - if (state.dataSurface->SurfWinOriginalClass(IWin) == SurfaceClass::TDD_Diffuser) { - // Look up the TDD:DOME object - int PipeNum = state.dataSurface->SurfWinTDDPipeNum(IWin); - // Unshaded visible transmittance of TDD for a single ray from sky/ground element - TVISB = TransTDD(state, PipeNum, COSB, RadType::VisibleBeam) * state.dataSurface->SurfWinGlazedFrac(IWin); + // Calculate position factor (used in glare calculation) for this + // win element / ref pt / view-vector combination + Real64 POSFAC = 0.0; - } else { // Regular window - if (state.dataSurface->SurfWinWindowModelType(IWin) != WindowModel::BSDF) { - // Vis trans of glass for COSB incidence angle - TVISB = General::POLYF(COSB, state.dataConstruction->Construct(IConst).TransVisBeamCoef) * - state.dataSurface->SurfWinGlazedFrac(IWin) * state.dataSurface->SurfWinLightWellEff(IWin); - } else { - // Complex fenestration needs to use different equation for visible transmittance. That will be calculated later - // in the code since it depends on different incoming directions. For now, just put zero to differentiate from - // regular windows - TVISB = 0.0; - } - if (extWinType == ExtWinType::AdjZone) { - int zoneNum = 0; - if (CalledFrom == CalledFor::RefPoint) { - zoneNum = state.dataDaylightingData->daylightControl(daylightCtrlNum).zoneIndex; - } else if (CalledFrom == CalledFor::MapPoint) { - assert(MapNum > 0); - zoneNum = state.dataDaylightingData->IllumMapCalc(MapNum).zoneIndex; - } - // Does ray pass through an interior window in zone (ZoneNum) containing the ref point? - for (int const spaceNum : state.dataHeatBal->Zone(zoneNum).spaceIndexes) { - auto const &thisSpace = state.dataHeatBal->space(spaceNum); - for (int IntWin = thisSpace.WindowSurfaceFirst; IntWin <= thisSpace.WindowSurfaceLast; ++IntWin) { - if (state.dataSurface->Surface(IntWin).ExtBoundCond >= - 1) { // in develop this was Surface(IntWin).Class == SurfaceClass::Window && Surface(IntWin).ExtBoundCond >= 1 - if (state.dataSurface->Surface(state.dataSurface->Surface(IntWin).ExtBoundCond).Zone == - state.dataSurface->Surface(IWin).Zone) { - - PierceSurface(state, IntWin, RREF, Ray, HitPtIntWin, hitIntWin); - if (hitIntWin) { - IntWinHitNum = IntWin; - COSBIntWin = dot(state.dataSurface->Surface(IntWin).OutNormVec, Ray); - if (COSBIntWin <= 0.0) { - hitIntWin = false; - IntWinHitNum = 0; - continue; - } - TVISIntWin = General::POLYF( - COSBIntWin, - state.dataConstruction->Construct(state.dataSurface->Surface(IntWin).Construction).TransVisBeamCoef); - TVISB *= TVISIntWin; - break; // Ray passes thru interior window; exit from DO loop - } - } - } - } - } // End of loop over surfaces in zone ZoneNum + // Distance from ref pt to intersection of view vector and plane + // normal to view vector containing the window element - if (!hitIntWin) { - // Ray does not pass through an int win in ZoneNum. Therefore, it hits the opaque part - // of a surface between ref point in ZoneNum and ext win element in adjacent zone. - hitIntObs = true; - } - } // End of check if this is an ext win in an adjacent zone - } // End of check if TDD:Diffuser or regular exterior window or complex fenestration - - // Check for interior obstructions - if (extWinType == ExtWinType::InZone && !hitIntObs) { - // Check for obstruction between reference point and window element - // Returns hitIntObs = true iff obstruction is hit - // (Example of interior obstruction is a wall in an L-shaped room that lies - // between reference point and window.) - DayltgHitInteriorObstruction(state, IWin, RREF, RWIN, hitIntObs); - } - - if (extWinType == ExtWinType::AdjZone && IntWinHitNum > 0 && !hitIntObs) { - // Check for obstruction between ref point and interior window through which ray passes - DayltgHitInteriorObstruction(state, IntWinHitNum, RREF, HitPtIntWin, hitIntObs); - if (!hitIntObs) { - // Check for obstruction between intersection point on int window and ext win element - DayltgHitBetWinObstruction(state, IntWinHitNum, IWin, HitPtIntWin, RWIN, hitIntObs); - } + if (CalledFrom == CalledFor::RefPoint) { + RR = DIS * dot(Ray, VIEWVC2); + if (RR > 0.0) { + // Square of distance from above intersection point to win element + ASQ = DIS * DIS - RR * RR; + // Vertical displacement of win element wrt ref pt + YD = RWIN2.z - RREF2.z; + // Horizontal and vertical displacement ratio and position factor + Real64 XR = std::sqrt(std::abs(ASQ - YD * YD)) / RR; + Real64 YR = std::abs(YD / RR); + POSFAC = DayltgGlarePositionFactor(XR, YR); + } + } + + hitIntObs = false; + int IntWinHitNum = 0; // Surface number of interior window that is intersected + bool hitIntWin = false; // Ray from ref pt passes through interior window + TVISIntWinDisk = 0.0; // Init Value + TVISIntWin = 0.0; + + Vector3 HitPtIntWin = {0.0, 0.0, 0.0}; + auto &surf = state.dataSurface->Surface(IWin); + if (surf.OriginalClass == SurfaceClass::TDD_Diffuser) { + // Look up the TDD:DOME object + int PipeNum = state.dataSurface->SurfWinTDDPipeNum(IWin); + // Unshaded visible transmittance of TDD for a single ray from sky/ground element + TVISB = TransTDD(state, PipeNum, COSB, RadType::VisibleBeam) * surfWin.glazedFrac; + + } else { // Regular window + if (state.dataSurface->SurfWinWindowModelType(IWin) != WindowModel::BSDF) { + // Vis trans of glass for COSB incidence angle + TVISB = General::POLYF(COSB, state.dataConstruction->Construct(IConst).TransVisBeamCoef) * surfWin.glazedFrac * surfWin.lightWellEff; + } else { + // Complex fenestration needs to use different equation for visible transmittance. That will be calculated later + // in the code since it depends on different incoming directions. For now, just put zero to differentiate from + // regular windows + TVISB = 0.0; } - if (CalledFrom == CalledFor::RefPoint) { - // Glare calculations only done for regular reference points, not for maps - if (!hitIntObs) { - if (extWinType == ExtWinType::InZone || (extWinType == ExtWinType::AdjZone && hitIntWin)) { - // Increment solid angle subtended by portion of window above ref pt - state.dataSurface->SurfaceWindow(IWin).SolidAngAtRefPt(iRefPoint) += DOMEGA; - state.dataDaylightingData->daylightControl(daylightCtrlNum).SolidAngAtRefPt(loopwin, iRefPoint) += DOMEGA; - // Increment position-factor-modified solid angle - state.dataSurface->SurfaceWindow(IWin).SolidAngAtRefPtWtd(iRefPoint) += DOMEGA * POSFAC; - state.dataDaylightingData->daylightControl(daylightCtrlNum).SolidAngAtRefPtWtd(loopwin, iRefPoint) += DOMEGA * POSFAC; + if (extWinType == ExtWinType::AdjZone) { + int zoneNum = 0; + if (CalledFrom == CalledFor::RefPoint) { + zoneNum = dl->daylightControl(daylightCtrlNum).zoneIndex; + } else if (CalledFrom == CalledFor::MapPoint) { + assert(MapNum > 0); + zoneNum = dl->illumMaps(MapNum).zoneIndex; + } + // Does ray pass through an interior window in zone (ZoneNum) containing the ref point? + for (int const spaceNum : state.dataHeatBal->Zone(zoneNum).spaceIndexes) { + auto const &thisSpace = state.dataHeatBal->space(spaceNum); + for (int IntWin = thisSpace.WindowSurfaceFirst; IntWin <= thisSpace.WindowSurfaceLast; ++IntWin) { + auto const &surfIntWin = state.dataSurface->Surface(IntWin); + // in develop this was Surface(IntWin).Class == SurfaceClass::Window && Surface(IntWin).ExtBoundCond >= 1 + if (surfIntWin.ExtBoundCond < 1) continue; + + if (state.dataSurface->Surface(surfIntWin.ExtBoundCond).Zone != surf.Zone) continue; + + hitIntWin = PierceSurface(state, IntWin, RREF, Ray, HitPtIntWin); + if (hitIntWin) { + IntWinHitNum = IntWin; + COSBIntWin = dot(surfIntWin.OutNormVec, Ray); + if (COSBIntWin <= 0.0) { + hitIntWin = false; + IntWinHitNum = 0; + continue; + } + TVISIntWin = General::POLYF(COSBIntWin, state.dataConstruction->Construct(surfIntWin.Construction).TransVisBeamCoef); + TVISB *= TVISIntWin; + break; // Ray passes thru interior window; exit from DO loop + } } + } // End of loop over surfaces in zone ZoneNum + + if (!hitIntWin) { + // Ray does not pass through an int win in ZoneNum. Therefore, it hits the opaque part + // of a surface between ref point in ZoneNum and ext win element in adjacent zone. + hitIntObs = true; } - } - if (hitIntObs) ObTrans = 0.0; + } // End of check if this is an ext win in an adjacent zone + } // End of check if TDD:Diffuser or regular exterior window or complex fenestration - hitExtObs = false; + // Check for interior obstructions + if (extWinType == ExtWinType::InZone && !hitIntObs) { + // Check for obstruction between reference point and window element + // Returns hitIntObs = true iff obstruction is hit + // (Example of interior obstruction is a wall in an L-shaped room that lies + // between reference point and window.) + hitIntObs = DayltgHitInteriorObstruction(state, IWin, RREF, RWIN); + } + + if (extWinType == ExtWinType::AdjZone && IntWinHitNum > 0 && !hitIntObs) { + // Check for obstruction between ref point and interior window through which ray passes + hitIntObs = DayltgHitInteriorObstruction(state, IntWinHitNum, RREF, HitPtIntWin); if (!hitIntObs) { - // No interior obstruction was hit. - // Check for exterior obstructions between window element and sky/ground. - // Get product of transmittances of obstructions hit by ray. - // ObTrans = 1.0 will be returned if no exterior obstructions are hit. - - if (state.dataSurface->SurfWinWindowModelType(IWin) != WindowModel::BSDF) { - // the IHR (now HourOfDay) here is/was not correct, this is outside of hour loop - // the hour is used to query schedule for transmission , not sure what to do - // it will work for detailed and never did work correctly before. - DayltgHitObstruction(state, state.dataGlobal->HourOfDay, IWin2, RWIN2, Ray, ObTrans); - if (ObTrans < 1.0) hitExtObs = true; - } else { - // Transmittance from exterior obstruction surfaces is calculated here. This needs to be done for each timestep - // in order to account for changes in exterior surface transmittances - int CplxFenState = state.dataSurface->SurfaceWindow(IWin).ComplexFen.CurrentState; - int NReflSurf = 0; // Number of blocked beams for complex fenestration + // Check for obstruction between intersection point on int window and ext win element + hitIntObs = DayltgHitBetWinObstruction(state, IntWinHitNum, IWin, HitPtIntWin, RWIN); + } + } + if (CalledFrom == CalledFor::RefPoint) { + // Glare calculations only done for regular reference points, not for maps + if (!hitIntObs) { + if (extWinType == ExtWinType::InZone || (extWinType == ExtWinType::AdjZone && hitIntWin)) { + // Increment solid angle subtended by portion of window above ref pt + surfWin.refPts(iRefPoint).solidAng += DOMEGA; + dl->daylightControl(daylightCtrlNum).refPts(iRefPoint).extWins(loopwin).solidAng += DOMEGA; + // Increment position-factor-modified solid angle + surfWin.refPts(iRefPoint).solidAngWtd += DOMEGA * POSFAC; + dl->daylightControl(daylightCtrlNum).refPts(iRefPoint).extWins(loopwin).solidAngWtd += DOMEGA * POSFAC; + } + } + } + if (hitIntObs) ObTrans = 0.0; + + hitExtObs = false; + if (!hitIntObs) { + // No interior obstruction was hit. + // Check for exterior obstructions between window element and sky/ground. + // Get product of transmittances of obstructions hit by ray. + // ObTrans = 1.0 will be returned if no exterior obstructions are hit. + + if (state.dataSurface->SurfWinWindowModelType(IWin) != WindowModel::BSDF) { + // the IHR (now HourOfDay) here is/was not correct, this is outside of hour loop + // the hour is used to query schedule for transmission , not sure what to do + // it will work for detailed and never did work correctly before. + ObTrans = DayltgHitObstruction(state, state.dataGlobal->HourOfDay, IWin2, RWIN2, Ray); + if (ObTrans < 1.0) hitExtObs = true; + } else { + // Transmittance from exterior obstruction surfaces is calculated here. This needs to be done for each timestep + // in order to account for changes in exterior surface transmittances + int CplxFenState = surfWin.ComplexFen.CurrentState; + auto &complexWinDayltgGeom = state.dataBSDFWindow->ComplexWind(IWin).DaylghtGeom(CplxFenState); + int NReflSurf = 0; // Number of blocked beams for complex fenestration + if (CalledFrom == CalledFor::RefPoint) { + NReflSurf = complexWinDayltgGeom.RefPoint(iRefPoint).NReflSurf(WinEl); + } else if (CalledFrom == CalledFor::MapPoint) { + NReflSurf = complexWinDayltgGeom.IlluminanceMap(iRefPoint, MapNum).NReflSurf(WinEl); + } + int RayIndex; + for (int ICplxFen = 1; ICplxFen <= NReflSurf; ++ICplxFen) { if (CalledFrom == CalledFor::RefPoint) { - NReflSurf = state.dataBSDFWindow->ComplexWind(IWin).DaylghtGeom(CplxFenState).RefPoint(iRefPoint).NReflSurf(WinEl); + RayIndex = complexWinDayltgGeom.RefPoint(iRefPoint).RefSurfIndex(ICplxFen, WinEl); } else if (CalledFrom == CalledFor::MapPoint) { - NReflSurf = state.dataBSDFWindow->ComplexWind(IWin).DaylghtGeom(CplxFenState).IlluminanceMap(iRefPoint, MapNum).NReflSurf(WinEl); + RayIndex = complexWinDayltgGeom.IlluminanceMap(iRefPoint, MapNum).RefSurfIndex(ICplxFen, WinEl); } - int RayIndex; - for (int ICplxFen = 1; ICplxFen <= NReflSurf; ++ICplxFen) { - if (CalledFrom == CalledFor::RefPoint) { - RayIndex = - state.dataBSDFWindow->ComplexWind(IWin).DaylghtGeom(CplxFenState).RefPoint(iRefPoint).RefSurfIndex(ICplxFen, WinEl); - } else if (CalledFrom == CalledFor::MapPoint) { - RayIndex = state.dataBSDFWindow->ComplexWind(IWin) - .DaylghtGeom(CplxFenState) - .IlluminanceMap(iRefPoint, MapNum) - .RefSurfIndex(ICplxFen, WinEl); - } - Vector3 RayVector = state.dataBSDFWindow->ComplexWind(IWin).Geom(CplxFenState).sInc(RayIndex); - // It will get product of all transmittances - DayltgHitObstruction(state, state.dataGlobal->HourOfDay, IWin, RWIN, RayVector, TransBeam); - // IF (TransBeam > 0.0d0) ObTrans = TransBeam - if (CalledFrom == CalledFor::RefPoint) { - state.dataBSDFWindow->ComplexWind(IWin).DaylghtGeom(CplxFenState).RefPoint(iRefPoint).TransOutSurf(ICplxFen, WinEl) = - TransBeam; - } else if (CalledFrom == CalledFor::MapPoint) { - state.dataBSDFWindow->ComplexWind(IWin) - .DaylghtGeom(CplxFenState) - .IlluminanceMap(iRefPoint, MapNum) - .TransOutSurf(ICplxFen, WinEl) = TransBeam; - } + Vector3 RayVector = state.dataBSDFWindow->ComplexWind(IWin).Geom(CplxFenState).sInc(RayIndex); + // It will get product of all transmittances + TransBeam = DayltgHitObstruction(state, state.dataGlobal->HourOfDay, IWin, RWIN, RayVector); + // IF (TransBeam > 0.0d0) ObTrans = TransBeam + if (CalledFrom == CalledFor::RefPoint) { + complexWinDayltgGeom.RefPoint(iRefPoint).TransOutSurf(ICplxFen, WinEl) = TransBeam; + } else if (CalledFrom == CalledFor::MapPoint) { + complexWinDayltgGeom.IlluminanceMap(iRefPoint, MapNum).TransOutSurf(ICplxFen, WinEl) = TransBeam; } - // This will avoid obstruction multiplier calculations for non-CFS window - ObTrans = 0.0; } + // This will avoid obstruction multiplier calculations for non-CFS window + ObTrans = 0.0; } + } - if (state.dataSurface->CalcSolRefl && PHRAY < 0.0 && ObTrans > 1.0e-6) { - // Calculate effect of obstructions on shading of sky diffuse reaching the ground point hit - // by the ray. This effect is given by the ratio SkyObstructionMult = - // (obstructed sky diffuse at ground point)/(unobstructed sky diffuse at ground point). - // This ratio is calculated for an isotropic sky. - // Ground point hit by the ray: - Alfa = std::acos(-Ray.z); - Beta = std::atan2(Ray.y, Ray.x); - HorDis = (RWIN2.z - state.dataSurface->GroundLevelZ) * std::tan(Alfa); - Vector3 GroundHitPt = {RWIN2.x + HorDis * std::cos(Beta), RWIN2.y + HorDis * std::sin(Beta), state.dataSurface->GroundLevelZ}; - - SkyObstructionMult = CalcObstrMultiplier(state, GroundHitPt, AltAngStepsForSolReflCalc, DataSurfaces::AzimAngStepsForSolReflCalc); - } // End of check if solar reflection calculation is in effect + if (state.dataSurface->CalcSolRefl && PHRAY < 0.0 && ObTrans > 1.0e-6) { + // Calculate effect of obstructions on shading of sky diffuse reaching the ground point hit + // by the ray. This effect is given by the ratio SkyObstructionMult = + // (obstructed sky diffuse at ground point)/(unobstructed sky diffuse at ground point). + // This ratio is calculated for an isotropic sky. + // Ground point hit by the ray: + Real64 Alfa = std::acos(-Ray.z); + Real64 Beta = std::atan2(Ray.y, Ray.x); + // Distance between ground hit point and proj'n of center of window element onto ground (m) + Real64 HorDis = (RWIN2.z - state.dataSurface->GroundLevelZ) * std::tan(Alfa); + Vector3 GroundHitPt = {RWIN2.x + HorDis * std::cos(Beta), RWIN2.y + HorDis * std::sin(Beta), state.dataSurface->GroundLevelZ}; - } // End of check if COSB > 0 -} + SkyObstructionMult = + CalcObstrMultiplier(state, GroundHitPt, DataSurfaces::AltAngStepsForSolReflCalc, DataSurfaces::AzimAngStepsForSolReflCalc); + } // End of check if solar reflection calculation is in effect +} // FigureDayltgCoeffsAtPointsForWindowElements() void InitializeCFSDaylighting(EnergyPlusData &state, int const daylightCtrlNum, // Current daylighting control number @@ -2201,114 +2109,95 @@ void InitializeCFSDaylighting(EnergyPlusData &state, // PURPOSE OF THIS SUBROUTINE: // For incoming BSDF window direction calculates whether bin is coming from sky, ground or reflected surface. // Routine also calculates intersection points with ground and exterior reflection surfaces. - - int NumOfWinEl; // Number of window elements - - Real64 DWX; // Window element width - Real64 DWY; // Window element height - Real64 WinElArea; // Window element area - - Vector3 W1; - Vector3 W2; - Vector3 W3; - Vector3 W21; - Vector3 W23; - Vector3 WNorm; - - // Position factor variables - Real64 AZVIEW; // Azimuth of view vector + auto &dl = state.dataDayltg; // Object Data DataBSDFWindow::BSDFDaylghtPosition elPos; // altitude and azimuth of intersection element Vector Vec; // temporary vector variable - NumOfWinEl = NWX * NWY; + int NumOfWinEl = NWX * NWY; // Number of window elements - DWX = state.dataSurface->Surface(IWin).Width / NWX; - DWY = state.dataSurface->Surface(IWin).Height / NWY; + auto &surf = state.dataSurface->Surface(IWin); + Real64 DWX = surf.Width / NWX; // Window element width + Real64 DWY = surf.Height / NWY; // Window element height - int zoneNum = state.dataDaylightingData->daylightControl(daylightCtrlNum).zoneIndex; - AZVIEW = (state.dataDaylightingData->daylightControl(daylightCtrlNum).ViewAzimuthForGlare + state.dataHeatBal->Zone(zoneNum).RelNorth + - state.dataHeatBal->BuildingAzimuth + state.dataHeatBal->BuildingRotationAppendixG) * - Constant::DegToRadians; + int zoneNum = dl->daylightControl(daylightCtrlNum).zoneIndex; + Real64 AZVIEW = (dl->daylightControl(daylightCtrlNum).ViewAzimuthForGlare + state.dataHeatBal->Zone(zoneNum).RelNorth + + state.dataHeatBal->BuildingAzimuth + state.dataHeatBal->BuildingRotationAppendixG) * + Constant::DegToRadians; // Perform necessary calculations for window coordinates and vectors. This will be used to calculate centroids for // each window element - W1 = 0.0; - W2 = 0.0; - W3 = 0.0; - - if (state.dataSurface->Surface(IWin).Sides == 4) { - W3 = state.dataSurface->Surface(IWin).Vertex(2); - W2 = state.dataSurface->Surface(IWin).Vertex(3); - W1 = state.dataSurface->Surface(IWin).Vertex(4); - } else if (state.dataSurface->Surface(IWin).Sides == 3) { - W3 = state.dataSurface->Surface(IWin).Vertex(2); - W2 = state.dataSurface->Surface(IWin).Vertex(3); - W1 = state.dataSurface->Surface(IWin).Vertex(1); - } - - W21 = W1 - W2; - W23 = W3 - W2; - - W21 /= state.dataSurface->Surface(IWin).Height; - W23 /= state.dataSurface->Surface(IWin).Width; - - WNorm = state.dataSurface->Surface(IWin).lcsz; - - WinElArea = DWX * DWY; - if (state.dataSurface->Surface(IWin).Sides == 3) { + Vector3 W1 = {0.0, 0.0, 0.0}; + Vector3 W2 = {0.0, 0.0, 0.0}; + Vector3 W3 = {0.0, 0.0, 0.0}; + + if (surf.Sides == 4) { + W3 = surf.Vertex(2); + W2 = surf.Vertex(3); + W1 = surf.Vertex(4); + } else if (surf.Sides == 3) { + W3 = surf.Vertex(2); + W2 = surf.Vertex(3); + W1 = surf.Vertex(1); + } + + Vector3 W21 = W1 - W2; + W21 /= surf.Height; + Vector3 W23 = W3 - W2; + W23 /= surf.Width; + Vector3 WNorm = surf.lcsz; + + Real64 WinElArea = DWX * DWY; + if (surf.Sides == 3) { WinElArea *= std::sqrt(1.0 - pow_2(dot(W21, W23))); } + auto &complexWin = state.dataBSDFWindow->ComplexWind(IWin); + if (CalledFrom == CalledFor::MapPoint) { - if (!allocated(state.dataBSDFWindow->ComplexWind(IWin).IlluminanceMap)) { - state.dataBSDFWindow->ComplexWind(IWin).IlluminanceMap.allocate(NRefPts, (int)state.dataDaylightingData->IllumMap.size()); + if (!allocated(complexWin.IlluminanceMap)) { + complexWin.IlluminanceMap.allocate(NRefPts, (int)dl->illumMaps.size()); } - AllocateForCFSRefPointsGeometry(state.dataBSDFWindow->ComplexWind(IWin).IlluminanceMap(iRefPoint, MapNum), NumOfWinEl); + AllocateForCFSRefPointsGeometry(complexWin.IlluminanceMap(iRefPoint, MapNum), NumOfWinEl); } else if (CalledFrom == CalledFor::RefPoint) { - if (!allocated(state.dataBSDFWindow->ComplexWind(IWin).RefPoint)) { - state.dataBSDFWindow->ComplexWind(IWin).RefPoint.allocate(NRefPts); + if (!allocated(complexWin.RefPoint)) { + complexWin.RefPoint.allocate(NRefPts); } - AllocateForCFSRefPointsGeometry(state.dataBSDFWindow->ComplexWind(IWin).RefPoint(iRefPoint), NumOfWinEl); + AllocateForCFSRefPointsGeometry(complexWin.RefPoint(iRefPoint), NumOfWinEl); } //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! //! Allocation for each complex fenestration state reference points //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - if (!allocated(state.dataBSDFWindow->ComplexWind(IWin).DaylghtGeom)) { - state.dataBSDFWindow->ComplexWind(IWin).DaylghtGeom.allocate(state.dataBSDFWindow->ComplexWind(IWin).NumStates); + if (!allocated(complexWin.DaylghtGeom)) { + complexWin.DaylghtGeom.allocate(state.dataBSDFWindow->ComplexWind(IWin).NumStates); } // Calculation needs to be performed for each state - for (int CurFenState = 1; CurFenState <= state.dataBSDFWindow->ComplexWind(IWin).NumStates; ++CurFenState) { + for (int CurFenState = 1; CurFenState <= complexWin.NumStates; ++CurFenState) { // number of incident basis directions for current state - int NBasis = state.dataBSDFWindow->ComplexWind(IWin).Geom(CurFenState).Inc.NBasis; + int NBasis = complexWin.Geom(CurFenState).Inc.NBasis; // number of outgoing basis directions for current state - int NTrnBasis = state.dataBSDFWindow->ComplexWind(IWin).Geom(CurFenState).Trn.NBasis; + int NTrnBasis = complexWin.Geom(CurFenState).Trn.NBasis; if (CalledFrom == CalledFor::MapPoint) { - if ((int)state.dataDaylightingData->IllumMap.size() > 0) { + if ((int)dl->illumMaps.size() > 0) { // illuminance map for each state - if (!allocated(state.dataBSDFWindow->ComplexWind(IWin).DaylghtGeom(CurFenState).IlluminanceMap)) { - state.dataBSDFWindow->ComplexWind(IWin) - .DaylghtGeom(CurFenState) - .IlluminanceMap.allocate(NRefPts, (int)state.dataDaylightingData->IllumMap.size()); + if (!allocated(complexWin.DaylghtGeom(CurFenState).IlluminanceMap)) { + complexWin.DaylghtGeom(CurFenState).IlluminanceMap.allocate(NRefPts, (int)dl->illumMaps.size()); } - AllocateForCFSRefPointsState(state, - state.dataBSDFWindow->ComplexWind(IWin).DaylghtGeom(CurFenState).IlluminanceMap(iRefPoint, MapNum), - NumOfWinEl, - NBasis, - NTrnBasis); + AllocateForCFSRefPointsState( + state, complexWin.DaylghtGeom(CurFenState).IlluminanceMap(iRefPoint, MapNum), NumOfWinEl, NBasis, NTrnBasis); InitializeCFSStateData(state, - state.dataBSDFWindow->ComplexWind(IWin).DaylghtGeom(CurFenState).IlluminanceMap(iRefPoint, MapNum), - state.dataBSDFWindow->ComplexWind(IWin).IlluminanceMap(iRefPoint, MapNum), + complexWin.DaylghtGeom(CurFenState).IlluminanceMap(iRefPoint, MapNum), + complexWin.IlluminanceMap(iRefPoint, MapNum), daylightCtrlNum, IWin, RefPoint, @@ -2328,16 +2217,15 @@ void InitializeCFSDaylighting(EnergyPlusData &state, } } else if (CalledFrom == CalledFor::RefPoint) { - if (!allocated(state.dataBSDFWindow->ComplexWind(IWin).DaylghtGeom(CurFenState).RefPoint)) { - state.dataBSDFWindow->ComplexWind(IWin).DaylghtGeom(CurFenState).RefPoint.allocate(NRefPts); + if (!allocated(complexWin.DaylghtGeom(CurFenState).RefPoint)) { + complexWin.DaylghtGeom(CurFenState).RefPoint.allocate(NRefPts); } - AllocateForCFSRefPointsState( - state, state.dataBSDFWindow->ComplexWind(IWin).DaylghtGeom(CurFenState).RefPoint(iRefPoint), NumOfWinEl, NBasis, NTrnBasis); + AllocateForCFSRefPointsState(state, complexWin.DaylghtGeom(CurFenState).RefPoint(iRefPoint), NumOfWinEl, NBasis, NTrnBasis); InitializeCFSStateData(state, - state.dataBSDFWindow->ComplexWind(IWin).DaylghtGeom(CurFenState).RefPoint(iRefPoint), - state.dataBSDFWindow->ComplexWind(IWin).RefPoint(iRefPoint), + complexWin.DaylghtGeom(CurFenState).RefPoint(iRefPoint), + complexWin.RefPoint(iRefPoint), daylightCtrlNum, IWin, RefPoint, @@ -2356,7 +2244,7 @@ void InitializeCFSDaylighting(EnergyPlusData &state, WinElArea); } } -} +} // InitializeCFSDaylighting() void InitializeCFSStateData(EnergyPlusData &state, DataBSDFWindow::BSDFRefPoints &StateRefPoint, @@ -2422,6 +2310,8 @@ void InitializeCFSStateData(EnergyPlusData &state, CFSRefPointPosFactor(state, RefPoint, StateRefPoint, iWin, CurFenState, NTrnBasis, AZVIEW); + auto &surf = state.dataSurface->Surface(iWin); + curWinEl = 0; // loop through window elements. This will calculate sky, ground and reflection bins for each window element for (int IX = 1; IX <= NWX; ++IX) { @@ -2445,18 +2335,16 @@ void InitializeCFSStateData(EnergyPlusData &state, hit = false; TotHits = 0; for (int JSurf = 1; JSurf <= state.dataSurface->TotSurfaces; ++JSurf) { + auto &surf2 = state.dataSurface->Surface(JSurf); + // the following test will cycle on anything except exterior surfaces and shading surfaces - if (state.dataSurface->Surface(JSurf).HeatTransSurf && state.dataSurface->Surface(JSurf).ExtBoundCond != ExternalEnvironment) - continue; + if (surf2.HeatTransSurf && surf2.ExtBoundCond != ExternalEnvironment) continue; // skip the base surface containing the window and any other subsurfaces of that surface - if (JSurf == state.dataSurface->Surface(iWin).BaseSurf || - state.dataSurface->Surface(JSurf).BaseSurf == state.dataSurface->Surface(iWin).BaseSurf) - continue; + if (JSurf == surf.BaseSurf || surf2.BaseSurf == surf.BaseSurf) continue; // skip surfaces that face away from the window - DotProd = dot(state.dataBSDFWindow->ComplexWind(iWin).Geom(CurFenState).sInc(IRay), - state.dataSurface->Surface(JSurf).NewellSurfaceNormalVector); + DotProd = dot(state.dataBSDFWindow->ComplexWind(iWin).Geom(CurFenState).sInc(IRay), surf2.NewellSurfaceNormalVector); if (DotProd >= 0) continue; - PierceSurface(state, JSurf, Centroid, state.dataBSDFWindow->ComplexWind(iWin).Geom(CurFenState).sInc(IRay), HitPt, hit); + hit = PierceSurface(state, JSurf, Centroid, state.dataBSDFWindow->ComplexWind(iWin).Geom(CurFenState).sInc(IRay), HitPt); if (!hit) continue; // Miss: Try next surface if (TotHits == 0) { // First hit for this ray @@ -2469,7 +2357,7 @@ void InitializeCFSStateData(EnergyPlusData &state, V = HitPt - Centroid; // vector array from window ctr to hit pt LeastHitDsq = V.magnitude_squared(); // dist^2 window ctr to hit pt TmpHSurfDSq(1, NReflSurf) = LeastHitDsq; - if (!state.dataSurface->Surface(JSurf).HeatTransSurf && state.dataSurface->Surface(JSurf).SchedShadowSurfIndex != 0) { + if (!surf2.HeatTransSurf && surf2.SchedShadowSurfIndex != 0) { TransRSurf = 1.0; // If a shadowing surface may have a scheduled transmittance, treat it here as completely transparent } else { TransRSurf = 0.0; @@ -2487,8 +2375,7 @@ void InitializeCFSStateData(EnergyPlusData &state, break; } } - if (!state.dataSurface->Surface(JSurf).HeatTransSurf && - state.dataSurface->Surface(JSurf).SchedShadowSurfIndex == 0) { + if (!surf2.HeatTransSurf && surf2.SchedShadowSurfIndex == 0) { // The new hit is opaque, so we can drop all the hits further away TmpHSurfNo(J, NReflSurf) = JSurf; TmpHitPt(J, NReflSurf) = HitPt; @@ -2516,7 +2403,7 @@ void InitializeCFSStateData(EnergyPlusData &state, // A new closest hit. If it is opaque, drop the current hit list, // otherwise add it at the front LeastHitDsq = HitDsq; - if (!state.dataSurface->Surface(JSurf).HeatTransSurf && state.dataSurface->Surface(JSurf).SchedShadowSurfIndex != 0) { + if (!surf2.HeatTransSurf && surf2.SchedShadowSurfIndex != 0) { TransRSurf = 1.0; // New closest hit is transparent, keep the existing hit list for (int I = TotHits; I >= 1; --I) { TmpHSurfNo(I + 1, NReflSurf) = TmpHSurfNo(I, NReflSurf); @@ -2751,14 +2638,6 @@ void CFSRefPointPosFactor(EnergyPlusData &state, // PURPOSE OF THIS SUBROUTINE: // Calculate position factor for given reference point. - // SUBROUTINE LOCAL VARIABLES - Real64 XR; - Real64 YR; - bool hit; - - // Object Data - DataBSDFWindow::BSDFDaylghtPosition elPos; // altitude and azimuth of intersection element - auto const &sTrn = state.dataBSDFWindow->ComplexWind(iWin).Geom(CurFenState).sTrn; for (int iTrnRay = 1; iTrnRay <= NTrnBasis; ++iTrnRay) { Vector3 V = sTrn(iTrnRay); @@ -2766,18 +2645,18 @@ void CFSRefPointPosFactor(EnergyPlusData &state, Vector3 InterPoint; - PierceSurface(state, iWin, RefPoint, V, InterPoint, hit); + bool hit = PierceSurface(state, iWin, RefPoint, V, InterPoint); if (hit) { RefPointMap.RefPointIntersection(iTrnRay) = true; - elPos = WindowComplexManager::DaylghtAltAndAzimuth(V); + DataBSDFWindow::BSDFDaylghtPosition elPos = WindowComplexManager::DaylghtAltAndAzimuth(V); - XR = std::tan(std::abs(Constant::PiOvr2 - AZVIEW - elPos.Azimuth) + 0.001); - YR = std::tan(elPos.Altitude + 0.001); + Real64 XR = std::tan(std::abs(Constant::PiOvr2 - AZVIEW - elPos.Azimuth) + 0.001); + Real64 YR = std::tan(elPos.Altitude + 0.001); RefPointMap.RefPtIntPosFac(iTrnRay) = DayltgGlarePositionFactor(XR, YR); } } -} +} // CFSRefPointPosFactor() Real64 CalcObstrMultiplier(EnergyPlusData &state, Vector3 const &GroundHitPt, // Coordinates of point that ray hits ground (m) @@ -2799,76 +2678,63 @@ Real64 CalcObstrMultiplier(EnergyPlusData &state, // azimuth Theta and create upward-going ground ray unit vector at each Phi,Theta pair. // Phi = 0 at the horizon; Phi = Pi/2 at the zenith. - // Return value - Real64 ObstrMultiplier; - // Locals - Real64 DPhi; // Phi increment (radians) - Real64 DTheta; // Theta increment (radians) - Real64 SkyGndUnObs; // Unobstructed sky irradiance at a ground point - Real64 SkyGndObs; // Obstructed sky irradiance at a ground point + auto &dl = state.dataDayltg; - Real64 Phi; // Altitude angle of ray from a ground point (radians) - Real64 SPhi; // Sin of Phi - Real64 CPhi; // cos of Phi - Real64 Theta; // Azimuth angle of ray from a ground point (radians) - - Real64 CosIncAngURay; // Cosine of incidence angle of URay on ground plane - Real64 dOmegaGnd; // Solid angle element of ray from ground point (steradians) - Real64 IncAngSolidAngFac; // CosIncAngURay*dOmegaGnd/Pi - bool hitObs; // True iff obstruction is hit + bool hitObs; // True iff obstruction is hit Vector3 URay; // Unit vector in (Phi,Theta) direction Vector3 ObsHitPt; // Unit vector in (Phi,Theta) direction assert(AzimSteps <= DataSurfaces::AzimAngStepsForSolReflCalc); - DPhi = Constant::PiOvr2 / (AltSteps / 2.0); - DTheta = Constant::Pi / AzimSteps; - SkyGndObs = 0.0; - SkyGndUnObs = 0.0; + Real64 DPhi = Constant::PiOvr2 / (AltSteps / 2.0); // Phi increment (radians) + Real64 DTheta = Constant::Pi / AzimSteps; // Theta increment (radians) // Tuned Precompute Phi trig table - if (AltSteps != state.dataDaylightingManager->AltSteps_last) { + if (AltSteps != dl->AltSteps_last) { for (int IPhi = 1, IPhi_end = (AltSteps / 2); IPhi <= IPhi_end; ++IPhi) { - Phi = (IPhi - 0.5) * DPhi; - state.dataDaylightingManager->cos_Phi(IPhi) = std::cos(Phi); - state.dataDaylightingManager->sin_Phi(IPhi) = std::sin(Phi); + Real64 Phi = (IPhi - 0.5) * DPhi; + dl->cos_Phi[IPhi] = std::cos(Phi); + dl->sin_Phi[IPhi] = std::sin(Phi); } - state.dataDaylightingManager->AltSteps_last = AltSteps; + dl->AltSteps_last = AltSteps; } // Tuned Precompute Theta trig table - if (AzimSteps != state.dataDaylightingManager->AzimSteps_last) { + if (AzimSteps != dl->AzimSteps_last) { for (int ITheta = 1; ITheta <= 2 * AzimSteps; ++ITheta) { - Theta = (ITheta - 0.5) * DTheta; - state.dataDaylightingManager->cos_Theta(ITheta) = std::cos(Theta); - state.dataDaylightingManager->sin_Theta(ITheta) = std::sin(Theta); + Real64 Theta = (ITheta - 0.5) * DTheta; + dl->cos_Theta[ITheta] = std::cos(Theta); + dl->sin_Theta[ITheta] = std::sin(Theta); } - state.dataDaylightingManager->AzimSteps_last = AzimSteps; + dl->AzimSteps_last = AzimSteps; } + Real64 SkyGndObs = 0.0; // Obstructed sky irradiance at a ground point + Real64 SkyGndUnObs = 0.0; // Unobstructed sky irradiance at a ground point + // Altitude loop for (int IPhi = 1, IPhi_end = (AltSteps / 2); IPhi <= IPhi_end; ++IPhi) { - SPhi = state.dataDaylightingManager->sin_Phi(IPhi); - CPhi = state.dataDaylightingManager->cos_Phi(IPhi); + Real64 sinPhi = dl->sin_Phi[IPhi]; // sinPhi + Real64 cosPhi = dl->cos_Phi[IPhi]; // cosPhi // Third component of ground ray unit vector in (Theta,Phi) direction - URay.z = SPhi; - dOmegaGnd = CPhi * DTheta * DPhi; + URay.z = sinPhi; + Real64 dOmegaGnd = cosPhi * DTheta * DPhi; // Solid angle element of ray from ground point (steradians) // Cosine of angle of incidence of ground ray on ground plane - CosIncAngURay = SPhi; - IncAngSolidAngFac = CosIncAngURay * dOmegaGnd / Constant::Pi; + Real64 CosIncAngURay = sinPhi; + Real64 IncAngSolidAngFac = CosIncAngURay * dOmegaGnd / Constant::Pi; // CosIncAngURay*dOmegaGnd/Pi // Azimuth loop for (int ITheta = 1; ITheta <= 2 * AzimSteps; ++ITheta) { - URay.x = CPhi * state.dataDaylightingManager->cos_Theta(ITheta); - URay.y = CPhi * state.dataDaylightingManager->sin_Theta(ITheta); + URay.x = cosPhi * dl->cos_Theta[ITheta]; + URay.y = cosPhi * dl->sin_Theta[ITheta]; SkyGndUnObs += IncAngSolidAngFac; // Does this ground ray hit an obstruction? hitObs = false; if (state.dataSurface->TotSurfaces < octreeCrossover) { // Linear search through surfaces for (int ObsSurfNum : state.dataSurface->AllShadowPossObstrSurfaceList) { - PierceSurface(state, ObsSurfNum, GroundHitPt, URay, ObsHitPt, hitObs); // Check if ray pierces surface + hitObs = PierceSurface(state, ObsSurfNum, GroundHitPt, URay, ObsHitPt); // Check if ray pierces surface if (hitObs) break; } @@ -2877,8 +2743,8 @@ Real64 CalcObstrMultiplier(EnergyPlusData &state, // Lambda function for the octree to test for surface hit auto surfaceHit = [&GroundHitPt, &hitObs, &URay, &ObsHitPt](SurfaceData const &surface) -> bool { if (surface.IsShadowPossibleObstruction) { - PierceSurface(surface, GroundHitPt, URay, ObsHitPt, hitObs); // Check if ray pierces surface - return hitObs; // Ray pierces surface + hitObs = PierceSurface(surface, GroundHitPt, URay, ObsHitPt); // Check if ray pierces surface + return hitObs; } else { return false; } @@ -2897,14 +2763,8 @@ Real64 CalcObstrMultiplier(EnergyPlusData &state, // in case ground point is surrounded by obstructions (SkyGndUnObs == 0), then multiplier will be equal to zero // This should not happen anyway because in that case ray would not be able to reach ground point - ObstrMultiplier = 0.0; - - if (SkyGndUnObs != 0.0) { - ObstrMultiplier = SkyGndObs / SkyGndUnObs; - } - - return ObstrMultiplier; -} + return (SkyGndUnObs != 0.0) ? (SkyGndObs / SkyGndUnObs) : 0.0; +} // CalcObstrMultiplier() void FigureDayltgCoeffsAtPointsForSunPosition( EnergyPlusData &state, @@ -2958,34 +2818,22 @@ void FigureDayltgCoeffsAtPointsForSunPosition( if (state.dataSurface->SurfSunCosHourly(iHour).z < DataEnvironment::SunIsUpValue) return; + auto &dl = state.dataDayltg; + // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - static const Vector3 RREF(0.0); // Location of a reference point in absolute coordinate system //Autodesk Was used uninitialized: - // Never set here // Made static for performance and const for now until issue addressed - Real64 ProfAng; // Solar profile angle on a window (radians) - Real64 POSFAC; // Position factor for a window element / ref point / view vector combination - Real64 XR; // Horizontal displacement ratio - Real64 YR; // Vertical displacement ratio + Vector3 RREF{0.0, 0.0, 0.0}; // Location of a reference point in absolute coordinate system //Autodesk Was used uninitialized: Real64 ObTransDisk; // Product of solar transmittances of exterior obstructions hit by ray from reference point to sun Real64 LumAtHitPtFrSun; // Luminance at hit point of obstruction by reflection of direct light from sun (cd/m2) - Real64 ELUM; // Sky or ground luminance (cd/m2) - Real64 DEDIR; // Illuminance contribution at reference point from window element (lux) - Real64 COSI; // Cosine of angle between direct sun and window outward normal Real64 TVISS; // Direct solar visible transmittance of window at given angle of incidence // (times light well efficiency, if appropriate) Real64 XAVWL; // XAVWL*TVISS is contribution of window luminance from solar disk (cd/m2) - Real64 SlatAng; // Blind slat angle (rad) - Real64 Alfa; // Intermediate variables bool hitObs; // True iff obstruction is hit Real64 ObsVisRefl; // Visible reflectance of obstruction Real64 SkyReflVisLum; // Reflected sky luminance at hit point divided by - Real64 CosIncAngRefl; // Cos of angle of incidence of beam on reflecting surface - Real64 CosIncAngRec; // Cos of angle of incidence of reflected beam on receiving window - Real64 ReflDistanceSq; // Distance squared between ref pt and hit point on reflecting surf (m^2) - Real64 ReflDistance; // Distance between ref pt and hit point on reflecting surf (m) Real64 SpecReflectance; // Specular reflectance of a reflecting surface Real64 TVisRefl; // Bare window vis trans for reflected beam // (times light well efficiency, if appropriate) @@ -3001,12 +2849,7 @@ void FigureDayltgCoeffsAtPointsForSunPosition( ++ISunPos; // Altitude of sun (degrees) - state.dataDaylightingManager->PHSUN = state.dataDaylightingManager->PHSUNHR(iHour); - state.dataDaylightingManager->SPHSUN = state.dataDaylightingManager->SPHSUNHR(iHour); - state.dataDaylightingManager->CPHSUN = state.dataDaylightingManager->CPHSUNHR(iHour); - - // Azimuth of sun in absolute coord sys - state.dataDaylightingManager->THSUN = state.dataDaylightingManager->THSUNHR(iHour); + dl->sunAngles = dl->sunAnglesHr[iHour]; // First time through, call routine to calculate inter-reflected illuminance // at reference point and luminance of window with shade, screen or blind. @@ -3017,12 +2860,12 @@ void FigureDayltgCoeffsAtPointsForSunPosition( int enclNum = 0; // enclosure index int zoneNum = 0; // zone index if (CalledFrom == CalledFor::RefPoint) { - zoneNum = state.dataDaylightingData->daylightControl(daylightCtrlNum).zoneIndex; - enclNum = state.dataDaylightingData->daylightControl(daylightCtrlNum).enclIndex; + zoneNum = dl->daylightControl(daylightCtrlNum).zoneIndex; + enclNum = dl->daylightControl(daylightCtrlNum).enclIndex; } else if (CalledFrom == CalledFor::MapPoint) { assert(MapNum > 0); - zoneNum = state.dataDaylightingData->IllumMapCalc(MapNum).zoneIndex; - enclNum = state.dataDaylightingData->IllumMapCalc(MapNum).enclIndex; + zoneNum = dl->illumMaps(MapNum).zoneIndex; + enclNum = dl->illumMaps(MapNum).enclIndex; } if (state.dataSurface->SurfWinWindowModelType(IWin) != WindowModel::BSDF) { if (LSHCAL == 1) DayltgInterReflectedIllum(state, ISunPos, iHour, enclNum, IWin2); @@ -3044,9 +2887,10 @@ void FigureDayltgCoeffsAtPointsForSunPosition( if (COSB <= 0.0) return; - Illums XEDIRSK; - // XEDIRSU = 0.0; //Unused Set but never used - Illums XAVWLSK; + auto &surfWin = state.dataSurface->SurfaceWindow(IWin); + + Illums XDirIllum; + Illums XAvgWinLum; Real64 const Ray_3 = Ray.z; Real64 const DOMEGA_Ray_3 = DOMEGA * Ray_3; @@ -3076,9 +2920,9 @@ void FigureDayltgCoeffsAtPointsForSunPosition( // Beam solar reflected from nearest obstruction - DayltgSurfaceLumFromSun(state, iHour, Ray, NearestHitSurfNum, NearestHitPt, LumAtHitPtFrSun); - state.dataDaylightingManager->AVWLSU(iHour, 1) += LumAtHitPtFrSun * TVISB; - if (PHRAY >= 0.0) state.dataDaylightingManager->EDIRSU(iHour, 1) += LumAtHitPtFrSun * DOMEGA_Ray_3 * TVISB; + LumAtHitPtFrSun = DayltgSurfaceLumFromSun(state, iHour, Ray, NearestHitSurfNum, NearestHitPt); + dl->avgWinLum(iHour, 1).sun += LumAtHitPtFrSun * TVISB; + if (PHRAY >= 0.0) dl->dirIllum(iHour, 1).sun += LumAtHitPtFrSun * DOMEGA_Ray_3 * TVISB; // Sky solar reflected from nearest obstruction @@ -3122,17 +2966,17 @@ void FigureDayltgCoeffsAtPointsForSunPosition( SkyReflVisLum = ObsVisRefl * state.dataSurface->Surface(NearestHitSurfNumX).ViewFactorSky * state.dataSolarShading->SurfDifShdgRatioIsoSkyHRTS(1, iHour, NearestHitSurfNumX) / Constant::Pi; } - assert(equal_dimensions(state.dataDaylightingManager->AVWLSK, state.dataDaylightingManager->EDIRSK)); - auto &gilsk = state.dataDaylightingManager->GILSK(iHour); - auto &avwlsk = state.dataDaylightingManager->AVWLSK(iHour, 1); - auto &edirsk = state.dataDaylightingManager->EDIRSK(iHour, 1); + assert(equal_dimensions(dl->avgWinLum, dl->dirIllum)); + auto &gilsk = dl->horIllum[iHour]; + auto &avwlsk = dl->avgWinLum(iHour, 1); + auto &edirsk = dl->dirIllum(iHour, 1); for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { - XAVWLSK.sky[iSky] = gilsk.sky[iSky] * SkyReflVisLum; - avwlsk.sky[iSky] += XAVWLSK.sky[iSky] * TVISB; + XAvgWinLum.sky[iSky] = gilsk.sky[iSky] * SkyReflVisLum; + avwlsk.sky[iSky] += XAvgWinLum.sky[iSky] * TVISB; if (PHRAY >= 0.0) { - XEDIRSK.sky[iSky] = gilsk.sky[iSky] * SkyReflVisLum * DOMEGA_Ray_3; - edirsk.sky[iSky] += XEDIRSK.sky[iSky] * TVISB; + XDirIllum.sky[iSky] = gilsk.sky[iSky] * SkyReflVisLum * DOMEGA_Ray_3; + edirsk.sky[iSky] += XDirIllum.sky[iSky] * TVISB; } } } @@ -3141,31 +2985,32 @@ void FigureDayltgCoeffsAtPointsForSunPosition( if (ObTrans > 1.e-6) { // Ray did not hit an obstruction or the transmittance product of hit obstructions is non-zero. // Contribution of sky or ground luminance in cd/m2 - if (state.dataSurface->SurfWinOriginalClass(IWin) == SurfaceClass::TDD_Diffuser) { + if (state.dataSurface->Surface(IWin).OriginalClass == SurfaceClass::TDD_Diffuser) { // Make all transmitted light diffuse for a TDD with a bare diffuser - assert(equal_dimensions(state.dataDaylightingManager->AVWLSK, state.dataDaylightingManager->WLUMSK)); - assert(equal_dimensions(state.dataDaylightingManager->AVWLSK, state.dataDaylightingManager->EDIRSK)); - auto &avwlsk = state.dataDaylightingManager->AVWLSK(iHour, 1); - auto &edirsk = state.dataDaylightingManager->EDIRSK(iHour, 1); - auto &wlumsk = state.dataDaylightingManager->WLUMSK(iHour, 1); + assert(equal_dimensions(dl->avgWinLum, dl->winLum)); + assert(equal_dimensions(dl->avgWinLum, dl->dirIllum)); + auto &avwlsk = dl->avgWinLum(iHour, 1); + auto &edirsk = dl->dirIllum(iHour, 1); + auto &wlumsk = dl->winLum(iHour, 1); for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { avwlsk.sky[iSky] += wlumsk.sky[iSky]; if (PHRAY > 0.0) edirsk.sky[iSky] += wlumsk.sky[iSky] * DOMEGA_Ray_3; } - state.dataDaylightingManager->AVWLSU(iHour, 1) += state.dataDaylightingManager->WLUMSU(iHour, 1); - state.dataDaylightingManager->AVWLSUdisk(iHour, 1) += state.dataDaylightingManager->WLUMSUdisk(iHour, 1); + dl->avgWinLum(iHour, 1).sun += dl->winLum(iHour, 1).sun; + dl->avgWinLum(iHour, 1).sunDisk += dl->winLum(iHour, 1).sunDisk; - if (PHRAY > 0.0) state.dataDaylightingManager->EDIRSU(iHour, 1) += state.dataDaylightingManager->WLUMSU(iHour, 1) * DOMEGA_Ray_3; + if (PHRAY > 0.0) dl->dirIllum(iHour, 1).sun += dl->winLum(iHour, 1).sun * DOMEGA_Ray_3; } else { // Bare window Vector3 GroundHitPt; // Coordinates of point that ray hits ground (m) // Tuned Hoisted operations out of loop and linear indexing if (state.dataSurface->CalcSolRefl) { // Coordinates of ground point hit by the ray - Alfa = std::acos(-Ray_3); + Real64 Alfa = std::acos(-Ray_3); Real64 const Ray_1(Ray.x); Real64 const Ray_2(Ray.y); // Beta = std::atan2( Ray_2, Ray_1 ); //Unused Tuning below eliminated use - Real64 HorDis((RWIN2.z - state.dataSurface->GroundLevelZ) * std::tan(Alfa)); // Distance between ground hit point and proj'n of center + // Distance between ground hit point and proj'n of center of window element onto ground (m) + Real64 HorDis = (RWIN2.z - state.dataSurface->GroundLevelZ) * std::tan(Alfa); GroundHitPt.z = state.dataSurface->GroundLevelZ; // Tuned Replaced by below: sqrt is faster than sincos // GroundHitPt( 1 ) = RWIN2( 1 ) + HorDis * std::cos( Beta ); @@ -3182,26 +3027,25 @@ void FigureDayltgCoeffsAtPointsForSunPosition( } Real64 const GILSK_mult((state.dataEnvrn->GndReflectanceForDayltg / Constant::Pi) * ObTrans * SkyObstructionMult); Real64 const TVISB_ObTrans(TVISB * ObTrans); - Real64 const AVWLSU_add(TVISB_ObTrans * state.dataDaylightingManager->GILSU(iHour) * - (state.dataEnvrn->GndReflectanceForDayltg / Constant::Pi)); + Real64 const AVWLSU_add(TVISB_ObTrans * dl->horIllum[iHour].sun * (state.dataEnvrn->GndReflectanceForDayltg / Constant::Pi)); Vector3 const SUNCOS_iHour(state.dataSurface->SurfSunCosHourly(iHour)); - assert(equal_dimensions(state.dataDaylightingManager->EDIRSK, state.dataDaylightingManager->AVWLSK)); - auto &edirsk = state.dataDaylightingManager->EDIRSK(iHour, 1); - auto &avwlsk = state.dataDaylightingManager->AVWLSK(iHour, 1); + assert(equal_dimensions(dl->dirIllum, dl->avgWinLum)); + auto &edirsk = dl->dirIllum(iHour, 1); + auto &avwlsk = dl->avgWinLum(iHour, 1); for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { - if (PHRAY > 0.0) { // Ray heads upward to sky - ELUM = DayltgSkyLuminance(state, static_cast(iSky), THRAY, PHRAY); - XEDIRSK.sky[iSky] = ELUM * DOMEGA_Ray_3; - DEDIR = XEDIRSK.sky[iSky] * TVISB; + if (PHRAY > 0.0) { // Ray heads upward to sky + Real64 ELUM = DayltgSkyLuminance(state, static_cast(iSky), THRAY, PHRAY); // Sky or ground luminance (cd/m2) + XDirIllum.sky[iSky] = ELUM * DOMEGA_Ray_3; + Real64 DEDIR = XDirIllum.sky[iSky] * TVISB; // Illuminance contribution at reference point from window element (lux) edirsk.sky[iSky] += DEDIR * ObTrans; avwlsk.sky[iSky] += ELUM * TVISB_ObTrans; - XAVWLSK.sky[iSky] = ELUM * ObTrans; + XAvgWinLum.sky[iSky] = ELUM * ObTrans; } else { // PHRAY <= 0. // Ray heads downward to ground. // Contribution from sky diffuse reflected from ground - XAVWLSK.sky[iSky] = state.dataDaylightingManager->GILSK(iHour).sky[iSky] * GILSK_mult; - avwlsk.sky[iSky] += TVISB * XAVWLSK.sky[iSky]; + XAvgWinLum.sky[iSky] = dl->horIllum[iHour].sky[iSky] * GILSK_mult; + avwlsk.sky[iSky] += TVISB * XAvgWinLum.sky[iSky]; // Contribution from beam solar reflected from ground (beam reaching ground point // can be obstructed [SunObstructionMult < 1.0] if CalcSolRefl = .TRUE.) } // End of check if ray is going up or down @@ -3214,13 +3058,13 @@ void FigureDayltgCoeffsAtPointsForSunPosition( hitObs = false; Vector3 ObsHitPt; // Coordinates of hit point on an obstruction (m) for (int ObsSurfNum : state.dataSurface->AllShadowPossObstrSurfaceList) { - PierceSurface(state, ObsSurfNum, GroundHitPt, SUNCOS_iHour, ObsHitPt, hitObs); + hitObs = PierceSurface(state, ObsSurfNum, GroundHitPt, SUNCOS_iHour, ObsHitPt); if (hitObs) break; } // if ( hitObs ) SunObstructionMult = 0.0; - if (!hitObs) state.dataDaylightingManager->AVWLSU(iHour, 1) += AVWLSU_add; + if (!hitObs) dl->avgWinLum(iHour, 1).sun += AVWLSU_add; } else { - state.dataDaylightingManager->AVWLSU(iHour, 1) += AVWLSU_add; + dl->avgWinLum(iHour, 1).sun += AVWLSU_add; } } // (PHRAY <= 0.0) } @@ -3234,25 +3078,25 @@ void FigureDayltgCoeffsAtPointsForSunPosition( // Unit vector from ref. pt. to sun Vector3 RAYCOS; - RAYCOS.x = state.dataDaylightingManager->CPHSUN * std::cos(state.dataDaylightingManager->THSUN); - RAYCOS.y = state.dataDaylightingManager->CPHSUN * std::sin(state.dataDaylightingManager->THSUN); - RAYCOS.z = state.dataDaylightingManager->SPHSUN; + RAYCOS.x = dl->sunAngles.cosPhi * std::cos(dl->sunAngles.theta); + RAYCOS.y = dl->sunAngles.cosPhi * std::sin(dl->sunAngles.theta); + RAYCOS.z = dl->sunAngles.sinPhi; // Is sun on front side of exterior window? - COSI = dot(WNORM2, RAYCOS); - bool hit; // True if ray from ref point thru window element hits an obstruction - bool hitWin; // True if ray passes thru window + Real64 COSI = dot(WNORM2, RAYCOS); // Cosine of angle between direct sun and window outward normal + bool hit; // True if ray from ref point thru window element hits an obstruction + bool hitWin; // True if ray passes thru window Vector3 HP; if (COSI > 0.0) { // Does RAYCOS pass thru exterior window? HP is point that RAYCOS intersects window plane. - PierceSurface(state, IWin2, RREF2, RAYCOS, HP, hitWin); + hitWin = PierceSurface(state, IWin2, RREF2, RAYCOS, HP); // True if ray from ref pt to sun hits an interior obstruction if (hitWin) { bool hitIntObsDisk = false; if (extWinType == ExtWinType::InZone) { // Check for interior obstructions between reference point and HP. - DayltgHitInteriorObstruction(state, IWin2, RREF2, HP, hitIntObsDisk); + hitIntObsDisk = DayltgHitInteriorObstruction(state, IWin2, RREF2, HP); } ObTransDisk = 0.0; // Init value // Init flag for vector from RP to sun passing through interior window @@ -3271,27 +3115,26 @@ void FigureDayltgCoeffsAtPointsForSunPosition( for (int IntWinDisk = thisSpace.WindowSurfaceFirst, IntWinDisk_end = thisSpace.WindowSurfaceLast; IntWinDisk <= IntWinDisk_end; ++IntWinDisk) { - if (state.dataSurface->Surface(IntWinDisk).ExtBoundCond >= 1) { - if (state.dataSurface->Surface(state.dataSurface->Surface(IntWinDisk).ExtBoundCond).Zone == - state.dataSurface->Surface(IWin2).Zone) { - PierceSurface(state, IntWinDisk, RREF, RAYCOS, HitPtIntWinDisk, hitIntWinDisk); - if (hitIntWinDisk) { - IntWinDiskHitNum = IntWinDisk; - COSBIntWin = dot(state.dataSurface->Surface(IntWinDisk).OutNormVec, RAYCOS); - if (COSBIntWin <= 0.0) { - hitIntWinDisk = false; - IntWinDiskHitNum = 0; - continue; - } - TVISIntWinDisk = General::POLYF( - COSBIntWin, - state.dataConstruction->Construct(state.dataSurface->Surface(IntWinDisk).Construction).TransVisBeamCoef); - break; - } - } + auto const &surfIntWinDisk = state.dataSurface->Surface(IntWinDisk); + if (surfIntWinDisk.ExtBoundCond < 1) continue; + + if (state.dataSurface->Surface(surfIntWinDisk.ExtBoundCond).Zone != state.dataSurface->Surface(IWin2).Zone) continue; + + hitIntWinDisk = PierceSurface(state, IntWinDisk, RREF, RAYCOS, HitPtIntWinDisk); + if (!hitIntWinDisk) continue; + + IntWinDiskHitNum = IntWinDisk; + COSBIntWin = dot(surfIntWinDisk.OutNormVec, RAYCOS); + if (COSBIntWin <= 0.0) { + hitIntWinDisk = false; + IntWinDiskHitNum = 0; + continue; } - } - } + TVISIntWinDisk = + General::POLYF(COSBIntWin, state.dataConstruction->Construct(surfIntWinDisk.Construction).TransVisBeamCoef); + break; + } // for (IntWinDisk) + } // for (spaceNum) if (!hitIntWinDisk) { // Vector from RP to sun does not pass through interior window ObTransDisk = 0.0; @@ -3301,11 +3144,11 @@ void FigureDayltgCoeffsAtPointsForSunPosition( // Check for interior obstructions between ref point and interior window hitIntObsDisk = false; if (hitIntWinDisk) { - DayltgHitInteriorObstruction(state, IntWinDiskHitNum, RREF, HitPtIntWinDisk, hitIntObsDisk); + hitIntObsDisk = DayltgHitInteriorObstruction(state, IntWinDiskHitNum, RREF, HitPtIntWinDisk); // If no obstruction between RP and hit int win, check for obstruction // between int win and ext win if (!hitIntObsDisk) { - DayltgHitBetWinObstruction(state, IntWinDiskHitNum, IWin2, HitPtIntWinDisk, HP, hitIntObsDisk); + hitIntObsDisk = DayltgHitBetWinObstruction(state, IntWinDiskHitNum, IWin2, HitPtIntWinDisk, HP); } } if (hitIntObsDisk) ObTransDisk = 0.0; @@ -3319,7 +3162,7 @@ void FigureDayltgCoeffsAtPointsForSunPosition( if (!hitIntObsDisk) { // No interior obstruction was hit // Net transmittance of exterior obstructions encountered by RAYCOS // ObTransDisk = 1.0 will be returned if no exterior obstructions are hit. - DayltgHitObstruction(state, iHour, IWin2, RREF2, RAYCOS, ObTransDisk); + ObTransDisk = DayltgHitObstruction(state, iHour, IWin2, RREF2, RAYCOS); // if ( ObTransDisk < 1.0 ) hitExtObsDisk = true; //Unused Set but never used // RJH 08-26-07 However, if this is a case of interior window // and vector to sun does not pass through interior window @@ -3339,36 +3182,33 @@ void FigureDayltgCoeffsAtPointsForSunPosition( // Sun reaches reference point; increment illuminance. // Direct normal illuminance is normalized to 1.0 - if (state.dataSurface->SurfWinOriginalClass(IWin) == SurfaceClass::TDD_Diffuser) { + if (state.dataSurface->Surface(IWin).OriginalClass == SurfaceClass::TDD_Diffuser) { // No beam is transmitted. Takes care of TDD with a bare diffuser and all types of blinds. TVISS = 0.0; } else { // Beam transmittance for bare window and all types of blinds - TVISS = General::POLYF(COSI, state.dataConstruction->Construct(IConst).TransVisBeamCoef) * - state.dataSurface->SurfWinGlazedFrac(IWin) * state.dataSurface->SurfWinLightWellEff(IWin); + TVISS = General::POLYF(COSI, state.dataConstruction->Construct(IConst).TransVisBeamCoef) * surfWin.glazedFrac * + surfWin.lightWellEff; if (extWinType == ExtWinType::AdjZone && hitIntWinDisk) TVISS *= TVISIntWinDisk; } - state.dataDaylightingManager->EDIRSUdisk(iHour, 1) = RAYCOS.z * TVISS * ObTransDisk; // Bare window + dl->dirIllum(iHour, 1).sunDisk = RAYCOS.z * TVISS * ObTransDisk; // Bare window std::array transBmBmMult; std::fill(transBmBmMult.begin(), transBmBmMult.end(), 0.0); + if (ANY_BLIND(ShType)) { - ProfileAngle(state, IWin, RAYCOS, state.dataMaterial->Blind(BlNum).SlatOrientation, ProfAng); + auto const &blind = state.dataMaterial->Blind(BlNum); + + Real64 ProfAng = ProfileAngle(state, IWin, RAYCOS, blind.SlatOrientation); // Contribution of beam passing through slats and reaching reference point for (int JB = 1; JB <= Material::MaxSlatAngs; ++JB) { // IF (.NOT.SurfaceWindow(IWin)%MovableSlats .AND. JB > 1) EXIT - if (state.dataSurface->SurfWinMovableSlats(IWin)) { - SlatAng = (JB - 1) * Constant::Pi / (Material::MaxSlatAngs - 1); - } else { - SlatAng = state.dataMaterial->Blind(BlNum).SlatAngle * Constant::DegToRadians; - } - transBmBmMult[JB] = WindowManager::BlindBeamBeamTrans(ProfAng, - SlatAng, - state.dataMaterial->Blind(BlNum).SlatWidth, - state.dataMaterial->Blind(BlNum).SlatSeparation, - state.dataMaterial->Blind(BlNum).SlatThickness); - state.dataDaylightingManager->EDIRSUdisk(iHour, JB + 1) = RAYCOS.z * TVISS * transBmBmMult[JB] * ObTransDisk; + Real64 SlatAng = (state.dataSurface->SurfWinMovableSlats(IWin)) ? ((JB - 1) * Constant::Pi / (Material::MaxSlatAngs - 1)) + : (blind.SlatAngle * Constant::DegToRadians); + transBmBmMult[JB] = + WindowManager::BlindBeamBeamTrans(ProfAng, SlatAng, blind.SlatWidth, blind.SlatSeparation, blind.SlatThickness); + dl->dirIllum(iHour, JB + 1).sunDisk = RAYCOS.z * TVISS * transBmBmMult[JB] * ObTransDisk; // do this only once for fixed slat blinds if (!state.dataSurface->SurfWinMovableSlats(IWin)) break; @@ -3377,12 +3217,10 @@ void FigureDayltgCoeffsAtPointsForSunPosition( // pass angle from sun to window normal here using PHSUN and THSUN from above and surface angles // SunAltitudeToWindowNormalAngle = PHSUN - SurfaceWindow(IWin)%Phi // SunAzimuthToWindowNormalAngle = THSUN - SurfaceWindow(IWin)%Theta - DataHeatBalance::CalcScreenTransmittance(state, - IWin, - (state.dataDaylightingManager->PHSUN - state.dataSurface->SurfWinPhi(IWin)), - (state.dataDaylightingManager->THSUN - state.dataSurface->SurfWinTheta(IWin))); - transBmBmMult[1] = state.dataMaterial->Screens(state.dataSurface->SurfWinScreenNumber(IWin)).BmBmTrans; - state.dataDaylightingManager->EDIRSUdisk(iHour, 2) = RAYCOS.z * TVISS * transBmBmMult[1] * ObTransDisk; + DataHeatBalance::CalcScreenTransmittance( + state, IWin, (dl->sunAngles.phi - surfWin.phi), (dl->sunAngles.theta - surfWin.theta)); + transBmBmMult[1] = state.dataMaterial->Screens(surfWin.screenNum).BmBmTrans; + dl->dirIllum(iHour, 2).sunDisk = RAYCOS.z * TVISS * transBmBmMult[1] * ObTransDisk; } if (CalledFrom == CalledFor::RefPoint) { @@ -3390,11 +3228,12 @@ void FigureDayltgCoeffsAtPointsForSunPosition( // Position factor for sun (note that AZVIEW is wrt y-axis and THSUN is wrt // x-axis of absolute coordinate system. - XR = std::tan(std::abs(Constant::PiOvr2 - AZVIEW - state.dataDaylightingManager->THSUN) + 0.001); - YR = std::tan(state.dataDaylightingManager->PHSUN + 0.001); - POSFAC = DayltgGlarePositionFactor(XR, YR); + Real64 XR = std::tan(std::abs(Constant::PiOvr2 - AZVIEW - dl->sunAngles.theta) + 0.001); + Real64 YR = std::tan(dl->sunAngles.phi + 0.001); + Real64 POSFAC = + DayltgGlarePositionFactor(XR, YR); // Position factor for a window element / ref point / view vector combination - WindowSolidAngleDaylightPoint = state.dataSurface->SurfaceWindow(IWin).SolidAngAtRefPtWtd(iRefPoint); + WindowSolidAngleDaylightPoint = state.dataSurface->SurfaceWindow(IWin).refPts(iRefPoint).solidAngWtd; if (POSFAC != 0.0 && WindowSolidAngleDaylightPoint > 0.000001) { // Increment window luminance. Luminance of solar disk (cd/m2) @@ -3404,22 +3243,22 @@ void FigureDayltgCoeffsAtPointsForSunPosition( // Solid angle subtended by sun is 0.000068 steradians XAVWL = 14700.0 * std::sqrt(0.000068 * POSFAC) * double(NWX * NWY) / std::pow(WindowSolidAngleDaylightPoint, 0.8); - state.dataDaylightingManager->AVWLSUdisk(iHour, 1) = XAVWL * TVISS * ObTransDisk; // Bare window + dl->avgWinLum(iHour, 1).sunDisk = XAVWL * TVISS * ObTransDisk; // Bare window if (ANY_BLIND(ShType)) { for (int JB = 1; JB <= Material::MaxSlatAngs; ++JB) { // IF (.NOT. SurfaceWindow(IWin)%MovableSlats .AND. JB > 1) EXIT - state.dataDaylightingManager->AVWLSUdisk(iHour, JB + 1) = XAVWL * TVISS * transBmBmMult[JB] * ObTransDisk; + dl->avgWinLum(iHour, JB + 1).sunDisk = XAVWL * TVISS * transBmBmMult[JB] * ObTransDisk; if (!state.dataSurface->SurfWinMovableSlats(IWin)) break; } } else if (ShType == WinShadingType::ExtScreen) { - state.dataDaylightingManager->AVWLSUdisk(iHour, 2) = XAVWL * TVISS * transBmBmMult[1] * ObTransDisk; + dl->avgWinLum(iHour, 2).sunDisk = XAVWL * TVISS * transBmBmMult[1] * ObTransDisk; } } // Position Factor - } - } // Beam avoids all obstructions - } // Beam passes thru window - } // Sun on front side + } // if (calledFrom == RefPt) + } // if (ObTransDisk > 1e-6) // Beam avoids all obstructions + } // if (hitWin) + } // if (COSI > 0.0) // Sun on front side // Beam solar reaching reference point after beam-beam (specular) reflection from // an exterior surface @@ -3456,19 +3295,19 @@ void FigureDayltgCoeffsAtPointsForSunPosition( // reach reference point in this case if (SunVecMir.z <= 0.0) continue; // Cosine of incidence angle of reflected beam on window - CosIncAngRec = dot(state.dataSurface->Surface(IWin2).OutNormVec, SunVecMir); + Real64 CosIncAngRec = dot(state.dataSurface->Surface(IWin2).OutNormVec, SunVecMir); if (CosIncAngRec <= 0.0) continue; // Does ray from ref. pt. along SunVecMir pass through window? - PierceSurface(state, IWin2, RREF2, SunVecMir, HP, hitWin); + hitWin = PierceSurface(state, IWin2, RREF2, SunVecMir, HP); if (!hitWin) continue; // Ray did not pass through window // Check if this ray hits interior obstructions - DayltgHitInteriorObstruction(state, IWin2, RREF2, HP, hit); + hit = DayltgHitInteriorObstruction(state, IWin2, RREF2, HP); if (hit) continue; // Interior obstruction was hit // Does ray hit this reflecting surface? - PierceSurface(state, ReflSurfNum, RREF2, SunVecMir, HitPtRefl, hitRefl); + hitRefl = PierceSurface(state, ReflSurfNum, RREF2, SunVecMir, HitPtRefl); if (!hitRefl) continue; // Ray did not hit this reflecting surface - ReflDistanceSq = distance_squared(HitPtRefl, RREF2); - ReflDistance = std::sqrt(ReflDistanceSq); + Real64 ReflDistanceSq = distance_squared(HitPtRefl, RREF2); + Real64 ReflDistance = std::sqrt(ReflDistanceSq); // Is ray from ref. pt. to reflection point (HitPtRefl) obstructed? bool hitObsRefl = false; Vector3 HitPtObs; // Hit point on obstruction @@ -3477,7 +3316,7 @@ void FigureDayltgCoeffsAtPointsForSunPosition( ++loop2) { int const ObsSurfNum = state.dataSolarReflectionManager->SolReflRecSurf(RecSurfNum).PossibleObsSurfNums(loop2); if (ObsSurfNum == ReflSurfNum || ObsSurfNum == state.dataSurface->Surface(ReflSurfNum).BaseSurf) continue; - PierceSurface(state, ObsSurfNum, RREF2, SunVecMir, ReflDistance, HitPtObs, hitObs); // ReflDistance cutoff added + hitObs = PierceSurface(state, ObsSurfNum, RREF2, SunVecMir, ReflDistance, HitPtObs); // ReflDistance cutoff added if (hitObs) { // => Could skip distance check (unless < vs <= ReflDistance really matters) if (distance_squared(HitPtObs, RREF2) < ReflDistanceSq) { // Distance squared from ref pt to reflection point hitObsRefl = true; @@ -3500,7 +3339,7 @@ void FigureDayltgCoeffsAtPointsForSunPosition( ++loop2) { int const ObsSurfNum = state.dataSolarReflectionManager->SolReflRecSurf(ReflSurfRecNum).PossibleObsSurfNums(loop2); - PierceSurface(state, ObsSurfNum, HitPtRefl, RAYCOS, HitPtObs, hitObs); + hitObs = PierceSurface(state, ObsSurfNum, HitPtRefl, RAYCOS, HitPtObs); if (hitObs) break; } } @@ -3508,7 +3347,7 @@ void FigureDayltgCoeffsAtPointsForSunPosition( // Reflecting surface is a building shade for (int ObsSurfNum : state.dataSurface->AllShadowPossObstrSurfaceList) { if (ObsSurfNum == ReflSurfNum) continue; - PierceSurface(state, ObsSurfNum, HitPtRefl, RAYCOS, HitPtObs, hitObs); + hitObs = PierceSurface(state, ObsSurfNum, HitPtRefl, RAYCOS, HitPtObs); if (hitObs) break; } } // End of check if reflector is a window or shadowing surface @@ -3517,7 +3356,7 @@ void FigureDayltgCoeffsAtPointsForSunPosition( // No obstructions. Calculate reflected beam illuminance at ref. pt. from this reflecting surface. SpecReflectance = 0.0; - CosIncAngRefl = std::abs(dot(RAYCOS, ReflNorm)); + Real64 CosIncAngRefl = std::abs(dot(RAYCOS, ReflNorm)); // Cos of angle of incidence of beam on reflecting surface if (state.dataSurface->Surface(ReflSurfNum).Class == SurfaceClass::Window) { int const ConstrNumRefl = state.dataSurface->SurfActiveConstruction(ReflSurfNum); SpecReflectance = @@ -3529,29 +3368,24 @@ void FigureDayltgCoeffsAtPointsForSunPosition( General::POLYF(std::abs(CosIncAngRefl), state.dataConstruction->Construct(state.dataSurface->SurfShadowGlazingConstruct(ReflSurfNum)) .ReflSolBeamFrontCoef); - TVisRefl = General::POLYF(CosIncAngRec, state.dataConstruction->Construct(IConst).TransVisBeamCoef) * - state.dataSurface->SurfWinGlazedFrac(IWin) * state.dataSurface->SurfWinLightWellEff(IWin); - state.dataDaylightingManager->EDIRSUdisk(iHour, 1) += SunVecMir(3) * SpecReflectance * TVisRefl; // Bare window + TVisRefl = General::POLYF(CosIncAngRec, state.dataConstruction->Construct(IConst).TransVisBeamCoef) * surfWin.glazedFrac * + surfWin.lightWellEff; + dl->dirIllum(iHour, 1).sunDisk += SunVecMir.z * SpecReflectance * TVisRefl; // Bare window TransBmBmMultRefl = 0.0; if (ANY_BLIND(ShType)) { - ProfileAngle(state, IWin, SunVecMir, state.dataMaterial->Blind(BlNum).SlatOrientation, ProfAng); + auto const &blind = state.dataMaterial->Blind(BlNum); + Real64 ProfAng = ProfileAngle(state, IWin, SunVecMir, blind.SlatOrientation); // Contribution of reflected beam passing through slats and reaching reference point Real64 const Pi_SlatAng_fac(Constant::Pi / (Material::MaxSlatAngs - 1)); for (int JB = 1; JB <= Material::MaxSlatAngs; ++JB) { // IF (.NOT.SurfaceWindow(IWin)%MovableSlats .AND. JB > 1) EXIT - if (state.dataSurface->SurfWinMovableSlats(IWin)) { - SlatAng = double(JB - 1) * Pi_SlatAng_fac; - } else { - SlatAng = state.dataMaterial->Blind(BlNum).SlatAngle * Constant::DegToRadians; - } - TransBmBmMultRefl(JB) = WindowManager::BlindBeamBeamTrans(ProfAng, - SlatAng, - state.dataMaterial->Blind(BlNum).SlatWidth, - state.dataMaterial->Blind(BlNum).SlatSeparation, - state.dataMaterial->Blind(BlNum).SlatThickness); - state.dataDaylightingManager->EDIRSUdisk(iHour, JB + 1) += - SunVecMir.z * SpecReflectance * TVisRefl * TransBmBmMultRefl(JB); + Real64 SlatAng = (state.dataSurface->SurfWinMovableSlats(IWin)) ? (double(JB - 1) * Pi_SlatAng_fac) + : (blind.SlatAngle * Constant::DegToRadians); + + TransBmBmMultRefl(JB) = WindowManager::BlindBeamBeamTrans( + ProfAng, SlatAng, blind.SlatWidth, blind.SlatSeparation, blind.SlatThickness); + dl->dirIllum(iHour, JB + 1).sunDisk += SunVecMir.z * SpecReflectance * TVisRefl * TransBmBmMultRefl(JB); if (!state.dataSurface->SurfWinMovableSlats(IWin)) break; } @@ -3560,34 +3394,30 @@ void FigureDayltgCoeffsAtPointsForSunPosition( // surface angles SunAltitudeToWindowNormalAngle = PHSUN - SurfaceWindow(IWin)%Phi // SunAzimuthToWindowNormalAngle = THSUN - SurfaceWindow(IWin)%Theta DataHeatBalance::CalcScreenTransmittance( - state, - IWin, - (state.dataDaylightingManager->PHSUN - state.dataSurface->SurfWinPhi(IWin)), - (state.dataDaylightingManager->THSUN - state.dataSurface->SurfWinTheta(IWin))); - TransBmBmMultRefl(1) = state.dataMaterial->Screens(state.dataSurface->SurfWinScreenNumber(IWin)).BmBmTrans; - state.dataDaylightingManager->EDIRSUdisk(iHour, 2) += SunVecMir.z * SpecReflectance * TVisRefl * TransBmBmMultRefl(1); + state, IWin, (dl->sunAngles.phi - surfWin.phi), (dl->sunAngles.theta - surfWin.theta)); + TransBmBmMultRefl(1) = state.dataMaterial->Screens(surfWin.screenNum).BmBmTrans; + dl->dirIllum(iHour, 2).sunDisk += SunVecMir.z * SpecReflectance * TVisRefl * TransBmBmMultRefl(1); } // End of check if window has a blind or screen // Glare from reflected solar disk PHSUNrefl = SunVecMir.z; THSUNrefl = std::atan2(SunVecMir.y, SunVecMir.x); - XR = std::tan(std::abs(Constant::PiOvr2 - AZVIEW - THSUNrefl) + 0.001); - YR = std::tan(PHSUNrefl + 0.001); - POSFAC = DayltgGlarePositionFactor(XR, YR); - if (POSFAC != 0.0 && state.dataSurface->SurfaceWindow(IWin).SolidAngAtRefPtWtd(iRefPoint) > 0.000001) { + Real64 XR = std::tan(std::abs(Constant::PiOvr2 - AZVIEW - THSUNrefl) + 0.001); + Real64 YR = std::tan(PHSUNrefl + 0.001); + Real64 POSFAC = DayltgGlarePositionFactor(XR, YR); + if (POSFAC != 0.0 && state.dataSurface->SurfaceWindow(IWin).refPts(iRefPoint).solidAngWtd > 0.000001) { XAVWL = 14700.0 * std::sqrt(0.000068 * POSFAC) * double(NWX * NWY) / - std::pow(state.dataSurface->SurfaceWindow(IWin).SolidAngAtRefPtWtd(iRefPoint), 0.8); - state.dataDaylightingManager->AVWLSUdisk(iHour, 1) += XAVWL * TVisRefl * SpecReflectance; // Bare window + std::pow(state.dataSurface->SurfaceWindow(IWin).refPts(iRefPoint).solidAngWtd, 0.8); + dl->avgWinLum(iHour, 1).sunDisk += XAVWL * TVisRefl * SpecReflectance; // Bare window if (ANY_BLIND(ShType)) { for (int JB = 1; JB <= Material::MaxSlatAngs; ++JB) { // IF(.NOT. SurfaceWindow(IWin)%MovableSlats .AND. JB > 1) EXIT - state.dataDaylightingManager->AVWLSUdisk(iHour, JB + 1) += - XAVWL * TVisRefl * SpecReflectance * TransBmBmMultRefl(JB); + dl->avgWinLum(iHour, JB + 1).sunDisk += XAVWL * TVisRefl * SpecReflectance * TransBmBmMultRefl(JB); if (!state.dataSurface->SurfWinMovableSlats(IWin)) break; } } else if (ShType == WinShadingType::ExtScreen) { - state.dataDaylightingManager->AVWLSUdisk(iHour, 2) += XAVWL * TVisRefl * SpecReflectance * TransBmBmMultRefl(1); + dl->avgWinLum(iHour, 2).sunDisk += XAVWL * TVisRefl * SpecReflectance * TransBmBmMultRefl(1); } } } // End of check that obstruction can specularly reflect @@ -3606,7 +3436,7 @@ void FigureDayltgCoeffsAtPointsForSunPosition( // Interior window visible transmittance multiplier for exterior window in adjacent zone TVisIntWinMult = 1.0; TVisIntWinDiskMult = 1.0; - if (state.dataSurface->Surface(IWin).SolarEnclIndex != state.dataDaylightingData->daylightControl(daylightCtrlNum).enclIndex) { + if (state.dataSurface->Surface(IWin).SolarEnclIndex != dl->daylightControl(daylightCtrlNum).enclIndex) { TVisIntWinMult = TVISIntWin; TVisIntWinDiskMult = TVISIntWinDisk; } @@ -3616,25 +3446,24 @@ void FigureDayltgCoeffsAtPointsForSunPosition( // Sometimes this is JB > 2 and sometimes it's JB > 1, what gives? if (!state.dataSurface->SurfWinMovableSlats(IWin) && JB > 1) break; - auto &wlumsk = state.dataDaylightingManager->WLUMSK(iHour, JB + 1); - auto &edirsk = state.dataDaylightingManager->EDIRSK(iHour, JB + 1); - auto &avwlsk = state.dataDaylightingManager->AVWLSK(iHour, JB + 1); + auto &wlumsk = dl->winLum(iHour, JB + 1); + auto &edirsk = dl->dirIllum(iHour, JB + 1); + auto &avwlsk = dl->avgWinLum(iHour, JB + 1); for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { // IF (.NOT.SurfaceWindow(IWin)%MovableSlats .AND. JB > 1) EXIT avwlsk.sky[iSky] += wlumsk.sky[iSky] * TVisIntWinMult; if (PHRAY > 0.0) edirsk.sky[iSky] += wlumsk.sky[iSky] * DOMEGA_Ray_3_TVisIntWinMult; } // for (iSky) - state.dataDaylightingManager->AVWLSU(iHour, JB + 1) += state.dataDaylightingManager->WLUMSU(iHour, JB + 1) * TVisIntWinMult; - state.dataDaylightingManager->AVWLSUdisk(iHour, JB + 1) += state.dataDaylightingManager->WLUMSUdisk(iHour, JB + 1) * TVisIntWinDiskMult; + dl->avgWinLum(iHour, JB + 1).sun += dl->winLum(iHour, JB + 1).sun * TVisIntWinMult; + dl->avgWinLum(iHour, JB + 1).sunDisk += dl->winLum(iHour, JB + 1).sunDisk * TVisIntWinDiskMult; if (PHRAY > 0.0) { - state.dataDaylightingManager->EDIRSU(iHour, JB + 1) += - state.dataDaylightingManager->WLUMSU(iHour, JB + 1) * DOMEGA_Ray_3_TVisIntWinMult; + dl->dirIllum(iHour, JB + 1).sun += dl->winLum(iHour, JB + 1).sun * DOMEGA_Ray_3_TVisIntWinMult; } } // for (JB) } -} +} // FigureDayltgCoeffsAtPointsForSunPosition() void FigureRefPointDayltgFactorsToAddIllums(EnergyPlusData &state, int const daylightCtrlNum, // Current daylighting control number @@ -3663,21 +3492,16 @@ void FigureRefPointDayltgFactorsToAddIllums(EnergyPlusData &state, Real64 constexpr tmpDFCalc(0.05); // cut off illuminance (lux) for exterior horizontal in calculating the daylighting and glare factors // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - Real64 VTR; // For switchable glazing, ratio of visible transmittance of fully-switched state to that of the unswitched state + auto &dl = state.dataDayltg; if (state.dataSurface->SurfSunCosHourly(iHour).z < DataEnvironment::SunIsUpValue) return; ++ISunPos; // Altitude of sun (degrees) - state.dataDaylightingManager->PHSUN = state.dataDaylightingManager->PHSUNHR(iHour); - state.dataDaylightingManager->SPHSUN = state.dataDaylightingManager->SPHSUNHR(iHour); - state.dataDaylightingManager->CPHSUN = state.dataDaylightingManager->CPHSUNHR(iHour); + dl->sunAngles = dl->sunAnglesHr[iHour]; - // Azimuth of sun in absolute coord sys - state.dataDaylightingManager->THSUN = state.dataDaylightingManager->THSUNHR(iHour); - - auto &thisDaylightControl = state.dataDaylightingData->daylightControl(daylightCtrlNum); + auto &thisDayltgCtrl = dl->daylightControl(daylightCtrlNum); int const enclNum = state.dataSurface->Surface(IWin).SolarEnclIndex; // Loop over shading index (1=bare window; 2=diffusing glazing, shade, screen or fixed slat-angle blind; @@ -3688,84 +3512,79 @@ void FigureRefPointDayltgFactorsToAddIllums(EnergyPlusData &state, // and interior surfaces with high visible reflectance. // Added tmpDFCalc (default to 0.05 lux) as the cap for GILSK and GILSU in calculating the daylight factors // the assumption behind it is if exterior horizontal surface does not get daylight, spaces do not get daylight. + + auto &daylFacHr = thisDayltgCtrl.daylFac[iHour]; + for (int JSH = 1; JSH <= Material::MaxSlatAngs + 1; ++JSH) { if (!state.dataSurface->SurfWinMovableSlats(IWin) && JSH > 2) break; - auto const &gilsk = state.dataDaylightingManager->GILSK(iHour); - auto const &edirsk = state.dataDaylightingManager->EDIRSK(iHour, JSH); - auto const &eintsk = state.dataDaylightingManager->EINTSK(iHour, JSH); - auto const &avwlsk = state.dataDaylightingManager->AVWLSK(iHour, JSH); - auto &illSky = thisDaylightControl.DaylIllFacSky(iHour, loopwin, iRefPoint, JSH); - auto &sourceSky = thisDaylightControl.DaylSourceFacSky(iHour, loopwin, iRefPoint, JSH); - auto &backSky = thisDaylightControl.DaylBackFacSky(iHour, loopwin, iRefPoint, JSH); + auto const &gilsk = dl->horIllum[iHour]; + auto const &edirsk = dl->dirIllum(iHour, JSH); + auto const &eintsk = dl->reflIllum(iHour, JSH); + auto const &avwlsk = dl->avgWinLum(iHour, JSH); + + auto &daylFac = daylFacHr(loopwin, iRefPoint, JSH); + auto &illFac = daylFac[iLum_Illum]; + auto &sourceFac = daylFac[iLum_Source]; + auto &backFac = daylFac[iLum_Back]; for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { // Loop over sky types if (gilsk.sky[iSky] > tmpDFCalc) { - illSky.sky[iSky] = (edirsk.sky[iSky] + eintsk.sky[iSky]) / gilsk.sky[iSky]; - sourceSky.sky[iSky] = avwlsk.sky[iSky] / (NWX * NWY * gilsk.sky[iSky]); - backSky.sky[iSky] = - eintsk.sky[iSky] * state.dataDaylightingData->enclDaylight(enclNum).aveVisDiffReflect / (Constant::Pi * gilsk.sky[iSky]); + illFac.sky[iSky] = (edirsk.sky[iSky] + eintsk.sky[iSky]) / gilsk.sky[iSky]; + sourceFac.sky[iSky] = avwlsk.sky[iSky] / (NWX * NWY * gilsk.sky[iSky]); + backFac.sky[iSky] = eintsk.sky[iSky] * dl->enclDaylight(enclNum).aveVisDiffReflect / (Constant::Pi * gilsk.sky[iSky]); } else { - illSky.sky[iSky] = 0.0; - sourceSky.sky[iSky] = 0.0; - backSky.sky[iSky] = 0.0; + illFac.sky[iSky] = 0.0; + sourceFac.sky[iSky] = 0.0; + backFac.sky[iSky] = 0.0; } } // for (iSky) - if (state.dataDaylightingManager->GILSU(iHour) > tmpDFCalc) { - thisDaylightControl.DaylIllFacSun(iHour, loopwin, iRefPoint, JSH) = - (state.dataDaylightingManager->EDIRSU(iHour, JSH) + state.dataDaylightingManager->EINTSU(iHour, JSH)) / - (state.dataDaylightingManager->GILSU(iHour) + 0.0001); - thisDaylightControl.DaylIllFacSunDisk(iHour, loopwin, iRefPoint, JSH) = - (state.dataDaylightingManager->EDIRSUdisk(iHour, JSH) + state.dataDaylightingManager->EINTSUdisk(iHour, JSH)) / - (state.dataDaylightingManager->GILSU(iHour) + 0.0001); - thisDaylightControl.DaylSourceFacSun(iHour, loopwin, iRefPoint, JSH) = - state.dataDaylightingManager->AVWLSU(iHour, JSH) / (NWX * NWY * (state.dataDaylightingManager->GILSU(iHour) + 0.0001)); - thisDaylightControl.DaylSourceFacSunDisk(iHour, loopwin, iRefPoint, JSH) = - state.dataDaylightingManager->AVWLSUdisk(iHour, JSH) / (NWX * NWY * (state.dataDaylightingManager->GILSU(iHour) + 0.0001)); - thisDaylightControl.DaylBackFacSun(iHour, loopwin, iRefPoint, JSH) = - state.dataDaylightingManager->EINTSU(iHour, JSH) * state.dataDaylightingData->enclDaylight(enclNum).aveVisDiffReflect / - (Constant::Pi * (state.dataDaylightingManager->GILSU(iHour) + 0.0001)); - thisDaylightControl.DaylBackFacSunDisk(iHour, loopwin, iRefPoint, JSH) = - state.dataDaylightingManager->EINTSUdisk(iHour, JSH) * state.dataDaylightingData->enclDaylight(enclNum).aveVisDiffReflect / - (Constant::Pi * (state.dataDaylightingManager->GILSU(iHour) + 0.0001)); + if (dl->horIllum[iHour].sun > tmpDFCalc) { + auto &daylFac = daylFacHr(loopwin, iRefPoint, JSH); + daylFac[iLum_Illum].sun = (dl->dirIllum(iHour, JSH).sun + dl->reflIllum(iHour, JSH).sun) / (dl->horIllum[iHour].sun + 0.0001); + daylFac[iLum_Illum].sunDisk = (dl->dirIllum(iHour, JSH).sunDisk + dl->reflIllum(iHour, JSH).sunDisk) / (dl->horIllum[iHour].sun + 0.0001); + daylFac[iLum_Source].sun = dl->avgWinLum(iHour, JSH).sun / (NWX * NWY * (dl->horIllum[iHour].sun + 0.0001)); + daylFac[iLum_Source].sunDisk = dl->avgWinLum(iHour, JSH).sunDisk / (NWX * NWY * (dl->horIllum[iHour].sun + 0.0001)); + daylFac[iLum_Back].sun = + dl->reflIllum(iHour, JSH).sun * dl->enclDaylight(enclNum).aveVisDiffReflect / (Constant::Pi * (dl->horIllum[iHour].sun + 0.0001)); + daylFac[iLum_Back].sunDisk = + dl->reflIllum(iHour, JSH).sunDisk * dl->enclDaylight(enclNum).aveVisDiffReflect / (Constant::Pi * (dl->horIllum[iHour].sun + 0.0001)); } else { - thisDaylightControl.DaylIllFacSun(iHour, loopwin, iRefPoint, JSH) = 0.0; - thisDaylightControl.DaylIllFacSunDisk(iHour, loopwin, iRefPoint, JSH) = 0.0; + daylFac[iLum_Illum].sun = 0.0; + daylFac[iLum_Illum].sunDisk = 0.0; - thisDaylightControl.DaylSourceFacSun(iHour, loopwin, iRefPoint, JSH) = 0.0; - thisDaylightControl.DaylSourceFacSunDisk(iHour, loopwin, iRefPoint, JSH) = 0.0; + daylFac[iLum_Source].sun = 0.0; + daylFac[iLum_Source].sunDisk = 0.0; - thisDaylightControl.DaylBackFacSun(iHour, loopwin, iRefPoint, JSH) = 0.0; - thisDaylightControl.DaylBackFacSunDisk(iHour, loopwin, iRefPoint, JSH) = 0.0; + daylFac[iLum_Back].sun = 0.0; + daylFac[iLum_Back].sunDisk = 0.0; } } // for (jSH) // For switchable glazing put daylighting factors for switched (dark) state in IS=2 location if (ICtrl > 0 && state.dataSurface->WindowShadingControl(ICtrl).ShadingType == WinShadingType::SwitchableGlazing) { - VTR = state.dataSurface->SurfWinVisTransRatio(IWin); + + Real64 VTR = state.dataSurface->SurfWinVisTransRatio(IWin); // Ratio of Tvis of fully-switched state to that of the unswitched state + auto &daylFac2 = daylFacHr(loopwin, iRefPoint, 2); + auto const &daylFac1 = daylFacHr(loopwin, iRefPoint, 1); + for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { - thisDaylightControl.DaylIllFacSky(iHour, loopwin, iRefPoint, 2).sky[iSky] = - thisDaylightControl.DaylIllFacSky(iHour, loopwin, iRefPoint, 1).sky[iSky] * VTR; - thisDaylightControl.DaylSourceFacSky(iHour, loopwin, iRefPoint, 2).sky[iSky] = - thisDaylightControl.DaylSourceFacSky(iHour, loopwin, iRefPoint, 1).sky[iSky] * VTR; - thisDaylightControl.DaylBackFacSky(iHour, loopwin, iRefPoint, 2).sky[iSky] = - thisDaylightControl.DaylBackFacSky(iHour, loopwin, iRefPoint, 1).sky[iSky] * VTR; + daylFac2[iLum_Illum].sky[iSky] = daylFac1[iLum_Illum].sky[iSky] * VTR; + daylFac2[iLum_Source].sky[iSky] = daylFac1[iLum_Source].sky[iSky] * VTR; + daylFac2[iLum_Back].sky[iSky] = daylFac1[iLum_Back].sky[iSky] * VTR; } // for (iSky) - thisDaylightControl.DaylIllFacSun(iHour, loopwin, iRefPoint, 2) = thisDaylightControl.DaylIllFacSun(iHour, loopwin, iRefPoint, 1) * VTR; - thisDaylightControl.DaylSourceFacSun(iHour, loopwin, iRefPoint, 2) = thisDaylightControl.DaylSourceFacSun(iHour, loopwin, iRefPoint, 1) * VTR; - thisDaylightControl.DaylBackFacSun(iHour, loopwin, iRefPoint, 2) = thisDaylightControl.DaylBackFacSun(iHour, loopwin, iRefPoint, 1) * VTR; - thisDaylightControl.DaylIllFacSunDisk(iHour, loopwin, iRefPoint, 2) = - thisDaylightControl.DaylIllFacSunDisk(iHour, loopwin, iRefPoint, 1) * VTR; - thisDaylightControl.DaylSourceFacSunDisk(iHour, loopwin, iRefPoint, 2) = - thisDaylightControl.DaylSourceFacSunDisk(iHour, loopwin, iRefPoint, 1) * VTR; - thisDaylightControl.DaylBackFacSunDisk(iHour, loopwin, iRefPoint, 2) = - thisDaylightControl.DaylBackFacSunDisk(iHour, loopwin, iRefPoint, 1) * VTR; + daylFac2[iLum_Illum].sun = daylFac1[iLum_Illum].sun * VTR; + daylFac2[iLum_Source].sun = daylFac1[iLum_Source].sun * VTR; + daylFac2[iLum_Back].sun = daylFac1[iLum_Back].sun * VTR; + daylFac2[iLum_Illum].sunDisk = daylFac1[iLum_Illum].sunDisk * VTR; + daylFac2[iLum_Source].sunDisk = daylFac1[iLum_Source].sunDisk * VTR; + daylFac2[iLum_Back].sunDisk = daylFac1[iLum_Back].sunDisk * VTR; } // ICtrl > 0 -} +} // FigureRefPointDayltgFactorsToAddIllums() void FigureMapPointDayltgFactorsToAddIllums(EnergyPlusData &state, int const MapNum, @@ -3792,8 +3611,7 @@ void FigureMapPointDayltgFactorsToAddIllums(EnergyPlusData &state, // the daylighting and glare factors // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - Real64 VTR; // For switchable glazing, ratio of visible transmittance of - // fully-switched state to that of the unswitched state + auto &dl = state.dataDayltg; if (state.dataSurface->SurfSunCosHourly(iHour).z < DataEnvironment::SunIsUpValue) return; @@ -3806,43 +3624,42 @@ void FigureMapPointDayltgFactorsToAddIllums(EnergyPlusData &state, // Added tmpDFCalc (default to 0.05 lux) as the cap for GILSK and GILSU in calculating the daylight factors // the assumption behind it is if exterior horizontal surface does not get daylight, spaces do not get daylight. - auto &illumMapCalc = state.dataDaylightingData->IllumMapCalc(MapNum); + auto &illumMap = dl->illumMaps(MapNum); + auto &daylFacHr = illumMap.daylFac[iHour]; for (int JSH = 1; JSH <= Material::MaxSlatAngs + 1; ++JSH) { if (!state.dataSurface->SurfWinMovableSlats(IWin) && JSH > 2) break; - auto const &gilsk = state.dataDaylightingManager->GILSK(iHour); - auto const &edirsk = state.dataDaylightingManager->EDIRSK(iHour, JSH); - auto const &eintsk = state.dataDaylightingManager->EINTSK(iHour, JSH); - auto &illSky = illumMapCalc.DaylIllFacSky(iHour, loopwin, iMapPoint, JSH); + auto const &gilsk = dl->horIllum[iHour]; + auto const &edirsk = dl->dirIllum(iHour, JSH); + auto const &eintsk = dl->reflIllum(iHour, JSH); + auto &illSky = daylFacHr(loopwin, iMapPoint, JSH); for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { // Loop over sky types illSky.sky[iSky] = (gilsk.sky[iSky] > tmpDFCalc) ? ((edirsk.sky[iSky] + eintsk.sky[iSky]) / gilsk.sky[iSky]) : 0.0; } // for (iSky) - if (state.dataDaylightingManager->GILSU(iHour) > tmpDFCalc) { - illumMapCalc.DaylIllFacSun(iHour, loopwin, iMapPoint, JSH) = - (state.dataDaylightingManager->EDIRSU(iHour, JSH) + state.dataDaylightingManager->EINTSU(iHour, JSH)) / - (state.dataDaylightingManager->GILSU(iHour) + 0.0001); - illumMapCalc.DaylIllFacSunDisk(iHour, loopwin, iMapPoint, JSH) = - (state.dataDaylightingManager->EDIRSUdisk(iHour, JSH) + state.dataDaylightingManager->EINTSUdisk(iHour, JSH)) / - (state.dataDaylightingManager->GILSU(iHour) + 0.0001); + if (dl->horIllum[iHour].sun > tmpDFCalc) { + daylFacHr(loopwin, iMapPoint, JSH).sun = + (dl->dirIllum(iHour, JSH).sun + dl->reflIllum(iHour, JSH).sun) / (dl->horIllum[iHour].sun + 0.0001); + daylFacHr(loopwin, iMapPoint, JSH).sunDisk = + (dl->dirIllum(iHour, JSH).sunDisk + dl->reflIllum(iHour, JSH).sunDisk) / (dl->horIllum[iHour].sun + 0.0001); } else { - illumMapCalc.DaylIllFacSun(iHour, loopwin, iMapPoint, JSH) = 0.0; - illumMapCalc.DaylIllFacSunDisk(iHour, loopwin, iMapPoint, JSH) = 0.0; + daylFacHr(loopwin, iMapPoint, JSH).sun = 0.0; + daylFacHr(loopwin, iMapPoint, JSH).sunDisk = 0.0; } } // for (jSH) // For switchable glazing put daylighting factors for switched (dark) state in IS=2 location if (ICtrl > 0 && state.dataSurface->WindowShadingControl(ICtrl).ShadingType == WinShadingType::SwitchableGlazing) { - VTR = state.dataSurface->SurfWinVisTransRatio(IWin); - auto &illSky2 = illumMapCalc.DaylIllFacSky(iHour, loopwin, iMapPoint, 2); - auto const &illSky1 = illumMapCalc.DaylIllFacSky(iHour, loopwin, iMapPoint, 1); + Real64 VTR = state.dataSurface->SurfWinVisTransRatio(IWin); // ratio of Tvis of switched to unswitched state + auto &illSky2 = daylFacHr(loopwin, iMapPoint, 2); + auto const &illSky1 = daylFacHr(loopwin, iMapPoint, 1); for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { illSky2.sky[iSky] = illSky1.sky[iSky] * VTR; } - illumMapCalc.DaylIllFacSun(iHour, loopwin, iMapPoint, 2) = illumMapCalc.DaylIllFacSun(iHour, loopwin, iMapPoint, 1) * VTR; - illumMapCalc.DaylIllFacSunDisk(iHour, loopwin, iMapPoint, 2) = illumMapCalc.DaylIllFacSunDisk(iHour, loopwin, iMapPoint, 1) * VTR; + daylFacHr(loopwin, iMapPoint, 2).sun = daylFacHr(loopwin, iMapPoint, 1).sun * VTR; + daylFacHr(loopwin, iMapPoint, 2).sunDisk = daylFacHr(loopwin, iMapPoint, 1).sunDisk * VTR; } // ICtrl > 0 } @@ -3856,16 +3673,17 @@ void GetDaylightingParametersInput(EnergyPlusData &state) // PURPOSE OF THIS SUBROUTINE: // This subroutine provides a simple structure to get all daylighting // parameters. + auto &dl = state.dataDayltg; - if (!state.dataDaylightingManager->getDaylightingParametersInputFlag) return; - state.dataDaylightingManager->getDaylightingParametersInputFlag = false; + if (!dl->getDaylightingParametersInputFlag) return; + dl->getDaylightingParametersInputFlag = false; auto const &ipsc = state.dataIPShortCut; ipsc->cCurrentModuleObject = "Daylighting:Controls"; bool ErrorsFound = false; int TotDaylightingControls = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, ipsc->cCurrentModuleObject); if (TotDaylightingControls > 0) { - state.dataDaylightingData->enclDaylight.allocate(state.dataViewFactor->NumOfSolarEnclosures); + dl->enclDaylight.allocate(state.dataViewFactor->NumOfSolarEnclosures); GetInputDayliteRefPt(state, ErrorsFound); GetDaylightingControls(state, ErrorsFound); GeometryTransformForDaylighting(state); @@ -3875,197 +3693,181 @@ void GetDaylightingParametersInput(EnergyPlusData &state) DayltgSetupAdjZoneListsAndPointers(state); } - state.dataDaylightingManager->maxNumRefPtInAnyDaylCtrl = 0; - state.dataDaylightingManager->maxNumRefPtInAnyEncl = 0; + dl->maxNumRefPtInAnyDaylCtrl = 0; + dl->maxNumRefPtInAnyEncl = 0; // Loop through all daylighting controls to find total reference points in each enclosure - for (int daylightCtrlNum = 1; daylightCtrlNum <= (int)state.dataDaylightingData->daylightControl.size(); ++daylightCtrlNum) { - int numRefPoints = state.dataDaylightingData->daylightControl(daylightCtrlNum).TotalDaylRefPoints; - state.dataDaylightingManager->maxNumRefPtInAnyDaylCtrl = max(numRefPoints, state.dataDaylightingManager->maxNumRefPtInAnyDaylCtrl); + for (int daylightCtrlNum = 1; daylightCtrlNum <= (int)dl->daylightControl.size(); ++daylightCtrlNum) { + int numRefPoints = dl->daylightControl(daylightCtrlNum).TotalDaylRefPoints; + dl->maxNumRefPtInAnyDaylCtrl = max(numRefPoints, dl->maxNumRefPtInAnyDaylCtrl); } for (int enclNum = 1; enclNum <= state.dataViewFactor->NumOfSolarEnclosures; ++enclNum) { - state.dataDaylightingManager->maxNumRefPtInAnyEncl = - max(state.dataViewFactor->EnclSolInfo(enclNum).TotalEnclosureDaylRefPoints, state.dataDaylightingManager->maxNumRefPtInAnyEncl); + dl->maxNumRefPtInAnyEncl = max(state.dataViewFactor->EnclSolInfo(enclNum).TotalEnclosureDaylRefPoints, dl->maxNumRefPtInAnyEncl); } + dl->maxEnclSubSurfaces = max(maxval(state.dataHeatBal->Zone, &DataHeatBalance::ZoneData::NumSubSurfaces), + maxval(dl->enclDaylight, &EnclDaylightCalc::NumOfDayltgExtWins)); + for (int SurfNum : state.dataSurface->AllHTWindowSurfaceList) { - int const surfEnclNum = state.dataSurface->Surface(SurfNum).SolarEnclIndex; + auto const &surf = state.dataSurface->Surface(SurfNum); + int const surfEnclNum = surf.SolarEnclIndex; int const numEnclRefPoints = state.dataViewFactor->EnclSolInfo(surfEnclNum).TotalEnclosureDaylRefPoints; auto &surfWin = state.dataSurface->SurfaceWindow(SurfNum); if (numEnclRefPoints > 0) { if (!state.dataSurface->SurfWinSurfDayLightInit(SurfNum)) { - surfWin.SolidAngAtRefPt.allocate(numEnclRefPoints); - surfWin.SolidAngAtRefPt = 0.0; - surfWin.SolidAngAtRefPtWtd.allocate(numEnclRefPoints); - surfWin.SolidAngAtRefPtWtd = 0.0; - surfWin.IllumFromWinAtRefPt.allocate(numEnclRefPoints); - surfWin.IllumFromWinAtRefPt = {0.0, 0.0}; - surfWin.BackLumFromWinAtRefPt.allocate(numEnclRefPoints); - surfWin.BackLumFromWinAtRefPt = {0.0, 0.0}; - surfWin.SourceLumFromWinAtRefPt.allocate(numEnclRefPoints); - surfWin.SourceLumFromWinAtRefPt = {0.0, 0.0}; - surfWin.IllumFromWinAtRefPtRep.allocate(numEnclRefPoints); - surfWin.IllumFromWinAtRefPtRep = 0.0; - surfWin.LumWinFromRefPtRep.allocate(numEnclRefPoints); - surfWin.LumWinFromRefPtRep = 0.0; + surfWin.refPts.allocate(numEnclRefPoints); + for (auto &refPt : surfWin.refPts) { + new (&refPt) SurfaceWindowRefPt(); + } + state.dataSurface->SurfWinSurfDayLightInit(SurfNum) = true; } } else { - int SurfNumAdj = state.dataSurface->Surface(SurfNum).ExtBoundCond; + int SurfNumAdj = surf.ExtBoundCond; if (SurfNumAdj > 0) { int const adjSurfEnclNum = state.dataSurface->Surface(SurfNumAdj).SolarEnclIndex; int const numAdjEnclRefPoints = state.dataViewFactor->EnclSolInfo(adjSurfEnclNum).TotalEnclosureDaylRefPoints; if (numAdjEnclRefPoints > 0) { if (!state.dataSurface->SurfWinSurfDayLightInit(SurfNum)) { - surfWin.SolidAngAtRefPt.allocate(numAdjEnclRefPoints); - surfWin.SolidAngAtRefPt = 0.0; - surfWin.SolidAngAtRefPtWtd.allocate(numAdjEnclRefPoints); - surfWin.SolidAngAtRefPtWtd = 0.0; - surfWin.IllumFromWinAtRefPt.allocate(numAdjEnclRefPoints); - surfWin.IllumFromWinAtRefPt = {0.0, 0.0}; - surfWin.BackLumFromWinAtRefPt.allocate(numAdjEnclRefPoints); - surfWin.BackLumFromWinAtRefPt = {0.0, 0.0}; - surfWin.SourceLumFromWinAtRefPt.allocate(numAdjEnclRefPoints); - surfWin.SourceLumFromWinAtRefPt = {0.0, 0.0}; - surfWin.IllumFromWinAtRefPtRep.allocate(numAdjEnclRefPoints); - surfWin.IllumFromWinAtRefPtRep = 0.0; - surfWin.LumWinFromRefPtRep.allocate(numAdjEnclRefPoints); - surfWin.LumWinFromRefPtRep = 0.0; + surfWin.refPts.allocate(numAdjEnclRefPoints); + for (auto &refPt : surfWin.refPts) { + new (&refPt) SurfaceWindowRefPt(); + } state.dataSurface->SurfWinSurfDayLightInit(SurfNum) = true; } } } } - if (state.dataSurface->Surface(SurfNum).ExtBoundCond == ExternalEnvironment) { + if (surf.ExtBoundCond != ExternalEnvironment) continue; - if (state.dataSurface->Surface(SurfNum).HasShadeControl) { - auto &thisSurfEnclosure(state.dataViewFactor->EnclSolInfo(state.dataSurface->Surface(SurfNum).SolarEnclIndex)); - if (state.dataSurface->WindowShadingControl(state.dataSurface->Surface(SurfNum).activeWindowShadingControl).GlareControlIsActive) { - // Error if GlareControlIsActive but window is not in a Daylighting:Detailed zone - if (thisSurfEnclosure.TotalEnclosureDaylRefPoints == 0) { - ShowSevereError(state, format("Window={} has Window Shading Control with", state.dataSurface->Surface(SurfNum).Name)); - ShowContinueError(state, "GlareControlIsActive = Yes but it is not in a Daylighting zone or enclosure."); - ShowContinueError(state, - format("Zone or enclosure indicated={}", - state.dataViewFactor->EnclSolInfo(state.dataSurface->Surface(SurfNum).SolarEnclIndex).Name)); - ErrorsFound = true; - } - // Error if GlareControlIsActive and window is in a Daylighting:Detailed zone/enclosure with - // an interior window adjacent to another Daylighting:Detailed zone/enclosure - if (thisSurfEnclosure.TotalEnclosureDaylRefPoints > 0) { - for (int const intWin : thisSurfEnclosure.SurfacePtr) { - int const SurfNumAdj = state.dataSurface->Surface(intWin).ExtBoundCond; - if (state.dataSurface->Surface(intWin).Class == SurfaceClass::Window && SurfNumAdj > 0) { - auto &adjSurfEnclosure(state.dataViewFactor->EnclSolInfo(state.dataSurface->Surface(SurfNumAdj).SolarEnclIndex)); - if (adjSurfEnclosure.TotalEnclosureDaylRefPoints > 0) { - ShowSevereError(state, - format("Window={} has Window Shading Control with", state.dataSurface->Surface(SurfNum).Name)); - ShowContinueError(state, "GlareControlIsActive = Yes and is in a Daylighting zone or enclosure"); - ShowContinueError(state, "that shares an interior window with another Daylighting zone or enclosure"); - ShowContinueError(state, format("Adjacent Zone or Enclosure indicated={}", adjSurfEnclosure.Name)); - ErrorsFound = true; - } - } + if (!surf.HasShadeControl) continue; + + auto &thisSurfEnclosure(state.dataViewFactor->EnclSolInfo(surf.SolarEnclIndex)); + if (state.dataSurface->WindowShadingControl(surf.activeWindowShadingControl).GlareControlIsActive) { + // Error if GlareControlIsActive but window is not in a Daylighting:Detailed zone + if (thisSurfEnclosure.TotalEnclosureDaylRefPoints == 0) { + ShowSevereError(state, format("Window={} has Window Shading Control with", surf.Name)); + ShowContinueError(state, "GlareControlIsActive = Yes but it is not in a Daylighting zone or enclosure."); + ShowContinueError(state, format("Zone or enclosure indicated={}", state.dataViewFactor->EnclSolInfo(surf.SolarEnclIndex).Name)); + ErrorsFound = true; + } + // Error if GlareControlIsActive and window is in a Daylighting:Detailed zone/enclosure with + // an interior window adjacent to another Daylighting:Detailed zone/enclosure + if (thisSurfEnclosure.TotalEnclosureDaylRefPoints > 0) { + for (int const intWin : thisSurfEnclosure.SurfacePtr) { + int const SurfNumAdj = state.dataSurface->Surface(intWin).ExtBoundCond; + if (state.dataSurface->Surface(intWin).Class == SurfaceClass::Window && SurfNumAdj > 0) { + auto &adjSurfEnclosure(state.dataViewFactor->EnclSolInfo(state.dataSurface->Surface(SurfNumAdj).SolarEnclIndex)); + if (adjSurfEnclosure.TotalEnclosureDaylRefPoints > 0) { + ShowSevereError(state, format("Window={} has Window Shading Control with", surf.Name)); + ShowContinueError(state, "GlareControlIsActive = Yes and is in a Daylighting zone or enclosure"); + ShowContinueError(state, "that shares an interior window with another Daylighting zone or enclosure"); + ShowContinueError(state, format("Adjacent Zone or Enclosure indicated={}", adjSurfEnclosure.Name)); + ErrorsFound = true; } } } + } + } - if (state.dataSurface->WindowShadingControl(state.dataSurface->Surface(SurfNum).activeWindowShadingControl).shadingControlType == - WindowShadingControlType::MeetDaylIlumSetp) { - // Error if window has shadingControlType = MeetDaylightingIlluminanceSetpoint & - // but is not in a Daylighting:Detailed zone - if (thisSurfEnclosure.TotalEnclosureDaylRefPoints == 0) { - ShowSevereError(state, format("Window={} has Window Shading Control with", state.dataSurface->Surface(SurfNum).Name)); - ShowContinueError(state, "MeetDaylightingIlluminanceSetpoint but it is not in a Daylighting zone or enclosure."); - ShowContinueError(state, format("Zone or enclosure indicated={}", thisSurfEnclosure.Name)); - ErrorsFound = true; - } - // Error if window has shadingControlType = MeetDaylightIlluminanceSetpoint and is in a & - // Daylighting:Detailed zone with an interior window adjacent to another Daylighting:Detailed zone - if (thisSurfEnclosure.TotalEnclosureDaylRefPoints > 0) { - for (int const intWin : thisSurfEnclosure.SurfacePtr) { - int const SurfNumAdj = state.dataSurface->Surface(intWin).ExtBoundCond; - if (state.dataSurface->Surface(intWin).Class == SurfaceClass::Window && SurfNumAdj > 0) { - auto &adjSurfEnclosure(state.dataViewFactor->EnclSolInfo(state.dataSurface->Surface(SurfNumAdj).SolarEnclIndex)); - if (adjSurfEnclosure.TotalEnclosureDaylRefPoints > 0) { - ShowSevereError(state, - format("Window={} has Window Shading Control with", state.dataSurface->Surface(SurfNum).Name)); - ShowContinueError(state, "MeetDaylightIlluminanceSetpoint and is in a Daylighting zone or enclosure"); - ShowContinueError(state, "that shares an interior window with another Daylighting zone or enclosure"); - ShowContinueError(state, format("Adjacent Zone or enclosure indicated={}", adjSurfEnclosure.Name)); - ErrorsFound = true; - } - } - } - } + if (state.dataSurface->WindowShadingControl(surf.activeWindowShadingControl).shadingControlType != WindowShadingControlType::MeetDaylIlumSetp) + continue; + + // Error if window has shadingControlType = MeetDaylightingIlluminanceSetpoint & + // but is not in a Daylighting:Detailed zone + if (thisSurfEnclosure.TotalEnclosureDaylRefPoints == 0) { + ShowSevereError(state, format("Window={} has Window Shading Control with", surf.Name)); + ShowContinueError(state, "MeetDaylightingIlluminanceSetpoint but it is not in a Daylighting zone or enclosure."); + ShowContinueError(state, format("Zone or enclosure indicated={}", thisSurfEnclosure.Name)); + ErrorsFound = true; + continue; + } + + // Error if window has shadingControlType = MeetDaylightIlluminanceSetpoint and is in a & + // Daylighting:Detailed zone with an interior window adjacent to another Daylighting:Detailed zone + for (int const intWin : thisSurfEnclosure.SurfacePtr) { + int const SurfNumAdj = state.dataSurface->Surface(intWin).ExtBoundCond; + if (state.dataSurface->Surface(intWin).Class == SurfaceClass::Window && SurfNumAdj > 0) { + auto &adjSurfEnclosure(state.dataViewFactor->EnclSolInfo(state.dataSurface->Surface(SurfNumAdj).SolarEnclIndex)); + if (adjSurfEnclosure.TotalEnclosureDaylRefPoints > 0) { + ShowSevereError(state, format("Window={} has Window Shading Control with", surf.Name)); + ShowContinueError(state, "MeetDaylightIlluminanceSetpoint and is in a Daylighting zone or enclosure"); + ShowContinueError(state, "that shares an interior window with another Daylighting zone or enclosure"); + ShowContinueError(state, format("Adjacent Zone or enclosure indicated={}", adjSurfEnclosure.Name)); + ErrorsFound = true; } } } - } + } // for (SurfNum) if (!state.dataHeatBal->AnyAirBoundary) { for (int SurfLoop = 1; SurfLoop <= state.dataSurface->TotSurfaces; ++SurfLoop) { - if (state.dataSurface->Surface(SurfLoop).Class == SurfaceClass::Window && state.dataSurface->Surface(SurfLoop).ExtSolar) { - int const enclOfSurf = state.dataSurface->Surface(SurfLoop).SolarEnclIndex; - if (state.dataViewFactor->EnclSolInfo(enclOfSurf).TotalEnclosureDaylRefPoints > 0 && - !state.dataViewFactor->EnclSolInfo(enclOfSurf).HasInterZoneWindow && - state.dataDaylightingData->enclDaylight(enclOfSurf).hasSplitFluxDaylighting) { - for (int refPtNum = 1; refPtNum <= state.dataViewFactor->EnclSolInfo(enclOfSurf).TotalEnclosureDaylRefPoints; ++refPtNum) { + auto const &surf = state.dataSurface->Surface(SurfLoop); + if (surf.Class != SurfaceClass::Window || !surf.ExtSolar) continue; + + int const enclOfSurf = surf.SolarEnclIndex; + auto const &enclSol = state.dataViewFactor->EnclSolInfo(enclOfSurf); + if (enclSol.TotalEnclosureDaylRefPoints == 0 || enclSol.HasInterZoneWindow || !dl->enclDaylight(enclOfSurf).hasSplitFluxDaylighting) + continue; + + auto &surfWin = state.dataSurface->SurfaceWindow(SurfLoop); + for (int refPtNum = 1; refPtNum <= enclSol.TotalEnclosureDaylRefPoints; ++refPtNum) { + auto &refPt = surfWin.refPts(refPtNum); + SetupOutputVariable(state, + format("Daylighting Window Reference Point {} Illuminance", refPtNum), + Constant::Units::lux, + refPt.illumFromWinRep, + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Average, + surf.Name); + SetupOutputVariable(state, + format("Daylighting Window Reference Point {} View Luminance", refPtNum), + Constant::Units::cd_m2, + refPt.lumWinRep, + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Average, + surf.Name); + } + } + } else { + for (int enclNum = 1; enclNum <= state.dataViewFactor->NumOfSolarEnclosures; ++enclNum) { + auto const &enclSol = state.dataViewFactor->EnclSolInfo(enclNum); + for (int const enclSurfNum : enclSol.SurfacePtr) { + auto const &surf = state.dataSurface->Surface(enclSurfNum); + auto &surfWindow = state.dataSurface->SurfaceWindow(enclSurfNum); + + if (surf.Class != SurfaceClass::Window || !surf.ExtSolar) continue; + + if (enclSol.TotalEnclosureDaylRefPoints == 0 || enclSol.HasInterZoneWindow) continue; + + auto const &enclDayltg = dl->enclDaylight(enclNum); + if (!enclDayltg.hasSplitFluxDaylighting) continue; + + int refPtCount = 0; + for (int controlNum : enclDayltg.daylightControlIndexes) { + auto const &control = dl->daylightControl(controlNum); + for (int refPtNum = 1; refPtNum <= control.TotalDaylRefPoints; ++refPtNum) { + ++refPtCount; // Count reference points across each daylighting control in the same enclosure + auto &refPt = surfWindow.refPts(refPtCount); + std::string varKey = format("{} to {}", surf.Name, state.dataDayltg->DaylRefPt(control.refPts(refPtNum).num).Name); SetupOutputVariable(state, - format("Daylighting Window Reference Point {} Illuminance", refPtNum), - OutputProcessor::Unit::lux, - state.dataSurface->SurfaceWindow(SurfLoop).IllumFromWinAtRefPtRep(refPtNum), + "Daylighting Window Reference Point Illuminance", + Constant::Units::lux, + refPt.illumFromWinRep, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + varKey); SetupOutputVariable(state, - format("Daylighting Window Reference Point {} View Luminance", refPtNum), - OutputProcessor::Unit::cd_m2, - state.dataSurface->SurfaceWindow(SurfLoop).LumWinFromRefPtRep(refPtNum), + "Daylighting Window Reference Point View Luminance", + Constant::Units::cd_m2, + refPt.lumWinRep, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); - } - } - } - } - } else { - for (int enclNum = 1; enclNum <= state.dataViewFactor->NumOfSolarEnclosures; ++enclNum) { - for (int const enclSurfNum : state.dataViewFactor->EnclSolInfo(enclNum).SurfacePtr) { - if (state.dataSurface->Surface(enclSurfNum).Class == SurfaceClass::Window && state.dataSurface->Surface(enclSurfNum).ExtSolar) { - if (state.dataViewFactor->EnclSolInfo(enclNum).TotalEnclosureDaylRefPoints > 0 && - !state.dataViewFactor->EnclSolInfo(enclNum).HasInterZoneWindow && - state.dataDaylightingData->enclDaylight(enclNum).hasSplitFluxDaylighting) { - int refPtCount = 0; - for (int controlNum : state.dataDaylightingData->enclDaylight(enclNum).daylightControlIndexes) { - for (int refPtNum = 1; refPtNum <= state.dataDaylightingData->daylightControl(controlNum).TotalDaylRefPoints; - ++refPtNum) { - ++refPtCount; // Count reference points across each daylighting control in the same enclosure - std::string const varKey = - state.dataSurface->Surface(enclSurfNum).Name + " to " + - state.dataDaylightingData - ->DaylRefPt(state.dataDaylightingData->daylightControl(controlNum).DaylRefPtNum(refPtNum)) - .Name; - SetupOutputVariable(state, - "Daylighting Window Reference Point Illuminance", - OutputProcessor::Unit::lux, - state.dataSurface->SurfaceWindow(enclSurfNum).IllumFromWinAtRefPtRep(refPtCount), - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Average, - varKey); - SetupOutputVariable(state, - "Daylighting Window Reference Point View Luminance", - OutputProcessor::Unit::cd_m2, - state.dataSurface->SurfaceWindow(enclSurfNum).LumWinFromRefPtRep(refPtCount), - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Average, - varKey); - } - } + varKey); } - } - } - } + } // for (controlNum) + } // for (enclSurfNum) + } // for (enclNum) } // RJH DElight Modification Begin - Calls to DElight preprocessing subroutines @@ -4148,83 +3950,63 @@ void GetDaylightingParametersInput(EnergyPlusData &state) ipsc->cAlphaFieldNames, ipsc->cNumericFieldNames); if (has_prefix(ipsc->cAlphaArgs(1), "SIZINGDAYS")) { - state.dataDaylightingData->DFSReportSizingDays = true; + dl->DFSReportSizingDays = true; } else if (has_prefix(ipsc->cAlphaArgs(1), "ALLSHADOWCALCULATIONDAYS")) { - state.dataDaylightingData->DFSReportAllShadowCalculationDays = true; + dl->DFSReportAllShadowCalculationDays = true; } } if (ErrorsFound) ShowFatalError(state, "Program terminated for above reasons"); -} +} // FigureMapPointDayltgFactorsToAddIllums() void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) { // Perform the GetInput function for the Output:IlluminanceMap // Glazer - June 2016 (moved from GetDaylightingControls) + auto &dl = state.dataDayltg; - int AddMapPoints; - int RefPt; - Real64 CosBldgRelNorth; // Cosine of Building rotation - Real64 SinBldgRelNorth; // Sine of Building rotation - Real64 CosZoneRelNorth; // Cosine of Zone rotation - Real64 SinZoneRelNorth; // Sine of Zone rotation - Real64 CosBldgRotAppGonly(0.0); // Cosine of the building rotation for appendix G only ( relative north ) - Real64 SinBldgRotAppGonly(0.0); // Sine of the building rotation for appendix G only ( relative north ) - Real64 Xb; // temp var for transformation calc - Real64 Yb; // temp var for transformation calc - Real64 Xo; - Real64 XnoRot; - Real64 Xtrans; - Real64 Yo; - Real64 YnoRot; - Real64 Ytrans; - bool doTransform; - Real64 OldAspectRatio; - Real64 NewAspectRatio; Array1D_bool ZoneMsgDone; - auto &Zone(state.dataHeatBal->Zone); - - CosBldgRelNorth = std::cos(-(state.dataHeatBal->BuildingAzimuth + state.dataHeatBal->BuildingRotationAppendixG) * Constant::DegToRadians); - SinBldgRelNorth = std::sin(-(state.dataHeatBal->BuildingAzimuth + state.dataHeatBal->BuildingRotationAppendixG) * Constant::DegToRadians); + Real64 CosBldgRelNorth = std::cos(-(state.dataHeatBal->BuildingAzimuth + state.dataHeatBal->BuildingRotationAppendixG) * Constant::DegToRadians); + Real64 SinBldgRelNorth = std::sin(-(state.dataHeatBal->BuildingAzimuth + state.dataHeatBal->BuildingRotationAppendixG) * Constant::DegToRadians); // these are only for Building Rotation for Appendix G when using world coordinate system - CosBldgRotAppGonly = std::cos(-state.dataHeatBal->BuildingRotationAppendixG * Constant::DegToRadians); - SinBldgRotAppGonly = std::sin(-state.dataHeatBal->BuildingRotationAppendixG * Constant::DegToRadians); + Real64 CosBldgRotAppGonly = std::cos(-state.dataHeatBal->BuildingRotationAppendixG * Constant::DegToRadians); + Real64 SinBldgRotAppGonly = std::sin(-state.dataHeatBal->BuildingRotationAppendixG * Constant::DegToRadians); - doTransform = false; - OldAspectRatio = 1.0; - NewAspectRatio = 1.0; + bool doTransform = false; + Real64 OldAspectRatio = 1.0; + Real64 NewAspectRatio = 1.0; CheckForGeometricTransform(state, doTransform, OldAspectRatio, NewAspectRatio); + auto &ip = state.dataInputProcessing->inputProcessor; auto const &ipsc = state.dataIPShortCut; ipsc->cCurrentModuleObject = "Output:IlluminanceMap"; int TotIllumMaps = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, ipsc->cCurrentModuleObject); - state.dataDaylightingData->IllumMap.allocate(TotIllumMaps); - state.dataDaylightingData->IllumMapCalc.allocate(TotIllumMaps); + dl->illumMaps.allocate(TotIllumMaps); if (TotIllumMaps > 0) { int IOStat; int NumAlpha; int NumNumber; for (int MapNum = 1; MapNum <= TotIllumMaps; ++MapNum) { - state.dataInputProcessing->inputProcessor->getObjectItem(state, - ipsc->cCurrentModuleObject, - MapNum, - ipsc->cAlphaArgs, - NumAlpha, - ipsc->rNumericArgs, - NumNumber, - IOStat, - ipsc->lNumericFieldBlanks, - ipsc->lAlphaFieldBlanks, - ipsc->cAlphaFieldNames, - ipsc->cNumericFieldNames); - - auto &illumMap = state.dataDaylightingData->IllumMap(MapNum); + ip->getObjectItem(state, + ipsc->cCurrentModuleObject, + MapNum, + ipsc->cAlphaArgs, + NumAlpha, + ipsc->rNumericArgs, + NumNumber, + IOStat, + ipsc->lNumericFieldBlanks, + ipsc->lAlphaFieldBlanks, + ipsc->cAlphaFieldNames, + ipsc->cNumericFieldNames); + + auto &illumMap = dl->illumMaps(MapNum); illumMap.Name = ipsc->cAlphaArgs(1); - illumMap.zoneIndex = Util::FindItemInList(ipsc->cAlphaArgs(2), Zone); + illumMap.zoneIndex = Util::FindItemInList(ipsc->cAlphaArgs(2), state.dataHeatBal->Zone); if (illumMap.zoneIndex == 0) { ShowSevereError(state, @@ -4253,9 +4035,6 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) } } - auto &illumMapCalc = state.dataDaylightingData->IllumMapCalc(MapNum); - illumMapCalc.zoneIndex = illumMap.zoneIndex; - illumMapCalc.enclIndex = illumMap.enclIndex; illumMap.Z = ipsc->rNumericArgs(1); illumMap.Xmin = ipsc->rNumericArgs(2); @@ -4271,11 +4050,7 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) ErrorsFound = true; } illumMap.Xnum = ipsc->rNumericArgs(4); - if (illumMap.Xnum != 1) { - illumMap.Xinc = (illumMap.Xmax - illumMap.Xmin) / (illumMap.Xnum - 1); - } else { - illumMap.Xinc = 0.0; - } + illumMap.Xinc = (illumMap.Xnum != 1) ? ((illumMap.Xmax - illumMap.Xmin) / (illumMap.Xnum - 1)) : 0.0; illumMap.Ymin = ipsc->rNumericArgs(5); illumMap.Ymax = ipsc->rNumericArgs(6); @@ -4290,11 +4065,8 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) ErrorsFound = true; } illumMap.Ynum = ipsc->rNumericArgs(7); - if (illumMap.Ynum != 1) { - illumMap.Yinc = (illumMap.Ymax - illumMap.Ymin) / (illumMap.Ynum - 1); - } else { - illumMap.Yinc = 0.0; - } + illumMap.Yinc = (illumMap.Ynum != 1) ? ((illumMap.Ymax - illumMap.Ymin) / (illumMap.Ynum - 1)) : 0.0; + if (illumMap.Xnum * illumMap.Ynum > MaxMapRefPoints) { ShowSevereError(state, format("{}=\"{}\", too many map points specified.", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); ShowContinueError(state, @@ -4309,32 +4081,32 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) } } // MapNum ipsc->cCurrentModuleObject = "OutputControl:IlluminanceMap:Style"; - int MapStyleIn = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, ipsc->cCurrentModuleObject); + int MapStyleIn = ip->getNumObjectsFound(state, ipsc->cCurrentModuleObject); if (MapStyleIn == 0) { ipsc->cAlphaArgs(1) = "COMMA"; - state.dataDaylightingData->MapColSep = DataStringGlobals::CharComma; // comma + dl->MapColSep = DataStringGlobals::CharComma; // comma } else if (MapStyleIn == 1) { - state.dataInputProcessing->inputProcessor->getObjectItem(state, - ipsc->cCurrentModuleObject, - 1, - ipsc->cAlphaArgs, - NumAlpha, - ipsc->rNumericArgs, - NumNumber, - IOStat, - ipsc->lNumericFieldBlanks, - ipsc->lAlphaFieldBlanks, - ipsc->cAlphaFieldNames, - ipsc->cNumericFieldNames); + ip->getObjectItem(state, + ipsc->cCurrentModuleObject, + 1, + ipsc->cAlphaArgs, + NumAlpha, + ipsc->rNumericArgs, + NumNumber, + IOStat, + ipsc->lNumericFieldBlanks, + ipsc->lAlphaFieldBlanks, + ipsc->cAlphaFieldNames, + ipsc->cNumericFieldNames); if (ipsc->cAlphaArgs(1) == "COMMA") { - state.dataDaylightingData->MapColSep = DataStringGlobals::CharComma; // comma + dl->MapColSep = DataStringGlobals::CharComma; // comma } else if (ipsc->cAlphaArgs(1) == "TAB") { - state.dataDaylightingData->MapColSep = DataStringGlobals::CharTab; // tab + dl->MapColSep = DataStringGlobals::CharTab; // tab } else if (ipsc->cAlphaArgs(1) == "FIXED" || ipsc->cAlphaArgs(1) == "SPACE") { - state.dataDaylightingData->MapColSep = DataStringGlobals::CharSpace; // space + dl->MapColSep = DataStringGlobals::CharSpace; // space } else { - state.dataDaylightingData->MapColSep = DataStringGlobals::CharComma; // comma + dl->MapColSep = DataStringGlobals::CharComma; // comma ShowWarningError(state, format("{}: invalid {}=\"{}\", Commas will be used to separate fields.", ipsc->cCurrentModuleObject, @@ -4351,187 +4123,160 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) } // Check for illuminance maps associated with this zone - for (int MapNum = 1; MapNum <= TotIllumMaps; ++MapNum) { - auto &illumMap = state.dataDaylightingData->IllumMap(MapNum); - auto &illumMapCalc = state.dataDaylightingData->IllumMapCalc(MapNum); - - if (illumMap.zoneIndex > 0) { - auto &zone = state.dataHeatBal->Zone(illumMap.zoneIndex); - // Calc cos and sin of Zone Relative North values for later use in transforming Reference Point coordinates - CosZoneRelNorth = std::cos(-zone.RelNorth * Constant::DegToRadians); - SinZoneRelNorth = std::sin(-zone.RelNorth * Constant::DegToRadians); - if (illumMap.Xnum * illumMap.Ynum > 0) { - // Add additional daylighting reference points for map - AddMapPoints = illumMap.Xnum * illumMap.Ynum; - illumMapCalc.TotalMapRefPoints = AddMapPoints; - illumMapCalc.MapRefPtAbsCoord.allocate(AddMapPoints); - illumMapCalc.MapRefPtAbsCoord = Vector3(0.0); - illumMapCalc.MapRefPtInBounds.allocate(AddMapPoints); - illumMapCalc.MapRefPtInBounds = true; - illumMapCalc.DaylIllumAtMapPt.allocate(AddMapPoints); - illumMapCalc.DaylIllumAtMapPt = 0.0; - illumMapCalc.DaylIllumAtMapPtHr.allocate(AddMapPoints); - illumMapCalc.DaylIllumAtMapPtHr = 0.0; - - if (AddMapPoints > MaxMapRefPoints) { - ShowSevereError(state, "GetDaylighting Parameters: Total Map Reference points entered is greater than maximum allowed."); - ShowContinueError(state, format("Occurs in Zone={}", zone.Name)); - ShowContinueError(state, - format("Maximum reference points allowed={}, entered amount ( when error first occurred )={}", - MaxMapRefPoints, - AddMapPoints)); - ErrorsFound = true; - break; - } - RefPt = 1; - // Calc cos and sin of Zone Relative North values for later use in transforming Map Point coordinates - // CosZoneRelNorth = std::cos( -zone.RelNorth * DegToRadians ); //Tuned These should not be changing - // SinZoneRelNorth = std::sin( -zone.RelNorth * DegToRadians ); - if (illumMap.Xnum != 1) { - illumMap.Xinc = (illumMap.Xmax - illumMap.Xmin) / (illumMap.Xnum - 1); + for (auto &illumMap : dl->illumMaps) { + + if (illumMap.zoneIndex == 0) continue; + + auto &zone = state.dataHeatBal->Zone(illumMap.zoneIndex); + // Calc cos and sin of Zone Relative North values for later use in transforming Reference Point coordinates + Real64 CosZoneRelNorth = std::cos(-zone.RelNorth * Constant::DegToRadians); + Real64 SinZoneRelNorth = std::sin(-zone.RelNorth * Constant::DegToRadians); + + if (illumMap.Xnum * illumMap.Ynum == 0) continue; + + // Add additional daylighting reference points for map + illumMap.TotalMapRefPoints = illumMap.Xnum * illumMap.Ynum; + illumMap.refPts.allocate(illumMap.TotalMapRefPoints); + for (auto &refPt : illumMap.refPts) { + new (&refPt) DaylMapPt(); + } + + if (illumMap.TotalMapRefPoints > MaxMapRefPoints) { + ShowSevereError(state, "GetDaylighting Parameters: Total Map Reference points entered is greater than maximum allowed."); + ShowContinueError(state, format("Occurs in Zone={}", zone.Name)); + ShowContinueError(state, + format("Maximum reference points allowed={}, entered amount ( when error first occurred )={}", + MaxMapRefPoints, + illumMap.TotalMapRefPoints)); + ErrorsFound = true; + break; + } + + // Calc cos and sin of Zone Relative North values for later use in transforming Map Point coordinates + // CosZoneRelNorth = std::cos( -zone.RelNorth * DegToRadians ); //Tuned These should not be changing + // SinZoneRelNorth = std::sin( -zone.RelNorth * DegToRadians ); + illumMap.Xinc = (illumMap.Xnum != 1) ? ((illumMap.Xmax - illumMap.Xmin) / (illumMap.Xnum - 1)) : 0.0; + illumMap.Yinc = (illumMap.Ynum != 1) ? ((illumMap.Ymax - illumMap.Ymin) / (illumMap.Ynum - 1)) : 0.0; + + // Map points and increments are stored in AbsCoord and then that is operated on if relative coords entered. + for (int Y = 1; Y <= illumMap.Ynum; ++Y) { + for (int X = 1; X <= illumMap.Xnum; ++X) { + int iRefPt = (Y - 1) * illumMap.Xnum + X; + auto &refPt = illumMap.refPts(iRefPt); + refPt.absCoords = {illumMap.Xmin + (X - 1) * illumMap.Xinc, illumMap.Ymin + (Y - 1) * illumMap.Yinc, illumMap.Z}; + } + } + + for (int Y = 1; Y <= illumMap.Ynum; ++Y) { + for (int X = 1; X <= illumMap.Xnum; ++X) { + int iRefPt = (Y - 1) * illumMap.Xnum + X; + auto &refPt = illumMap.refPts(iRefPt); + + if (!state.dataSurface->DaylRefWorldCoordSystem) { + Real64 Xb = refPt.absCoords.x * CosZoneRelNorth - refPt.absCoords.y * SinZoneRelNorth + zone.OriginX; + Real64 Yb = refPt.absCoords.x * SinZoneRelNorth + refPt.absCoords.y * CosZoneRelNorth + zone.OriginY; + refPt.absCoords.x = Xb * CosBldgRelNorth - Yb * SinBldgRelNorth; + refPt.absCoords.y = Xb * SinBldgRelNorth + Yb * CosBldgRelNorth; + refPt.absCoords.z += zone.OriginZ; + if (doTransform) { + Real64 Xo = refPt.absCoords.x; // world coordinates.... shifted by relative north angle... + Real64 Yo = refPt.absCoords.y; + // next derotate the building + Real64 XnoRot = Xo * CosBldgRelNorth + Yo * SinBldgRelNorth; + Real64 YnoRot = Yo * CosBldgRelNorth - Xo * SinBldgRelNorth; + // translate + Real64 Xtrans = XnoRot * std::sqrt(NewAspectRatio / OldAspectRatio); + Real64 Ytrans = YnoRot * std::sqrt(OldAspectRatio / NewAspectRatio); + // rerotate + refPt.absCoords.x = Xtrans * CosBldgRelNorth - Ytrans * SinBldgRelNorth; + + refPt.absCoords.y = Xtrans * SinBldgRelNorth + Ytrans * CosBldgRelNorth; + } } else { - illumMap.Xinc = 0.0; + Real64 Xb = refPt.absCoords.x; + Real64 Yb = refPt.absCoords.y; + refPt.absCoords.x = Xb * CosBldgRotAppGonly - Yb * SinBldgRotAppGonly; + refPt.absCoords.y = Xb * SinBldgRotAppGonly + Yb * CosBldgRotAppGonly; } - if (illumMap.Ynum != 1) { - illumMap.Yinc = (illumMap.Ymax - illumMap.Ymin) / (illumMap.Ynum - 1); - } else { - illumMap.Yinc = 0.0; + if (iRefPt == 1) { + illumMap.Xmin = refPt.absCoords.x; + illumMap.Ymin = refPt.absCoords.y; + illumMap.Xmax = refPt.absCoords.x; + illumMap.Ymax = refPt.absCoords.y; + illumMap.Z = refPt.absCoords.z; } - - // Map points and increments are stored in AbsCoord and then that is operated on if relative coords entered. - for (int Y = 1; Y <= illumMap.Ynum; ++Y) { - for (int X = 1; X <= illumMap.Xnum; ++X) { - illumMapCalc.MapRefPtAbsCoord(RefPt) = { - illumMap.Xmin + (X - 1) * illumMap.Xinc, illumMap.Ymin + (Y - 1) * illumMap.Yinc, illumMap.Z}; - ++RefPt; - } + illumMap.Xmin = min(illumMap.Xmin, refPt.absCoords.x); + illumMap.Ymin = min(illumMap.Ymin, refPt.absCoords.y); + illumMap.Xmax = max(illumMap.Xmax, refPt.absCoords.x); + illumMap.Ymax = max(illumMap.Ymax, refPt.absCoords.y); + if ((refPt.absCoords.x < zone.MinimumX && (zone.MinimumX - refPt.absCoords.x) > 0.001) || + (refPt.absCoords.x > zone.MaximumX && (refPt.absCoords.x - zone.MaximumX) > 0.001) || + (refPt.absCoords.y < zone.MinimumY && (zone.MinimumY - refPt.absCoords.y) > 0.001) || + (refPt.absCoords.y > zone.MaximumY && (refPt.absCoords.y - zone.MaximumY) > 0.001) || + (refPt.absCoords.z < zone.MinimumZ && (zone.MinimumZ - refPt.absCoords.z) > 0.001) || + (refPt.absCoords.z > zone.MaximumZ && (refPt.absCoords.z - zone.MaximumZ) > 0.001)) { + refPt.inBounds = false; } - RefPt = 1; - for (int Y = 1; Y <= illumMap.Ynum; ++Y) { - for (int X = 1; X <= illumMap.Xnum; ++X) { - auto &mapRefPtAbsCoord = illumMapCalc.MapRefPtAbsCoord(RefPt); - if (!state.dataSurface->DaylRefWorldCoordSystem) { - Xb = mapRefPtAbsCoord.x * CosZoneRelNorth - mapRefPtAbsCoord.y * SinZoneRelNorth + zone.OriginX; - Yb = mapRefPtAbsCoord.x * SinZoneRelNorth + mapRefPtAbsCoord.y * CosZoneRelNorth + zone.OriginY; - mapRefPtAbsCoord.x = Xb * CosBldgRelNorth - Yb * SinBldgRelNorth; - mapRefPtAbsCoord.y = Xb * SinBldgRelNorth + Yb * CosBldgRelNorth; - mapRefPtAbsCoord.z += zone.OriginZ; - if (doTransform) { - Xo = mapRefPtAbsCoord.x; // world coordinates.... shifted by relative north angle... - Yo = mapRefPtAbsCoord.y; - // next derotate the building - XnoRot = Xo * CosBldgRelNorth + Yo * SinBldgRelNorth; - YnoRot = Yo * CosBldgRelNorth - Xo * SinBldgRelNorth; - // translate - Xtrans = XnoRot * std::sqrt(NewAspectRatio / OldAspectRatio); - Ytrans = YnoRot * std::sqrt(OldAspectRatio / NewAspectRatio); - // rerotate - mapRefPtAbsCoord.x = Xtrans * CosBldgRelNorth - Ytrans * SinBldgRelNorth; - - mapRefPtAbsCoord.y = Xtrans * SinBldgRelNorth + Ytrans * CosBldgRelNorth; - } - } else { - Xb = mapRefPtAbsCoord.x; - Yb = mapRefPtAbsCoord.y; - mapRefPtAbsCoord.x = Xb * CosBldgRotAppGonly - Yb * SinBldgRotAppGonly; - mapRefPtAbsCoord.y = Xb * SinBldgRotAppGonly + Yb * CosBldgRotAppGonly; - } - if (RefPt == 1) { - illumMap.Xmin = mapRefPtAbsCoord.x; - illumMap.Ymin = mapRefPtAbsCoord.y; - illumMap.Xmax = mapRefPtAbsCoord.x; - illumMap.Ymax = mapRefPtAbsCoord.y; - illumMap.Z = mapRefPtAbsCoord.z; - } - illumMap.Xmin = min(illumMap.Xmin, mapRefPtAbsCoord.x); - illumMap.Ymin = min(illumMap.Ymin, mapRefPtAbsCoord.y); - illumMap.Xmax = max(illumMap.Xmax, mapRefPtAbsCoord.x); - illumMap.Ymax = max(illumMap.Ymax, mapRefPtAbsCoord.y); - if ((mapRefPtAbsCoord.x < zone.MinimumX && (zone.MinimumX - mapRefPtAbsCoord.x) > 0.001) || - (mapRefPtAbsCoord.x > zone.MaximumX && (mapRefPtAbsCoord.x - zone.MaximumX) > 0.001) || - (mapRefPtAbsCoord.y < zone.MinimumY && (zone.MinimumY - mapRefPtAbsCoord.y) > 0.001) || - (mapRefPtAbsCoord.y > zone.MaximumY && (mapRefPtAbsCoord.y - zone.MaximumY) > 0.001) || - (mapRefPtAbsCoord.z < zone.MinimumZ && (zone.MinimumZ - mapRefPtAbsCoord.z) > 0.001) || - (mapRefPtAbsCoord.z > zone.MaximumZ && (mapRefPtAbsCoord.z - zone.MaximumZ) > 0.001)) { - illumMapCalc.MapRefPtInBounds(RefPt) = false; - } - // Test extremes of Map Points against Zone Min/Max - if (RefPt == 1 || RefPt == illumMapCalc.TotalMapRefPoints) { - auto const &mapRefPtAbsCoord2 = illumMapCalc.MapRefPtAbsCoord(RefPt); - if ((mapRefPtAbsCoord2.x < zone.MinimumX || mapRefPtAbsCoord2.x > zone.MaximumX) && - !illumMapCalc.MapRefPtInBounds(RefPt)) { - ShowWarningError(state, - format("GetInputIlluminanceMap: Reference Map point #[{}], X Value outside Zone Min/Max X, Zone={}", - RefPt, - zone.Name)); - ShowContinueError(state, - format("...X Reference Point= {:.2R}, Zone Minimum X= {:.2R}, Zone Maximum X= {:.2R}", - mapRefPtAbsCoord2.x, - zone.MinimumX, - zone.MaximumX)); - if (mapRefPtAbsCoord2.x < zone.MinimumX) { - ShowContinueError( - state, format("...X Reference Distance Outside MinimumX= {:.4R} m.", zone.MinimumX - mapRefPtAbsCoord2.x)); - } else { - ShowContinueError( - state, format("...X Reference Distance Outside MaximumX= {:.4R} m.", mapRefPtAbsCoord2.x - zone.MaximumX)); - } - } - if ((mapRefPtAbsCoord2.y < zone.MinimumY || mapRefPtAbsCoord2.y > zone.MaximumY) && - !illumMapCalc.MapRefPtInBounds(RefPt)) { - ShowWarningError(state, - format("GetInputIlluminanceMap: Reference Map point #[{}], Y Value outside Zone Min/Max Y, Zone={}", - RefPt, - zone.Name)); - ShowContinueError(state, - format("...Y Reference Point= {:.2R}, Zone Minimum Y= {:.2R}, Zone Maximum Y= {:.2R}", - mapRefPtAbsCoord2.y, - zone.MinimumY, - zone.MaximumY)); - if (mapRefPtAbsCoord2.y < zone.MinimumY) { - ShowContinueError( - state, format("...Y Reference Distance Outside MinimumY= {:.4R} m.", zone.MinimumY - mapRefPtAbsCoord2.y)); - } else { - ShowContinueError( - state, format("...Y Reference Distance Outside MaximumY= {:.4R} m.", mapRefPtAbsCoord2.y - zone.MaximumY)); - } - } - if ((mapRefPtAbsCoord2.z < zone.MinimumZ || mapRefPtAbsCoord2.z > zone.MaximumZ) && - !illumMapCalc.MapRefPtInBounds(RefPt)) { - ShowWarningError(state, - format("GetInputIlluminanceMap: Reference Map point #[{}], Z Value outside Zone Min/Max Z, Zone={}", - RefPt, - zone.Name)); - ShowContinueError(state, - format("...Z Reference Point= {:.2R}, Zone Minimum Z= {:.2R}, Zone Maximum Z= {:.2R}", - mapRefPtAbsCoord2.z, - zone.MinimumZ, - zone.MaximumZ)); - if (mapRefPtAbsCoord2.z < zone.MinimumZ) { - ShowContinueError( - state, format("...Z Reference Distance Outside MinimumZ= {:.4R} m.", zone.MinimumZ - mapRefPtAbsCoord2.z)); - } else { - ShowContinueError( - state, format("...Z Reference Distance Outside MaximumZ= {:.4R} m.", mapRefPtAbsCoord2.z - zone.MaximumZ)); - } - } - } - ++RefPt; - } // X - } // Y - } - } - } // MapNum + // Test extremes of Map Points against Zone Min/Max + if (iRefPt != 1 && iRefPt != illumMap.TotalMapRefPoints) continue; + + if (refPt.inBounds) continue; + + if (refPt.absCoords.x < zone.MinimumX || refPt.absCoords.x > zone.MaximumX) { + ShowWarningError( + state, + format("GetInputIlluminanceMap: Reference Map point #[{}], X Value outside Zone Min/Max X, Zone={}", iRefPt, zone.Name)); + ShowContinueError(state, + format("...X Reference Point= {:.2R}, Zone Minimum X= {:.2R}, Zone Maximum X= {:.2R}", + refPt.absCoords.x, + zone.MinimumX, + zone.MaximumX)); + ShowContinueError( + state, + format("...X Reference Distance Outside MinimumX= {:.4R} m.", + (refPt.absCoords.x < zone.MinimumX) ? (zone.MinimumX - refPt.absCoords.x) : (refPt.absCoords.x - zone.MaximumX))); + } + if (refPt.absCoords.y < zone.MinimumY || refPt.absCoords.y > zone.MaximumY) { + ShowWarningError( + state, + format("GetInputIlluminanceMap: Reference Map point #[{}], Y Value outside Zone Min/Max Y, Zone={}", iRefPt, zone.Name)); + ShowContinueError(state, + format("...Y Reference Point= {:.2R}, Zone Minimum Y= {:.2R}, Zone Maximum Y= {:.2R}", + refPt.absCoords.y, + zone.MinimumY, + zone.MaximumY)); + ShowContinueError( + state, + format("...Y Reference Distance Outside MinimumY= {:.4R} m.", + (refPt.absCoords.y < zone.MinimumY) ? (zone.MinimumY - refPt.absCoords.y) : (refPt.absCoords.y - zone.MaximumY))); + } + if (refPt.absCoords.z < zone.MinimumZ || refPt.absCoords.z > zone.MaximumZ) { + ShowWarningError( + state, + format("GetInputIlluminanceMap: Reference Map point #[{}], Z Value outside Zone Min/Max Z, Zone={}", iRefPt, zone.Name)); + ShowContinueError(state, + format("...Z Reference Point= {:.2R}, Zone Minimum Z= {:.2R}, Zone Maximum Z= {:.2R}", + refPt.absCoords.z, + zone.MinimumZ, + zone.MaximumZ)); + ShowContinueError( + state, + format("...Z Reference Distance Outside MinimumZ= {:.4R} m.", + (refPt.absCoords.z < zone.MinimumZ) ? (zone.MinimumZ - refPt.absCoords.z) : (refPt.absCoords.z - zone.MaximumZ))); + } + } // for (X) + } // for (Y) + } // for (MapNum) ZoneMsgDone.dimension(state.dataGlobal->NumOfZones, false); - for (int MapNum = 1; MapNum <= TotIllumMaps; ++MapNum) { - auto const &illumMap = state.dataDaylightingData->IllumMap(MapNum); + for (auto const &illumMap : dl->illumMaps) { if (illumMap.zoneIndex == 0) continue; int enclNum = illumMap.enclIndex; - if (!state.dataDaylightingData->enclDaylight(enclNum).hasSplitFluxDaylighting && !ZoneMsgDone(illumMap.zoneIndex)) { + if (!dl->enclDaylight(enclNum).hasSplitFluxDaylighting && !ZoneMsgDone(illumMap.zoneIndex)) { ShowSevereError(state, - format("Zone Name in Output:IlluminanceMap is not used for Daylighting:Controls={}", Zone(illumMap.zoneIndex).Name)); + format("Zone Name in Output:IlluminanceMap is not used for Daylighting:Controls={}", + state.dataHeatBal->Zone(illumMap.zoneIndex).Name)); ErrorsFound = true; } } @@ -4542,12 +4287,11 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) "! ,Name,Zone,XMin {{m}},XMax {{m}},Xinc {{m}},#X Points,YMin " "{{m}},YMax {{m}},Yinc {{m}},#Y Points,Z {{m}}\n"); } - for (int MapNum = 1; MapNum <= TotIllumMaps; ++MapNum) { - auto const &illumMap = state.dataDaylightingData->IllumMap(MapNum); + for (auto const &illumMap : dl->illumMaps) { print(state.files.eio, "Daylighting:Illuminance Maps:Detail,{},{},{:.2R},{:.2R},{:.2R},{},{:.2R},{:.2R},{:.2R},{},{:.2R}\n", illumMap.Name, - Zone(illumMap.zoneIndex).Name, + state.dataHeatBal->Zone(illumMap.zoneIndex).Name, illumMap.Xmin, illumMap.Xmax, illumMap.Xinc, @@ -4560,7 +4304,7 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) } if (ErrorsFound) return; -} +} // GetInputIlluminanceMap() void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) { @@ -4569,6 +4313,8 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) // MODIFIED Glazer - July 2016 - Move geometry transformation portion, rearrange input, allow more than three reference points // Obtain the user input data for Daylighting:Controls object in the input file. + auto &dl = state.dataDayltg; + int IOStat; int NumAlpha; int NumNumber; @@ -4578,10 +4324,12 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) // constexpr Real64 FractionTolerance(4 * std::numeric_limits::epsilon()); // Instead, we use a 0.001 = 0.1% tolerance constexpr Real64 FractionTolerance(0.001); + + auto &ip = state.dataInputProcessing->inputProcessor; auto const &ipsc = state.dataIPShortCut; ipsc->cCurrentModuleObject = "Daylighting:Controls"; - int totDaylightingControls = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, ipsc->cCurrentModuleObject); - state.dataDaylightingData->daylightControl.allocate(totDaylightingControls); + int totDaylightingControls = ip->getNumObjectsFound(state, ipsc->cCurrentModuleObject); + dl->daylightControl.allocate(totDaylightingControls); Array1D spaceHasDaylightingControl; spaceHasDaylightingControl.dimension(state.dataGlobal->numSpaces, false); // Reset to zero in case this is called more than once in unit tests @@ -4591,19 +4339,19 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) for (int controlNum = 1; controlNum <= totDaylightingControls; ++controlNum) { ipsc->cAlphaArgs = ""; ipsc->rNumericArgs = 0.0; - state.dataInputProcessing->inputProcessor->getObjectItem(state, - ipsc->cCurrentModuleObject, - controlNum, - ipsc->cAlphaArgs, - NumAlpha, - ipsc->rNumericArgs, - NumNumber, - IOStat, - ipsc->lNumericFieldBlanks, - ipsc->lAlphaFieldBlanks, - ipsc->cAlphaFieldNames, - ipsc->cNumericFieldNames); - auto &daylightControl(state.dataDaylightingData->daylightControl(controlNum)); + ip->getObjectItem(state, + ipsc->cCurrentModuleObject, + controlNum, + ipsc->cAlphaArgs, + NumAlpha, + ipsc->rNumericArgs, + NumNumber, + IOStat, + ipsc->lNumericFieldBlanks, + ipsc->lAlphaFieldBlanks, + ipsc->cAlphaFieldNames, + ipsc->cNumericFieldNames); + auto &daylightControl = dl->daylightControl(controlNum); daylightControl.Name = ipsc->cAlphaArgs(1); // Is it a space or zone name? @@ -4662,7 +4410,7 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) } } - state.dataDaylightingData->enclDaylight(daylightControl.enclIndex).daylightControlIndexes.emplace_back(controlNum); + dl->enclDaylight(daylightControl.enclIndex).daylightControlIndexes.emplace_back(controlNum); daylightControl.ZoneName = state.dataHeatBal->Zone(daylightControl.zoneIndex).Name; if (ipsc->lAlphaFieldBlanks(3)) { @@ -4683,8 +4431,7 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) ShowContinueError(state, "SplitFlux assumed, and the simulation continues."); } } - state.dataDaylightingData->enclDaylight(daylightControl.enclIndex).hasSplitFluxDaylighting |= - (daylightControl.DaylightMethod == DaylightingMethod::SplitFlux); + dl->enclDaylight(daylightControl.enclIndex).hasSplitFluxDaylighting |= (daylightControl.DaylightMethod == DaylightingMethod::SplitFlux); if (!ipsc->lAlphaFieldBlanks(4)) { // Field: Availability Schedule Name daylightControl.AvailSchedNum = ScheduleManager::GetScheduleIndex(state, ipsc->cAlphaArgs(4)); @@ -4723,7 +4470,7 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) if (!ipsc->lAlphaFieldBlanks(6)) { // Field: Glare Calculation Daylighting Reference Point Name daylightControl.glareRefPtNumber = Util::FindItemInList(ipsc->cAlphaArgs(6), - state.dataDaylightingData->DaylRefPt, + dl->DaylRefPt, &RefPointData::Name); // Field: Glare Calculation Daylighting Reference Point Name if (daylightControl.glareRefPtNumber == 0) { ShowSevereError(state, @@ -4740,12 +4487,8 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) ShowContinueError(state, "No glare calculation performed, and the simulation continues."); } - if (!ipsc->lNumericFieldBlanks(5)) { - // Field: Glare Calculation Azimuth Angle of View Direction Clockwise from Zone y-Axis - daylightControl.ViewAzimuthForGlare = ipsc->rNumericArgs(5); - } else { - daylightControl.ViewAzimuthForGlare = 0.; - } + // Field: Glare Calculation Azimuth Angle of View Direction Clockwise from Zone y-Axis + daylightControl.ViewAzimuthForGlare = !ipsc->lNumericFieldBlanks(5) ? ipsc->rNumericArgs(5) : 0.0; daylightControl.MaxGlareallowed = ipsc->rNumericArgs(6); // Field: Maximum Allowable Discomfort Glare Index daylightControl.DElightGriddingResolution = ipsc->rNumericArgs(7); // Field: DElight Gridding Resolution @@ -4753,8 +4496,8 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) int curTotalDaylRefPts = NumAlpha - 6; // first six alpha fields are not part of extensible group daylightControl.TotalDaylRefPoints = curTotalDaylRefPts; state.dataViewFactor->EnclSolInfo(daylightControl.enclIndex).TotalEnclosureDaylRefPoints += curTotalDaylRefPts; - state.dataDaylightingData->ZoneDaylight(daylightControl.zoneIndex).totRefPts += curTotalDaylRefPts; - state.dataDaylightingData->maxRefPointsPerControl = max(state.dataDaylightingData->maxRefPointsPerControl, curTotalDaylRefPts); + dl->ZoneDaylight(daylightControl.zoneIndex).totRefPts += curTotalDaylRefPts; + dl->maxControlRefPoints = max(dl->maxControlRefPoints, curTotalDaylRefPts); if ((NumNumber - 7) / 2 != daylightControl.TotalDaylRefPoints) { ShowSevereError(state, format("{}The number of extensible numeric fields and alpha fields is inconsistent for: {}", @@ -4766,38 +4509,19 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) ipsc->cAlphaFieldNames(NumAlpha))); ErrorsFound = true; } - daylightControl.DaylRefPtNum.allocate(curTotalDaylRefPts); - daylightControl.FracZoneDaylit.allocate(curTotalDaylRefPts); - daylightControl.IllumSetPoint.allocate(curTotalDaylRefPts); - daylightControl.DaylIllumAtRefPt.allocate(curTotalDaylRefPts); - daylightControl.GlareIndexAtRefPt.allocate(curTotalDaylRefPts); - daylightControl.DaylRefPtAbsCoord.allocate(curTotalDaylRefPts); - daylightControl.DaylRefPtInBounds.allocate(curTotalDaylRefPts); - daylightControl.RefPtPowerReductionFactor.allocate(curTotalDaylRefPts); - daylightControl.BacLum.allocate(curTotalDaylRefPts); - daylightControl.TimeExceedingGlareIndexSPAtRefPt.allocate(curTotalDaylRefPts); - daylightControl.TimeExceedingDaylightIlluminanceSPAtRefPt.allocate(curTotalDaylRefPts); - - for (int refPt = 1; refPt <= curTotalDaylRefPts; ++refPt) { - daylightControl.DaylRefPtNum(refPt) = 0; - daylightControl.FracZoneDaylit(refPt) = 0.0; - daylightControl.IllumSetPoint(refPt) = 0.0; - daylightControl.DaylIllumAtRefPt(refPt) = 0.0; - daylightControl.GlareIndexAtRefPt(refPt) = 0.0; - daylightControl.DaylRefPtInBounds(refPt) = true; - daylightControl.RefPtPowerReductionFactor(refPt) = 1.0; - daylightControl.BacLum(refPt) = 0.0; - daylightControl.TimeExceedingGlareIndexSPAtRefPt(refPt) = 0.0; - daylightControl.TimeExceedingDaylightIlluminanceSPAtRefPt(refPt) = 0.0; - daylightControl.DaylRefPtAbsCoord(refPt) = {0.0, 0.0, 0.0}; + + daylightControl.refPts.allocate(curTotalDaylRefPts); + + for (auto &refPt : daylightControl.refPts) { + refPt = DaylRefPt(); } int countRefPts = 0; for (int refPtNum = 1; refPtNum <= curTotalDaylRefPts; ++refPtNum) { - daylightControl.DaylRefPtNum(refPtNum) = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(6 + refPtNum), - state.dataDaylightingData->DaylRefPt, - &RefPointData::Name); // Field: Daylighting Reference Point Name - if (daylightControl.DaylRefPtNum(refPtNum) == 0) { + auto &refPt = daylightControl.refPts(refPtNum); + refPt.num = + Util::FindItemInList(ipsc->cAlphaArgs(6 + refPtNum), dl->DaylRefPt, &RefPointData::Name); // Field: Daylighting Reference Point Name + if (refPt.num == 0) { ShowSevereError(state, format("{}: invalid {}=\"{}\" for object named: {}", ipsc->cCurrentModuleObject, @@ -4809,35 +4533,35 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) } else { ++countRefPts; } - daylightControl.FracZoneDaylit(refPtNum) = ipsc->rNumericArgs(6 + refPtNum * 2); // Field: Fraction Controlled by Reference Point - daylightControl.IllumSetPoint(refPtNum) = ipsc->rNumericArgs(7 + refPtNum * 2); // Field: Illuminance Setpoint at Reference Point + refPt.fracZoneDaylit = ipsc->rNumericArgs(6 + refPtNum * 2); // Field: Fraction Controlled by Reference Point + refPt.illumSetPoint = ipsc->rNumericArgs(7 + refPtNum * 2); // Field: Illuminance Setpoint at Reference Point if (daylightControl.DaylightMethod == DaylightingMethod::SplitFlux) { SetupOutputVariable(state, format("Daylighting Reference Point {} Illuminance", refPtNum), - OutputProcessor::Unit::lux, - daylightControl.DaylIllumAtRefPt(refPtNum), + Constant::Units::lux, + refPt.lums[iLum_Illum], OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, daylightControl.Name); SetupOutputVariable(state, format("Daylighting Reference Point {} Daylight Illuminance Setpoint Exceeded Time", refPtNum), - OutputProcessor::Unit::hr, - daylightControl.TimeExceedingDaylightIlluminanceSPAtRefPt(refPtNum), + Constant::Units::hr, + refPt.timeExceedingDaylightIlluminanceSetPoint, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, daylightControl.Name); SetupOutputVariable(state, format("Daylighting Reference Point {} Glare Index", refPtNum), - OutputProcessor::Unit::None, - daylightControl.GlareIndexAtRefPt(refPtNum), + Constant::Units::None, + refPt.glareIndex, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, daylightControl.Name); SetupOutputVariable(state, format("Daylighting Reference Point {} Glare Index Setpoint Exceeded Time", refPtNum), - OutputProcessor::Unit::hr, - daylightControl.TimeExceedingGlareIndexSPAtRefPt(refPtNum), + Constant::Units::hr, + refPt.timeExceedingGlareIndexSetPoint, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, daylightControl.Name); @@ -4850,7 +4574,10 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) ErrorsFound = true; } - Real64 sumFracs = sum(daylightControl.FracZoneDaylit); + Real64 sumFracs = 0.0; + for (auto const &refPt : daylightControl.refPts) + sumFracs += refPt.fracZoneDaylit; + daylightControl.sumFracLights = sumFracs; if ((1.0 - sumFracs) > FractionTolerance) { ShowWarningError(state, "GetDaylightingControls: Fraction of zone or space controlled by the Daylighting reference points is < 1.0."); @@ -4858,14 +4585,14 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) format("..discovered in {}=\"{}\", only {:.3R} of the zone or space is controlled.", ipsc->cCurrentModuleObject, daylightControl.Name, - sum(daylightControl.FracZoneDaylit))); + sumFracs)); } else if ((sumFracs - 1.0) > FractionTolerance) { ShowSevereError(state, "GetDaylightingControls: Fraction of zone or space controlled by the Daylighting reference points is > 1.0."); ShowContinueError(state, format("..discovered in {}=\"{}\", trying to control {:.3R} of the zone or space.", ipsc->cCurrentModuleObject, daylightControl.Name, - sum(daylightControl.FracZoneDaylit))); + sumFracs)); ErrorsFound = true; } @@ -4876,13 +4603,13 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) } SetupOutputVariable(state, "Daylighting Lighting Power Multiplier", - OutputProcessor::Unit::None, + Constant::Units::None, daylightControl.PowerReductionFactor, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, daylightControl.Name); } // for (controlNum) -} +} // GetDaylightingControls() void GeometryTransformForDaylighting(EnergyPlusData &state) { @@ -4890,188 +4617,158 @@ void GeometryTransformForDaylighting(EnergyPlusData &state) // DATE WRITTEN March 2002 // MODIFIED Glazer - July 2016 - separated this from GetInput function // For splitflux daylighting, transform the geometry - - std::string refName; - Real64 CosBldgRelNorth; // Cosine of Building rotation - Real64 SinBldgRelNorth; // Sine of Building rotation - Real64 CosZoneRelNorth; // Cosine of Zone rotation - Real64 SinZoneRelNorth; // Sine of Zone rotation - Real64 CosBldgRotAppGonly(0.0); // Cosine of the building rotation for appendix G only ( relative north ) - Real64 SinBldgRotAppGonly(0.0); // Sine of the building rotation for appendix G only ( relative north ) - Real64 Xb; // temp var for transformation calc - Real64 Yb; // temp var for transformation calc - Real64 Xo; - Real64 XnoRot; - Real64 Xtrans; - Real64 Yo; - Real64 YnoRot; - Real64 Ytrans; - bool doTransform; - Real64 OldAspectRatio; - Real64 NewAspectRatio; - Real64 rLightLevel; + auto &dl = state.dataDayltg; // Calc cos and sin of Building Relative North values for later use in transforming Reference Point coordinates - CosBldgRelNorth = std::cos(-(state.dataHeatBal->BuildingAzimuth + state.dataHeatBal->BuildingRotationAppendixG) * Constant::DegToRadians); - SinBldgRelNorth = std::sin(-(state.dataHeatBal->BuildingAzimuth + state.dataHeatBal->BuildingRotationAppendixG) * Constant::DegToRadians); + Real64 CosBldgRelNorth = std::cos(-(state.dataHeatBal->BuildingAzimuth + state.dataHeatBal->BuildingRotationAppendixG) * Constant::DegToRadians); + Real64 SinBldgRelNorth = std::sin(-(state.dataHeatBal->BuildingAzimuth + state.dataHeatBal->BuildingRotationAppendixG) * Constant::DegToRadians); // these are only for Building Rotation for Appendix G when using world coordinate system - CosBldgRotAppGonly = std::cos(-state.dataHeatBal->BuildingRotationAppendixG * Constant::DegToRadians); - SinBldgRotAppGonly = std::sin(-state.dataHeatBal->BuildingRotationAppendixG * Constant::DegToRadians); + Real64 CosBldgRotAppGonly = std::cos(-state.dataHeatBal->BuildingRotationAppendixG * Constant::DegToRadians); + Real64 SinBldgRotAppGonly = std::sin(-state.dataHeatBal->BuildingRotationAppendixG * Constant::DegToRadians); - doTransform = false; - OldAspectRatio = 1.0; - NewAspectRatio = 1.0; + bool doTransform = false; + Real64 OldAspectRatio = 1.0; + Real64 NewAspectRatio = 1.0; CheckForGeometricTransform(state, doTransform, OldAspectRatio, NewAspectRatio); - for (int controlNum = 1; controlNum <= (int)state.dataDaylightingData->daylightControl.size(); ++controlNum) { - auto &daylCntrl = state.dataDaylightingData->daylightControl(controlNum); - auto &zone(state.dataHeatBal->Zone(daylCntrl.zoneIndex)); + for (auto &daylCntrl : dl->daylightControl) { + auto &zone = state.dataHeatBal->Zone(daylCntrl.zoneIndex); // Calc cos and sin of Zone Relative North values for later use in transforming Reference Point coordinates - CosZoneRelNorth = std::cos(-zone.RelNorth * Constant::DegToRadians); - SinZoneRelNorth = std::sin(-zone.RelNorth * Constant::DegToRadians); + Real64 CosZoneRelNorth = std::cos(-zone.RelNorth * Constant::DegToRadians); + Real64 SinZoneRelNorth = std::sin(-zone.RelNorth * Constant::DegToRadians); - rLightLevel = InternalHeatGains::GetDesignLightingLevelForZone(state, daylCntrl.zoneIndex); + Real64 rLightLevel = InternalHeatGains::GetDesignLightingLevelForZone(state, daylCntrl.zoneIndex); InternalHeatGains::CheckLightsReplaceableMinMaxForZone(state, daylCntrl.zoneIndex); for (int refPtNum = 1; refPtNum <= daylCntrl.TotalDaylRefPoints; ++refPtNum) { - auto &curRefPt(state.dataDaylightingData->DaylRefPt(daylCntrl.DaylRefPtNum(refPtNum))); // get the active daylighting:referencepoint - curRefPt.indexToFracAndIllum = refPtNum; // back reference to the index to the ZoneDaylight structure arrays related to reference points + auto &refPt = daylCntrl.refPts(refPtNum); + auto &curRefPt = dl->DaylRefPt(refPt.num); // get the active daylighting:referencepoint + curRefPt.indexToFracAndIllum = refPtNum; // back reference to the index to the ZoneDaylight structure arrays related to reference points if (state.dataSurface->DaylRefWorldCoordSystem) { // transform only by appendix G rotation - daylCntrl.DaylRefPtAbsCoord(refPtNum).x = curRefPt.x * CosBldgRotAppGonly - curRefPt.y * SinBldgRotAppGonly; - daylCntrl.DaylRefPtAbsCoord(refPtNum).y = curRefPt.x * SinBldgRotAppGonly + curRefPt.y * CosBldgRotAppGonly; - daylCntrl.DaylRefPtAbsCoord(refPtNum).z = curRefPt.z; + refPt.absCoords.x = curRefPt.coords.x * CosBldgRotAppGonly - curRefPt.coords.y * SinBldgRotAppGonly; + refPt.absCoords.y = curRefPt.coords.x * SinBldgRotAppGonly + curRefPt.coords.y * CosBldgRotAppGonly; + refPt.absCoords.z = curRefPt.coords.z; } else { // Transform reference point coordinates into building coordinate system - Xb = curRefPt.x * CosZoneRelNorth - curRefPt.y * SinZoneRelNorth + zone.OriginX; - Yb = curRefPt.x * SinZoneRelNorth + curRefPt.y * CosZoneRelNorth + zone.OriginY; + Real64 Xb = curRefPt.coords.x * CosZoneRelNorth - curRefPt.coords.y * SinZoneRelNorth + zone.OriginX; + Real64 Yb = curRefPt.coords.x * SinZoneRelNorth + curRefPt.coords.y * CosZoneRelNorth + zone.OriginY; // Transform into World Coordinate System - daylCntrl.DaylRefPtAbsCoord(refPtNum).x = Xb * CosBldgRelNorth - Yb * SinBldgRelNorth; - daylCntrl.DaylRefPtAbsCoord(refPtNum).y = Xb * SinBldgRelNorth + Yb * CosBldgRelNorth; - daylCntrl.DaylRefPtAbsCoord(refPtNum).z = curRefPt.z + zone.OriginZ; + refPt.absCoords.x = Xb * CosBldgRelNorth - Yb * SinBldgRelNorth; + refPt.absCoords.y = Xb * SinBldgRelNorth + Yb * CosBldgRelNorth; + refPt.absCoords.z = curRefPt.coords.z + zone.OriginZ; if (doTransform) { - Xo = daylCntrl.DaylRefPtAbsCoord(refPtNum).x; // world coordinates.... shifted by relative north angle... - Yo = daylCntrl.DaylRefPtAbsCoord(refPtNum).y; + Real64 Xo = refPt.absCoords.x; // world coordinates.... shifted by relative north angle... + Real64 Yo = refPt.absCoords.y; // next derotate the building - XnoRot = Xo * CosBldgRelNorth + Yo * SinBldgRelNorth; - YnoRot = Yo * CosBldgRelNorth - Xo * SinBldgRelNorth; + Real64 XnoRot = Xo * CosBldgRelNorth + Yo * SinBldgRelNorth; + Real64 YnoRot = Yo * CosBldgRelNorth - Xo * SinBldgRelNorth; // translate - Xtrans = XnoRot * std::sqrt(NewAspectRatio / OldAspectRatio); - Ytrans = YnoRot * std::sqrt(OldAspectRatio / NewAspectRatio); + Real64 Xtrans = XnoRot * std::sqrt(NewAspectRatio / OldAspectRatio); + Real64 Ytrans = YnoRot * std::sqrt(OldAspectRatio / NewAspectRatio); // rerotate - daylCntrl.DaylRefPtAbsCoord(refPtNum).x = Xtrans * CosBldgRelNorth - Ytrans * SinBldgRelNorth; - daylCntrl.DaylRefPtAbsCoord(refPtNum).y = Xtrans * SinBldgRelNorth + Ytrans * CosBldgRelNorth; + refPt.absCoords.x = Xtrans * CosBldgRelNorth - Ytrans * SinBldgRelNorth; + refPt.absCoords.y = Xtrans * SinBldgRelNorth + Ytrans * CosBldgRelNorth; } } - refName = curRefPt.Name; - OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchDyLtZone, refName, daylCntrl.ZoneName); - OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchDyLtCtrlName, refName, daylCntrl.Name); + + auto &orp = state.dataOutRptPredefined; + OutputReportPredefined::PreDefTableEntry(state, orp->pdchDyLtZone, curRefPt.Name, daylCntrl.ZoneName); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchDyLtCtrlName, curRefPt.Name, daylCntrl.Name); if (daylCntrl.DaylightMethod == DaylightingMethod::SplitFlux) { - OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchDyLtKind, refName, "SplitFlux"); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchDyLtKind, curRefPt.Name, "SplitFlux"); } else { - OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchDyLtKind, refName, "DElight"); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchDyLtKind, curRefPt.Name, "DElight"); } // ( 1=continuous, 2=stepped, 3=continuous/off ) if (daylCntrl.LightControlType == LtgCtrlType::Continuous) { - OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchDyLtCtrlType, refName, "Continuous"); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchDyLtCtrlType, curRefPt.Name, "Continuous"); } else if (daylCntrl.LightControlType == LtgCtrlType::Stepped) { - OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchDyLtCtrlType, refName, "Stepped"); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchDyLtCtrlType, curRefPt.Name, "Stepped"); } else if (daylCntrl.LightControlType == LtgCtrlType::ContinuousOff) { - OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchDyLtCtrlType, refName, "Continuous/Off"); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchDyLtCtrlType, curRefPt.Name, "Continuous/Off"); } - OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchDyLtFrac, refName, daylCntrl.FracZoneDaylit(refPtNum)); - OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchDyLtWInst, refName, rLightLevel); - OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchDyLtWCtrl, refName, rLightLevel * daylCntrl.FracZoneDaylit(refPtNum)); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchDyLtFrac, curRefPt.Name, refPt.fracZoneDaylit); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchDyLtWInst, curRefPt.Name, rLightLevel); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchDyLtWCtrl, curRefPt.Name, rLightLevel * refPt.fracZoneDaylit); - if (daylCntrl.DaylRefPtAbsCoord(refPtNum).x < zone.MinimumX || daylCntrl.DaylRefPtAbsCoord(refPtNum).x > zone.MaximumX) { - daylCntrl.DaylRefPtInBounds(refPtNum) = false; + if (refPt.absCoords.x < zone.MinimumX || refPt.absCoords.x > zone.MaximumX) { + refPt.inBounds = false; ShowWarningError(state, format("GeometryTransformForDaylighting: Reference point X Value outside Zone Min/Max X, Zone={}", zone.Name)); ShowContinueError(state, format("...X Reference Point= {:.2R}, Zone Minimum X= {:.2R}, Zone Maximum X= {:.2R}", - daylCntrl.DaylRefPtAbsCoord(refPtNum).x, + refPt.absCoords.x, zone.MinimumX, zone.MaximumX)); - if (daylCntrl.DaylRefPtAbsCoord(refPtNum).x < zone.MinimumX) { - ShowContinueError( - state, - format("...X Reference Distance Outside MinimumX= {:.4R} m.", zone.MinimumX - daylCntrl.DaylRefPtAbsCoord(refPtNum).x)); - } else { - ShowContinueError( - state, - format("...X Reference Distance Outside MaximumX= {:.4R} m.", daylCntrl.DaylRefPtAbsCoord(refPtNum).x - zone.MaximumX)); - } + ShowContinueError( + state, + format("...X Reference Distance Outside MinimumX= {:.4R} m.", + (refPt.absCoords.x < zone.MinimumX) ? (zone.MinimumX - refPt.absCoords.x) : (refPt.absCoords.x - zone.MaximumX))); } - if (daylCntrl.DaylRefPtAbsCoord(refPtNum).y < zone.MinimumY || daylCntrl.DaylRefPtAbsCoord(refPtNum).y > zone.MaximumY) { - daylCntrl.DaylRefPtInBounds(refPtNum) = false; + if (refPt.absCoords.y < zone.MinimumY || refPt.absCoords.y > zone.MaximumY) { + refPt.inBounds = false; ShowWarningError(state, format("GeometryTransformForDaylighting: Reference point Y Value outside Zone Min/Max Y, Zone={}", zone.Name)); ShowContinueError(state, format("...Y Reference Point= {:.2R}, Zone Minimum Y= {:.2R}, Zone Maximum Y= {:.2R}", - daylCntrl.DaylRefPtAbsCoord(refPtNum).x, + refPt.absCoords.x, zone.MinimumY, zone.MaximumY)); - if (daylCntrl.DaylRefPtAbsCoord(refPtNum).y < zone.MinimumY) { - ShowContinueError( - state, - format("...Y Reference Distance Outside MinimumY= {:.4R} m.", zone.MinimumY - daylCntrl.DaylRefPtAbsCoord(refPtNum).y)); - } else { - ShowContinueError( - state, - format("...Y Reference Distance Outside MaximumY= {:.4R} m.", daylCntrl.DaylRefPtAbsCoord(refPtNum).y - zone.MaximumY)); - } + ShowContinueError( + state, + format("...Y Reference Distance Outside MinimumY= {:.4R} m.", + (refPt.absCoords.y < zone.MinimumY) ? (zone.MinimumY - refPt.absCoords.y) : (refPt.absCoords.y - zone.MaximumY))); } - if (daylCntrl.DaylRefPtAbsCoord(refPtNum).z < zone.MinimumZ || daylCntrl.DaylRefPtAbsCoord(refPtNum).z > zone.MaximumZ) { - daylCntrl.DaylRefPtInBounds(refPtNum) = false; + if (refPt.absCoords.z < zone.MinimumZ || refPt.absCoords.z > zone.MaximumZ) { + refPt.inBounds = false; ShowWarningError(state, format("GeometryTransformForDaylighting: Reference point Z Value outside Zone Min/Max Z, Zone={}", zone.Name)); ShowContinueError(state, format("...Z Reference Point= {:.2R}, Zone Minimum Z= {:.2R}, Zone Maximum Z= {:.2R}", - daylCntrl.DaylRefPtAbsCoord(refPtNum).z, + refPt.absCoords.z, zone.MinimumZ, zone.MaximumZ)); - if (daylCntrl.DaylRefPtAbsCoord(refPtNum).z < zone.MinimumZ) { - ShowContinueError( - state, - format("...Z Reference Distance Outside MinimumZ= {:.4R} m.", zone.MinimumZ - daylCntrl.DaylRefPtAbsCoord(refPtNum).z)); - } else { - ShowContinueError( - state, - format("...Z Reference Distance Outside MaximumZ= {:.4R} m.", daylCntrl.DaylRefPtAbsCoord(refPtNum).z - zone.MaximumZ)); - } + ShowContinueError( + state, + format("...Z Reference Distance Outside MinimumZ= {:.4R} m.", + (refPt.absCoords.z < zone.MinimumZ) ? (zone.MinimumZ - refPt.absCoords.z) : (refPt.absCoords.z - zone.MaximumZ))); } - } // for (refPtNum) reference point - } // for (controlNum) daylighting control -} + } // for (refPt) + } // for (daylightCtrl) +} // GeometryTransformForDaylighting() void GetInputDayliteRefPt(EnergyPlusData &state, bool &ErrorsFound) { // Perform GetInput function for the Daylighting:ReferencePoint object // Glazer - July 2016 + auto &dl = state.dataDayltg; + auto &ip = state.dataInputProcessing->inputProcessor; + auto const &ipsc = state.dataIPShortCut; + ipsc->cCurrentModuleObject = "Daylighting:ReferencePoint"; int RefPtNum = 0; int IOStat; int NumAlpha; int NumNumber; - auto const &ipsc = state.dataIPShortCut; - ipsc->cCurrentModuleObject = "Daylighting:ReferencePoint"; - int TotRefPoints = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, ipsc->cCurrentModuleObject); - state.dataDaylightingData->DaylRefPt.allocate(TotRefPoints); - for (auto &pt : state.dataDaylightingData->DaylRefPt) { - state.dataInputProcessing->inputProcessor->getObjectItem(state, - ipsc->cCurrentModuleObject, - ++RefPtNum, - ipsc->cAlphaArgs, - NumAlpha, - ipsc->rNumericArgs, - NumNumber, - IOStat, - ipsc->lNumericFieldBlanks, - ipsc->lAlphaFieldBlanks, - ipsc->cAlphaFieldNames, - ipsc->cNumericFieldNames); + + int TotRefPoints = ip->getNumObjectsFound(state, ipsc->cCurrentModuleObject); + + dl->DaylRefPt.allocate(TotRefPoints); + for (auto &pt : dl->DaylRefPt) { + ip->getObjectItem(state, + ipsc->cCurrentModuleObject, + ++RefPtNum, + ipsc->cAlphaArgs, + NumAlpha, + ipsc->rNumericArgs, + NumNumber, + IOStat, + ipsc->lNumericFieldBlanks, + ipsc->lAlphaFieldBlanks, + ipsc->cAlphaFieldNames, + ipsc->cNumericFieldNames); pt.Name = ipsc->cAlphaArgs(1); pt.ZoneNum = Util::FindItemInList(ipsc->cAlphaArgs(2), state.dataHeatBal->Zone); if (pt.ZoneNum == 0) { @@ -5088,15 +4785,14 @@ void GetInputDayliteRefPt(EnergyPlusData &state, bool &ErrorsFound) pt.ZoneNum = state.dataHeatBal->space(spaceNum).zoneNum; } } - pt.x = ipsc->rNumericArgs(1); - pt.y = ipsc->rNumericArgs(2); - pt.z = ipsc->rNumericArgs(3); + pt.coords = {ipsc->rNumericArgs(1), ipsc->rNumericArgs(2), ipsc->rNumericArgs(3)}; } } bool doesDayLightingUseDElight(EnergyPlusData &state) { - for (auto const &znDayl : state.dataDaylightingData->daylightControl) { + auto &dl = state.dataDayltg; + for (auto const &znDayl : dl->daylightControl) { if (znDayl.DaylightMethod == DaylightingMethod::DElight) { return true; } @@ -5121,53 +4817,44 @@ void CheckTDDsAndLightShelvesInDaylitZones(EnergyPlusData &state) // loop thru daylighting devices and check that their zones have daylight controls // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int SurfNum; // daylight device surface number - bool ErrorsFound; - - ErrorsFound = false; + bool ErrorsFound = false; - for (int PipeNum = 1; PipeNum <= (int)state.dataDaylightingDevicesData->TDDPipe.size(); ++PipeNum) { - SurfNum = state.dataDaylightingDevicesData->TDDPipe(PipeNum).Diffuser; + for (auto const &pipe : state.dataDaylightingDevicesData->TDDPipe) { + int SurfNum = pipe.Diffuser; if (SurfNum > 0) { int const pipeEnclNum = state.dataSurface->Surface(SurfNum).SolarEnclIndex; if (state.dataViewFactor->EnclSolInfo(pipeEnclNum).TotalEnclosureDaylRefPoints == 0) { ShowWarningError(state, format("DaylightingDevice:Tubular = {}: is not connected to a Zone that has Daylighting, no visible transmittance " "will be modeled through the daylighting device.", - state.dataDaylightingDevicesData->TDDPipe(PipeNum).Name)); + pipe.Name)); } - } else { // SurfNum == 0 // should not come here (would have already been caught in TDD get input), but is an error - ShowSevereError( - state, - format("DaylightingDevice:Tubular = {}: Diffuser surface not found ", state.dataDaylightingDevicesData->TDDPipe(PipeNum).Name)); + ShowSevereError(state, format("DaylightingDevice:Tubular = {}: Diffuser surface not found ", pipe.Name)); ErrorsFound = true; } - } // PipeNum + } // for (pipe) - for (int ShelfNum = 1; ShelfNum <= (int)state.dataDaylightingDevicesData->Shelf.size(); ++ShelfNum) { - SurfNum = state.dataDaylightingDevicesData->Shelf(ShelfNum).Window; - if (SurfNum == 0) { + for (auto const &shelf : state.dataDaylightingDevicesData->Shelf) { + if (shelf.Window == 0) { // should not come here (would have already been caught in shelf get input), but is an error - ShowSevereError(state, - format("DaylightingDevice:Shelf = {}: window not found ", state.dataDaylightingDevicesData->Shelf(ShelfNum).Name)); + ShowSevereError(state, format("DaylightingDevice:Shelf = {}: window not found ", shelf.Name)); ErrorsFound = true; } - } // ShelfNum + } // for (shelf) if (ErrorsFound) ShowFatalError(state, "CheckTDDsAndLightShelvesInDaylitZones: Errors in DAYLIGHTING input."); } void AssociateWindowShadingControlWithDaylighting(EnergyPlusData &state) { - for (int iShadeCtrl = 1; iShadeCtrl <= state.dataSurface->TotWinShadingControl; ++iShadeCtrl) { - auto &winShadeControl = state.dataSurface->WindowShadingControl(iShadeCtrl); + auto &dl = state.dataDayltg; + for (auto &winShadeControl : state.dataSurface->WindowShadingControl) { if (winShadeControl.DaylightingControlName.empty()) continue; int found = -1; - for (int daylightCtrlNum = 1; daylightCtrlNum <= (int)state.dataDaylightingData->daylightControl.size(); ++daylightCtrlNum) { - if (Util::SameString(state.dataSurface->WindowShadingControl(iShadeCtrl).DaylightingControlName, - state.dataDaylightingData->daylightControl(daylightCtrlNum).Name)) { + for (int daylightCtrlNum = 1; daylightCtrlNum <= (int)dl->daylightControl.size(); ++daylightCtrlNum) { + if (Util::SameString(winShadeControl.DaylightingControlName, dl->daylightControl(daylightCtrlNum).Name)) { found = daylightCtrlNum; break; } @@ -5182,7 +4869,7 @@ void AssociateWindowShadingControlWithDaylighting(EnergyPlusData &state) winShadeControl.DaylightingControlName)); } } -} +} // AssociateWindowShadingControlWithDaylighting() void GetLightWellData(EnergyPlusData &state, bool &ErrorsFound) // If errors found in input { @@ -5203,106 +4890,91 @@ void GetLightWellData(EnergyPlusData &state, bool &ErrorsFound) // If errors fou // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int IOStat; // IO Status when calling get input subroutine - int NumAlpha; // Number of alpha names being passed - int NumProp; // Number of properties being passed - int TotLightWells; // Total Light Well objects - Real64 HeightWell; // Well height (from window to bottom of well) (m) - Real64 PerimWell; // Well perimeter (at bottom of well) (m) - Real64 AreaWell; // Well area (at bottom of well) (m2) - Real64 VisReflWell; // Area-weighted visible reflectance of well walls - Real64 WellCavRatio; // Well cavity ratio + int IOStat; // IO Status when calling get input subroutine + int NumAlpha; // Number of alpha names being passed + int NumProp; // Number of properties being passed + int TotLightWells; // Total Light Well objects + auto &ip = state.dataInputProcessing->inputProcessor; auto const &ipsc = state.dataIPShortCut; + // Get the total number of Light Well objects ipsc->cCurrentModuleObject = "DaylightingDevice:LightWell"; - TotLightWells = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, ipsc->cCurrentModuleObject); + TotLightWells = ip->getNumObjectsFound(state, ipsc->cCurrentModuleObject); if (TotLightWells == 0) return; for (int loop = 1; loop <= TotLightWells; ++loop) { - state.dataInputProcessing->inputProcessor->getObjectItem(state, - ipsc->cCurrentModuleObject, - loop, - ipsc->cAlphaArgs, - NumAlpha, - ipsc->rNumericArgs, - NumProp, - IOStat, - ipsc->lNumericFieldBlanks, - ipsc->lAlphaFieldBlanks, - ipsc->cAlphaFieldNames, - ipsc->cNumericFieldNames); + ip->getObjectItem(state, + ipsc->cCurrentModuleObject, + loop, + ipsc->cAlphaArgs, + NumAlpha, + ipsc->rNumericArgs, + NumProp, + IOStat, + ipsc->lNumericFieldBlanks, + ipsc->lAlphaFieldBlanks, + ipsc->cAlphaFieldNames, + ipsc->cNumericFieldNames); int SurfNum = Util::FindItemInList(ipsc->cAlphaArgs(1), state.dataSurface->Surface); if (SurfNum == 0) { ShowSevereError(state, format("{}: invalid {}=\"{}\" not found.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), ipsc->cAlphaArgs(1))); + ErrorsFound = true; + continue; } + auto const &surf = state.dataSurface->Surface(SurfNum); + auto &surfWin = state.dataSurface->SurfaceWindow(SurfNum); // Check that associated surface is an exterior window // True if associated surface is not an exterior window - if (SurfNum != 0) { - bool WrongSurfaceType = false; - if (state.dataSurface->Surface(SurfNum).Class != SurfaceClass::Window && - state.dataSurface->Surface(SurfNum).ExtBoundCond != ExternalEnvironment) - WrongSurfaceType = true; - if (WrongSurfaceType) { - ShowSevereError(state, - format("{}: invalid {}=\"{}\" - not an exterior window.", - ipsc->cCurrentModuleObject, - ipsc->cAlphaFieldNames(1), - ipsc->cAlphaArgs(1))); - ErrorsFound = true; - } + if (surf.Class != SurfaceClass::Window && surf.ExtBoundCond != ExternalEnvironment) { + ShowSevereError( + state, + format( + "{}: invalid {}=\"{}\" - not an exterior window.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), ipsc->cAlphaArgs(1))); + ErrorsFound = true; + continue; } - if (!ErrorsFound) { - - // Associated surface is an exterior window; calculate light well efficiency. - - state.dataSurface->SurfWinLightWellEff(SurfNum) = 1.0; - HeightWell = ipsc->rNumericArgs(1); - PerimWell = ipsc->rNumericArgs(2); - AreaWell = ipsc->rNumericArgs(3); - VisReflWell = ipsc->rNumericArgs(4); + // Associated surface is an exterior window; calculate light well efficiency. + surfWin.lightWellEff = 1.0; + Real64 HeightWell = ipsc->rNumericArgs(1); // Well height (from window to bottom of well) (m) + Real64 PerimWell = ipsc->rNumericArgs(2); // Well perimeter (at bottom of well) (m) + Real64 AreaWell = ipsc->rNumericArgs(3); // Well area (at bottom of well) (m2) + Real64 VisReflWell = ipsc->rNumericArgs(4); // Area-weighted visible reflectance of well walls - // Warning if light well area is less than window area - if (AreaWell < (state.dataSurface->Surface(SurfNum).Area + state.dataSurface->SurfWinDividerArea(SurfNum) - 0.1)) { - ShowSevereError(state, - format("{}: invalid {}=\"{}\" - Areas.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), ipsc->cAlphaArgs(1))); - ShowContinueError(state, - format("has Area of Bottom of Well={:.1R} that is less than window area={:.1R}", - state.dataSurface->Surface(SurfNum).Area, - AreaWell)); - } - - if (HeightWell >= 0.0 && PerimWell > 0.0 && AreaWell > 0.0) { - WellCavRatio = 2.5 * HeightWell * PerimWell / AreaWell; - state.dataSurface->SurfWinLightWellEff(SurfNum) = std::exp(-WellCavRatio * (0.16368 - 0.14467 * VisReflWell)); - } + // Warning if light well area is less than window area + if (AreaWell < (surf.Area + state.dataSurface->SurfWinDividerArea(SurfNum) - 0.1)) { + ShowSevereError(state, + format("{}: invalid {}=\"{}\" - Areas.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), ipsc->cAlphaArgs(1))); + ShowContinueError(state, format("has Area of Bottom of Well={:.1R} that is less than window area={:.1R}", surf.Area, AreaWell)); } + if (HeightWell >= 0.0 && PerimWell > 0.0 && AreaWell > 0.0) { + Real64 WellCavRatio = 2.5 * HeightWell * PerimWell / AreaWell; + surfWin.lightWellEff = std::exp(-WellCavRatio * (0.16368 - 0.14467 * VisReflWell)); + } } // End of loop over light well objects -} +} // GetLightWellData() inline int findWinShadingStatus(EnergyPlusData &state, int const IWin) { // Return the window shading status, 1=unshaded, 2=shaded - int WinShadingIndex = 1; bool WinShadedNoGlareControl = IS_SHADED_NO_GLARE_CTRL(state.dataSurface->SurfWinShadingFlag(IWin)); - if ((state.dataSurface->SurfWinWindowModelType(IWin) != WindowModel::BSDF) && - (WinShadedNoGlareControl || state.dataSurface->SurfWinSolarDiffusing(IWin))) { - WinShadingIndex = 2; - } - return WinShadingIndex; + + return ((state.dataSurface->SurfWinWindowModelType(IWin) != WindowModel::BSDF) && + (WinShadedNoGlareControl || state.dataSurface->SurfWinSolarDiffusing(IWin))) + ? 2 + : 1; } -void DayltgGlare(EnergyPlusData &state, - int IL, // Reference point index: 1=first ref pt, 2=second ref pt - Real64 BLUM, // Window background (surround) luminance (cd/m2) - Real64 &GLINDX, // Glare index - int const daylightCtrlNum // Current daylighting control number +Real64 DayltgGlare(EnergyPlusData &state, + int IL, // Reference point index: 1=first ref pt, 2=second ref pt + Real64 BLUM, // Window background (surround) luminance (cd/m2) + int const daylightCtrlNum // Current daylighting control number ) { @@ -5327,29 +4999,27 @@ void DayltgGlare(EnergyPlusData &state, Real64 GTOT = 0.0; // Glare constant + auto &dl = state.dataDayltg; + // Loop over exterior windows associated with zone - auto &thisDaylightControl = state.dataDaylightingData->daylightControl(daylightCtrlNum); - auto &thisEnclDaylight = state.dataDaylightingData->enclDaylight(thisDaylightControl.enclIndex); + auto &thisDayltgCtrl = dl->daylightControl(daylightCtrlNum); + auto &thisEnclDaylight = dl->enclDaylight(thisDayltgCtrl.enclIndex); for (int loop = 1; loop <= thisEnclDaylight.NumOfDayltgExtWins; ++loop) { int IWin = thisEnclDaylight.DayltgExtWinSurfNums(loop); int WinShadingIndex = findWinShadingStatus(state, IWin); // Conversion from ft-L to cd/m2, with cd/m2 = 0.2936 ft-L, gives the 0.4794 factor // below, which is (0.2936)**0.6 - Real64 GTOT1 = 0.4794 * (std::pow(thisDaylightControl.SourceLumFromWinAtRefPt(loop, IL)[WinShadingIndex - 1], 1.6)) * - std::pow(thisDaylightControl.SolidAngAtRefPtWtd(loop, IL), 0.8); - Real64 GTOT2 = BLUM + 0.07 * (std::sqrt(thisDaylightControl.SolidAngAtRefPt(loop, IL))) * - thisDaylightControl.SourceLumFromWinAtRefPt(loop, IL)[WinShadingIndex - 1]; + auto const &extWin = thisDayltgCtrl.refPts(IL).extWins(loop); + Real64 GTOT1 = 0.4794 * (std::pow(extWin.lums[iLum_Source][WinShadingIndex - 1], 1.6)) * std::pow(extWin.solidAngWtd, 0.8); + Real64 GTOT2 = BLUM + 0.07 * std::sqrt(extWin.solidAng) * extWin.lums[iLum_Source][WinShadingIndex - 1]; GTOT += GTOT1 / (GTOT2 + 0.000001); } // Glare index (adding 0.000001 prevents LOG10 (0)) - GLINDX = 10.0 * std::log10(GTOT + 0.000001); - // Set glare index to zero for GTOT < 1 - GLINDX = max(0.0, GLINDX); + return max(0.0, 10.0 * std::log10(GTOT + 0.000001)); } void DayltgGlareWithIntWins(EnergyPlusData &state, - Array1D &GLINDX, // Glare index int const daylightCtrlNum // Current daylighting control number ) { @@ -5369,18 +5039,19 @@ void DayltgGlareWithIntWins(EnergyPlusData &state, // REFERENCES: // Based on subroutine DayltgGlare. - Real64 GTOT = 0.0; // Glare constant(?) + Real64 GTOT = 0.0; // Glare constant(?) // TODO: does this need to be reset for every refPt? // Calculate background luminance including effect of inter-reflected illuminance from light // entering zone through its interior windows - - auto &thisDaylightControl = state.dataDaylightingData->daylightControl(daylightCtrlNum); - auto &thisEnclDaylight = state.dataDaylightingData->enclDaylight(thisDaylightControl.enclIndex); - int RefPoints = thisDaylightControl.TotalDaylRefPoints; // Number of daylighting reference points in zone + auto &dl = state.dataDayltg; + auto &thisDayltgCtrl = dl->daylightControl(daylightCtrlNum); + auto &thisEnclDaylight = dl->enclDaylight(thisDayltgCtrl.enclIndex); + int RefPoints = thisDayltgCtrl.TotalDaylRefPoints; // Number of daylighting reference points in zone for (int IL = 1; IL <= RefPoints; ++IL) { - Real64 BackgroundLum = - thisDaylightControl.BacLum(IL) + thisEnclDaylight.InterReflIllFrIntWins * thisEnclDaylight.aveVisDiffReflect / Constant::Pi; - BackgroundLum = max(thisDaylightControl.IllumSetPoint(IL) * thisEnclDaylight.aveVisDiffReflect / Constant::Pi, BackgroundLum); + auto &refPt = thisDayltgCtrl.refPts(IL); + + Real64 BackgroundLum = refPt.lums[iLum_Back] + thisEnclDaylight.InterReflIllFrIntWins * thisEnclDaylight.aveVisDiffReflect / Constant::Pi; + BackgroundLum = max(refPt.illumSetPoint * thisEnclDaylight.aveVisDiffReflect / Constant::Pi, BackgroundLum); // Loop over exterior windows associated with zone for (int loop = 1; loop <= thisEnclDaylight.NumOfDayltgExtWins; ++loop) { @@ -5388,23 +5059,19 @@ void DayltgGlareWithIntWins(EnergyPlusData &state, int WinShadingIndex = findWinShadingStatus(state, IWin); // Conversion from ft-L to cd/m2, with cd/m2 = 0.2936 ft-L, gives the 0.4794 factor // below, which is (0.2936)**0.6 - Real64 GTOT1 = 0.4794 * (std::pow(thisDaylightControl.SourceLumFromWinAtRefPt(loop, IL)[WinShadingIndex - 1], 1.6)) * - std::pow(thisDaylightControl.SolidAngAtRefPtWtd(loop, IL), 0.8); - Real64 GTOT2 = BackgroundLum + 0.07 * (std::sqrt(thisDaylightControl.SolidAngAtRefPt(loop, IL))) * - thisDaylightControl.SourceLumFromWinAtRefPt(loop, IL)[WinShadingIndex - 1]; + auto const &extWin = thisDayltgCtrl.refPts(IL).extWins(loop); + Real64 GTOT1 = 0.4794 * (std::pow(extWin.lums[iLum_Source][WinShadingIndex - 1], 1.6)) * std::pow(extWin.solidAngWtd, 0.8); + Real64 GTOT2 = BackgroundLum + 0.07 * std::sqrt(extWin.solidAng) * extWin.lums[iLum_Source][WinShadingIndex - 1]; GTOT += GTOT1 / (GTOT2 + 0.000001); } // Glare index - GLINDX(IL) = 10.0 * std::log10(GTOT + 0.000001); - // Set glare index to zero for GTOT < 1 - GLINDX(IL) = max(0.0, GLINDX(IL)); - } -} + refPt.glareIndex = max(0.0, 10.0 * std::log10(GTOT + 0.000001)); + } // for (IL) +} // DaylGlareWithIntWins() void DayltgExtHorizIllum(EnergyPlusData &state, - Illums &HISK, // Horizontal illuminance from sky for different sky types - Real64 &HISU // Horizontal illuminance from sun for unit beam normal + Illums &HI // Horizontal illuminance from sky for different sky types ) { @@ -5433,47 +5100,48 @@ void DayltgExtHorizIllum(EnergyPlusData &state, // The contribution in lumens/m2 from a patch of sky at altitude PH and azimuth TH // is L(TH,PH)*SIN(PH)*COS(PH)*DTH*DPH, where L(TH,PH) is the luminance // of the patch in cd/m2. + auto &dl = state.dataDayltg; + // Init - if (state.dataDaylightingManager->DayltgExtHorizIllum_firstTime) { + if (dl->DayltgExtHorizIllum_firstTime) { for (int IPH = 1; IPH <= NPH; ++IPH) { - state.dataDaylightingManager->PH[IPH] = (IPH - 0.5) * DPH; - state.dataDaylightingManager->SPHCPH[IPH] = - std::sin(state.dataDaylightingManager->PH[IPH]) * std::cos(state.dataDaylightingManager->PH[IPH]); // DA = COS(PH)*DTH*DPH + dl->PH[IPH] = (IPH - 0.5) * DPH; + dl->SPHCPH[IPH] = std::sin(dl->PH[IPH]) * std::cos(dl->PH[IPH]); // DA = COS(PH)*DTH*DPH } for (int ITH = 1; ITH <= NTH; ++ITH) { - state.dataDaylightingManager->TH[ITH] = (ITH - 0.5) * DTH; + dl->TH[ITH] = (ITH - 0.5) * DTH; } - state.dataDaylightingManager->DayltgExtHorizIllum_firstTime = false; + dl->DayltgExtHorizIllum_firstTime = false; } - HISK = Illums(); + HI = Illums(); // Sky integration for (int IPH = 1; IPH <= NPH; ++IPH) { - Real64 const PH_IPH = state.dataDaylightingManager->PH[IPH]; - Real64 const SPHCPH_IPH = state.dataDaylightingManager->SPHCPH[IPH]; + Real64 const PH_IPH = dl->PH[IPH]; + Real64 const SPHCPH_IPH = dl->SPHCPH[IPH]; for (int ITH = 1; ITH <= NTH; ++ITH) { - Real64 const TH_ITH = state.dataDaylightingManager->TH[ITH]; + Real64 const TH_ITH = dl->TH[ITH]; for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { - HISK.sky[iSky] += DayltgSkyLuminance(state, static_cast(iSky), TH_ITH, PH_IPH) * SPHCPH_IPH; + HI.sky[iSky] += DayltgSkyLuminance(state, static_cast(iSky), TH_ITH, PH_IPH) * SPHCPH_IPH; } } } for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { - HISK.sky[iSky] *= DTH * DPH; + HI.sky[iSky] *= DTH * DPH; } // Direct solar horizontal illum (for unit direct normal illuminance) - HISU = state.dataDaylightingManager->SPHSUN * 1.0; -} - -void DayltgHitObstruction(EnergyPlusData &state, - int const IHOUR, // Hour number - int const IWin, // Window index - Vector3 const &R1, // Origin of ray (m) - Vector3 const &RN, // Unit vector along ray - Real64 &ObTrans // Product of solar transmittances of exterior obstructions + HI.sun = dl->sunAngles.sinPhi * 1.0; +} // DayltgExtHorizIllum() + +// Product of solar transmittances of exterior obstructions +Real64 DayltgHitObstruction(EnergyPlusData &state, + int const IHOUR, // Hour number + int const IWin, // Window index + Vector3 const &R1, // Origin of ray (m) + Vector3 const &RN // Unit vector along ray ) { @@ -5501,10 +5169,10 @@ void DayltgHitObstruction(EnergyPlusData &state, // Local declarations bool hit; // True iff a particular obstruction is hit - ObTrans = 1.0; + Real64 ObTrans = 1.0; - auto const &window(state.dataSurface->Surface(IWin)); - int const window_iBaseSurf(window.BaseSurf); + auto const &window = state.dataSurface->Surface(IWin); + int const window_iBaseSurf = window.BaseSurf; Vector3 DayltgHitObstructionHP; // Loop over potentially obstructing surfaces, which can be building elements, like walls, or shadowing surfaces, like overhangs @@ -5516,13 +5184,13 @@ void DayltgHitObstruction(EnergyPlusData &state, auto const &surface = state.dataSurface->Surface(ISurf); SurfaceClass IType = surface.Class; if ((IType == SurfaceClass::Wall || IType == SurfaceClass::Roof || IType == SurfaceClass::Floor) && (ISurf != window_iBaseSurf)) { - PierceSurface(state, ISurf, R1, RN, DayltgHitObstructionHP, hit); + hit = PierceSurface(state, ISurf, R1, RN, DayltgHitObstructionHP); if (hit) { // Building element is hit (assumed opaque) ObTrans = 0.0; break; } } else if (surface.IsShadowing) { - PierceSurface(state, ISurf, R1, RN, DayltgHitObstructionHP, hit); + hit = PierceSurface(state, ISurf, R1, RN, DayltgHitObstructionHP); if (hit) { // Shading surface is hit // Get solar transmittance of the shading surface Real64 const Trans( @@ -5548,13 +5216,13 @@ void DayltgHitObstruction(EnergyPlusData &state, DataSurfaces::SurfaceClass const sClass(surface.Class); Vector3 HP; if ((sClass == SurfaceClass::Wall || sClass == SurfaceClass::Roof || sClass == SurfaceClass::Floor) && (&surface != window_base_p)) { - PierceSurface(surface, R1, RN, HP, hit); + hit = PierceSurface(surface, R1, RN, HP); if (hit) { // Building element is hit (assumed opaque) ObTrans = 0.0; return true; } } else if (surface.IsShadowing) { - PierceSurface(surface, R1, RN, HP, hit); + hit = PierceSurface(surface, R1, RN, HP); if (hit) { // Shading surface is hit // Get solar transmittance of the shading surface Real64 const Trans( @@ -5575,13 +5243,14 @@ void DayltgHitObstruction(EnergyPlusData &state, Vector3 const RN_inv(SurfaceOctreeCube::safe_inverse(RN)); state.dataHeatBalMgr->surfaceOctree.processSomeSurfaceRayIntersectsCube(state, R1, RN, RN_inv, solarTransmittance); } -} -void DayltgHitInteriorObstruction(EnergyPlusData &state, + return ObTrans; +} // DayltgHitObstruction() + +bool DayltgHitInteriorObstruction(EnergyPlusData &state, int const IWin, // Window index Vector3 const &R1, // Origin of ray (m) - Vector3 const &R2, // Destination of ray (m) - bool &hit // True iff ray hits an obstruction + Vector3 const &R2 // Destination of ray (m) ) { @@ -5596,15 +5265,15 @@ void DayltgHitInteriorObstruction(EnergyPlusData &state, // Preconditions assert(magnitude(R2 - R1) > 0.0); // Protect normalize() from divide by zero - hit = false; + bool hit = false; Vector3 RN = (R2 - R1).normalize(); // Make unit vector - Real64 const d12(distance(R1, R2)); // Distance between R1 and R2 + Real64 const d12 = distance(R1, R2); // Distance between R1 and R2 - auto const &window(state.dataSurface->Surface(IWin)); - int const window_Enclosure(window.SolarEnclIndex); - int const window_iBaseSurf(window.BaseSurf); - auto const &window_base(window_iBaseSurf > 0 ? state.dataSurface->Surface(window_iBaseSurf) : window); - int const window_base_iExtBoundCond(window_base.ExtBoundCond); + auto const &window = state.dataSurface->Surface(IWin); + int const window_Enclosure = window.SolarEnclIndex; + int const window_iBaseSurf = window.BaseSurf; + auto const &window_base = window_iBaseSurf > 0 ? state.dataSurface->Surface(window_iBaseSurf) : window; + int const window_base_iExtBoundCond = window_base.ExtBoundCond; // Loop over potentially obstructing surfaces, which can be building elements, like walls, or shadowing surfaces, like overhangs if (state.dataSurface->TotSurfaces < octreeCrossover) { // Linear search through surfaces @@ -5619,27 +5288,27 @@ void DayltgHitInteriorObstruction(EnergyPlusData &state, (IType == SurfaceClass::Wall || IType == SurfaceClass::Roof || IType == SurfaceClass::Floor) && (ISurf != window_iBaseSurf) && (ISurf != window_base_iExtBoundCond))) // Exclude window's base or base-adjacent surfaces { - PierceSurface(state, ISurf, R1, RN, d12, DayltgHitInteriorObstructionHP, hit); // Check if R2-R1 segment pierces surface - if (hit) break; // Segment pierces surface: Don't check the rest + hit = PierceSurface(state, ISurf, R1, RN, d12, DayltgHitInteriorObstructionHP); // Check if R2-R1 segment pierces surface + if (hit) break; // Segment pierces surface: Don't check the rest } } } else { // Surface octree search - auto const *window_base_p(&window_base); - auto const &window_base_adjacent(window_base_iExtBoundCond > 0 ? state.dataSurface->Surface(window_base_iExtBoundCond) : window_base); - auto const *window_base_adjacent_p(&window_base_adjacent); + auto const *window_base_p = &window_base; + auto const &window_base_adjacent = window_base_iExtBoundCond > 0 ? state.dataSurface->Surface(window_base_iExtBoundCond) : window_base; + auto const *window_base_adjacent_p = &window_base_adjacent; // Lambda function for the octree to test for surface hit auto surfaceHit = [=, &R1, &hit](SurfaceData const &surface) -> bool { - DataSurfaces::SurfaceClass const sClass(surface.Class); + DataSurfaces::SurfaceClass const sClass = surface.Class; Vector3 HP; // Hit point if ((surface.IsShadowing) || // Shadowing surface ((surface.SolarEnclIndex == window_Enclosure) && // Surface is in same zone as window (sClass == SurfaceClass::Wall || sClass == SurfaceClass::Roof || sClass == SurfaceClass::Floor) && // Wall, ceiling/roof, or floor (&surface != window_base_p) && (&surface != window_base_adjacent_p))) // Exclude window's base or base-adjacent surfaces { - PierceSurface(surface, R1, RN, d12, HP, hit); // Check if R2-R1 segment pierces surface + hit = PierceSurface(surface, R1, RN, d12, HP); // Check if R2-R1 segment pierces surface return hit; } else { return false; @@ -5649,14 +5318,15 @@ void DayltgHitInteriorObstruction(EnergyPlusData &state, // Check octree surface candidates until a hit is found, if any state.dataHeatBalMgr->surfaceOctree.hasSurfaceSegmentIntersectsCube(R1, R2, surfaceHit); } -} -void DayltgHitBetWinObstruction(EnergyPlusData &state, + return hit; +} // DayltgHitInteriorObstruction() + +bool DayltgHitBetWinObstruction(EnergyPlusData &state, int const IWin1, // Surface number of origin window int const IWin2, // Surface number of destination window Vector3 const &R1, // Origin of ray (on IWin1) (m) - Vector3 const &R2, // Destination of ray (on IWin2) (m) - bool &hit // True iff ray hits an obstruction + Vector3 const &R2 // Destination of ray (on IWin2) (m) ) { @@ -5675,21 +5345,21 @@ void DayltgHitBetWinObstruction(EnergyPlusData &state, // SUBROUTINE LOCAL VARIABLE DECLARATIONS: SurfaceClass IType; // Surface type/class - hit = false; + bool hit = false; Vector3 RN = (R2 - R1).normalize(); // Unit vector - Real64 const d12(distance(R1, R2)); // Distance between R1 and R2 (m) + Real64 const d12 = distance(R1, R2); // Distance between R1 and R2 (m) - auto const &window1(state.dataSurface->Surface(IWin1)); - int const window1_iBaseSurf(window1.BaseSurf); - auto const &window1_base(window1_iBaseSurf > 0 ? state.dataSurface->Surface(window1_iBaseSurf) : window1); - int const window1_base_iExtBoundCond(window1_base.ExtBoundCond); + auto const &window1 = state.dataSurface->Surface(IWin1); + int const window1_iBaseSurf = window1.BaseSurf; + auto const &window1_base = window1_iBaseSurf > 0 ? state.dataSurface->Surface(window1_iBaseSurf) : window1; + int const window1_base_iExtBoundCond = window1_base.ExtBoundCond; - auto const &window2(state.dataSurface->Surface(IWin2)); - int const window2_Enclosure(window2.SolarEnclIndex); - int const window2_iBaseSurf(window2.BaseSurf); - auto const &window2_base(window2_iBaseSurf > 0 ? state.dataSurface->Surface(window2_iBaseSurf) : window2); - int const window2_base_iExtBoundCond(window2_base.ExtBoundCond); + auto const &window2 = state.dataSurface->Surface(IWin2); + int const window2_Enclosure = window2.SolarEnclIndex; + int const window2_iBaseSurf = window2.BaseSurf; + auto const &window2_base = window2_iBaseSurf > 0 ? state.dataSurface->Surface(window2_iBaseSurf) : window2; + int const window2_base_iExtBoundCond = window2_base.ExtBoundCond; // Preconditions // assert( window1.Zone == window2_Zone ); //? This is violated in PurchAirWithDoubleFacadeDaylighting so then why the asymmetry @@ -5699,7 +5369,7 @@ void DayltgHitBetWinObstruction(EnergyPlusData &state, if (state.dataSurface->TotSurfaces < octreeCrossover) { // Linear search through surfaces for (int ISurf = 1; ISurf <= state.dataSurface->TotSurfaces; ++ISurf) { - auto const &surface(state.dataSurface->Surface(ISurf)); + auto const &surface = state.dataSurface->Surface(ISurf); IType = surface.Class; if ((surface.IsShadowing) || // Shadowing surface ((surface.SolarEnclIndex == window2_Enclosure) && // Wall/ceiling/floor is in same zone as windows @@ -5708,24 +5378,24 @@ void DayltgHitBetWinObstruction(EnergyPlusData &state, (ISurf != window1_base_iExtBoundCond) && (ISurf != window2_base_iExtBoundCond))) // Exclude windows' base-adjacent surfaces { Vector3 HP; - PierceSurface(state, ISurf, R1, RN, d12, HP, hit); // Check if R2-R1 segment pierces surface - if (hit) break; // Segment pierces surface: Don't check the rest + hit = PierceSurface(state, ISurf, R1, RN, d12, HP); // Check if R2-R1 segment pierces surface + if (hit) break; // Segment pierces surface: Don't check the rest } } } else { // Surface octree search - auto const *window1_base_p(&window1_base); - auto const &window1_base_adjacent(window1_base_iExtBoundCond > 0 ? state.dataSurface->Surface(window1_base_iExtBoundCond) : window1_base); - auto const *window1_base_adjacent_p(&window1_base_adjacent); + auto const *window1_base_p = &window1_base; + auto const &window1_base_adjacent = window1_base_iExtBoundCond > 0 ? state.dataSurface->Surface(window1_base_iExtBoundCond) : window1_base; + auto const *window1_base_adjacent_p = &window1_base_adjacent; - auto const *window2_base_p(&window2_base); - auto const &window2_base_adjacent(window2_base_iExtBoundCond > 0 ? state.dataSurface->Surface(window2_base_iExtBoundCond) : window2_base); - auto const *window2_base_adjacent_p(&window2_base_adjacent); + auto const *window2_base_p = &window2_base; + auto const &window2_base_adjacent = (window2_base_iExtBoundCond > 0) ? state.dataSurface->Surface(window2_base_iExtBoundCond) : window2_base; + auto const *window2_base_adjacent_p = &window2_base_adjacent; // Lambda function for the octree to test for surface hit auto surfaceHit = [=, &R1, &RN, &hit](SurfaceData const &surface) -> bool { - DataSurfaces::SurfaceClass const sClass(surface.Class); + DataSurfaces::SurfaceClass const sClass = surface.Class; Vector3 HP; if ((surface.IsShadowing) || // Shadowing surface ((surface.SolarEnclIndex == window2_Enclosure) && // Surface is in same zone as window @@ -5733,8 +5403,7 @@ void DayltgHitBetWinObstruction(EnergyPlusData &state, (&surface != window1_base_p) && (&surface != window2_base_p) && // Exclude windows' base surfaces (&surface != window1_base_adjacent_p) && (&surface != window2_base_adjacent_p))) // Exclude windows' base-adjacent surfaces { - PierceSurface(surface, R1, RN, d12, HP, - hit); // Check if R2-R1 segment pierces surface + hit = PierceSurface(surface, R1, RN, d12, HP); // Check if R2-R1 segment pierces surface return hit; } else { return false; @@ -5744,38 +5413,43 @@ void DayltgHitBetWinObstruction(EnergyPlusData &state, // Check octree surface candidates until a hit is found, if any state.dataHeatBalMgr->surfaceOctree.hasSurfaceSegmentIntersectsCube(R1, R2, surfaceHit); } -} + + return hit; +} // DayltingHitBetWinObstruction() void initDaylighting(EnergyPlusData &state, bool const initSurfaceHeatBalancefirstTime) { // For daylit zones, calculate interior daylight illuminance at reference points and // simulate lighting control system to get overhead electric lighting reduction // factor due to daylighting. + auto &dl = state.dataDayltg; + for (int SurfNum : state.dataSurface->AllExtSolWindowSurfaceList) { - state.dataSurface->SurfaceWindow(SurfNum).IllumFromWinAtRefPtRep = 0.0; - state.dataSurface->SurfaceWindow(SurfNum).LumWinFromRefPtRep = 0.0; + for (auto &refPt : state.dataSurface->SurfaceWindow(SurfNum).refPts) { + refPt.illumFromWinRep = refPt.lumWinRep = 0.0; + } } // Reset space power reduction factors for (int spaceNum = 1; spaceNum <= state.dataGlobal->numSpaces; ++spaceNum) { - state.dataDaylightingData->spacePowerReductionFactor(spaceNum) = 1.0; + dl->spacePowerReductionFactor(spaceNum) = 1.0; } - for (int daylightCtrlNum = 1; daylightCtrlNum <= (int)state.dataDaylightingData->daylightControl.size(); ++daylightCtrlNum) { - auto &thisDaylightControl = state.dataDaylightingData->daylightControl(daylightCtrlNum); - thisDaylightControl.PowerReductionFactor = 1.0; + for (int daylightCtrlNum = 1; daylightCtrlNum <= (int)dl->daylightControl.size(); ++daylightCtrlNum) { + auto &thisDayltgCtrl = dl->daylightControl(daylightCtrlNum); + thisDayltgCtrl.PowerReductionFactor = 1.0; if (state.dataEnvrn->PreviousSolRadPositive) { // Reset to zero only if there was solar in the previous timestep, otherwise these are already zero - thisDaylightControl.DaylIllumAtRefPt = 0.0; - thisDaylightControl.GlareIndexAtRefPt = 0.0; - state.dataDaylightingData->enclDaylight(thisDaylightControl.enclIndex).InterReflIllFrIntWins = - 0.0; // inter-reflected illuminance from interior windows - for (int refPtNum = 1; refPtNum <= thisDaylightControl.TotalDaylRefPoints; ++refPtNum) { - thisDaylightControl.TimeExceedingGlareIndexSPAtRefPt(refPtNum) = 0.0; - thisDaylightControl.TimeExceedingDaylightIlluminanceSPAtRefPt(refPtNum) = 0.0; + dl->enclDaylight(thisDayltgCtrl.enclIndex).InterReflIllFrIntWins = 0.0; // inter-reflected illuminance from interior windows + for (int refPtNum = 1; refPtNum <= thisDayltgCtrl.TotalDaylRefPoints; ++refPtNum) { + auto &refPt = thisDayltgCtrl.refPts(refPtNum); + refPt.lums[iLum_Illum] = 0.0; + refPt.glareIndex = 0.0; + refPt.timeExceedingGlareIndexSetPoint = 0.0; + refPt.timeExceedingDaylightIlluminanceSetPoint = 0.0; } } - if (state.dataEnvrn->SunIsUp && thisDaylightControl.TotalDaylRefPoints != 0) { + if (state.dataEnvrn->SunIsUp && thisDayltgCtrl.TotalDaylRefPoints != 0) { if (initSurfaceHeatBalancefirstTime) DisplayString(state, "Computing Interior Daylighting Illumination"); DayltgInteriorIllum(state, daylightCtrlNum); } @@ -5784,47 +5458,47 @@ void initDaylighting(EnergyPlusData &state, bool const initSurfaceHeatBalancefir // The following report variables are valid only for daylit zones/enclosures without interior windows if (state.dataEnvrn->SunIsUp) { for (int enclNum = 1; enclNum <= state.dataViewFactor->NumOfSolarEnclosures; ++enclNum) { - if ((state.dataViewFactor->EnclSolInfo(enclNum).TotalEnclosureDaylRefPoints > 0) && - (!state.dataViewFactor->EnclSolInfo(enclNum).HasInterZoneWindow)) { - auto &thisEnclDaylight = state.dataDaylightingData->enclDaylight(enclNum); - for (int extWinNum = 1; extWinNum <= thisEnclDaylight.NumOfDayltgExtWins; ++extWinNum) { - int IWin = thisEnclDaylight.DayltgExtWinSurfNums(extWinNum); - WinCover winCover = WinCover::Bare; - if (state.dataSurface->SurfWinWindowModelType(IWin) != WindowModel::BSDF && - (IS_SHADED(state.dataSurface->SurfWinShadingFlag(IWin)) || state.dataSurface->SurfWinSolarDiffusing(IWin))) { - winCover = WinCover::Shaded; - } - int refPtCount = 0; - for (int controlNum : state.dataDaylightingData->enclDaylight(enclNum).daylightControlIndexes) { - auto &thisControl = state.dataDaylightingData->daylightControl(controlNum); - if (thisControl.DaylightMethod == DaylightingMethod::SplitFlux) { - for (int refPtNum = 1; refPtNum <= thisControl.TotalDaylRefPoints; ++refPtNum) { - ++refPtCount; // Count reference points across each daylighting control in the same enclosure - state.dataSurface->SurfaceWindow(IWin).IllumFromWinAtRefPtRep(refPtCount) = - thisControl.IllumFromWinAtRefPt(extWinNum, refPtNum)[(int)winCover]; - state.dataSurface->SurfaceWindow(IWin).LumWinFromRefPtRep(refPtCount) = - thisControl.SourceLumFromWinAtRefPt(extWinNum, refPtNum)[(int)winCover]; - } - } - } + if ((state.dataViewFactor->EnclSolInfo(enclNum).TotalEnclosureDaylRefPoints == 0) || + (state.dataViewFactor->EnclSolInfo(enclNum).HasInterZoneWindow)) + continue; + + auto &thisEnclDaylight = dl->enclDaylight(enclNum); + for (int extWinNum = 1; extWinNum <= thisEnclDaylight.NumOfDayltgExtWins; ++extWinNum) { + int IWin = thisEnclDaylight.DayltgExtWinSurfNums(extWinNum); + WinCover winCover = WinCover::Bare; + if (state.dataSurface->SurfWinWindowModelType(IWin) != WindowModel::BSDF && + (IS_SHADED(state.dataSurface->SurfWinShadingFlag(IWin)) || state.dataSurface->SurfWinSolarDiffusing(IWin))) { + winCover = WinCover::Shaded; } - } - } - } + int refPtCount = 0; + for (int controlNum : dl->enclDaylight(enclNum).daylightControlIndexes) { + auto &daylCtrl = dl->daylightControl(controlNum); + if (daylCtrl.DaylightMethod != DaylightingMethod::SplitFlux) continue; + + for (int refPtNum = 1; refPtNum <= daylCtrl.TotalDaylRefPoints; ++refPtNum) { + ++refPtCount; // Count reference points across each daylighting control in the same enclosure + auto &refPt = state.dataSurface->SurfaceWindow(IWin).refPts(refPtCount); + auto const &daylCtrlRefPt = daylCtrl.refPts(refPtNum); + refPt.illumFromWinRep = daylCtrlRefPt.extWins(extWinNum).lums[iLum_Illum][(int)winCover]; + refPt.lumWinRep = daylCtrlRefPt.extWins(extWinNum).lums[iLum_Source][(int)winCover]; + } + } // for (controlNum) + } // for (extWinNum) + } // for (enclNum) + } // if (SunIsUp) if (state.dataEnvrn->SunIsUp && (int)state.dataDaylightingDevicesData->TDDPipe.size() > 0) { if (initSurfaceHeatBalancefirstTime) DisplayString(state, "Computing Interior Daylighting Illumination for TDD pipes"); DayltgInteriorTDDIllum(state); } - for (int daylightCtrlNum = 1; daylightCtrlNum <= (int)state.dataDaylightingData->daylightControl.size(); ++daylightCtrlNum) { - auto &thisDaylightControl = state.dataDaylightingData->daylightControl(daylightCtrlNum); + for (int daylightCtrlNum = 1; daylightCtrlNum <= (int)dl->daylightControl.size(); ++daylightCtrlNum) { + auto &thisDayltgCtrl = dl->daylightControl(daylightCtrlNum); // RJH DElight Modification Begin - Call to DElight electric lighting control subroutine // Check if the sun is up and the current Thermal Zone hosts a Daylighting:DElight object - if (state.dataEnvrn->SunIsUp && thisDaylightControl.TotalDaylRefPoints != 0 && - (thisDaylightControl.DaylightMethod == DaylightingMethod::DElight)) { - int zoneNum = thisDaylightControl.zoneIndex; + if (state.dataEnvrn->SunIsUp && thisDayltgCtrl.TotalDaylRefPoints != 0 && (thisDayltgCtrl.DaylightMethod == DaylightingMethod::DElight)) { + int zoneNum = thisDayltgCtrl.zoneIndex; // Call DElight interior illuminance and electric lighting control subroutine Real64 dPowerReducFac = 1.0; // Return value Electric Lighting Power Reduction Factor for current Zone and Timestep Real64 dHISKFFC = state.dataEnvrn->HISKF * DataDElight::LUX2FC; @@ -5836,10 +5510,6 @@ void initDaylighting(EnergyPlusData &state, bool const initSurfaceHeatBalancefir Real64 dCloudFraction = state.dataEnvrn->CloudFraction; // Init Error Flag to 0 (no Warnings or Errors) (returned from DElight) int iErrorFlag = 0; - bool elOpened; - - int iReadStatus; // Error File Read Status - bool bEndofErrFile; // End of Error File flag DElightManagerF::DElightElecLtgCtrl(len(state.dataHeatBal->Zone(zoneNum).Name), state.dataHeatBal->Zone(zoneNum).Name, @@ -5858,12 +5528,11 @@ void initDaylighting(EnergyPlusData &state, bool const initSurfaceHeatBalancefir std::string cErrorMsg; // Each DElight Error Message can be up to 200 characters long // Open DElight Electric Lighting Error File for reading auto iDElightErrorFile = state.files.outputDelightDfdmpFilePath.try_open(state.files.outputControl.delightdfdmp); // (THIS_AUTO_OK) - elOpened = iDElightErrorFile.good(); + bool elOpened = iDElightErrorFile.good(); // Sequentially read lines in DElight Electric Lighting Error File // and process them using standard EPlus warning/error handling calls - bEndofErrFile = false; - iReadStatus = 0; + bool bEndofErrFile = false; while (!bEndofErrFile && elOpened) { auto cErrorLine = iDElightErrorFile.readLine(); // (THIS_AUTO_OK) if (cErrorLine.eof) { @@ -5898,17 +5567,12 @@ void initDaylighting(EnergyPlusData &state, bool const initSurfaceHeatBalancefir // extract reference point illuminance values from DElight Electric Lighting dump file for reporting // Open DElight Electric Lighting Dump File for reading auto iDElightErrorFile = state.files.outputDelightEldmpFilePath.try_open(state.files.outputControl.delighteldmp); // (THIS_AUTO_OK) - if (iDElightErrorFile.is_open()) { - elOpened = true; - } else { - elOpened = false; - } + bool elOpened = iDElightErrorFile.is_open(); // Sequentially read lines in DElight Electric Lighting Dump File // and extract refpt illuminances for standard EPlus output handling - bEndofErrFile = false; + bool bEndofErrFile = false; int iDElightRefPt = 0; // Reference Point number for reading DElight Dump File (eplusout.delighteldmp) - iReadStatus = 0; while (!bEndofErrFile && elOpened) { auto line = iDElightErrorFile.read(); // (THIS_AUTO_OK) Real64 dRefPtIllum = line.data; // tmp var for reading RefPt illuminance @@ -5919,8 +5583,8 @@ void initDaylighting(EnergyPlusData &state, bool const initSurfaceHeatBalancefir // Increment refpt counter ++iDElightRefPt; // Assure refpt index does not exceed number of refpts in this zone - if (iDElightRefPt <= thisDaylightControl.TotalDaylRefPoints) { - thisDaylightControl.DaylIllumAtRefPt(iDElightRefPt) = dRefPtIllum; + if (iDElightRefPt <= thisDayltgCtrl.TotalDaylRefPoints) { + thisDayltgCtrl.refPts(iDElightRefPt).lums[iLum_Illum] = dRefPtIllum; } } @@ -5932,7 +5596,7 @@ void initDaylighting(EnergyPlusData &state, bool const initSurfaceHeatBalancefir } // Store the calculated total zone Power Reduction Factor due to DElight daylighting // in the ZoneDaylight structure for later use - thisDaylightControl.PowerReductionFactor = dPowerReducFac; + thisDayltgCtrl.PowerReductionFactor = dPowerReducFac; } // RJH DElight Modification End - Call to DElight electric lighting control subroutine } @@ -5957,26 +5621,26 @@ void initDaylighting(EnergyPlusData &state, bool const initSurfaceHeatBalancefir void manageDaylighting(EnergyPlusData &state) { + auto &dl = state.dataDayltg; + if (state.dataEnvrn->SunIsUp && (state.dataEnvrn->BeamSolarRad + state.dataEnvrn->GndSolarRad + state.dataEnvrn->DifSolarRad > 0.0)) { for (int enclNum = 1; enclNum <= state.dataViewFactor->NumOfSolarEnclosures; ++enclNum) { - if (state.dataViewFactor->EnclSolInfo(enclNum).TotalEnclosureDaylRefPoints > 0) { - if (state.dataViewFactor->EnclSolInfo(enclNum).HasInterZoneWindow) { - DayltgInterReflIllFrIntWins(state, enclNum); - for (int daylightCtrlNum : state.dataDaylightingData->enclDaylight(enclNum).daylightControlIndexes) { - auto &thisDaylightControl = state.dataDaylightingData->daylightControl(daylightCtrlNum); - DayltgGlareWithIntWins(state, thisDaylightControl.GlareIndexAtRefPt, daylightCtrlNum); - } - } + auto &enclSol = state.dataViewFactor->EnclSolInfo(enclNum); + if (enclSol.TotalEnclosureDaylRefPoints == 0 || !enclSol.HasInterZoneWindow) continue; + + DayltgInterReflIllFrIntWins(state, enclNum); + for (int daylightCtrlNum : dl->enclDaylight(enclNum).daylightControlIndexes) { + DayltgGlareWithIntWins(state, daylightCtrlNum); } } DayltgElecLightingControl(state); - } else if (state.dataDaylightingData->mapResultsToReport && state.dataGlobal->TimeStep == state.dataGlobal->NumOfTimeStepInHour) { - for (int MapNum = 1; MapNum <= (int)state.dataDaylightingData->IllumMap.size(); ++MapNum) { + } else if (dl->mapResultsToReport && state.dataGlobal->TimeStep == state.dataGlobal->NumOfTimeStepInHour) { + for (int MapNum = 1; MapNum <= (int)dl->illumMaps.size(); ++MapNum) { ReportIllumMap(state, MapNum); } - state.dataDaylightingData->mapResultsToReport = false; + dl->mapResultsToReport = false; } -} +} // manageDaylighting() void DayltgInteriorIllum(EnergyPlusData &state, int const daylightCtrlNum) // Daylighting:Controls number @@ -6013,19 +5677,19 @@ void DayltgInteriorIllum(EnergyPlusData &state, // REFERENCES: // Based on DOE-2.1E subroutine DINTIL. + auto &dl = state.dataDayltg; Real64 constexpr tmpSWIterStep(0.05); // step of switching factor, assuming maximum of 20 switching states int NREFPT; // Number of daylighting reference points int iSky1; // Sky type index values for averaging two sky types int iSky2; - auto &SetPnt = state.dataDaylightingManager->SetPnt; // Illuminance setpoint at reference points (lux) - auto &GLRNDX = state.dataDaylightingManager->GLRNDX; // Glare index at reference point - auto &GLRNEW = state.dataDaylightingManager->GLRNEW; // New glare index at reference point + Array1D SetPnt; // Illuminance setpoint at reference points (lux) + Array1D GLRNEW; // New glare index at reference point - auto &thisDaylightControl = state.dataDaylightingData->daylightControl(daylightCtrlNum); - int enclNum = thisDaylightControl.enclIndex; - auto &thisEnclDaylight = state.dataDaylightingData->enclDaylight(enclNum); + auto &thisDayltgCtrl = dl->daylightControl(daylightCtrlNum); + int enclNum = thisDayltgCtrl.enclIndex; + auto &thisEnclDaylight = dl->enclDaylight(enclNum); int ISWFLG; // Switchable glazing flag: =1 if one or more windows in a zone // has switchable glazing that adjusts visible transmittance to just meet // daylighting setpoint; =0 otherwise. @@ -6041,48 +5705,74 @@ void DayltgInteriorIllum(EnergyPlusData &state, Real64 VTNow; // VT of the time step actual TC window Real64 VTMaster; // VT of the base/master TC window - // Added variables for glare iterations for switchable glazings - auto &tmpIllumFromWinAtRefPt = state.dataDaylightingManager->tmpIllumFromWinAtRefPt; - auto &tmpBackLumFromWinAtRefPt = state.dataDaylightingManager->tmpBackLumFromWinAtRefPt; - auto &tmpSourceLumFromWinAtRefPt = state.dataDaylightingManager->tmpSourceLumFromWinAtRefPt; + Array2D, (int)Lum::Num>> tmpDaylFromWinAtRefPt; bool breakOuterLoop(false); bool continueOuterLoop(false); - if (thisDaylightControl.DaylightMethod != DaylightingMethod::SplitFlux) return; + struct ShadeGroupLums + { + Array1D, (int)Lum::Num>> WDAYIL; // Illuminance from window at ref-point + Array1D> RDAYIL; // Illuminance from window at ref-point after closing shade + Real64 switchedWinLum; + Real64 unswitchedWinLum; + Real64 switchedTvis; + Real64 unswitchedTvis; + Real64 lumRatio; + }; + + Array1D shadeGroupsLums; + + // Array2D, iLum_Num>> WDAYIL; // Illuminance from window at reference point + // (second index) + // the number of shade deployment groups (third index) + // Array2D> WBACLU; // Background illuminance from window at reference point (second index) + // the number of shade deployment groups (third index) + // Array2D> RDAYIL; // Illuminance from window at reference point after closing shade + // Array2D RBACLU; // Background illuminance from window at reference point after closing shade + // Array1D DILLSW; // Illuminance a ref point from a group of windows that can be switched together, + // Array1D DILLUN; // and from those that aren't (lux) + // Array1D TVIS1; // Visible transmittance at normal incidence of unswitched glazing + // Array1D TVIS2; // Visible transmittance at normal incidence of fully-switched glazing + // Array1D ASETIL; // Illuminance ratio (lux) + + if (thisDayltgCtrl.DaylightMethod != DaylightingMethod::SplitFlux) return; + + NREFPT = thisDayltgCtrl.TotalDaylRefPoints; + + if (dl->DayltgInteriorIllum_firstTime) { + dl->DaylIllum.allocate(dl->maxNumRefPtInAnyDaylCtrl); + dl->DayltgInteriorIllum_firstTime = false; + } - NREFPT = thisDaylightControl.TotalDaylRefPoints; + // size these for the maximum of the shade deployment order + shadeGroupsLums.allocate(dl->maxShadeDeployOrderExtWins); + for (auto &shadeGroupLums : shadeGroupsLums) { + shadeGroupLums.WDAYIL.allocate(dl->maxControlRefPoints); + shadeGroupLums.RDAYIL.allocate(dl->maxControlRefPoints); + } // Three arrays to save original clear and dark (fully switched) states' // zone/window daylighting properties. - if (state.dataDaylightingManager->DayltgInteriorIllum_firstTime) { - int const d1(max(maxval(state.dataHeatBal->Zone, &DataHeatBalance::ZoneData::NumSubSurfaces), - maxval(state.dataDaylightingData->enclDaylight, &EnclDaylightCalc::NumOfDayltgExtWins))); - tmpIllumFromWinAtRefPt.allocate(d1, state.dataDaylightingManager->maxNumRefPtInAnyDaylCtrl); - tmpBackLumFromWinAtRefPt.allocate(d1, state.dataDaylightingManager->maxNumRefPtInAnyDaylCtrl); - tmpSourceLumFromWinAtRefPt.allocate(d1, state.dataDaylightingManager->maxNumRefPtInAnyDaylCtrl); - - SetPnt.allocate(state.dataDaylightingManager->maxNumRefPtInAnyDaylCtrl); - state.dataDaylightingManager->DaylIllum.allocate(state.dataDaylightingManager->maxNumRefPtInAnyDaylCtrl); - GLRNDX.allocate(state.dataDaylightingManager->maxNumRefPtInAnyDaylCtrl); - GLRNEW.allocate(state.dataDaylightingManager->maxNumRefPtInAnyDaylCtrl); + tmpDaylFromWinAtRefPt.allocate(dl->maxNumRefPtInAnyDaylCtrl, dl->maxEnclSubSurfaces); - state.dataDaylightingManager->DayltgInteriorIllum_firstTime = false; - } + SetPnt.allocate(dl->maxNumRefPtInAnyDaylCtrl); + dl->DaylIllum.allocate(dl->maxNumRefPtInAnyDaylCtrl); + GLRNEW.allocate(dl->maxNumRefPtInAnyDaylCtrl); - for (int iExtWin = 1; iExtWin <= (int)tmpIllumFromWinAtRefPt.size1(); ++iExtWin) { - for (int iRefPt = 1; iRefPt <= (int)tmpIllumFromWinAtRefPt.size2(); ++iRefPt) { - tmpIllumFromWinAtRefPt(iExtWin, iRefPt) = {0.0, 0.0}; - tmpBackLumFromWinAtRefPt(iExtWin, iRefPt) = {0.0, 0.0}; - tmpSourceLumFromWinAtRefPt(iExtWin, iRefPt) = {0.0, 0.0}; + for (int iRefPt = 1; iRefPt <= (int)dl->maxNumRefPtInAnyDaylCtrl; ++iRefPt) { + for (int iExtWin = 1; iExtWin <= (int)dl->maxEnclSubSurfaces; ++iExtWin) { + auto &tmpDayl = tmpDaylFromWinAtRefPt(iRefPt, iExtWin); + tmpDayl[iLum_Illum] = tmpDayl[iLum_Back] = tmpDayl[iLum_Source] = {0.0, 0.0}; } } // Initialize reference point illuminance and window background luminance for (int IL = 1; IL <= NREFPT; ++IL) { - SetPnt(IL) = thisDaylightControl.IllumSetPoint(IL); - state.dataDaylightingManager->DaylIllum(IL) = 0.0; - thisDaylightControl.BacLum(IL) = 0.0; + auto &refPt = thisDayltgCtrl.refPts(IL); + SetPnt(IL) = refPt.illumSetPoint; + dl->DaylIllum(IL) = 0.0; + refPt.lums[iLum_Back] = 0.0; } if (state.dataEnvrn->SkyClearness > 3.0) { // Sky is average of clear and clear turbid @@ -6110,14 +5800,14 @@ void DayltgInteriorIllum(EnergyPlusData &state, VTRatio = 1.0; if (NREFPT > 0) { int const IConst = state.dataSurface->Surface(IWin).Construction; - if (state.dataConstruction->Construct(IConst).TCFlag == 1) { + auto const &construction = state.dataConstruction->Construct(IConst); + if (construction.TCFlag == 1) { // For thermochromic windows, daylight and glare factors are always calculated // based on the master construction. They need to be adjusted by the VTRatio, including: // ZoneDaylight()%DaylIllFacSky, DaylIllFacSun, DaylIllFacSunDisk; DaylBackFacSky, // DaylBackFacSun, DaylBackFacSunDisk, DaylSourceFacSky, DaylSourceFacSun, DaylSourceFacSunDisk - VTNow = General::POLYF(1.0, state.dataConstruction->Construct(IConst).TransVisBeamCoef); - VTMaster = - General::POLYF(1.0, state.dataConstruction->Construct(state.dataConstruction->Construct(IConst).TCMasterConst).TransVisBeamCoef); + VTNow = General::POLYF(1.0, construction.TransVisBeamCoef); + VTMaster = General::POLYF(1.0, state.dataConstruction->Construct(construction.TCMasterConst).TransVisBeamCoef); VTRatio = VTNow / VTMaster; } } @@ -6128,203 +5818,153 @@ void DayltgInteriorIllum(EnergyPlusData &state, Real64 wgtCurrHr = state.dataGlobal->WeightNow; Real64 wgtPrevHr = state.dataGlobal->WeightPreviousHour; + std::array SFHR; // Sky source luminance factor for sky type, bare/shaded window + std::array DFHR; // Sky daylight factor for sky type, bare/shaded window + std::array BFHR; // Sky background luminance factor for sky type, bare/shaded window + // Loop over reference points for (int IL = 1; IL <= NREFPT; ++IL) { + auto const &daylFacCurr = thisDayltgCtrl.daylFac[state.dataGlobal->HourOfDay](loop, IL, 1); + auto const &daylFacPrev = thisDayltgCtrl.daylFac[state.dataGlobal->PreviousHour](loop, IL, 1); // Daylight factors for current sun position - auto const &illSkyCurr = thisDaylightControl.DaylIllFacSky(state.dataGlobal->HourOfDay, loop, IL, 1); - auto const &illSkyPrev = thisDaylightControl.DaylIllFacSky(state.dataGlobal->PreviousHour, loop, IL, 1); - auto &dfskhr = state.dataDaylightingManager->DFSKHR[(int)WinCover::Bare]; - auto const &backSkyCurr = thisDaylightControl.DaylBackFacSky(state.dataGlobal->HourOfDay, loop, IL, 1); - auto const &backSkyPrev = thisDaylightControl.DaylBackFacSky(state.dataGlobal->PreviousHour, loop, IL, 1); - auto &bfskhr = state.dataDaylightingManager->BFSKHR[(int)WinCover::Bare]; - auto const &sourceSkyCurr = thisDaylightControl.DaylSourceFacSky(state.dataGlobal->HourOfDay, loop, IL, 1); - auto const &sourceSkyPrev = thisDaylightControl.DaylSourceFacSky(state.dataGlobal->PreviousHour, loop, IL, 1); - auto &sfskhr = state.dataDaylightingManager->SFSKHR[(int)WinCover::Bare]; - - auto const &ill2SkyCurr = thisDaylightControl.DaylIllFacSky(state.dataGlobal->HourOfDay, loop, IL, 2); - auto const &ill2SkyPrev = thisDaylightControl.DaylIllFacSky(state.dataGlobal->PreviousHour, loop, IL, 2); - auto &dfskhr2 = state.dataDaylightingManager->DFSKHR[(int)WinCover::Shaded]; - auto const &back2SkyCurr = thisDaylightControl.DaylBackFacSky(state.dataGlobal->HourOfDay, loop, IL, 2); - auto const &back2SkyPrev = thisDaylightControl.DaylBackFacSky(state.dataGlobal->PreviousHour, loop, IL, 2); - auto &bfskhr2 = state.dataDaylightingManager->BFSKHR[(int)WinCover::Shaded]; - auto const &source2SkyCurr = thisDaylightControl.DaylSourceFacSky(state.dataGlobal->HourOfDay, loop, IL, 2); - auto const &source2SkyPrev = thisDaylightControl.DaylSourceFacSky(state.dataGlobal->PreviousHour, loop, IL, 2); - auto &sfskhr2 = state.dataDaylightingManager->SFSKHR[(int)WinCover::Shaded]; + auto const &illFacCurr = daylFacCurr[iLum_Illum]; + auto const &illFacPrev = daylFacPrev[iLum_Illum]; + auto &dfhr = DFHR[iWinCover_Bare]; + auto const &backFacCurr = daylFacCurr[iLum_Back]; + auto const &backFacPrev = daylFacPrev[iLum_Back]; + auto &bfhr = BFHR[iWinCover_Bare]; + auto const &sourceFacCurr = daylFacCurr[iLum_Source]; + auto const &sourceFacPrev = daylFacPrev[iLum_Source]; + auto &sfhr = SFHR[iWinCover_Bare]; + + auto const &daylFac2Curr = thisDayltgCtrl.daylFac[state.dataGlobal->HourOfDay](loop, IL, 2); + auto const &daylFac2Prev = thisDayltgCtrl.daylFac[state.dataGlobal->PreviousHour](loop, IL, 2); + + auto const &illFac2Curr = daylFac2Curr[iLum_Illum]; + auto const &illFac2Prev = daylFac2Prev[iLum_Illum]; + auto &dfhr2 = DFHR[iWinCover_Shaded]; + auto const &backFac2Curr = daylFac2Curr[iLum_Back]; + auto const &backFac2Prev = daylFac2Prev[iLum_Back]; + auto &bfhr2 = BFHR[iWinCover_Shaded]; + auto const &sourceFac2Curr = daylFac2Curr[iLum_Source]; + auto const &sourceFac2Prev = daylFac2Prev[iLum_Source]; + auto &sfhr2 = SFHR[iWinCover_Shaded]; int SurfWinSlatsAngIndex = state.dataSurface->SurfWinSlatsAngIndex(IWin); int slatAngLo = SurfWinSlatsAngIndex + 1; int slatAngHi = min(Material::MaxSlatAngs + 1, slatAngLo + 1); Real64 interpFac = state.dataSurface->SurfWinSlatsAngInterpFac(IWin); - auto const &illLoSkyCurr = thisDaylightControl.DaylIllFacSky(state.dataGlobal->HourOfDay, loop, IL, slatAngLo); - auto const &illLoSkyPrev = thisDaylightControl.DaylIllFacSky(state.dataGlobal->PreviousHour, loop, IL, slatAngLo); - auto const &illHiSkyCurr = thisDaylightControl.DaylIllFacSky(state.dataGlobal->HourOfDay, loop, IL, slatAngHi); - auto const &illHiSkyPrev = thisDaylightControl.DaylIllFacSky(state.dataGlobal->PreviousHour, loop, IL, slatAngHi); + auto const &daylFacLoCurr = thisDayltgCtrl.daylFac[state.dataGlobal->HourOfDay](loop, IL, slatAngLo); + auto const &daylFacLoPrev = thisDayltgCtrl.daylFac[state.dataGlobal->PreviousHour](loop, IL, slatAngLo); + auto const &daylFacHiCurr = thisDayltgCtrl.daylFac[state.dataGlobal->HourOfDay](loop, IL, slatAngHi); + auto const &daylFacHiPrev = thisDayltgCtrl.daylFac[state.dataGlobal->PreviousHour](loop, IL, slatAngHi); - auto const &backLoSkyCurr = thisDaylightControl.DaylBackFacSky(state.dataGlobal->HourOfDay, loop, IL, slatAngLo); - auto const &backLoSkyPrev = thisDaylightControl.DaylBackFacSky(state.dataGlobal->PreviousHour, loop, IL, slatAngLo); - auto const &backHiSkyCurr = thisDaylightControl.DaylBackFacSky(state.dataGlobal->HourOfDay, loop, IL, slatAngLo); - auto const &backHiSkyPrev = thisDaylightControl.DaylBackFacSky(state.dataGlobal->PreviousHour, loop, IL, slatAngLo); + auto const &illFacLoCurr = daylFacLoCurr[iLum_Illum]; + auto const &illFacLoPrev = daylFacLoPrev[iLum_Illum]; + auto const &illFacHiCurr = daylFacHiCurr[iLum_Illum]; + auto const &illFacHiPrev = daylFacHiPrev[iLum_Illum]; - auto const &sourceLoSkyCurr = thisDaylightControl.DaylSourceFacSky(state.dataGlobal->HourOfDay, loop, IL, slatAngLo); - auto const &sourceLoSkyPrev = thisDaylightControl.DaylSourceFacSky(state.dataGlobal->PreviousHour, loop, IL, slatAngLo); - auto const &sourceHiSkyCurr = thisDaylightControl.DaylSourceFacSky(state.dataGlobal->HourOfDay, loop, IL, slatAngHi); - auto const &sourceHiSkyPrev = thisDaylightControl.DaylSourceFacSky(state.dataGlobal->PreviousHour, loop, IL, slatAngHi); + auto const &backFacLoCurr = daylFacLoCurr[iLum_Back]; + auto const &backFacLoPrev = daylFacLoPrev[iLum_Back]; + auto const &backFacHiCurr = daylFacHiCurr[iLum_Back]; + auto const &backFacHiPrev = daylFacHiPrev[iLum_Back]; + + auto const &sourceFacLoCurr = daylFacLoCurr[iLum_Source]; + auto const &sourceFacLoPrev = daylFacLoPrev[iLum_Source]; + auto const &sourceFacHiCurr = daylFacHiCurr[iLum_Source]; + auto const &sourceFacHiPrev = daylFacHiPrev[iLum_Source]; for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { // ===Bare window=== // Sky daylight factor for sky type (second index), bare/shaded window (first index) - dfskhr.sky[iSky] = VTRatio * (wgtCurrHr * illSkyCurr.sky[iSky] + wgtPrevHr * illSkyPrev.sky[iSky]); - bfskhr.sky[iSky] = VTRatio * (wgtCurrHr * backSkyCurr.sky[iSky] + wgtPrevHr * backSkyPrev.sky[iSky]); - sfskhr.sky[iSky] = VTRatio * (wgtCurrHr * sourceSkyCurr.sky[iSky] + wgtPrevHr * sourceSkyPrev.sky[iSky]); + dfhr.sky[iSky] = VTRatio * (wgtCurrHr * illFacCurr.sky[iSky] + wgtPrevHr * illFacPrev.sky[iSky]); + bfhr.sky[iSky] = VTRatio * (wgtCurrHr * backFacCurr.sky[iSky] + wgtPrevHr * backFacPrev.sky[iSky]); + sfhr.sky[iSky] = VTRatio * (wgtCurrHr * sourceFacCurr.sky[iSky] + wgtPrevHr * sourceFacPrev.sky[iSky]); if (ShadedOrDiffusingGlassWin) { // ===Shaded window or window with diffusing glass=== if (!state.dataSurface->SurfWinMovableSlats(IWin)) { // Shade, screen, blind with fixed slats, or diffusing glass - dfskhr2.sky[iSky] = VTRatio * (wgtCurrHr * ill2SkyCurr.sky[iSky] + wgtPrevHr * ill2SkyPrev.sky[iSky]); - bfskhr2.sky[iSky] = VTRatio * (wgtCurrHr * back2SkyCurr.sky[iSky] + wgtPrevHr * back2SkyPrev.sky[iSky]); - sfskhr2.sky[iSky] = VTRatio * (wgtCurrHr * source2SkyCurr.sky[iSky] + wgtPrevHr * source2SkyPrev.sky[iSky]); + dfhr2.sky[iSky] = VTRatio * (wgtCurrHr * illFac2Curr.sky[iSky] + wgtPrevHr * illFac2Prev.sky[iSky]); + bfhr2.sky[iSky] = VTRatio * (wgtCurrHr * backFac2Curr.sky[iSky] + wgtPrevHr * backFac2Prev.sky[iSky]); + sfhr2.sky[iSky] = VTRatio * (wgtCurrHr * sourceFac2Curr.sky[iSky] + wgtPrevHr * sourceFac2Prev.sky[iSky]); } else { // Blind with movable slats - Real64 illSkyCurr = General::Interp(illLoSkyCurr.sky[iSky], illHiSkyCurr.sky[iSky], interpFac); - Real64 backSkyCurr = General::Interp(backLoSkyCurr.sky[iSky], backHiSkyCurr.sky[iSky], interpFac); - Real64 sourceSkyCurr = General::Interp(sourceLoSkyCurr.sky[iSky], sourceHiSkyCurr.sky[iSky], interpFac); + Real64 illSkyCurr = General::Interp(illFacLoCurr.sky[iSky], illFacHiCurr.sky[iSky], interpFac); + Real64 backSkyCurr = General::Interp(backFacLoCurr.sky[iSky], backFacHiCurr.sky[iSky], interpFac); + Real64 sourceSkyCurr = General::Interp(sourceFacLoCurr.sky[iSky], sourceFacHiCurr.sky[iSky], interpFac); - Real64 illSkyPrev = General::Interp(illLoSkyPrev.sky[iSky], illHiSkyPrev.sky[iSky], interpFac); - Real64 backSkyPrev = General::Interp(backLoSkyPrev.sky[iSky], backHiSkyPrev.sky[iSky], interpFac); - Real64 sourceSkyPrev = General::Interp(sourceLoSkyPrev.sky[iSky], sourceHiSkyPrev.sky[iSky], interpFac); + Real64 illSkyPrev = General::Interp(illFacLoPrev.sky[iSky], illFacHiPrev.sky[iSky], interpFac); + Real64 backSkyPrev = General::Interp(backFacLoPrev.sky[iSky], backFacHiPrev.sky[iSky], interpFac); + Real64 sourceSkyPrev = General::Interp(sourceFacLoPrev.sky[iSky], sourceFacHiPrev.sky[iSky], interpFac); - dfskhr2.sky[iSky] = VTRatio * (wgtCurrHr * illSkyCurr + wgtPrevHr * illSkyPrev); - bfskhr2.sky[iSky] = VTRatio * (wgtCurrHr * backSkyCurr + wgtPrevHr * backSkyPrev); - sfskhr2.sky[iSky] = VTRatio * (wgtCurrHr * sourceSkyCurr + wgtPrevHr * sourceSkyPrev); + dfhr2.sky[iSky] = VTRatio * (wgtCurrHr * illSkyCurr + wgtPrevHr * illSkyPrev); + bfhr2.sky[iSky] = VTRatio * (wgtCurrHr * backSkyCurr + wgtPrevHr * backSkyPrev); + sfhr2.sky[iSky] = VTRatio * (wgtCurrHr * sourceSkyCurr + wgtPrevHr * sourceSkyPrev); } // End of check if window has blind with movable slats } // End of check if window is shaded or has diffusing glass } // for (iSky) // Sun daylight factor for bare/shaded window - state.dataDaylightingManager->DFSUHR[(int)WinCover::Bare] = - VTRatio * (wgtCurrHr * (thisDaylightControl.DaylIllFacSun(state.dataGlobal->HourOfDay, loop, IL, 1) + - thisDaylightControl.DaylIllFacSunDisk(state.dataGlobal->HourOfDay, loop, IL, 1)) + - wgtPrevHr * (thisDaylightControl.DaylIllFacSun(state.dataGlobal->PreviousHour, loop, IL, 1) + - thisDaylightControl.DaylIllFacSunDisk(state.dataGlobal->PreviousHour, loop, IL, 1))); + DFHR[iWinCover_Bare].sun = + VTRatio * (wgtCurrHr * (illFacCurr.sun + illFacCurr.sunDisk) + wgtPrevHr * (illFacPrev.sun + illFacPrev.sunDisk)); // Sun background luminance factor for bare/shaded window - state.dataDaylightingManager->BFSUHR[(int)WinCover::Bare] = - VTRatio * (wgtCurrHr * (thisDaylightControl.DaylBackFacSun(state.dataGlobal->HourOfDay, loop, IL, 1) + - thisDaylightControl.DaylBackFacSunDisk(state.dataGlobal->HourOfDay, loop, IL, 1)) + - wgtPrevHr * (thisDaylightControl.DaylBackFacSun(state.dataGlobal->PreviousHour, loop, IL, 1) + - thisDaylightControl.DaylBackFacSunDisk(state.dataGlobal->PreviousHour, loop, IL, 1))); + BFHR[iWinCover_Bare].sun = + VTRatio * (wgtCurrHr * (backFacCurr.sun + backFacCurr.sunDisk) + wgtPrevHr * (backFacPrev.sun + backFacPrev.sunDisk)); // Sun source luminance factor for bare/shaded window - state.dataDaylightingManager->SFSUHR[(int)WinCover::Bare] = - VTRatio * (wgtCurrHr * (thisDaylightControl.DaylSourceFacSun(state.dataGlobal->HourOfDay, loop, IL, 1) + - thisDaylightControl.DaylSourceFacSunDisk(state.dataGlobal->HourOfDay, loop, IL, 1)) + - wgtPrevHr * (thisDaylightControl.DaylSourceFacSun(state.dataGlobal->PreviousHour, loop, IL, 1) + - thisDaylightControl.DaylSourceFacSunDisk(state.dataGlobal->PreviousHour, loop, IL, 1))); + SFHR[iWinCover_Bare].sun = + VTRatio * (wgtCurrHr * (sourceFacCurr.sun + sourceFacCurr.sunDisk) + wgtPrevHr * (sourceFacPrev.sun + sourceFacPrev.sunDisk)); if (ShadedOrDiffusingGlassWin) { // ===Shaded window or window with diffusing glass=== if (!state.dataSurface->SurfWinMovableSlats(IWin)) { // Shade, screen, blind with fixed slats, or diffusing glass - state.dataDaylightingManager->DFSUHR[(int)WinCover::Shaded] = - VTRatio * (wgtCurrHr * thisDaylightControl.DaylIllFacSun(state.dataGlobal->HourOfDay, loop, IL, 2) + - wgtPrevHr * thisDaylightControl.DaylIllFacSun(state.dataGlobal->PreviousHour, loop, IL, 2)); - - state.dataDaylightingManager->BFSUHR[(int)WinCover::Shaded] = - VTRatio * (wgtCurrHr * thisDaylightControl.DaylBackFacSun(state.dataGlobal->HourOfDay, loop, IL, 2) + - wgtPrevHr * thisDaylightControl.DaylBackFacSun(state.dataGlobal->PreviousHour, loop, IL, 2)); - - state.dataDaylightingManager->SFSUHR[(int)WinCover::Shaded] = - VTRatio * (wgtCurrHr * thisDaylightControl.DaylSourceFacSun(state.dataGlobal->HourOfDay, loop, IL, 2) + - wgtPrevHr * thisDaylightControl.DaylSourceFacSun(state.dataGlobal->PreviousHour, loop, IL, 2)); + DFHR[iWinCover_Shaded].sun = VTRatio * (wgtCurrHr * illFac2Curr.sun + wgtPrevHr * illFac2Prev.sun); + BFHR[iWinCover_Shaded].sun = VTRatio * (wgtCurrHr * backFac2Curr.sun + wgtPrevHr * backFac2Prev.sun); + SFHR[iWinCover_Shaded].sun = VTRatio * (wgtCurrHr * sourceFac2Curr.sun + wgtPrevHr * sourceFac2Prev.sun); if (!state.dataSurface->SurfWinSlatsBlockBeam(IWin)) { - state.dataDaylightingManager->DFSUHR[(int)WinCover::Shaded] += - VTRatio * (wgtCurrHr * thisDaylightControl.DaylIllFacSunDisk(state.dataGlobal->HourOfDay, loop, IL, 2) + - wgtPrevHr * thisDaylightControl.DaylIllFacSunDisk(state.dataGlobal->PreviousHour, loop, IL, 2)); - - state.dataDaylightingManager->BFSUHR[(int)WinCover::Shaded] += - VTRatio * (wgtCurrHr * thisDaylightControl.DaylBackFacSunDisk(state.dataGlobal->HourOfDay, loop, IL, 2) + - wgtPrevHr * thisDaylightControl.DaylBackFacSunDisk(state.dataGlobal->PreviousHour, loop, IL, 2)); - - state.dataDaylightingManager->SFSUHR[(int)WinCover::Shaded] += - VTRatio * (wgtCurrHr * thisDaylightControl.DaylSourceFacSunDisk(state.dataGlobal->HourOfDay, loop, IL, 2) + - wgtPrevHr * thisDaylightControl.DaylSourceFacSunDisk(state.dataGlobal->PreviousHour, loop, IL, 2)); + DFHR[iWinCover_Shaded].sun += VTRatio * (wgtCurrHr * illFac2Curr.sunDisk + wgtPrevHr * illFac2Prev.sunDisk); + BFHR[iWinCover_Shaded].sun += VTRatio * (wgtCurrHr * backFac2Curr.sunDisk + wgtPrevHr * backFac2Prev.sunDisk); + SFHR[iWinCover_Shaded].sun += VTRatio * (wgtCurrHr * sourceFac2Curr.sunDisk + wgtPrevHr * sourceFac2Prev.sunDisk); } } else { // Blind with movable slats - int SurfWinSlatsAngIndex = state.dataSurface->SurfWinSlatsAngIndex(IWin); - int slatAngLo = SurfWinSlatsAngIndex + 1; - int slatAngHi = min(Material::MaxSlatAngs + 1, slatAngLo + 1); + // int SurfWinSlatsAngIndex = state.dataSurface->SurfWinSlatsAngIndex(IWin); + // int slatAngLo = SurfWinSlatsAngIndex + 1; + // int slatAngHi = min(Material::MaxSlatAngs + 1, slatAngLo + 1); Real64 SurfWinSlatsAngInterpFac = state.dataSurface->SurfWinSlatsAngInterpFac(IWin); - Real64 DaylIllFacSunNow = General::Interp(thisDaylightControl.DaylIllFacSun(state.dataGlobal->HourOfDay, loop, IL, slatAngLo), - thisDaylightControl.DaylIllFacSun(state.dataGlobal->HourOfDay, loop, IL, slatAngHi), - SurfWinSlatsAngInterpFac); - Real64 DaylBackFacSunNow = General::Interp(thisDaylightControl.DaylBackFacSun(state.dataGlobal->HourOfDay, loop, IL, slatAngLo), - thisDaylightControl.DaylBackFacSun(state.dataGlobal->HourOfDay, loop, IL, slatAngHi), - SurfWinSlatsAngInterpFac); - Real64 DaylSourceFacSunNow = - General::Interp(thisDaylightControl.DaylSourceFacSun(state.dataGlobal->HourOfDay, loop, IL, slatAngLo), - thisDaylightControl.DaylSourceFacSun(state.dataGlobal->HourOfDay, loop, IL, slatAngHi), - SurfWinSlatsAngInterpFac); - Real64 DaylIllFacSunPrev = General::Interp(thisDaylightControl.DaylIllFacSun(state.dataGlobal->PreviousHour, loop, IL, slatAngLo), - thisDaylightControl.DaylIllFacSun(state.dataGlobal->PreviousHour, loop, IL, slatAngHi), - SurfWinSlatsAngInterpFac); - Real64 DaylBackFacSunPrev = - General::Interp(thisDaylightControl.DaylBackFacSun(state.dataGlobal->PreviousHour, loop, IL, slatAngLo), - thisDaylightControl.DaylBackFacSun(state.dataGlobal->PreviousHour, loop, IL, slatAngHi), - SurfWinSlatsAngInterpFac); - Real64 DaylSourceFacSunPrev = - General::Interp(thisDaylightControl.DaylSourceFacSun(state.dataGlobal->PreviousHour, loop, IL, slatAngLo), - thisDaylightControl.DaylSourceFacSun(state.dataGlobal->PreviousHour, loop, IL, slatAngHi), - SurfWinSlatsAngInterpFac); - state.dataDaylightingManager->DFSUHR[(int)WinCover::Shaded] = - VTRatio * (wgtCurrHr * DaylIllFacSunNow + wgtPrevHr * DaylIllFacSunPrev); - state.dataDaylightingManager->BFSUHR[(int)WinCover::Shaded] = - VTRatio * (wgtCurrHr * DaylBackFacSunNow + wgtPrevHr * DaylBackFacSunPrev); - state.dataDaylightingManager->SFSUHR[(int)WinCover::Shaded] = - VTRatio * (wgtCurrHr * DaylSourceFacSunNow + wgtPrevHr * DaylSourceFacSunPrev); + Real64 DaylIllFacSunNow = General::Interp(illFacLoCurr.sun, illFacHiCurr.sun, SurfWinSlatsAngInterpFac); + Real64 DaylBackFacSunNow = General::Interp(backFacLoCurr.sun, backFacHiCurr.sun, SurfWinSlatsAngInterpFac); + Real64 DaylSourceFacSunNow = General::Interp(sourceFacLoCurr.sun, sourceFacHiCurr.sun, SurfWinSlatsAngInterpFac); + Real64 DaylIllFacSunPrev = General::Interp(illFacLoPrev.sun, illFacHiPrev.sun, SurfWinSlatsAngInterpFac); + Real64 DaylBackFacSunPrev = General::Interp(backFacLoPrev.sun, backFacHiPrev.sun, SurfWinSlatsAngInterpFac); + Real64 DaylSourceFacSunPrev = General::Interp(sourceFacLoPrev.sun, sourceFacHiPrev.sun, SurfWinSlatsAngInterpFac); + DFHR[iWinCover_Shaded].sun = VTRatio * (wgtCurrHr * DaylIllFacSunNow + wgtPrevHr * DaylIllFacSunPrev); + BFHR[iWinCover_Shaded].sun = VTRatio * (wgtCurrHr * DaylBackFacSunNow + wgtPrevHr * DaylBackFacSunPrev); + SFHR[iWinCover_Shaded].sun = VTRatio * (wgtCurrHr * DaylSourceFacSunNow + wgtPrevHr * DaylSourceFacSunPrev); // We add the contribution from the solar disk if slats do not block beam solar // TH CR 8010, DaylIllFacSunDisk needs to be interpolated if (!state.dataSurface->SurfWinSlatsBlockBeam(IWin)) { - Real64 DaylIllFacSunDiskNow = - General::Interp(thisDaylightControl.DaylIllFacSunDisk(state.dataGlobal->HourOfDay, loop, IL, slatAngLo), - thisDaylightControl.DaylIllFacSunDisk(state.dataGlobal->HourOfDay, loop, IL, slatAngHi), - SurfWinSlatsAngInterpFac); - Real64 DaylBackFacSunDiskNow = - General::Interp(thisDaylightControl.DaylBackFacSunDisk(state.dataGlobal->HourOfDay, loop, IL, slatAngLo), - thisDaylightControl.DaylBackFacSunDisk(state.dataGlobal->HourOfDay, loop, IL, slatAngHi), - SurfWinSlatsAngInterpFac); - Real64 DaylSourceFacSunDiskNow = - General::Interp(thisDaylightControl.DaylSourceFacSunDisk(state.dataGlobal->HourOfDay, loop, IL, slatAngLo), - thisDaylightControl.DaylSourceFacSunDisk(state.dataGlobal->HourOfDay, loop, IL, slatAngHi), - SurfWinSlatsAngInterpFac); - Real64 DaylIllFacSunDiskPrev = - General::Interp(thisDaylightControl.DaylIllFacSunDisk(state.dataGlobal->PreviousHour, loop, IL, slatAngLo), - thisDaylightControl.DaylIllFacSunDisk(state.dataGlobal->PreviousHour, loop, IL, slatAngHi), - SurfWinSlatsAngInterpFac); - Real64 DaylBackFacSunDiskPrev = - General::Interp(thisDaylightControl.DaylBackFacSunDisk(state.dataGlobal->PreviousHour, loop, IL, slatAngLo), - thisDaylightControl.DaylBackFacSunDisk(state.dataGlobal->PreviousHour, loop, IL, slatAngHi), - SurfWinSlatsAngInterpFac); - Real64 DaylSourceFacSunDiskPrev = - General::Interp(thisDaylightControl.DaylSourceFacSunDisk(state.dataGlobal->PreviousHour, loop, IL, slatAngLo), - thisDaylightControl.DaylSourceFacSunDisk(state.dataGlobal->PreviousHour, loop, IL, slatAngHi), - SurfWinSlatsAngInterpFac); - state.dataDaylightingManager->DFSUHR[(int)WinCover::Shaded] += - VTRatio * (wgtCurrHr * DaylIllFacSunDiskNow + wgtPrevHr * DaylIllFacSunDiskPrev); - state.dataDaylightingManager->BFSUHR[(int)WinCover::Shaded] += - VTRatio * (wgtCurrHr * DaylBackFacSunDiskNow + wgtPrevHr * DaylBackFacSunDiskPrev); - state.dataDaylightingManager->SFSUHR[(int)WinCover::Shaded] += - VTRatio * (wgtCurrHr * DaylSourceFacSunDiskNow + wgtPrevHr * DaylSourceFacSunDiskPrev); + Real64 DaylIllFacSunDiskNow = General::Interp(illFacLoCurr.sunDisk, illFacHiCurr.sunDisk, SurfWinSlatsAngInterpFac); + Real64 DaylBackFacSunDiskNow = General::Interp(backFacLoCurr.sunDisk, backFacHiCurr.sunDisk, SurfWinSlatsAngInterpFac); + Real64 DaylSourceFacSunDiskNow = General::Interp(sourceFacLoCurr.sunDisk, sourceFacHiCurr.sunDisk, SurfWinSlatsAngInterpFac); + Real64 DaylIllFacSunDiskPrev = General::Interp(illFacLoPrev.sunDisk, illFacHiPrev.sunDisk, SurfWinSlatsAngInterpFac); + Real64 DaylBackFacSunDiskPrev = General::Interp(backFacLoPrev.sunDisk, backFacHiPrev.sunDisk, SurfWinSlatsAngInterpFac); + Real64 DaylSourceFacSunDiskPrev = General::Interp(sourceFacLoPrev.sunDisk, sourceFacHiPrev.sunDisk, SurfWinSlatsAngInterpFac); + DFHR[iWinCover_Shaded].sun += VTRatio * (wgtCurrHr * DaylIllFacSunDiskNow + wgtPrevHr * DaylIllFacSunDiskPrev); + BFHR[iWinCover_Shaded].sun += VTRatio * (wgtCurrHr * DaylBackFacSunDiskNow + wgtPrevHr * DaylBackFacSunDiskPrev); + SFHR[iWinCover_Shaded].sun += VTRatio * (wgtCurrHr * DaylSourceFacSunDiskNow + wgtPrevHr * DaylSourceFacSunDiskPrev); } } // End of check if window has blind with movable slats } // End of check if window is shaded or has diffusing glass @@ -6334,51 +5974,46 @@ void DayltgInteriorIllum(EnergyPlusData &state, // Adding 0.001 in the following prevents zero HorIllSky in early morning or late evening when sun // is up in the present time step but GILSK(ISky,HourOfDay) and GILSK(ISky,NextHour) are both zero. - auto const &gilskCurr = state.dataDaylightingManager->GILSK(state.dataGlobal->HourOfDay); - auto const &gilskPrev = state.dataDaylightingManager->GILSK(state.dataGlobal->PreviousHour); - - for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { - // Horizontal illuminance for different sky types - // HorIllSky(ISky) = WeightNow * GILSK(ISky,HourOfDay) + WeightNextHour * GILSK(ISky,NextHour) + 0.001 - state.dataDaylightingManager->HorIllSky.sky[iSky] = - state.dataGlobal->WeightNow * gilskCurr.sky[iSky] + state.dataGlobal->WeightPreviousHour * gilskPrev.sky[iSky] + 0.001; - } + auto const &gilskCurr = dl->horIllum[state.dataGlobal->HourOfDay]; + auto const &gilskPrev = dl->horIllum[state.dataGlobal->PreviousHour]; // HISKF is current time step horizontal illuminance from sky, calculated in DayltgLuminousEfficacy, // which is called in WeatherManager. HISUNF is current time step horizontal illuminance from sun, // also calculated in DayltgLuminousEfficacy. - Real64 horIllSky1 = state.dataDaylightingManager->HorIllSky.sky[iSky1]; - Real64 horIllSky2 = state.dataDaylightingManager->HorIllSky.sky[iSky2]; + Real64 horIllSky1 = + state.dataGlobal->WeightNow * gilskCurr.sky[iSky1] + state.dataGlobal->WeightPreviousHour * gilskPrev.sky[iSky1] + 0.001; + Real64 horIllSky2 = + state.dataGlobal->WeightNow * gilskCurr.sky[iSky2] + state.dataGlobal->WeightPreviousHour * gilskPrev.sky[iSky2] + 0.001; HorIllSkyFac = state.dataEnvrn->HISKF / ((1 - SkyWeight) * horIllSky2 + SkyWeight * horIllSky1); + auto &daylFromWinAtRefPt = thisDayltgCtrl.refPts(IL).extWins(loop).lums; + auto &tmpDayl = tmpDaylFromWinAtRefPt(IL, loop); for (int iWinCover = 0; iWinCover < (int)WinCover::Num; ++iWinCover) { - auto const &dfskhr = state.dataDaylightingManager->DFSKHR[iWinCover]; - auto const &bfskhr = state.dataDaylightingManager->BFSKHR[iWinCover]; - auto const &sfskhr = state.dataDaylightingManager->SFSKHR[iWinCover]; + auto const &dfhr = DFHR[iWinCover]; + auto const &bfhr = BFHR[iWinCover]; + auto const &sfhr = SFHR[iWinCover]; // What is this? - if (iWinCover == (int)WinCover::Shaded && !ShadedOrDiffusingGlassWin) break; - - thisDaylightControl.IllumFromWinAtRefPt(loop, IL)[iWinCover] = - state.dataDaylightingManager->DFSUHR[iWinCover] * state.dataEnvrn->HISUNF + - HorIllSkyFac * (dfskhr.sky[iSky1] * SkyWeight * horIllSky1 + dfskhr.sky[iSky2] * (1.0 - SkyWeight) * horIllSky2); - thisDaylightControl.BackLumFromWinAtRefPt(loop, IL)[iWinCover] = - state.dataDaylightingManager->BFSUHR[iWinCover] * state.dataEnvrn->HISUNF + - HorIllSkyFac * (bfskhr.sky[iSky1] * SkyWeight * horIllSky1 + bfskhr.sky[iSky2] * (1.0 - SkyWeight) * horIllSky2); + if (iWinCover == iWinCover_Shaded && !ShadedOrDiffusingGlassWin) break; - thisDaylightControl.SourceLumFromWinAtRefPt(loop, IL)[iWinCover] = - state.dataDaylightingManager->SFSUHR[iWinCover] * state.dataEnvrn->HISUNF + - HorIllSkyFac * (sfskhr.sky[iSky1] * SkyWeight * horIllSky1 + sfskhr.sky[iSky2] * (1.0 - SkyWeight) * horIllSky2); + daylFromWinAtRefPt[iLum_Illum][iWinCover] = + dfhr.sun * state.dataEnvrn->HISUNF + + HorIllSkyFac * (dfhr.sky[iSky1] * SkyWeight * horIllSky1 + dfhr.sky[iSky2] * (1.0 - SkyWeight) * horIllSky2); + daylFromWinAtRefPt[iLum_Back][iWinCover] = + bfhr.sun * state.dataEnvrn->HISUNF + + HorIllSkyFac * (bfhr.sky[iSky1] * SkyWeight * horIllSky1 + bfhr.sky[iSky2] * (1.0 - SkyWeight) * horIllSky2); + daylFromWinAtRefPt[iLum_Source][iWinCover] = + sfhr.sun * state.dataEnvrn->HISUNF + + HorIllSkyFac * (sfhr.sky[iSky1] * SkyWeight * horIllSky1 + sfhr.sky[iSky2] * (1.0 - SkyWeight) * horIllSky2); - thisDaylightControl.SourceLumFromWinAtRefPt(loop, IL)[iWinCover] = - max(thisDaylightControl.SourceLumFromWinAtRefPt(loop, IL)[iWinCover], 0.0); + daylFromWinAtRefPt[iLum_Source][iWinCover] = max(daylFromWinAtRefPt[iLum_Source][iWinCover], 0.0); // Added TH 1/21/2010 - save the original clear and dark (fully switched) states' // zone daylighting values, needed for switachable glazings - tmpIllumFromWinAtRefPt(loop, IL)[iWinCover] = thisDaylightControl.IllumFromWinAtRefPt(loop, IL)[iWinCover]; - tmpBackLumFromWinAtRefPt(loop, IL)[iWinCover] = thisDaylightControl.BackLumFromWinAtRefPt(loop, IL)[iWinCover]; - tmpSourceLumFromWinAtRefPt(loop, IL)[iWinCover] = thisDaylightControl.SourceLumFromWinAtRefPt(loop, IL)[iWinCover]; + tmpDayl[iLum_Illum][iWinCover] = daylFromWinAtRefPt[iLum_Illum][iWinCover]; + tmpDayl[iLum_Back][iWinCover] = daylFromWinAtRefPt[iLum_Back][iWinCover]; + tmpDayl[iLum_Source][iWinCover] = daylFromWinAtRefPt[iLum_Source][iWinCover]; } // for for (iWinCover) } // End of reference point loop, IL @@ -6396,7 +6031,7 @@ void DayltgInteriorIllum(EnergyPlusData &state, for (int loop = 1; loop <= thisEnclDaylight.NumOfDayltgExtWins; ++loop) { int IWin = thisEnclDaylight.DayltgExtWinSurfNums(loop); - ICtrl = state.dataSurface->Surface(IWin).activeWindowShadingControl; + int ICtrl = state.dataSurface->Surface(IWin).activeWindowShadingControl; if (state.dataSurface->Surface(IWin).HasShadeControl && ISWFLG == 0) { if (state.dataSurface->WindowShadingControl(ICtrl).shadingControlType == WindowShadingControlType::MeetDaylIlumSetp && state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::GlassConditionallyLightened) @@ -6411,8 +6046,9 @@ void DayltgInteriorIllum(EnergyPlusData &state, int IS = findWinShadingStatus(state, IWin); for (int IL = 1; IL <= NREFPT; ++IL) { - state.dataDaylightingManager->DaylIllum(IL) += thisDaylightControl.IllumFromWinAtRefPt(loop, IL)[IS - 1]; - thisDaylightControl.BacLum(IL) += thisDaylightControl.BackLumFromWinAtRefPt(loop, IL)[IS - 1]; + auto &refPt = thisDayltgCtrl.refPts(IL); + dl->DaylIllum(IL) += refPt.extWins(loop).lums[iLum_Illum][IS - 1]; + refPt.lums[iLum_Back] += refPt.extWins(loop).lums[iLum_Back][IS - 1]; } } // End of second window loop over exterior windows associated with this zone @@ -6426,50 +6062,49 @@ void DayltgInteriorIllum(EnergyPlusData &state, int count = 0; // If daylight illuminance is above setpoint, allow switching - if (ISWFLG != 0 && state.dataDaylightingManager->DaylIllum(1) > SetPnt(1)) { + if (ISWFLG != 0 && dl->DaylIllum(1) > SetPnt(1)) { + + // array of flags to indicate that previously groups would have already shaded this window + Array1D_bool previously_shaded; + previously_shaded.dimension(dl->maxDayltgExtWins, false); - auto &DILLSW = state.dataDaylightingManager->DILLSW; - auto &DILLUN = state.dataDaylightingManager->DILLUN; - auto &previously_shaded = state.dataDaylightingManager->previously_shaded; // Third loop over windows. Get illuminance at ref pt 1 from // windows that can be switched (DILLSW) with a group and those that can't (DILLUN). // Windows that can be switched are initially in the unswitched state. For subsequent // groups the windows in previous groups are fully switched. - DILLSW = 0.0; - DILLUN = 0.0; - previously_shaded = false; + for (auto &shadeGroupLum : shadeGroupsLums) { + shadeGroupLum.switchedWinLum = shadeGroupLum.unswitchedWinLum = 0.0; + } - for (std::size_t igroup = 1; igroup <= thisDaylightControl.ShadeDeployOrderExtWins.size(); igroup++) { - std::vector const &listOfExtWin = thisDaylightControl.ShadeDeployOrderExtWins[igroup - 1]; + for (std::size_t igroup = 1; igroup <= thisDayltgCtrl.ShadeDeployOrderExtWins.size(); igroup++) { + auto &shadeGroupLums = shadeGroupsLums(igroup); + std::vector const &listOfExtWin = thisDayltgCtrl.ShadeDeployOrderExtWins[igroup - 1]; for (const int IWin : listOfExtWin) { ++count; // need to map back to the original order of the "loop" to not change all the other data structures - int loop = thisDaylightControl.MapShdOrdToLoopNum(count); - if (loop > 0) { - ICtrl = state.dataSurface->Surface(IWin).activeWindowShadingControl; - int IS = findWinShadingStatus(state, IWin); - if (state.dataSurface->Surface(IWin).HasShadeControl) { - if (state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::GlassConditionallyLightened && - state.dataSurface->WindowShadingControl(ICtrl).shadingControlType == WindowShadingControlType::MeetDaylIlumSetp && - !previously_shaded(loop)) { - DILLSW(igroup) += thisDaylightControl.IllumFromWinAtRefPt(loop, 1)[IS - 1]; - previously_shaded(loop) = true; - } else { - if (!previously_shaded(loop)) { - DILLUN(igroup) += thisDaylightControl.IllumFromWinAtRefPt(loop, 1)[IS - 1]; - } else { - DILLUN(igroup) += thisDaylightControl.IllumFromWinAtRefPt( - loop, 1)[(int)WinCover::Shaded]; // use the shaded state if previously shaded - } - } - } + int loop = thisDayltgCtrl.MapShdOrdToLoopNum(count); + if (loop == 0) continue; + + if (!state.dataSurface->Surface(IWin).HasShadeControl) continue; + + int ICtrl = state.dataSurface->Surface(IWin).activeWindowShadingControl; + int IS = findWinShadingStatus(state, IWin); + + auto const &daylFromWinAtRefPt = thisDayltgCtrl.refPts(1).extWins(loop).lums[iLum_Illum]; + if (state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::GlassConditionallyLightened && + state.dataSurface->WindowShadingControl(ICtrl).shadingControlType == WindowShadingControlType::MeetDaylIlumSetp && + !previously_shaded(loop)) { + shadeGroupLums.switchedWinLum += daylFromWinAtRefPt[IS - 1]; + previously_shaded(loop) = true; + } else { + shadeGroupLums.unswitchedWinLum += !previously_shaded(loop) ? daylFromWinAtRefPt[IS - 1] : daylFromWinAtRefPt[iWinCover_Shaded]; } - } - } // End of third window loop, IWin + } // for (IWin) + } // for (igroup) // Transmittance multiplier - for (std::size_t igroup = 1; igroup <= thisDaylightControl.ShadeDeployOrderExtWins.size(); igroup++) { - state.dataDaylightingManager->ASETIL(igroup) = (SetPnt(1) - DILLUN(igroup)) / (DILLSW(igroup) + 0.00001); + for (auto &shadeGroupLums : shadeGroupsLums) { + shadeGroupLums.lumRatio = (SetPnt(1) - shadeGroupLums.unswitchedWinLum) / (shadeGroupLums.switchedWinLum + 0.00001); } // ASETIL < 1 means there's enough light, so check for switching @@ -6479,147 +6114,150 @@ void DayltgInteriorIllum(EnergyPlusData &state, count = 0; breakOuterLoop = false; continueOuterLoop = false; - for (std::size_t igroup = 1; igroup <= thisDaylightControl.ShadeDeployOrderExtWins.size(); igroup++) { - - std::vector const &listOfExtWin = thisDaylightControl.ShadeDeployOrderExtWins[igroup - 1]; - auto &thisTVIS1 = state.dataDaylightingManager->TVIS1(igroup); - auto &thisTVIS2 = state.dataDaylightingManager->TVIS2(igroup); - auto const &thisASETIL = state.dataDaylightingManager->ASETIL(igroup); + for (std::size_t igroup = 1; igroup <= thisDayltgCtrl.ShadeDeployOrderExtWins.size(); igroup++) { + auto &shadeGroupLums = shadeGroupsLums(igroup); + std::vector const &listOfExtWin = thisDayltgCtrl.ShadeDeployOrderExtWins[igroup - 1]; for (const int IWin : listOfExtWin) { ++count; + auto const &surfWin = state.dataSurface->SurfaceWindow(IWin); // need to map back to the original order of the "loop" to not change all the other data structures - int loop = thisDaylightControl.MapShdOrdToLoopNum(count); - if (loop > 0) { - if (thisASETIL < 1.0) { + int loop = thisDayltgCtrl.MapShdOrdToLoopNum(count); + if (loop > 0 && shadeGroupLums.lumRatio < 1.0) { - ICtrl = state.dataSurface->Surface(IWin).activeWindowShadingControl; - if (!state.dataSurface->Surface(IWin).HasShadeControl) { - continueOuterLoop = true; - continue; - } - if (state.dataSurface->SurfWinShadingFlag(IWin) != WinShadingType::GlassConditionallyLightened || - state.dataSurface->WindowShadingControl(ICtrl).shadingControlType != WindowShadingControlType::MeetDaylIlumSetp) { - continueOuterLoop = true; - continue; - } + int ICtrl = state.dataSurface->Surface(IWin).activeWindowShadingControl; + if (!state.dataSurface->Surface(IWin).HasShadeControl) { + continueOuterLoop = true; + continue; + } + if (state.dataSurface->SurfWinShadingFlag(IWin) != WinShadingType::GlassConditionallyLightened || + state.dataSurface->WindowShadingControl(ICtrl).shadingControlType != WindowShadingControlType::MeetDaylIlumSetp) { + continueOuterLoop = true; + continue; + } - int const IConst = state.dataSurface->SurfActiveConstruction(IWin); - // Vis trans at normal incidence of unswitched glass - thisTVIS1 = General::POLYF(1.0, state.dataConstruction->Construct(IConst).TransVisBeamCoef) * - state.dataSurface->SurfWinGlazedFrac(IWin); + int const IConst = state.dataSurface->SurfActiveConstruction(IWin); + // Vis trans at normal incidence of unswitched glass + shadeGroupLums.unswitchedTvis = + General::POLYF(1.0, state.dataConstruction->Construct(IConst).TransVisBeamCoef) * surfWin.glazedFrac; - // Vis trans at normal incidence of fully switched glass - int const IConstShaded = state.dataSurface->Surface(IWin).activeShadedConstruction; - thisTVIS2 = General::POLYF(1.0, state.dataConstruction->Construct(IConstShaded).TransVisBeamCoef) * - state.dataSurface->SurfWinGlazedFrac(IWin); + // Vis trans at normal incidence of fully switched glass + int const IConstShaded = state.dataSurface->Surface(IWin).activeShadedConstruction; + shadeGroupLums.switchedTvis = + General::POLYF(1.0, state.dataConstruction->Construct(IConstShaded).TransVisBeamCoef) * surfWin.glazedFrac; - // Reset shading flag to indicate that window is shaded by being partially or fully switched - state.dataSurface->SurfWinShadingFlag(IWin) = WinShadingType::SwitchableGlazing; + // Reset shading flag to indicate that window is shaded by being partially or fully switched + state.dataSurface->SurfWinShadingFlag(IWin) = WinShadingType::SwitchableGlazing; - // ASETIL < 0 means illuminance from non-daylight-switchable windows exceeds setpoint, - // so completely switch all daylight-switchable windows to minimize solar gain - if (thisASETIL <= 0.0) { - state.dataSurface->SurfWinSwitchingFactor(IWin) = 1.0; - state.dataSurface->SurfWinVisTransSelected(IWin) = thisTVIS2; - } else { - // Case where 0 < ASETIL < 1: darken glass in all - // daylight-switchable windows to just meet illuminance setpoint - // From this equation: SETPNT(1) = DILLUN + DILLSW/TVIS1 * VisTransSelected - state.dataSurface->SurfWinVisTransSelected(IWin) = max(thisTVIS2, thisASETIL * thisTVIS1) + 0.000001; - state.dataSurface->SurfWinSwitchingFactor(IWin) = - (thisTVIS1 - state.dataSurface->SurfWinVisTransSelected(IWin)) / (thisTVIS1 - thisTVIS2 + 0.000001); - // bound switching factor between 0 and 1 - state.dataSurface->SurfWinSwitchingFactor(IWin) = min(1.0, state.dataSurface->SurfWinSwitchingFactor(IWin)); - state.dataSurface->SurfWinSwitchingFactor(IWin) = max(0.0, state.dataSurface->SurfWinSwitchingFactor(IWin)); - } + // ASETIL < 0 means illuminance from non-daylight-switchable windows exceeds setpoint, + // so completely switch all daylight-switchable windows to minimize solar gain + if (shadeGroupLums.lumRatio <= 0.0) { + state.dataSurface->SurfWinSwitchingFactor(IWin) = 1.0; + state.dataSurface->SurfWinVisTransSelected(IWin) = shadeGroupLums.switchedTvis; + } else { + // Case where 0 < ASETIL < 1: darken glass in all + // daylight-switchable windows to just meet illuminance setpoint + // From this equation: SETPNT(1) = DILLUN + DILLSW/TVIS1 * VisTransSelected + state.dataSurface->SurfWinVisTransSelected(IWin) = + max(shadeGroupLums.switchedTvis, shadeGroupLums.lumRatio * shadeGroupLums.unswitchedTvis) + 0.000001; + state.dataSurface->SurfWinSwitchingFactor(IWin) = + (shadeGroupLums.unswitchedTvis - state.dataSurface->SurfWinVisTransSelected(IWin)) / + (shadeGroupLums.unswitchedTvis - shadeGroupLums.switchedTvis + 0.000001); + // bound switching factor between 0 and 1 + state.dataSurface->SurfWinSwitchingFactor(IWin) = min(1.0, state.dataSurface->SurfWinSwitchingFactor(IWin)); + state.dataSurface->SurfWinSwitchingFactor(IWin) = max(0.0, state.dataSurface->SurfWinSwitchingFactor(IWin)); + } - // Adjust daylight quantities based on ratio between switched and unswitched visible transmittance - for (int IL = 1; IL <= NREFPT; ++IL) { - // DaylIllum(IL) and BacLum(IL) were calculated at the clear state: IS = 1, - // and need to adjusted for intermediate switched state at VisTransSelected: IS = 2 - int IS = 1; - VTRAT = state.dataSurface->SurfWinVisTransSelected(IWin) / (thisTVIS1 + 0.000001); - state.dataDaylightingManager->DaylIllum(IL) += (VTRAT - 1.0) * thisDaylightControl.IllumFromWinAtRefPt(loop, IL)[IS - 1]; - thisDaylightControl.BacLum(IL) += (VTRAT - 1.0) * thisDaylightControl.BackLumFromWinAtRefPt(loop, IL)[IS - 1]; - - // Adjust illum, background illum and source luminance for this window in intermediate switched state - // for later use in the DayltgGlare calc because SurfaceWindow(IWin)%ShadingFlag = WinShadingType::SwitchableGlazing = 2 - IS = 2; - VTRAT = state.dataSurface->SurfWinVisTransSelected(IWin) / (thisTVIS2 + 0.000001); - thisDaylightControl.IllumFromWinAtRefPt(loop, IL)[IS - 1] = VTRAT * tmpIllumFromWinAtRefPt(loop, IL)[IS - 1]; - thisDaylightControl.BackLumFromWinAtRefPt(loop, IL)[IS - 1] = VTRAT * tmpBackLumFromWinAtRefPt(loop, IL)[IS - 1]; - thisDaylightControl.SourceLumFromWinAtRefPt(loop, IL)[IS - 1] = VTRAT * tmpSourceLumFromWinAtRefPt(loop, IL)[IS - 1]; - } // IL - } // ASETIL < 1 - } + // Adjust daylight quantities based on ratio between switched and unswitched visible transmittance + for (int IL = 1; IL <= NREFPT; ++IL) { + // DaylIllum(IL) and BacLum(IL) were calculated at the clear state: IS = 1, + // and need to adjusted for intermediate switched state at VisTransSelected: IS = 2 + int IS = 1; + + auto &daylFromWinAtRefPt = thisDayltgCtrl.refPts(IL).extWins(loop).lums; + auto const &tmpDayl = tmpDaylFromWinAtRefPt(IL, loop); + + VTRAT = state.dataSurface->SurfWinVisTransSelected(IWin) / (shadeGroupLums.unswitchedTvis + 0.000001); + dl->DaylIllum(IL) += (VTRAT - 1.0) * daylFromWinAtRefPt[iLum_Illum][IS - 1]; + thisDayltgCtrl.refPts(IL).lums[iLum_Back] += (VTRAT - 1.0) * daylFromWinAtRefPt[iLum_Back][IS - 1]; + + // Adjust illum, background illum and source luminance for this window in intermediate switched state + // for later use in the DayltgGlare calc because SurfaceWindow(IWin)%ShadingFlag = WinShadingType::SwitchableGlazing = 2 + IS = 2; + VTRAT = state.dataSurface->SurfWinVisTransSelected(IWin) / (shadeGroupLums.switchedTvis + 0.000001); + daylFromWinAtRefPt[iLum_Illum][IS - 1] = VTRAT * tmpDayl[iLum_Illum][IS - 1]; + daylFromWinAtRefPt[iLum_Back][IS - 1] = VTRAT * tmpDayl[iLum_Back][IS - 1]; + daylFromWinAtRefPt[iLum_Source][IS - 1] = VTRAT * tmpDayl[iLum_Source][IS - 1]; + } // for (IL) + } // if (loop > 0 && ASETIL < 1) // If new daylight does not exceed the illuminance setpoint, done, no more checking other groups of switchable glazings - if (state.dataDaylightingManager->DaylIllum(1) <= SetPnt(1)) { + if (dl->DaylIllum(1) <= SetPnt(1)) { breakOuterLoop = true; break; } - } + } // for (Win) if (breakOuterLoop) break; if (continueOuterLoop) continue; - } // End of fourth window loop + } // for (igroup) } // ISWFLG /= 0 .AND. DaylIllum(1) > SETPNT(1) // loop over windows to do luminance based control count = 0; - for (std::size_t igroup = 1; igroup <= thisDaylightControl.ShadeDeployOrderExtWins.size(); igroup++) { - for (int const IWin : thisDaylightControl.ShadeDeployOrderExtWins[igroup - 1]) { + for (int igroup = 1; igroup <= (int)thisDayltgCtrl.ShadeDeployOrderExtWins.size(); igroup++) { + for (int const IWin : thisDayltgCtrl.ShadeDeployOrderExtWins[igroup - 1]) { ++count; - ICtrl = state.dataSurface->Surface(IWin).activeWindowShadingControl; + int ICtrl = state.dataSurface->Surface(IWin).activeWindowShadingControl; WindowShadingControlType shCtrlType = state.dataSurface->WindowShadingControl(ICtrl).shadingControlType; if (!((shCtrlType == WindowShadingControlType::HiSolar_HiLumin_OffMidNight) || (shCtrlType == WindowShadingControlType::HiSolar_HiLumin_OffSunset) || (shCtrlType == WindowShadingControlType::HiSolar_HiLumin_OffNextMorning))) continue; // need to map back to the original order of the "loop" to not change all the other data structures - int loop = thisDaylightControl.MapShdOrdToLoopNum(count); - if (loop > 0) { - WinShadingType currentFlag = state.dataSurface->SurfWinShadingFlag(IWin); - WinShadingType ShType = state.dataSurface->WindowShadingControl(ICtrl).ShadingType; - if ((currentFlag == WinShadingType::IntShadeConditionallyOff) || (currentFlag == WinShadingType::GlassConditionallyLightened) || - (currentFlag == WinShadingType::ExtShadeConditionallyOff) || (currentFlag == WinShadingType::IntBlindConditionallyOff) || - (currentFlag == WinShadingType::ExtBlindConditionallyOff) || (currentFlag == WinShadingType::BGShadeConditionallyOff) || - (currentFlag == WinShadingType::BGBlindConditionallyOff)) { - if (thisDaylightControl.SourceLumFromWinAtRefPt(loop, 1)[(int)WinCover::Bare] > - state.dataSurface->WindowShadingControl(ICtrl).SetPoint2) { - // shade on if luminance of this window is above setpoint - state.dataSurface->SurfWinShadingFlag(IWin) = ShType; - // update total illuminance and background luminance - for (int IL = 1; IL <= NREFPT; ++IL) { - state.dataDaylightingManager->DaylIllum(IL) += thisDaylightControl.IllumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded] - - thisDaylightControl.IllumFromWinAtRefPt(loop, IL)[(int)WinCover::Bare]; - thisDaylightControl.BacLum(IL) += thisDaylightControl.BackLumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded] - - thisDaylightControl.BackLumFromWinAtRefPt(loop, IL)[(int)WinCover::Bare]; - } - } else { - // shade off if luminance is below setpoint - state.dataSurface->SurfWinShadingFlag(IWin) = WinShadingType::ShadeOff; - } + int loop = thisDayltgCtrl.MapShdOrdToLoopNum(count); + if (loop == 0) continue; + + WinShadingType currentFlag = state.dataSurface->SurfWinShadingFlag(IWin); + WinShadingType ShType = state.dataSurface->WindowShadingControl(ICtrl).ShadingType; + if ((currentFlag != WinShadingType::IntShadeConditionallyOff) && (currentFlag != WinShadingType::GlassConditionallyLightened) && + (currentFlag != WinShadingType::ExtShadeConditionallyOff) && (currentFlag != WinShadingType::IntBlindConditionallyOff) && + (currentFlag != WinShadingType::ExtBlindConditionallyOff) && (currentFlag != WinShadingType::BGShadeConditionallyOff) && + (currentFlag != WinShadingType::BGBlindConditionallyOff)) + continue; + + auto const &daylFromWinAtRefPt = thisDayltgCtrl.refPts(1).extWins(loop).lums; + if (daylFromWinAtRefPt[iLum_Source][iWinCover_Bare] > state.dataSurface->WindowShadingControl(ICtrl).SetPoint2) { + // shade on if luminance of this window is above setpoint + state.dataSurface->SurfWinShadingFlag(IWin) = ShType; + // update total illuminance and background luminance + for (int IL = 1; IL <= NREFPT; ++IL) { + dl->DaylIllum(IL) += daylFromWinAtRefPt[iLum_Illum][iWinCover_Shaded] - daylFromWinAtRefPt[iLum_Illum][iWinCover_Bare]; + thisDayltgCtrl.refPts(IL).lums[iLum_Back] += + daylFromWinAtRefPt[iLum_Back][iWinCover_Shaded] - daylFromWinAtRefPt[iLum_Back][iWinCover_Bare]; } + } else { + // shade off if luminance is below setpoint + state.dataSurface->SurfWinShadingFlag(IWin) = WinShadingType::ShadeOff; } - } - } + } // for (IWin) + } // for (igroup) // Calculate glare index at each reference point assuming the daylight illuminance setpoint is // met at both reference points, either by daylight or electric lights for (int IL = 1; IL <= NREFPT; ++IL) { - BACL = max(SetPnt(IL) * state.dataDaylightingData->enclDaylight(enclNum).aveVisDiffReflect / Constant::Pi, thisDaylightControl.BacLum(IL)); + auto &refPt = thisDayltgCtrl.refPts(IL); + BACL = max(SetPnt(IL) * dl->enclDaylight(enclNum).aveVisDiffReflect / Constant::Pi, refPt.lums[iLum_Back]); // DayltgGlare uses ZoneDaylight(ZoneNum)%SourceLumFromWinAtRefPt(IL,1,loop) for unshaded windows, and // ZoneDaylight(ZoneNum)%SourceLumFromWinAtRefPt(IL,2,loop) for shaded windows - DayltgGlare(state, IL, BACL, GLRNDX(IL), daylightCtrlNum); + refPt.glareIndex = DayltgGlare(state, IL, BACL, daylightCtrlNum); } // Check if glare level is less than maximum allowed at each ref pt. If maximum // is exceeded at either ref pt, attempt to reduce glare to acceptable level by closing // shading device on windows that have shades that have not already been closed. GlareFlag = false; - for (int IL = 1; IL <= NREFPT; ++IL) { - if (GLRNDX(IL) > thisDaylightControl.MaxGlareallowed) { + for (auto const &refPt : thisDayltgCtrl.refPts) { + if (refPt.glareIndex > thisDayltgCtrl.MaxGlareallowed) { GlareFlag = true; break; } @@ -6633,11 +6271,9 @@ void DayltgInteriorIllum(EnergyPlusData &state, count = 0; continueOuterLoop = false; - for (std::size_t igroup = 1; igroup <= thisDaylightControl.ShadeDeployOrderExtWins.size(); igroup++) { - - std::vector const &listOfExtWin = thisDaylightControl.ShadeDeployOrderExtWins[igroup - 1]; - auto &thisTVIS1 = state.dataDaylightingManager->TVIS1(igroup); - auto &thisTVIS2 = state.dataDaylightingManager->TVIS1(igroup); + for (std::size_t igroup = 1; igroup <= thisDayltgCtrl.ShadeDeployOrderExtWins.size(); igroup++) { + auto &shadeGroupLums = shadeGroupsLums(igroup); + std::vector const &listOfExtWin = thisDayltgCtrl.ShadeDeployOrderExtWins[igroup - 1]; int countBeforeListOfExtWinLoop = count; bool atLeastOneGlareControlIsActive = false; @@ -6645,112 +6281,106 @@ void DayltgInteriorIllum(EnergyPlusData &state, for (const int IWin : listOfExtWin) { ++count; // need to map back to the original order of the "loop" to not change all the other data structures - int loop = thisDaylightControl.MapShdOrdToLoopNum(count); - if (loop > 0) { - // Check if window is eligible for glare control - // TH 1/21/2010. Switchable glazings already in partially switched state - // should be allowed to further dim to control glare - // if (SurfWinShadingFlag(IWin) <= BGBlind && SurfWinShadingFlag(IWin) != SwitchableGlazing) { - if (NOT_SHADED(state.dataSurface->SurfWinShadingFlag(IWin)) || ANY_SHADE_SCREEN(state.dataSurface->SurfWinShadingFlag(IWin)) || - ANY_BLIND(state.dataSurface->SurfWinShadingFlag(IWin))) { - continueOuterLoop = false; - continue; - } - ICtrl = state.dataSurface->Surface(IWin).activeWindowShadingControl; - if (!state.dataSurface->Surface(IWin).HasShadeControl) { - continueOuterLoop = false; - continue; + int loop = thisDayltgCtrl.MapShdOrdToLoopNum(count); + if (loop == 0) continue; + + auto const &surfWin = state.dataSurface->SurfaceWindow(IWin); + // Check if window is eligible for glare control + // TH 1/21/2010. Switchable glazings already in partially switched state + // should be allowed to further dim to control glare + // if (SurfWinShadingFlag(IWin) <= BGBlind && SurfWinShadingFlag(IWin) != SwitchableGlazing) { + if (NOT_SHADED(state.dataSurface->SurfWinShadingFlag(IWin)) || ANY_SHADE_SCREEN(state.dataSurface->SurfWinShadingFlag(IWin)) || + ANY_BLIND(state.dataSurface->SurfWinShadingFlag(IWin))) { + continueOuterLoop = false; + continue; + } + ICtrl = state.dataSurface->Surface(IWin).activeWindowShadingControl; + if (!state.dataSurface->Surface(IWin).HasShadeControl) { + continueOuterLoop = false; + continue; + } + if (state.dataSurface->WindowShadingControl(ICtrl).GlareControlIsActive) { + atLeastOneGlareControlIsActive = true; + + // Illuminance (WDAYIL) and background luminance (WBACLU) contribution from this + // window without shading (IS=1) and with shading (IS=2) for each ref pt + // For switchable windows, this may be partially switched rather than fully dark + for (int IL = 1; IL <= NREFPT; ++IL) { + auto const &daylFromWinAtRefPt = thisDayltgCtrl.refPts(IL).extWins(loop).lums; + for (int iWinCover = 0; iWinCover < (int)WinCover::Num; ++iWinCover) { + shadeGroupLums.WDAYIL(IL)[iLum_Illum][iWinCover] = daylFromWinAtRefPt[iLum_Illum][iWinCover]; + shadeGroupLums.WDAYIL(IL)[iLum_Back][iWinCover] = daylFromWinAtRefPt[iLum_Back][iWinCover]; + } } - if (state.dataSurface->WindowShadingControl(ICtrl).GlareControlIsActive) { - atLeastOneGlareControlIsActive = true; - // Illuminance (WDAYIL) and background luminance (WBACLU) contribution from this - // window without shading (IS=1) and with shading (IS=2) for each ref pt - // For switchable windows, this may be partially switched rather than fully dark - for (int IL = 1; IL <= NREFPT; ++IL) { - for (int iWinCover = 0; iWinCover < (int)WinCover::Num; ++iWinCover) { - state.dataDaylightingManager->WDAYIL(IL, igroup)[iWinCover] = - thisDaylightControl.IllumFromWinAtRefPt(loop, IL)[iWinCover]; - state.dataDaylightingManager->WBACLU(IL, igroup)[iWinCover] = - thisDaylightControl.BackLumFromWinAtRefPt(loop, IL)[iWinCover]; - } + // Recalculate illuminance and glare with shading on this window. + // For switchable glazings, this is the fully switched (dark) state + for (int IL = 1; IL <= NREFPT; ++IL) { + auto &rdayil = shadeGroupLums.RDAYIL(IL); + auto const &wdayil = shadeGroupLums.WDAYIL(IL); + auto const &refPt = thisDayltgCtrl.refPts(IL); + + if (state.dataSurface->SurfWinShadingFlag(IWin) != WinShadingType::SwitchableGlazing) { + // for non switchable glazings or switchable glazings not switched yet (still in clear state) + // SurfaceWindow(IWin)%ShadingFlag = WinShadingFlag::GlassConditionallyLightened + rdayil[iLum_Illum] = dl->DaylIllum(IL) - wdayil[iLum_Illum][iWinCover_Bare] + wdayil[iLum_Illum][iWinCover_Shaded]; + rdayil[iLum_Back] = refPt.lums[iLum_Back] - wdayil[iLum_Back][iWinCover_Bare] + wdayil[iLum_Back][iWinCover_Shaded]; + } else { + // switchable glazings already in partially switched state when calc the RDAYIL(IL) & RBACLU(IL) + auto &tmpDayl = tmpDaylFromWinAtRefPt(loop, IL); + rdayil[iLum_Illum] = dl->DaylIllum(IL) - wdayil[iLum_Illum][iWinCover_Shaded] + tmpDayl[iLum_Illum][iWinCover_Shaded]; + rdayil[iLum_Back] = refPt.lums[iLum_Back] - wdayil[iLum_Back][iWinCover_Shaded] + tmpDayl[iLum_Back][iWinCover_Shaded]; } + } // for (IL) - // Recalculate illuminance and glare with shading on this window. - // For switchable glazings, this is the fully switched (dark) state + if (state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::GlassConditionallyLightened) + state.dataSurface->SurfWinShadingFlag(IWin) = WinShadingType::SwitchableGlazing; + else if (state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::IntShadeConditionallyOff) + state.dataSurface->SurfWinShadingFlag(IWin) = WinShadingType::IntShade; + else if (state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::ExtShadeConditionallyOff) + state.dataSurface->SurfWinShadingFlag(IWin) = WinShadingType::ExtShade; + else if (state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::IntBlindConditionallyOff) + state.dataSurface->SurfWinShadingFlag(IWin) = WinShadingType::IntBlind; + else if (state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::ExtBlindConditionallyOff) + state.dataSurface->SurfWinShadingFlag(IWin) = WinShadingType::ExtBlind; + else if (state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::BGShadeConditionallyOff) + state.dataSurface->SurfWinShadingFlag(IWin) = WinShadingType::BGShade; + else if (state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::BGBlindConditionallyOff) + state.dataSurface->SurfWinShadingFlag(IWin) = WinShadingType::BGBlind; + + // For switchable glazings, it is switched to fully dark state, + // update ZoneDaylight(ZoneNum)%SourceLumFromWinAtRefPt(IL,2,loop) for use in DayltgGlare + if (state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::SwitchableGlazing) { for (int IL = 1; IL <= NREFPT; ++IL) { - if (state.dataSurface->SurfWinShadingFlag(IWin) != WinShadingType::SwitchableGlazing) { - // for non switchable glazings or switchable glazings not switched yet (still in clear state) - // SurfaceWindow(IWin)%ShadingFlag = WinShadingFlag::GlassConditionallyLightened - state.dataDaylightingManager->RDAYIL(IL, igroup) = - state.dataDaylightingManager->DaylIllum(IL) - - state.dataDaylightingManager->WDAYIL(IL, igroup)[(int)WinCover::Bare] + - state.dataDaylightingManager->WDAYIL(IL, igroup)[(int)WinCover::Shaded]; - state.dataDaylightingManager->RBACLU(IL, igroup) = - thisDaylightControl.BacLum(IL) - state.dataDaylightingManager->WBACLU(IL, igroup)[(int)WinCover::Bare] + - state.dataDaylightingManager->WBACLU(IL, igroup)[(int)WinCover::Shaded]; - } else { - // switchable glazings already in partially switched state when calc the RDAYIL(IL) & RBACLU(IL) - state.dataDaylightingManager->RDAYIL(IL, igroup) = - state.dataDaylightingManager->DaylIllum(IL) - - state.dataDaylightingManager->WDAYIL(IL, igroup)[(int)WinCover::Shaded] + - tmpIllumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded]; - state.dataDaylightingManager->RBACLU(IL, igroup) = - thisDaylightControl.BacLum(IL) - state.dataDaylightingManager->WBACLU(IL, igroup)[(int)WinCover::Shaded] + - tmpBackLumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded]; - } - } + auto &daylFromWinAtRefPt = thisDayltgCtrl.refPts(IL).extWins(loop).lums; + auto const &tmpDayl = tmpDaylFromWinAtRefPt(IL, loop); - if (state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::GlassConditionallyLightened) - state.dataSurface->SurfWinShadingFlag(IWin) = WinShadingType::SwitchableGlazing; - else if (state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::IntShadeConditionallyOff) - state.dataSurface->SurfWinShadingFlag(IWin) = WinShadingType::IntShade; - else if (state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::ExtShadeConditionallyOff) - state.dataSurface->SurfWinShadingFlag(IWin) = WinShadingType::ExtShade; - else if (state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::IntBlindConditionallyOff) - state.dataSurface->SurfWinShadingFlag(IWin) = WinShadingType::IntBlind; - else if (state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::ExtBlindConditionallyOff) - state.dataSurface->SurfWinShadingFlag(IWin) = WinShadingType::ExtBlind; - else if (state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::BGShadeConditionallyOff) - state.dataSurface->SurfWinShadingFlag(IWin) = WinShadingType::BGShade; - else if (state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::BGBlindConditionallyOff) - state.dataSurface->SurfWinShadingFlag(IWin) = WinShadingType::BGBlind; - - // For switchable glazings, it is switched to fully dark state, - // update ZoneDaylight(ZoneNum)%SourceLumFromWinAtRefPt(IL,2,loop) for use in DayltgGlare - if (state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::SwitchableGlazing) { - for (int IL = 1; IL <= NREFPT; ++IL) { - thisDaylightControl.SourceLumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded] = - tmpSourceLumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded]; - thisDaylightControl.IllumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded] = - tmpIllumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded]; - thisDaylightControl.BackLumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded] = - tmpBackLumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded]; - } + daylFromWinAtRefPt[iLum_Source][iWinCover_Shaded] = tmpDayl[iLum_Source][iWinCover_Shaded]; + daylFromWinAtRefPt[iLum_Illum][iWinCover_Shaded] = tmpDayl[iLum_Illum][iWinCover_Shaded]; + daylFromWinAtRefPt[iLum_Back][iWinCover_Shaded] = tmpDayl[iLum_Back][iWinCover_Shaded]; + } - int const IConst = state.dataSurface->SurfActiveConstruction(IWin); - // Vis trans at normal incidence of unswitched glass - thisTVIS1 = General::POLYF(1.0, state.dataConstruction->Construct(IConst).TransVisBeamCoef) * - state.dataSurface->SurfWinGlazedFrac(IWin); + int const IConst = state.dataSurface->SurfActiveConstruction(IWin); + // Vis trans at normal incidence of unswitched glass + shadeGroupLums.unswitchedTvis = + General::POLYF(1.0, state.dataConstruction->Construct(IConst).TransVisBeamCoef) * surfWin.glazedFrac; - // Vis trans at normal incidence of fully switched glass - int const IConstShaded = state.dataSurface->Surface(IWin).activeShadedConstruction; - thisTVIS2 = General::POLYF(1.0, state.dataConstruction->Construct(IConstShaded).TransVisBeamCoef) * - state.dataSurface->SurfWinGlazedFrac(IWin); - } - } - } - } + // Vis trans at normal incidence of fully switched glass + int const IConstShaded = state.dataSurface->Surface(IWin).activeShadedConstruction; + shadeGroupLums.switchedTvis = + General::POLYF(1.0, state.dataConstruction->Construct(IConstShaded).TransVisBeamCoef) * surfWin.glazedFrac; + } // if (switchableGlazing) + } // if (GlareControlIsActive) + } // for (IWin) if (continueOuterLoop) continue; if (atLeastOneGlareControlIsActive) { // Re-calc daylight and glare at shaded state. For switchable glazings, it is the fully dark state. for (int IL = 1; IL <= NREFPT; ++IL) { - BACL = max(SetPnt(IL) * state.dataDaylightingData->enclDaylight(enclNum).aveVisDiffReflect / Constant::Pi, - state.dataDaylightingManager->RBACLU(IL, igroup)); + BACL = max(SetPnt(IL) * dl->enclDaylight(enclNum).aveVisDiffReflect / Constant::Pi, shadeGroupLums.RDAYIL(IL)[iLum_Back]); // DayltgGlare uses ZoneDaylight(ZoneNum)%SourceLumFromWinAtRefPt(IL,2,loop) for shaded state - DayltgGlare(state, IL, BACL, GLRNEW(IL), daylightCtrlNum); + GLRNEW(IL) = DayltgGlare(state, IL, BACL, daylightCtrlNum); } // Check if the shading did not improve the glare conditions @@ -6779,8 +6409,11 @@ void DayltgInteriorIllum(EnergyPlusData &state, int numRefPtOldAboveMaxNewBelowOld = 0; int numRefPtOldBelowMaxNewBelowMax = 0; for (int IL = 1; IL <= NREFPT; ++IL) { - if (GLRNDX(IL) > thisDaylightControl.MaxGlareallowed && GLRNEW(IL) <= GLRNDX(IL)) ++numRefPtOldAboveMaxNewBelowOld; - if (GLRNDX(IL) <= thisDaylightControl.MaxGlareallowed && GLRNEW(IL) <= thisDaylightControl.MaxGlareallowed) + auto const &refPt = thisDayltgCtrl.refPts(IL); + + if (refPt.glareIndex > thisDayltgCtrl.MaxGlareallowed && GLRNEW(IL) <= refPt.glareIndex) + ++numRefPtOldAboveMaxNewBelowOld; + else if (refPt.glareIndex <= thisDayltgCtrl.MaxGlareallowed && GLRNEW(IL) <= thisDayltgCtrl.MaxGlareallowed) ++numRefPtOldBelowMaxNewBelowMax; } blnCycle = true; @@ -6794,216 +6427,212 @@ void DayltgInteriorIllum(EnergyPlusData &state, for (const int IWin : listOfExtWin) { ++count; // need to map back to the original order of the "loop" to not change all the other data structures - int loop = thisDaylightControl.MapShdOrdToLoopNum(count); - if (loop > 0) { - // if (SurfWinShadingFlag(IWin) <= BGBlind && SurfWinShadingFlag(IWin) != SwitchableGlazing) { - if (NOT_SHADED(state.dataSurface->SurfWinShadingFlag(IWin)) || ANY_SHADE_SCREEN(state.dataSurface->SurfWinShadingFlag(IWin)) || - ANY_BLIND(state.dataSurface->SurfWinShadingFlag(IWin))) - continue; - - ICtrl = state.dataSurface->Surface(IWin).activeWindowShadingControl; - if (!state.dataSurface->Surface(IWin).HasShadeControl) continue; - if (state.dataSurface->WindowShadingControl(ICtrl).GlareControlIsActive) { - - // Shading this window has not improved the glare situation. - // Reset shading flag to no shading condition, go to next window. - if (blnCycle) { - // for switchable glazings, reset properties to clear state or partial switched state? - if (state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::SwitchableGlazing) { - state.dataSurface->SurfWinSwitchingFactor(IWin) = 0.0; - state.dataSurface->SurfWinVisTransSelected(IWin) = thisTVIS1; - - // RESET properties for fully dark state - for (int IL = 1; IL <= NREFPT; ++IL) { - thisDaylightControl.IllumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded] = - tmpIllumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded]; - thisDaylightControl.BackLumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded] = - tmpBackLumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded]; - thisDaylightControl.SourceLumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded] = - tmpSourceLumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded]; - } - } - - state.dataSurface->SurfWinShadingFlag(IWin) = WinShadingType::ShadeOff; - continue; - } + int loop = thisDayltgCtrl.MapShdOrdToLoopNum(count); + if (loop == 0) continue; - // Shading this window has improved the glare situation. - // Reset background luminance, glare index, and daylight illuminance at each ref pt. - // For switchable glazings, this is fully switched, dark state - for (int IL = 1; IL <= NREFPT; ++IL) { - thisDaylightControl.BacLum(IL) = state.dataDaylightingManager->RBACLU(IL, igroup); - GLRNDX(IL) = GLRNEW(IL); - state.dataDaylightingManager->DaylIllum(IL) = state.dataDaylightingManager->RDAYIL(IL, igroup); - } + // if (SurfWinShadingFlag(IWin) <= BGBlind && SurfWinShadingFlag(IWin) != SwitchableGlazing) { + if (NOT_SHADED(state.dataSurface->SurfWinShadingFlag(IWin)) || ANY_SHADE_SCREEN(state.dataSurface->SurfWinShadingFlag(IWin)) || + ANY_BLIND(state.dataSurface->SurfWinShadingFlag(IWin))) + continue; - // TH comments (5/22/2009): seems for EC windows, if the calculated glare exceeds the max setpoint, - // the EC windows will be reset to fully dark state which significantly reduces the available daylight. - // A better way is to dim the EC windows as necessary just to meet the glare index, which will still - // provide more daylight while not exceeding the max glare! The question is then how to set the - // SwitchingFactor to just meet the glare index. - // This was addressed in CR 7984 for E+ 5.0. 1/19/2010 + ICtrl = state.dataSurface->Surface(IWin).activeWindowShadingControl; + if (!state.dataSurface->Surface(IWin).HasShadeControl) continue; + if (state.dataSurface->WindowShadingControl(ICtrl).GlareControlIsActive) { - // If switchable glazing, set switching factor to 1: fully switched. + // Shading this window has not improved the glare situation. + // Reset shading flag to no shading condition, go to next window. + if (blnCycle) { + // for switchable glazings, reset properties to clear state or partial switched state? if (state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::SwitchableGlazing) { - // tmpSWFactor0 = SurfaceWindow( IWin ).SwitchingFactor; // save original - // switching factor - ////Unused Set but never used - state.dataSurface->SurfWinSwitchingFactor(IWin) = 1.0; - state.dataSurface->SurfWinVisTransSelected(IWin) = thisTVIS2; + state.dataSurface->SurfWinSwitchingFactor(IWin) = 0.0; + state.dataSurface->SurfWinVisTransSelected(IWin) = shadeGroupLums.unswitchedTvis; - // restore fully dark values + // RESET properties for fully dark state for (int IL = 1; IL <= NREFPT; ++IL) { - state.dataDaylightingManager->WDAYIL(IL, igroup)[(int)WinCover::Shaded] = - tmpIllumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded]; - state.dataDaylightingManager->WBACLU(IL, igroup)[(int)WinCover::Shaded] = - tmpBackLumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded]; - thisDaylightControl.IllumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded] = - tmpIllumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded]; - thisDaylightControl.BackLumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded] = - tmpBackLumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded]; - thisDaylightControl.SourceLumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded] = - tmpSourceLumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded]; + auto &daylFromWinAtRefPt = thisDayltgCtrl.refPts(IL).extWins(loop).lums; + auto const &tmpDayl = tmpDaylFromWinAtRefPt(IL, loop); + daylFromWinAtRefPt[iLum_Illum][iWinCover_Shaded] = tmpDayl[iLum_Illum][iWinCover_Shaded]; + daylFromWinAtRefPt[iLum_Source][iWinCover_Shaded] = tmpDayl[iLum_Source][iWinCover_Shaded]; + daylFromWinAtRefPt[iLum_Back][iWinCover_Shaded] = tmpDayl[iLum_Back][iWinCover_Shaded]; } } - // Check if glare now acceptable at each ref pt. - GlareOK = false; - if (NREFPT == 1) { - if (GLRNDX(1) <= thisDaylightControl.MaxGlareallowed) GlareOK = true; - } else if (NREFPT > 1) { - if (GLRNDX(1) <= thisDaylightControl.MaxGlareallowed && GLRNDX(2) <= thisDaylightControl.MaxGlareallowed) GlareOK = true; + state.dataSurface->SurfWinShadingFlag(IWin) = WinShadingType::ShadeOff; + continue; + } + + // Shading this window has improved the glare situation. + // Reset background luminance, glare index, and daylight illuminance at each ref pt. + // For switchable glazings, this is fully switched, dark state + for (int IL = 1; IL <= NREFPT; ++IL) { + auto &refPt = thisDayltgCtrl.refPts(IL); + refPt.lums[iLum_Back] = shadeGroupLums.RDAYIL(IL)[iLum_Back]; + refPt.glareIndex = GLRNEW(IL); + dl->DaylIllum(IL) = shadeGroupLums.RDAYIL(IL)[iLum_Illum]; + } + + // TH comments (5/22/2009): seems for EC windows, if the calculated glare exceeds the max setpoint, + // the EC windows will be reset to fully dark state which significantly reduces the available daylight. + // A better way is to dim the EC windows as necessary just to meet the glare index, which will still + // provide more daylight while not exceeding the max glare! The question is then how to set the + // SwitchingFactor to just meet the glare index. + // This was addressed in CR 7984 for E+ 5.0. 1/19/2010 + + // If switchable glazing, set switching factor to 1: fully switched. + if (state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::SwitchableGlazing) { + // tmpSWFactor0 = SurfaceWindow( IWin ).SwitchingFactor; // save original + // switching factor + ////Unused Set but never used + state.dataSurface->SurfWinSwitchingFactor(IWin) = 1.0; + state.dataSurface->SurfWinVisTransSelected(IWin) = shadeGroupLums.switchedTvis; + + // restore fully dark values + for (int IL = 1; IL <= NREFPT; ++IL) { + auto &daylFromWinAtRefPt = thisDayltgCtrl.refPts(IL).extWins(loop).lums; + auto const &tmpDayl = tmpDaylFromWinAtRefPt(IL, loop); + auto &wdayil = shadeGroupLums.WDAYIL(IL); + wdayil[iLum_Illum][iWinCover_Shaded] = tmpDayl[iLum_Illum][iWinCover_Shaded]; + wdayil[iLum_Back][iWinCover_Shaded] = tmpDayl[iLum_Back][iWinCover_Shaded]; + daylFromWinAtRefPt[iLum_Illum][iWinCover_Shaded] = tmpDayl[iLum_Illum][iWinCover_Shaded]; + daylFromWinAtRefPt[iLum_Back][iWinCover_Shaded] = tmpDayl[iLum_Back][iWinCover_Shaded]; + daylFromWinAtRefPt[iLum_Source][iWinCover_Shaded] = tmpDayl[iLum_Source][iWinCover_Shaded]; } + } - if (GlareOK) { - if (state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::SwitchableGlazing && - state.dataSurface->WindowShadingControl(ICtrl).shadingControlType == WindowShadingControlType::MeetDaylIlumSetp) { - // Added TH 1/14/2010 - // Only for switchable glazings with MeetDaylightIlluminanceSetpoint control - // The glazing is in fully dark state, it might lighten a bit to provide more daylight - // while meeting maximum discomfort glare index - // Iteration to find the right switching factor meeting the glare index - - // get fully dark state values - Real64 tmpSWSL1 = tmpSourceLumFromWinAtRefPt(loop, 1)[(int)WinCover::Shaded]; - Real64 tmpSWSL2 = (NREFPT > 1) ? tmpSourceLumFromWinAtRefPt(loop, 2)[(int)WinCover::Shaded] : 0.0; - - // use simple fixed step search in iteraction, can be improved in future - Real64 tmpSWFactor = 1.0 - tmpSWIterStep; - while (tmpSWFactor > 0) { - // calc new glare at new switching state - for (int IL = 1; IL <= NREFPT; ++IL) { - state.dataDaylightingManager->RDAYIL(IL, igroup) = - state.dataDaylightingManager->DaylIllum(IL) + - (state.dataDaylightingManager->WDAYIL(IL, igroup)[(int)WinCover::Bare] - - state.dataDaylightingManager->WDAYIL(IL, igroup)[(int)WinCover::Shaded]) * - (1.0 - tmpSWFactor); - state.dataDaylightingManager->RBACLU(IL, igroup) = - thisDaylightControl.BacLum(IL) + - (state.dataDaylightingManager->WBACLU(IL, igroup)[(int)WinCover::Bare] - - state.dataDaylightingManager->WBACLU(IL, igroup)[(int)WinCover::Shaded]) * - (1.0 - tmpSWFactor); - BACL = max(SetPnt(IL) * state.dataDaylightingData->enclDaylight(enclNum).aveVisDiffReflect / Constant::Pi, - state.dataDaylightingManager->RBACLU(IL, igroup)); - // needs to update SourceLumFromWinAtRefPt(IL,2,loop) before re-calc DayltgGlare - tmpMult = (thisTVIS1 - (thisTVIS1 - thisTVIS2) * tmpSWFactor) / thisTVIS2; - if (IL == 1) { - thisDaylightControl.SourceLumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded] = tmpSWSL1 * tmpMult; - } else { - thisDaylightControl.SourceLumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded] = tmpSWSL2 * tmpMult; - } - // Calc new glare - DayltgGlare(state, IL, BACL, GLRNEW(IL), daylightCtrlNum); - } + // Check if glare now acceptable at each ref pt. + GlareOK = false; + if (NREFPT == 1) { + if (thisDayltgCtrl.refPts(1).glareIndex <= thisDayltgCtrl.MaxGlareallowed) GlareOK = true; + } else if (NREFPT > 1) { + if (thisDayltgCtrl.refPts(1).glareIndex <= thisDayltgCtrl.MaxGlareallowed && + thisDayltgCtrl.refPts(2).glareIndex <= thisDayltgCtrl.MaxGlareallowed) + GlareOK = true; + } - // Check whether new glare is OK - GlareOK = false; - if (NREFPT == 1) { - if (GLRNEW(1) <= thisDaylightControl.MaxGlareallowed) GlareOK = true; - } else if (NREFPT > 1) { - if (GLRNEW(1) <= thisDaylightControl.MaxGlareallowed && GLRNEW(2) <= thisDaylightControl.MaxGlareallowed) - GlareOK = true; - } + if (GlareOK) { + if (state.dataSurface->SurfWinShadingFlag(IWin) == WinShadingType::SwitchableGlazing && + state.dataSurface->WindowShadingControl(ICtrl).shadingControlType == WindowShadingControlType::MeetDaylIlumSetp) { + // Added TH 1/14/2010 + // Only for switchable glazings with MeetDaylightIlluminanceSetpoint control + // The glazing is in fully dark state, it might lighten a bit to provide more daylight + // while meeting maximum discomfort glare index + // Iteration to find the right switching factor meeting the glare index + + // get fully dark state values + Real64 tmpSWSL1 = tmpDaylFromWinAtRefPt(1, loop)[iLum_Source][iWinCover_Shaded]; + Real64 tmpSWSL2 = (NREFPT > 1) ? tmpDaylFromWinAtRefPt(2, loop)[iLum_Source][iWinCover_Shaded] : 0.0; + + // use simple fixed step search in iteraction, can be improved in future + Real64 tmpSWFactor = 1.0 - tmpSWIterStep; + while (tmpSWFactor > 0) { + // calc new glare at new switching state + for (int IL = 1; IL <= NREFPT; ++IL) { + auto &rdayil = shadeGroupLums.RDAYIL(IL); + auto const &wdayil = shadeGroupLums.WDAYIL(IL); + auto &refPt = thisDayltgCtrl.refPts(IL); + rdayil[iLum_Illum] = + dl->DaylIllum(IL) + + (wdayil[iLum_Illum][iWinCover_Bare] - wdayil[iLum_Illum][iWinCover_Shaded]) * (1.0 - tmpSWFactor); + rdayil[iLum_Back] = + refPt.lums[iLum_Back] + + (wdayil[iLum_Back][iWinCover_Bare] - wdayil[iLum_Back][iWinCover_Shaded]) * (1.0 - tmpSWFactor); + BACL = max(SetPnt(IL) * dl->enclDaylight(enclNum).aveVisDiffReflect / Constant::Pi, rdayil[iLum_Back]); + // needs to update SourceLumFromWinAtRefPt(IL,2,loop) before re-calc DayltgGlare + tmpMult = (shadeGroupLums.unswitchedTvis - + (shadeGroupLums.unswitchedTvis - shadeGroupLums.switchedTvis) * tmpSWFactor) / + shadeGroupLums.switchedTvis; + refPt.extWins(loop).lums[iLum_Source][iWinCover_Shaded] = ((IL == 1) ? tmpSWSL1 : tmpSWSL2) * tmpMult; + // Calc new glare + GLRNEW(IL) = DayltgGlare(state, IL, BACL, daylightCtrlNum); + } // for (IL) + + // Check whether new glare is OK + GlareOK = false; + if (NREFPT == 1) { + if (GLRNEW(1) <= thisDayltgCtrl.MaxGlareallowed) GlareOK = true; + } else if (NREFPT > 1) { + if (GLRNEW(1) <= thisDayltgCtrl.MaxGlareallowed && GLRNEW(2) <= thisDayltgCtrl.MaxGlareallowed) GlareOK = true; + } - if (GlareOK) { - if (tmpSWFactor >= tmpSWIterStep) { - // Continue to lighten the glazing - tmpSWFactor -= tmpSWIterStep; - continue; - } else { - // Glare still OK but glazing already in clear state, no more lighten - breakOuterLoop = true; - break; - } + if (GlareOK) { + if (tmpSWFactor >= tmpSWIterStep) { + // Continue to lighten the glazing + tmpSWFactor -= tmpSWIterStep; + continue; } else { - // Glare too high, exit and use previous switching state - tmpSWFactor += tmpSWIterStep; + // Glare still OK but glazing already in clear state, no more lighten breakOuterLoop = true; break; } + } else { + // Glare too high, exit and use previous switching state + tmpSWFactor += tmpSWIterStep; + breakOuterLoop = true; + break; } + } // if (tmpSWFactor > 0) - // Final re-calculation if needed - if (!GlareOK) { - // Glare too high, use previous state and re-calc - for (int IL = 1; IL <= NREFPT; ++IL) { - state.dataDaylightingManager->RDAYIL(IL, igroup) = - state.dataDaylightingManager->DaylIllum(IL) + - (state.dataDaylightingManager->WDAYIL(IL, igroup)[(int)WinCover::Bare] - - state.dataDaylightingManager->WDAYIL(IL, igroup)[(int)WinCover::Shaded]) * - (1.0 - tmpSWFactor); - state.dataDaylightingManager->RBACLU(IL, igroup) = - thisDaylightControl.BacLum(IL) + - (state.dataDaylightingManager->WBACLU(IL, igroup)[(int)WinCover::Bare] - - state.dataDaylightingManager->WBACLU(IL, igroup)[(int)WinCover::Shaded]) * - (1.0 - tmpSWFactor); - BACL = max(SetPnt(IL) * state.dataDaylightingData->enclDaylight(enclNum).aveVisDiffReflect / Constant::Pi, - state.dataDaylightingManager->RBACLU(IL, igroup)); - - // needs to update SourceLumFromWinAtRefPt(IL,2,IWin) before re-calc DayltgGlare - tmpMult = (thisTVIS1 - (thisTVIS1 - thisTVIS2) * tmpSWFactor) / thisTVIS2; - if (IL == 1) { - thisDaylightControl.SourceLumFromWinAtRefPt(loop, 1)[(int)WinCover::Shaded] = tmpSWSL1 * tmpMult; - } else { - thisDaylightControl.SourceLumFromWinAtRefPt(loop, 2)[(int)WinCover::Shaded] = tmpSWSL2 * tmpMult; - } - DayltgGlare(state, IL, BACL, GLRNEW(IL), daylightCtrlNum); - } - } - - // Update final results + // Final re-calculation if needed + if (!GlareOK) { + // Glare too high, use previous state and re-calc for (int IL = 1; IL <= NREFPT; ++IL) { - thisDaylightControl.BacLum(IL) = state.dataDaylightingManager->RBACLU(IL, igroup); - GLRNDX(IL) = GLRNEW(IL); - state.dataDaylightingManager->DaylIllum(IL) = state.dataDaylightingManager->RDAYIL(IL, igroup); - - tmpMult = (thisTVIS1 - (thisTVIS1 - thisTVIS2) * tmpSWFactor) / thisTVIS2; - // update report variables - thisDaylightControl.IllumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded] = - tmpIllumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded] * tmpMult; - thisDaylightControl.BackLumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded] = - tmpBackLumFromWinAtRefPt(loop, IL)[(int)WinCover::Shaded] * tmpMult; + auto &rdayil = shadeGroupLums.RDAYIL(IL); + auto const &wdayil = shadeGroupLums.WDAYIL(IL); + rdayil[iLum_Illum] = + dl->DaylIllum(IL) + + (wdayil[iLum_Illum][iWinCover_Bare] - wdayil[iLum_Illum][iWinCover_Shaded]) * (1.0 - tmpSWFactor); + rdayil[iLum_Back] = + thisDayltgCtrl.refPts(IL).lums[iLum_Back] + + (wdayil[iLum_Back][iWinCover_Bare] - wdayil[iLum_Back][iWinCover_Shaded]) * (1.0 - tmpSWFactor); + BACL = max(SetPnt(IL) * dl->enclDaylight(enclNum).aveVisDiffReflect / Constant::Pi, rdayil[iLum_Back]); + + // needs to update SourceLumFromWinAtRefPt(IL,2,IWin) before re-calc DayltgGlare + tmpMult = (shadeGroupLums.unswitchedTvis - + (shadeGroupLums.unswitchedTvis - shadeGroupLums.switchedTvis) * tmpSWFactor) / + shadeGroupLums.switchedTvis; + thisDayltgCtrl.refPts(1).extWins(loop).lums[iLum_Source][iWinCover_Shaded] = + ((IL == 1) ? tmpSWSL1 : tmpSWSL2) * tmpMult; + GLRNEW(IL) = DayltgGlare(state, IL, BACL, daylightCtrlNum); } - state.dataSurface->SurfWinSwitchingFactor(IWin) = tmpSWFactor; - state.dataSurface->SurfWinVisTransSelected(IWin) = thisTVIS1 - (thisTVIS1 - thisTVIS2) * tmpSWFactor; + } - } else { - // For un-switchable glazing or switchable glazing but not MeetDaylightIlluminaceSetpoint control, - // it is in shaded state and glare is ok - job is done, exit the window loop - IWin - breakOuterLoop = true; - break; + // Update final results + for (int IL = 1; IL <= NREFPT; ++IL) { + auto &refPt = thisDayltgCtrl.refPts(IL); + auto const &rdayil = shadeGroupLums.RDAYIL(IL); + refPt.lums[iLum_Back] = rdayil[iLum_Back]; + refPt.glareIndex = GLRNEW(IL); + dl->DaylIllum(IL) = rdayil[iLum_Illum]; + + tmpMult = + (shadeGroupLums.unswitchedTvis - (shadeGroupLums.unswitchedTvis - shadeGroupLums.switchedTvis) * tmpSWFactor) / + shadeGroupLums.switchedTvis; + // update report variables + auto &daylFromWinAtRefPt = refPt.extWins(loop).lums; + auto const &tmpDayl = tmpDaylFromWinAtRefPt(IL, loop); + daylFromWinAtRefPt[iLum_Illum][iWinCover_Shaded] = tmpDayl[iLum_Illum][iWinCover_Shaded] * tmpMult; + daylFromWinAtRefPt[iLum_Back][iWinCover_Shaded] = tmpDayl[iLum_Back][iWinCover_Shaded] * tmpMult; } + state.dataSurface->SurfWinSwitchingFactor(IWin) = tmpSWFactor; + state.dataSurface->SurfWinVisTransSelected(IWin) = + shadeGroupLums.unswitchedTvis - (shadeGroupLums.unswitchedTvis - shadeGroupLums.switchedTvis) * tmpSWFactor; + + } else { + // For un-switchable glazing or switchable glazing but not MeetDaylightIlluminaceSetpoint control, + // it is in shaded state and glare is ok - job is done, exit the window loop - IWin + breakOuterLoop = true; + break; } - } // End of check if window glare control is active - } - } // end of for (int IWin : listOfExtWin) + } // if (glareOK) + } // if (glareControlIsActive) + } // for (IWin) if (breakOuterLoop) break; - } // for group - } // GlareFlag + } // for (igroup) + } // if (GlareFlag) // Loop again over windows and reset remaining shading flags that // are 10 or higher (i.e., conditionally off) to off - for (int spaceNum : state.dataHeatBal->Zone(thisDaylightControl.zoneIndex).spaceIndexes) { + for (int spaceNum : state.dataHeatBal->Zone(thisDayltgCtrl.zoneIndex).spaceIndexes) { auto const &thisSpace = state.dataHeatBal->space(spaceNum); for (int IWin = thisSpace.WindowSurfaceFirst; IWin <= thisSpace.WindowSurfaceLast; ++IWin) { if (state.dataSurface->Surface(IWin).ExtBoundCond != ExternalEnvironment) continue; @@ -7020,24 +6649,15 @@ void DayltgInteriorIllum(EnergyPlusData &state, // Variables for reporting for (int IL = 1; IL <= NREFPT; ++IL) { - thisDaylightControl.DaylIllumAtRefPt(IL) = state.dataDaylightingManager->DaylIllum(IL); - thisDaylightControl.GlareIndexAtRefPt(IL) = GLRNDX(IL); + auto &refPt = thisDayltgCtrl.refPts(IL); + refPt.lums[iLum_Illum] = dl->DaylIllum(IL); // added TH 12/2/2008 - if (GLRNDX(IL) > thisDaylightControl.MaxGlareallowed) { - thisDaylightControl.TimeExceedingGlareIndexSPAtRefPt(IL) = state.dataGlobal->TimeStepZone; // fraction of hours - } else { - thisDaylightControl.TimeExceedingGlareIndexSPAtRefPt(IL) = 0.0; - } - + refPt.timeExceedingGlareIndexSetPoint = (refPt.glareIndex > thisDayltgCtrl.MaxGlareallowed) ? state.dataGlobal->TimeStepZone : 0.0; // added TH 7/6/2009 - if (state.dataDaylightingManager->DaylIllum(IL) > thisDaylightControl.IllumSetPoint(IL)) { - thisDaylightControl.TimeExceedingDaylightIlluminanceSPAtRefPt(IL) = state.dataGlobal->TimeStepZone; // fraction of hours - } else { - thisDaylightControl.TimeExceedingDaylightIlluminanceSPAtRefPt(IL) = 0.0; - } + refPt.timeExceedingDaylightIlluminanceSetPoint = (dl->DaylIllum(IL) > refPt.illumSetPoint) ? state.dataGlobal->TimeStepZone : 0.0; } -} +} // DayltgInteriorIllum() void DayltgInteriorTDDIllum(EnergyPlusData &state) { @@ -7048,6 +6668,7 @@ void DayltgInteriorTDDIllum(EnergyPlusData &state) // PURPOSE OF THIS SUBROUTINE: // Calculate the TDD Pipe illuminance values + auto &dl = state.dataDayltg; // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int iSky1; // Sky type index values for averaging two sky types @@ -7072,28 +6693,28 @@ void DayltgInteriorTDDIllum(EnergyPlusData &state) for (int PipeNum = 1; PipeNum <= (int)state.dataDaylightingDevicesData->TDDPipe.size(); ++PipeNum) { state.dataDaylightingDevicesData->TDDPipe(PipeNum).TransVisBeam = - state.dataGlobal->WeightNow * state.dataDaylightingManager->TDDTransVisBeam(state.dataGlobal->HourOfDay, PipeNum) + - state.dataGlobal->WeightPreviousHour * state.dataDaylightingManager->TDDTransVisBeam(state.dataGlobal->PreviousHour, PipeNum); + state.dataGlobal->WeightNow * dl->TDDTransVisBeam(state.dataGlobal->HourOfDay, PipeNum) + + state.dataGlobal->WeightPreviousHour * dl->TDDTransVisBeam(state.dataGlobal->PreviousHour, PipeNum); - auto const &tddFluxIncCurr = state.dataDaylightingManager->TDDFluxInc(state.dataGlobal->HourOfDay, PipeNum); - auto const &tddFluxIncPrev = state.dataDaylightingManager->TDDFluxInc(state.dataGlobal->PreviousHour, PipeNum); + auto const &tddFluxIncCurr = dl->TDDFluxInc(state.dataGlobal->HourOfDay, PipeNum); + auto const &tddFluxIncPrev = dl->TDDFluxInc(state.dataGlobal->PreviousHour, PipeNum); - auto const &tddFluxTransCurr = state.dataDaylightingManager->TDDFluxTrans(state.dataGlobal->HourOfDay, PipeNum); - auto const &tddFluxTransPrev = state.dataDaylightingManager->TDDFluxTrans(state.dataGlobal->PreviousHour, PipeNum); + auto const &tddFluxTransCurr = dl->TDDFluxTrans(state.dataGlobal->HourOfDay, PipeNum); + auto const &tddFluxTransPrev = dl->TDDFluxTrans(state.dataGlobal->PreviousHour, PipeNum); - for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { + Illums TDDTransVisDiff; + for (int iSky = iSky1; iSky <= iSky2; ++iSky) { Real64 tddTransVisDiffCurr = (tddFluxIncCurr.sky[iSky] > 0.0) ? (tddFluxTransCurr.sky[iSky] / tddFluxIncCurr.sky[iSky]) : 0.0; Real64 tddTransVisDiffPrev = (tddFluxIncPrev.sky[iSky] > 0.0) ? (tddFluxTransPrev.sky[iSky] / tddFluxIncPrev.sky[iSky]) : 0.0; - state.dataDaylightingManager->TDDTransVisDiff.sky[iSky] = + TDDTransVisDiff.sky[iSky] = state.dataGlobal->WeightNow * tddTransVisDiffCurr + state.dataGlobal->WeightPreviousHour * tddTransVisDiffPrev; } // for (iSky) state.dataDaylightingDevicesData->TDDPipe(PipeNum).TransVisDiff = - SkyWeight * state.dataDaylightingManager->TDDTransVisDiff.sky[iSky1] + - (1.0 - SkyWeight) * state.dataDaylightingManager->TDDTransVisDiff.sky[iSky2]; + SkyWeight * TDDTransVisDiff.sky[iSky1] + (1.0 - SkyWeight) * TDDTransVisDiff.sky[iSky2]; } // for (PipeNum) -} +} // DayltgInteriorTDDIllum() void DayltgElecLightingControl(EnergyPlusData &state) { @@ -7114,27 +6735,28 @@ void DayltgElecLightingControl(EnergyPlusData &state) // REFERENCES: // Based on DOE-2.1E subroutine DLTSYS. + auto &dl = state.dataDayltg; - if (state.dataDaylightingData->daylightControl.empty()) { + if (dl->daylightControl.empty()) { return; } // Reset space power reduction factors for (int spaceNum = 1; spaceNum <= state.dataGlobal->numSpaces; ++spaceNum) { - state.dataDaylightingData->spacePowerReductionFactor(spaceNum) = 1.0; + dl->spacePowerReductionFactor(spaceNum) = 1.0; } - for (auto &thisDaylightControl : state.dataDaylightingData->daylightControl) { + for (auto &thisDayltgCtrl : dl->daylightControl) { - if (thisDaylightControl.DaylightMethod != DaylightingMethod::SplitFlux) { + if (thisDayltgCtrl.DaylightMethod != DaylightingMethod::SplitFlux) { // Set space power reduction factors - if (thisDaylightControl.PowerReductionFactor < 1.0) { - if (thisDaylightControl.spaceIndex > 0) { + if (thisDayltgCtrl.PowerReductionFactor < 1.0) { + if (thisDayltgCtrl.spaceIndex > 0) { // This is a space-level daylighting control - state.dataDaylightingData->spacePowerReductionFactor(thisDaylightControl.spaceIndex) = thisDaylightControl.PowerReductionFactor; + dl->spacePowerReductionFactor(thisDayltgCtrl.spaceIndex) = thisDayltgCtrl.PowerReductionFactor; } else { // This is a zone-level daylighting control - for (int spaceNum : state.dataHeatBal->Zone(thisDaylightControl.zoneIndex).spaceIndexes) { - state.dataDaylightingData->spacePowerReductionFactor(spaceNum) = thisDaylightControl.PowerReductionFactor; + for (int spaceNum : state.dataHeatBal->Zone(thisDayltgCtrl.zoneIndex).spaceIndexes) { + dl->spacePowerReductionFactor(spaceNum) = thisDayltgCtrl.PowerReductionFactor; } } } @@ -7142,75 +6764,74 @@ void DayltgElecLightingControl(EnergyPlusData &state) } // Electric lighting power reduction factor for a given daylighting control - Real64 &TotReduction = thisDaylightControl.PowerReductionFactor; + Real64 &TotReduction = thisDayltgCtrl.PowerReductionFactor; TotReduction = 0.0; Real64 ZFTOT = 0.0; // check if scheduled to be available - if (ScheduleManager::GetCurrentScheduleValue(state, thisDaylightControl.AvailSchedNum) > 0.0) { + if (ScheduleManager::GetCurrentScheduleValue(state, thisDayltgCtrl.AvailSchedNum) > 0.0) { // Loop over reference points - for (int IL = 1; IL <= thisDaylightControl.TotalDaylRefPoints; ++IL) { - + for (int IL = 1; IL <= thisDayltgCtrl.TotalDaylRefPoints; ++IL) { + auto &refPt = thisDayltgCtrl.refPts(IL); // Total fraction of zone that is daylit - ZFTOT += thisDaylightControl.FracZoneDaylit(IL); + ZFTOT += refPt.fracZoneDaylit; - state.dataDaylightingManager->DaylIllum(IL) = thisDaylightControl.DaylIllumAtRefPt(IL); + dl->DaylIllum(IL) = refPt.lums[iLum_Illum]; Real64 FL = 0.0; - if (state.dataDaylightingManager->DaylIllum(IL) < thisDaylightControl.IllumSetPoint(IL)) { - FL = - (thisDaylightControl.IllumSetPoint(IL) - state.dataDaylightingManager->DaylIllum(IL)) / thisDaylightControl.IllumSetPoint(IL); + if (dl->DaylIllum(IL) < refPt.illumSetPoint) { + FL = (refPt.illumSetPoint - dl->DaylIllum(IL)) / refPt.illumSetPoint; } // BRANCH ON LIGHTING SYSTEM TYPE - LtgCtrlType LSYSTP = thisDaylightControl.LightControlType; + LtgCtrlType LSYSTP = thisDayltgCtrl.LightControlType; Real64 FP = 0.0; if (LSYSTP != LtgCtrlType::Stepped) { // Continuously dimmable system with linear power curve // Fractional output power required to meet setpoint FP = 1.0; // LIGHT-CTRL-TYPE = CONTINUOUS (LSYSTP = 1) - if (FL <= thisDaylightControl.MinLightFraction) { - FP = thisDaylightControl.MinPowerFraction; + if (FL <= thisDayltgCtrl.MinLightFraction) { + FP = thisDayltgCtrl.MinPowerFraction; } // LIGHT-CTRL-TYPE = CONTINUOUS/OFF (LSYSTP = 3) - if (FL <= thisDaylightControl.MinLightFraction && LSYSTP == LtgCtrlType::ContinuousOff) { + if (FL <= thisDayltgCtrl.MinLightFraction && LSYSTP == LtgCtrlType::ContinuousOff) { FP = 0.0; } - if (FL > thisDaylightControl.MinLightFraction && FL < 1.0) { - FP = (FL + (1.0 - FL) * thisDaylightControl.MinPowerFraction - thisDaylightControl.MinLightFraction) / - (1.0 - thisDaylightControl.MinLightFraction); + if (FL > thisDayltgCtrl.MinLightFraction && FL < 1.0) { + FP = (FL + (1.0 - FL) * thisDayltgCtrl.MinPowerFraction - thisDayltgCtrl.MinLightFraction) / + (1.0 - thisDayltgCtrl.MinLightFraction); } } else { // LSYSTP = 2 // Stepped system FP = 0.0; // #9060: Use a tolerance, otherwise at very low (< 1e-12) daylighting conditions, you can get a multiplier > 1.0 - if (state.dataDaylightingManager->DaylIllum(IL) < 0.1) { + if (dl->DaylIllum(IL) < 0.1) { FP = 1.0; - } else if (state.dataDaylightingManager->DaylIllum(IL) < thisDaylightControl.IllumSetPoint(IL)) { - FP = double(int(thisDaylightControl.LightControlSteps * FL) + 1) / double(thisDaylightControl.LightControlSteps); + } else if (dl->DaylIllum(IL) < refPt.illumSetPoint) { + FP = double(int(thisDayltgCtrl.LightControlSteps * FL) + 1) / double(thisDayltgCtrl.LightControlSteps); } - if (thisDaylightControl.LightControlProbability < 1.0) { + if (thisDayltgCtrl.LightControlProbability < 1.0) { // Manual operation. Occupant sets lights one level too high a fraction of the time equal to // 1. - ZoneDaylight(ZoneNum)%LightControlProbability. RANDOM_NUMBER returns a random number // between 0 and 1. Real64 XRAN; RANDOM_NUMBER(XRAN); - if (XRAN >= thisDaylightControl.LightControlProbability) { + if (XRAN >= thisDayltgCtrl.LightControlProbability) { // Set level one higher if (FP < 1.0) { - FP += (1.0 / double(thisDaylightControl.LightControlSteps)); + FP += (1.0 / double(thisDayltgCtrl.LightControlSteps)); } } // XRAN } // Light Control Probability < 1 } // Lighting System Type - thisDaylightControl.RefPtPowerReductionFactor(IL) = FP; + refPt.powerReductionFactor = FP; // Accumulate net ltg power reduction factor for entire zone - TotReduction += thisDaylightControl.RefPtPowerReductionFactor(IL) * thisDaylightControl.FracZoneDaylit(IL); + TotReduction += refPt.powerReductionFactor * refPt.fracZoneDaylit; } // End of loop over reference points, IL @@ -7224,37 +6845,38 @@ void DayltgElecLightingControl(EnergyPlusData &state) } // Set space power reduction factors - if (thisDaylightControl.spaceIndex > 0) { + if (thisDayltgCtrl.spaceIndex > 0) { // This is a space-level daylighting control - state.dataDaylightingData->spacePowerReductionFactor(thisDaylightControl.spaceIndex) = TotReduction; + dl->spacePowerReductionFactor(thisDayltgCtrl.spaceIndex) = TotReduction; } else { // This is a zone-level daylighting control - for (int spaceNum : state.dataHeatBal->Zone(thisDaylightControl.zoneIndex).spaceIndexes) { - state.dataDaylightingData->spacePowerReductionFactor(spaceNum) = TotReduction; + for (int spaceNum : state.dataHeatBal->Zone(thisDayltgCtrl.zoneIndex).spaceIndexes) { + dl->spacePowerReductionFactor(spaceNum) = TotReduction; } } } // end daylighting control loop // IF(TotIllumMaps > 0 .and. .not. DoingSizing .and. .not. WarmupFlag .and. .not. KickoffSimulation) THEN - if ((int)state.dataDaylightingData->IllumMap.size() > 0 && !state.dataGlobal->DoingSizing && !state.dataGlobal->WarmupFlag) { - for (int mapNum = 1; mapNum <= (int)state.dataDaylightingData->IllumMap.size(); ++mapNum) { - auto &illumMapCalc = state.dataDaylightingData->IllumMapCalc(mapNum); - if (state.dataGlobal->TimeStep == 1) state.dataDaylightingData->mapResultsToReport = false; - for (int IL = 1; IL <= illumMapCalc.TotalMapRefPoints; ++IL) { - illumMapCalc.DaylIllumAtMapPtHr(IL) += illumMapCalc.DaylIllumAtMapPt(IL) / double(state.dataGlobal->NumOfTimeStepInHour); - if (illumMapCalc.DaylIllumAtMapPtHr(IL) > 0.0) { - state.dataDaylightingData->mapResultsToReport = true; - state.dataDaylightingData->mapResultsReported = true; + if ((int)dl->illumMaps.size() > 0 && !state.dataGlobal->DoingSizing && !state.dataGlobal->WarmupFlag) { + for (int mapNum = 1; mapNum <= (int)dl->illumMaps.size(); ++mapNum) { + auto &illumMap = dl->illumMaps(mapNum); + if (state.dataGlobal->TimeStep == 1) dl->mapResultsToReport = false; + for (auto &refPt : illumMap.refPts) { + refPt.lumsHr[iLum_Illum] += refPt.lums[iLum_Illum] / double(state.dataGlobal->NumOfTimeStepInHour); + if (refPt.lumsHr[iLum_Illum] > 0.0) { + dl->mapResultsToReport = true; + dl->mapResultsReported = true; } } ReportIllumMap(state, mapNum); if (state.dataGlobal->TimeStep == state.dataGlobal->NumOfTimeStepInHour) { - illumMapCalc.DaylIllumAtMapPtHr = 0.0; - illumMapCalc.DaylIllumAtMapPt = 0.0; + for (auto &refPt : illumMap.refPts) { + refPt.lumsHr[iLum_Illum] = refPt.lums[iLum_Illum] = 0.0; + } } - } - } -} + } // for (mapNum) + } // if (MapSize > 0) +} // DayltgElecLightingControl() Real64 DayltgGlarePositionFactor(Real64 X, // Lateral and vertical distance of luminous window element from Real64 Y) @@ -7297,7 +6919,7 @@ Real64 DayltgGlarePositionFactor(Real64 X, // Lateral and vertical distance of l Real64 FA = PF[IY - 1][IX - 1] + 2.0 * (X - X1) * (PF[IY - 1][IX] - PF[IY - 1][IX - 1]); Real64 FB = PF[IY][IX - 1] + 2.0 * (X - X1) * (PF[IY][IX] - PF[IY][IX - 1]); return FA + 2.0 * (Y - Y1) * (FB - FA); -} +} // DayltgGlarePositionFactor() void DayltgInterReflectedIllum(EnergyPlusData &state, int const ISunPos, // Sun position counter; used to avoid calculating various @@ -7317,8 +6939,8 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, // FCW Jul 2003: account for transmittance of shading surfaces // (previously these were assumed opaque even if transmittance schedule // value was non-zero) - // FCW Aug 2003: modify initialization of WLUMSK from WLUMSK = 0. TO - // WLUMSK(:,:,IHR) = 0. Otherwise values calculated in previous + // FCW Aug 2003: modify initialization of WinLum from WinLum = 0. TO + // WinLum(:,:,IHR) = 0. Otherwise values calculated in previous // call are incorrectly zeroed. Result was that window luminance with // shade or blind included only contribution from first window element // in window element loop in CalcDayltgCoefficients, thus seriously @@ -7349,7 +6971,7 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, // light from the inside surfaces of the space. The "split-flux" method is used // (Lynes, Principles of Natural Lighting, 1968). EINT is determined for // different sky types and for window with and without shades, screens or blinds. - // Also finds luminance (WLUMSK and WLUMSU) of window with shade or blind, & + // Also finds luminance (WinLum and WLUMSU) of window with shade or blind, & // or with diffusing glass, for different sky types. // REFERENCES: @@ -7359,20 +6981,18 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, // In the following I,J arrays: // I = sky type; // J = 1 for bare window, 2 and above for window with shade or blind. - auto &ZSK = state.dataDaylightingManager->ZSK; + Illums ZSK; // Sky-related and sun-related illuminance on window from sky/ground Vector3 U; // Unit vector in (PH,TH) direction Vector3 nearestHitPt; // Hit point of ray on nearest obstruction (m) Vector3 obsHitPt; // Coordinates of hit point on an obstruction (m) Vector3 groundHitPt; // Coordinates of point that ray from window center hits the ground (m) - auto &SkyObstructionMult = state.dataDaylightingManager->SkyObstructionMult; - auto &FLFWSK = state.dataDaylightingManager->FLFWSK; - auto &FLFWSU = state.dataDaylightingManager->FLFWSU; - auto &FLFWSUdisk = state.dataDaylightingManager->FLFWSUdisk; - auto &FLCWSK = state.dataDaylightingManager->FLCWSK; - auto &FLCWSU = state.dataDaylightingManager->FLCWSU; + // std::array FLFWSU = {0.0}; // Sun-related downgoing luminous flux, excluding entering beam + // std::array FLFWSUdisk = {0.0}; // Sun-related downgoing luminous flux, due to entering beam + // std::array FLCWSU = {0.0}; // Sun-related upgoing luminous flux + std::array FLCW = {Illums()}; // Sky-related upgoing luminous flux + std::array FLFW = {Illums()}; // Sky-related downgoing luminous flux std::array transMult; std::array transBmBmMult; - auto &ObTransM = state.dataDaylightingManager->ObTransM; // 3=intermediate, 4=overcast Real64 DPH; // Sky/ground element altitude and azimuth increments (radians) @@ -7395,6 +7015,7 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, Real64 ZSU; // element for clear and overcast sky Real64 ObTrans; // Product of solar transmittances of obstructions seen by a light ray + // unused REAL(r64) :: HitPointLumFrClearSky ! Luminance of obstruction from clear sky (cd/m2) // unused REAL(r64) :: HitPointLumFrOvercSky ! Luminance of obstruction from overcast sky (cd/m2) // unused REAL(r64) :: HitPointLumFrSun ! Luminance of obstruction from sun (cd/m2) @@ -7415,7 +7036,6 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, int OutShelfSurf; // Outside daylighting shelf surface number Real64 TransBlBmDiffFront; // Isolated blind vis beam-diffuse front transmittance Real64 TransScBmDiffFront; // Isolated screen vis beam-diffuse front transmittance - Real64 TransScDiffDiffFront; // Isolated screen vis diffuse-diffuse front transmittance Real64 ReflGlDiffDiffBack; // Bare glazing system vis diffuse back reflectance Real64 ReflGlDiffDiffFront; // Bare glazing system vis diffuse front reflectance Real64 ReflBlBmDiffFront; // Isolated blind vis beam-diffuse front reflectance @@ -7423,18 +7043,13 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, Real64 ReflBlDiffDiffFront; // Isolated blind vis diffuse-diffuse front reflectance Real64 ReflBlDiffDiffBack; // Isolated blind vis diffuse-diffuse back reflectance Real64 ReflScDiffDiffBack; // Isolated screen vis diffuse-diffuse back reflectance - Real64 ProfAng; // Solar profile angle (radians) - Real64 SlatAng; // Blind slat angle - Real64 t1; // Beam-beam vis trans of bare glass layers 1 and 2 - Real64 t2; + Real64 td2; // Diffuse-diffuse vis trans of bare glass layers 2 and 3 Real64 td3; Real64 rbd1; // Beam-diffuse back vis reflectance of bare glass layers 1 and 2 Real64 rbd2; Real64 rfd2; // Beam-diffuse front vis reflectance of bare glass layers 2 and 3 Real64 rfd3; - Real64 tfshBd; // Beam-diffuse front vis trans of bare blind - Real64 rfshB; // Beam-diffuse front vis reflectance of bare blind Real64 tfshd; // Diffuse-diffuse front vis trans of bare blind Real64 rbshd; // Diffuse-diffuse back vis reflectance of bare blind Real64 ZSUObsRefl; // Illuminance on window from beam solar reflected by an @@ -7444,12 +7059,9 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, Real64 LumAtHitPtFrSun; // Luminance at hit point on obstruction from solar reflection // for unit beam normal illuminance (cd/m2) Real64 SunObstructionMult; // = 1 if sun hits a ground point; otherwise = 0 - Real64 Alfa; // Direction angles for ray heading towards the ground (radians) - Real64 Beta; - Real64 HorDis; // Distance between ground hit point and proj'n of window center onto ground (m) - bool hitObs; // True iff obstruction is hit - Real64 ObsVisRefl; // Visible reflectance of obstruction - Real64 SkyReflVisLum; // Reflected sky luminance at hit point divided by unobstructed sky + bool hitObs; // True iff obstruction is hit + Real64 ObsVisRefl; // Visible reflectance of obstruction + Real64 SkyReflVisLum; // Reflected sky luminance at hit point divided by unobstructed sky // diffuse horizontal illuminance [(cd/m2)/lux] Real64 dReflObsSky; // Contribution to sky-related illuminance on window due to sky diffuse // reflection from an obstruction @@ -7466,19 +7078,21 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, WinShadingType ShType; - auto &thisEnclDaylight = state.dataDaylightingData->enclDaylight(enclNum); - int const enclNumThisWin = state.dataSurface->Surface(state.dataSurface->Surface(IWin).BaseSurf).SolarEnclIndex; + auto &dl = state.dataDayltg; + auto &thisEnclDaylight = dl->enclDaylight(enclNum); + auto const &surf = state.dataSurface->Surface(IWin); + auto const &surfWin = state.dataSurface->SurfaceWindow(IWin); + int const enclNumThisWin = state.dataSurface->Surface(surf.BaseSurf).SolarEnclIndex; // The inside surface area, ZoneDaylight(ZoneNum)%totInsSurfArea was calculated in subr DayltgAveInteriorReflectance if (enclNumThisWin == enclNum) { extWinType = ExtWinType::InZone; - EnclInsideSurfArea = state.dataDaylightingData->enclDaylight(enclNumThisWin).totInsSurfArea; + EnclInsideSurfArea = dl->enclDaylight(enclNumThisWin).totInsSurfArea; IntWinAdjZoneExtWinNum = 0; } else { extWinType = ExtWinType::AdjZone; // If window is exterior window in adjacent zone, then use areas of both enclosures - EnclInsideSurfArea = - state.dataDaylightingData->enclDaylight(enclNum).totInsSurfArea + state.dataDaylightingData->enclDaylight(enclNumThisWin).totInsSurfArea; + EnclInsideSurfArea = dl->enclDaylight(enclNum).totInsSurfArea + dl->enclDaylight(enclNumThisWin).totInsSurfArea; // find index in IntWinAdjZoneExtWin for (int AdjExtWinLoop = 1; AdjExtWinLoop <= thisEnclDaylight.NumOfIntWinAdjEnclExtWins; ++AdjExtWinLoop) { if (IWin == thisEnclDaylight.IntWinAdjEnclExtWin(AdjExtWinLoop).SurfNum) { // found it @@ -7489,21 +7103,18 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, } // Initialize window luminance and fluxes for split-flux calculation - state.dataDaylightingManager->WLUMSK(IHR, _) = Illums(); - state.dataDaylightingManager->WLUMSU(IHR, _) = 0.0; - state.dataDaylightingManager->WLUMSUdisk(IHR, _) = 0.0; - FLFWSK = Illums(); - FLFWSU = 0.0; - FLFWSUdisk = 0.0; - FLCWSK = Illums(); - FLCWSU = 0.0; + dl->winLum(IHR, _) = Illums(); + // dl->WLUMSU(IHR, _) = 0.0; + // dl->WLUMSUdisk(IHR, _) = 0.0; int const IConst = state.dataSurface->SurfActiveConstruction(IWin); + auto const &construct = state.dataConstruction->Construct(IConst); + BlindOn = false; ShadeOn = false; ScreenOn = false; - if (state.dataSurface->SurfWinOriginalClass(IWin) == SurfaceClass::TDD_Dome) { + if (state.dataSurface->Surface(IWin).OriginalClass == SurfaceClass::TDD_Dome) { PipeNum = state.dataSurface->SurfWinTDDPipeNum(IWin); } @@ -7522,8 +7133,8 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, // Azimuth ranges over a maximum of 2 Pi radians. // Altitude ranges over a maximum of Pi/2 radians between -Pi/2 < PH < +Pi/2, so that elements are not counted twice // PH = 0 at the horizon; PH = Pi/2 at the zenith - PHMIN = max(-Constant::PiOvr2, state.dataSurface->SurfWinPhi(IWin) - Constant::PiOvr2); - PHMAX = min(Constant::PiOvr2, state.dataSurface->SurfWinPhi(IWin) + Constant::PiOvr2); + PHMIN = max(-Constant::PiOvr2, surfWin.phi - Constant::PiOvr2); + PHMAX = min(Constant::PiOvr2, surfWin.phi + Constant::PiOvr2); DPH = (PHMAX - PHMIN) / double(NPHMAX); // Sky/ground element altitude integration @@ -7537,8 +7148,8 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, U.z = SPH; // Limits of azimuth integration - PhWin = state.dataSurface->SurfWinPhi(IWin); - ThWin = state.dataSurface->SurfWinTheta(IWin); + PhWin = surfWin.phi; + ThWin = surfWin.theta; if (PhWin >= 0.0) { if (PH >= Constant::PiOvr2 - PhWin) { ThMin = -Constant::Pi; @@ -7564,14 +7175,14 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, DA = CPH * DTH * DPH; // Sky/ground element azimuth integration - Real64 const sin_window_phi(std::sin(state.dataSurface->SurfWinPhi(IWin))); - Real64 const cos_window_phi(std::cos(state.dataSurface->SurfWinPhi(IWin))); + Real64 const sin_window_phi(std::sin(surfWin.phi)); + Real64 const cos_window_phi(std::cos(surfWin.phi)); for (int ITH = 1; ITH <= NTHMAX; ++ITH) { TH = ThMin + (double(ITH) - 0.5) * DTH; U.x = CPH * std::cos(TH); U.y = CPH * std::sin(TH); // Cosine of angle of incidence of light from sky or ground element - COSB = SPH * sin_window_phi + CPH * cos_window_phi * std::cos(TH - state.dataSurface->SurfWinTheta(IWin)); + COSB = SPH * sin_window_phi + CPH * cos_window_phi * std::cos(TH - surfWin.theta); if (COSB < 0.0) continue; // Sky/ground elements behind window (although there shouldn't be any) // Initialize illuminance on window for this sky/ground element @@ -7583,9 +7194,9 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, if (ISunPos == 1) { // Intersection calculation has to be done only for first sun position // Determine net transmittance of obstructions that the ray hits. ObTrans will be 1.0 // if no obstructions are hit. - DayltgHitObstruction(state, IHR, IWin, state.dataSurface->SurfaceWindow(IWin).WinCenter, U, ObTrans); - ObTransM[IPH][ITH] = ObTrans; - SkyObstructionMult[IPH][ITH] = 1.0; + ObTrans = DayltgHitObstruction(state, IHR, IWin, state.dataSurface->SurfaceWindow(IWin).WinCenter, U); + dl->ObTransM[IPH][ITH] = ObTrans; + dl->SkyObstructionMult[IPH][ITH] = 1.0; } // SKY AND GROUND RADIATION ON WINDOW @@ -7596,59 +7207,59 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, if (PH > 0.0) { // Contribution is from sky for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { - ZSK.sky[iSky] = DayltgSkyLuminance(state, static_cast(iSky), TH, PH) * COSB * DA * ObTransM[IPH][ITH]; + ZSK.sky[iSky] = DayltgSkyLuminance(state, static_cast(iSky), TH, PH) * COSB * DA * dl->ObTransM[IPH][ITH]; } } else { // PH <= 0.0; contribution is from ground - if (state.dataSurface->CalcSolRefl && ObTransM[IPH][ITH] > 1.e-6 && ISunPos == 1) { + if (state.dataSurface->CalcSolRefl && dl->ObTransM[IPH][ITH] > 1.e-6 && ISunPos == 1) { // Calculate effect of obstructions on shading of sky diffuse reaching the ground point hit // by the ray. This effect is given by the ratio SkyObstructionMult = // (obstructed sky diffuse at ground point)/(unobstructed sky diffuse at ground point). // This ratio is calculated for an isotropic sky. // Ground point hit by the ray: - Alfa = std::acos(-U.z); - Beta = std::atan2(U.y, U.x); - HorDis = (state.dataSurface->SurfaceWindow(IWin).WinCenter.z - state.dataSurface->GroundLevelZ) * std::tan(Alfa); + Real64 Alfa = std::acos(-U.z); + Real64 Beta = std::atan2(U.y, U.x); + Real64 HorDis = (state.dataSurface->SurfaceWindow(IWin).WinCenter.z - state.dataSurface->GroundLevelZ) * std::tan(Alfa); groundHitPt.z = state.dataSurface->GroundLevelZ; groundHitPt.x = state.dataSurface->SurfaceWindow(IWin).WinCenter.x + HorDis * std::cos(Beta); groundHitPt.y = state.dataSurface->SurfaceWindow(IWin).WinCenter.y + HorDis * std::sin(Beta); - SkyObstructionMult[IPH][ITH] = + dl->SkyObstructionMult[IPH][ITH] = CalcObstrMultiplier(state, groundHitPt, AltAngStepsForSolReflCalc, DataSurfaces::AzimAngStepsForSolReflCalc); } // End of check if solar reflection calc is in effect - auto const &gilsk = state.dataDaylightingManager->GILSK(IHR); + auto const &gilsk = dl->horIllum[IHR]; for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { // Below, luminance of ground in cd/m2 is illuminance on ground in lumens/m2 // times ground reflectance, divided by pi, times obstruction multiplier. - ZSK.sky[iSky] = (gilsk.sky[iSky] * state.dataEnvrn->GndReflectanceForDayltg / Constant::Pi) * COSB * DA * ObTransM[IPH][ITH] * - SkyObstructionMult[IPH][ITH]; + ZSK.sky[iSky] = (gilsk.sky[iSky] * state.dataEnvrn->GndReflectanceForDayltg / Constant::Pi) * COSB * DA * dl->ObTransM[IPH][ITH] * + dl->SkyObstructionMult[IPH][ITH]; } // Determine if sun illuminates the point that ray hits the ground. If the solar reflection // calculation has been requested (CalcSolRefl = .TRUE.) shading by obstructions, including // the building itself, is considered in determining whether sun hits the ground point. // Otherwise this shading is ignored and the sun always hits the ground point. SunObstructionMult = 1.0; - if (state.dataSurface->CalcSolRefl && ObTransM[IPH][ITH] > 1.e-6 && ISunPos == 1) { + if (state.dataSurface->CalcSolRefl && dl->ObTransM[IPH][ITH] > 1.e-6 && ISunPos == 1) { // Sun reaches ground point if vector from this point to the sun is unobstructed hitObs = false; for (int ObsSurfNum : state.dataSurface->AllShadowPossObstrSurfaceList) { - PierceSurface(state, ObsSurfNum, groundHitPt, SUNCOS_IHR, obsHitPt, hitObs); + hitObs = PierceSurface(state, ObsSurfNum, groundHitPt, SUNCOS_IHR, obsHitPt); if (hitObs) break; } if (hitObs) SunObstructionMult = 0.0; } - ZSU = (state.dataDaylightingManager->GILSU(IHR) * state.dataEnvrn->GndReflectanceForDayltg / Constant::Pi) * COSB * DA * - ObTransM[IPH][ITH] * SunObstructionMult; + ZSU = (dl->horIllum[IHR].sun * state.dataEnvrn->GndReflectanceForDayltg / Constant::Pi) * COSB * DA * dl->ObTransM[IPH][ITH] * + SunObstructionMult; } // BEAM SOLAR AND SKY SOLAR REFLECTED FROM NEAREST OBSTRUCTION - if (state.dataSurface->CalcSolRefl && ObTransM[IPH][ITH] < 1.0) { + if (state.dataSurface->CalcSolRefl && dl->ObTransM[IPH][ITH] < 1.0) { // Find obstruction whose hit point is closest to the center of the window DayltgClosestObstruction(state, state.dataSurface->SurfaceWindow(IWin).WinCenter, U, NearestHitSurfNum, nearestHitPt); if (NearestHitSurfNum > 0) { // Beam solar reflected from nearest obstruction. - DayltgSurfaceLumFromSun(state, IHR, U, NearestHitSurfNum, nearestHitPt, LumAtHitPtFrSun); + LumAtHitPtFrSun = DayltgSurfaceLumFromSun(state, IHR, U, NearestHitSurfNum, nearestHitPt); ZSUObsRefl = LumAtHitPtFrSun * COSB * DA; ZSU += ZSUObsRefl; @@ -7696,7 +7307,7 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, } dReflObsSky = SkyReflVisLum * COSB * DA; - auto const &gilsk = state.dataDaylightingManager->GILSK(IHR); + auto const &gilsk = dl->horIllum[IHR]; for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { ZSK.sky[iSky] += gilsk.sky[iSky] * dReflObsSky; } @@ -7709,21 +7320,21 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, // FLCW--(I,J) = part of incoming flux (in lumens) that goes up to ceiling and upper part of walls. // FLFW--(I,J) = part that goes down to floor and lower part of walls - if (state.dataSurface->SurfWinOriginalClass(IWin) == SurfaceClass::TDD_Dome) { + if (state.dataSurface->Surface(IWin).OriginalClass == SurfaceClass::TDD_Dome) { // Unshaded visible transmittance of TDD for a single ray from sky/ground element - TVISBR = TransTDD(state, PipeNum, COSB, RadType::VisibleBeam) * state.dataSurface->SurfWinGlazedFrac(IWin); + TVISBR = TransTDD(state, PipeNum, COSB, RadType::VisibleBeam) * surfWin.glazedFrac; // Make all transmitted light diffuse for a TDD with a bare diffuser - auto &wlumsk = state.dataDaylightingManager->WLUMSK(IHR, 1); - auto &flfwsk = FLFWSK(1); - auto &flcwsk = FLCWSK(1); + auto &wlumsk = dl->winLum(IHR, 1); + auto &flfwsk = FLFW[1]; + auto &flcwsk = FLCW[1]; - auto &tddFluxInc = state.dataDaylightingManager->TDDFluxInc(IHR, PipeNum); - auto &tddFluxTrans = state.dataDaylightingManager->TDDFluxTrans(IHR, PipeNum); + auto &tddFluxInc = dl->TDDFluxInc(IHR, PipeNum); + auto &tddFluxTrans = dl->TDDFluxTrans(IHR, PipeNum); for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { wlumsk.sky[iSky] += ZSK.sky[iSky] * TVISBR / Constant::Pi; - flfwsk.sky[iSky] += ZSK.sky[iSky] * TVISBR * (1.0 - state.dataSurface->SurfWinFractionUpgoing(IWin)); - flcwsk.sky[iSky] += ZSK.sky[iSky] * TVISBR * state.dataSurface->SurfWinFractionUpgoing(IWin); + flfwsk.sky[iSky] += ZSK.sky[iSky] * TVISBR * (1.0 - surfWin.fractionUpgoing); + flcwsk.sky[iSky] += ZSK.sky[iSky] * TVISBR * surfWin.fractionUpgoing; // For later calculation of diffuse visible transmittance tddFluxInc.sky[iSky] += ZSK.sky[iSky]; @@ -7734,23 +7345,22 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, tddFluxInc.sky[(int)SkyType::Clear] += ZSU; tddFluxTrans.sky[(int)SkyType::Clear] += ZSU * TVISBR; - state.dataDaylightingManager->WLUMSU(IHR, 1) += ZSU * TVISBR / Constant::Pi; - FLFWSU(1) += ZSU * TVISBR * (1.0 - state.dataSurface->SurfWinFractionUpgoing(IWin)); - FLCWSU(1) += ZSU * TVISBR * state.dataSurface->SurfWinFractionUpgoing(IWin); + dl->winLum(IHR, 1).sun += ZSU * TVISBR / Constant::Pi; + FLFW[1].sun += ZSU * TVISBR * (1.0 - surfWin.fractionUpgoing); + FLCW[1].sun += ZSU * TVISBR * surfWin.fractionUpgoing; } else { // Bare window // Transmittance of bare window for this sky/ground element - TVISBR = General::POLYF(COSB, state.dataConstruction->Construct(IConst).TransVisBeamCoef) * - state.dataSurface->SurfWinGlazedFrac(IWin) * state.dataSurface->SurfWinLightWellEff(IWin); + TVISBR = General::POLYF(COSB, construct.TransVisBeamCoef) * surfWin.glazedFrac * surfWin.lightWellEff; if (InShelfSurf > 0) { // Inside daylighting shelf // Daylighting shelf simplification: All light is diffuse // SurfaceWindow(IWin)%FractionUpgoing is already set to 1.0 earlier - auto &flcwsk = FLCWSK(1); + auto &flcwsk = FLCW[1]; for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { - flcwsk.sky[iSky] += ZSK.sky[iSky] * TVISBR * state.dataSurface->SurfWinFractionUpgoing(IWin); + flcwsk.sky[iSky] += ZSK.sky[iSky] * TVISBR * surfWin.fractionUpgoing; } - FLCWSU(1) += ZSU * TVISBR * state.dataSurface->SurfWinFractionUpgoing(IWin); + FLCW[1].sun += ZSU * TVISBR * surfWin.fractionUpgoing; } else { // Normal window @@ -7762,12 +7372,11 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, for (int IntWinLoop = 1; IntWinLoop <= thisEnclDaylight.IntWinAdjEnclExtWin(IntWinAdjZoneExtWinNum).NumOfIntWindows; ++IntWinLoop) { IntWinNum = thisEnclDaylight.IntWinAdjEnclExtWin(IntWinAdjZoneExtWinNum).IntWinNum(IntWinLoop); - PierceSurface(state, IntWinNum, state.dataSurface->SurfaceWindow(IntWinNum).WinCenter, SUNCOS_IHR, obsHitPt, hitObs); + auto const &surfIntWin = state.dataSurface->SurfaceWindow(IntWinNum); + hitObs = PierceSurface(state, IntWinNum, surfIntWin.WinCenter, SUNCOS_IHR, obsHitPt); if (hitObs) { // disk passes thru // cosine of incidence angle of light from sky or ground element for - COSBintWin = SPH * std::sin(state.dataSurface->SurfWinPhi(IntWinNum)) + - CPH * std::cos(state.dataSurface->SurfWinPhi(IntWinNum)) * - std::cos(TH - state.dataSurface->SurfWinTheta(IntWinNum)); + COSBintWin = SPH * std::sin(surfIntWin.phi) + CPH * std::cos(surfIntWin.phi) * std::cos(TH - surfIntWin.theta); TVISBR *= General::POLYF( COSBintWin, state.dataConstruction->Construct(state.dataSurface->Surface(IntWinNum).Construction).TransVisBeamCoef); @@ -7779,8 +7388,8 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, } } - auto &flfwsk = FLFWSK(1); - auto &flcwsk = FLCWSK(1); + auto &flfwsk = FLFW[1]; + auto &flcwsk = FLCW[1]; for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { // IF (PH < 0.0d0) THEN // Fixed by FCW, Nov. 2003: @@ -7792,9 +7401,9 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, } // for (iSky) if (PH > 0.0) { - FLFWSU(1) += ZSU * TVISBR; + FLFW[1].sun += ZSU * TVISBR; } else { - FLCWSU(1) += ZSU * TVISBR; + FLCW[1].sun += ZSU * TVISBR; } } // End of check if window with daylighting shelf or normal window @@ -7841,94 +7450,83 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, std::fill(transMult.begin(), transMult.end(), 0.0); if (ShadeOn) { // Shade - if (state.dataSurface->SurfWinOriginalClass(IWin) == SurfaceClass::TDD_Dome) { + if (state.dataSurface->Surface(IWin).OriginalClass == SurfaceClass::TDD_Dome) { // Shaded visible transmittance of TDD for a single ray from sky/ground element - transMult[1] = TransTDD(state, PipeNum, COSB, RadType::VisibleBeam) * state.dataSurface->SurfWinGlazedFrac(IWin); + transMult[1] = TransTDD(state, PipeNum, COSB, RadType::VisibleBeam) * surfWin.glazedFrac; } else { // Shade only, no TDD // Calculate transmittance of the combined window and shading device for this sky/ground element - transMult[1] = General::POLYF(COSB, state.dataConstruction->Construct(IConstShaded).TransVisBeamCoef) * - state.dataSurface->SurfWinGlazedFrac(IWin) * state.dataSurface->SurfWinLightWellEff(IWin); + transMult[1] = General::POLYF(COSB, state.dataConstruction->Construct(IConstShaded).TransVisBeamCoef) * surfWin.glazedFrac * + surfWin.lightWellEff; } } else if (ScreenOn) { // Screen: get beam-beam, beam-diffuse and diffuse-diffuse vis trans/ref of screen and glazing system - DataHeatBalance::CalcScreenTransmittance( - state, IWin, (PH - state.dataSurface->SurfWinPhi(IWin)), (TH - state.dataSurface->SurfWinTheta(IWin))); - ReflGlDiffDiffFront = state.dataConstruction->Construct(IConst).ReflectVisDiffFront; - ReflScDiffDiffBack = state.dataMaterial->Screens(state.dataSurface->SurfWinScreenNumber(IWin)).DifReflectVis; - TransScBmDiffFront = state.dataMaterial->Screens(state.dataSurface->SurfWinScreenNumber(IWin)).BmDifTransVis; - transMult[1] = TransScBmDiffFront * state.dataSurface->SurfWinGlazedFrac(IWin) * - state.dataConstruction->Construct(IConst).TransDiffVis / (1 - ReflGlDiffDiffFront * ReflScDiffDiffBack) * - state.dataSurface->SurfWinLightWellEff(IWin); - transBmBmMult[1] = state.dataMaterial->Screens(state.dataSurface->SurfWinScreenNumber(IWin)).BmBmTransVis; + DataHeatBalance::CalcScreenTransmittance(state, IWin, (PH - surfWin.phi), (TH - surfWin.theta)); + ReflGlDiffDiffFront = construct.ReflectVisDiffFront; + ReflScDiffDiffBack = state.dataMaterial->Screens(surfWin.screenNum).DifReflectVis; + TransScBmDiffFront = state.dataMaterial->Screens(surfWin.screenNum).BmDifTransVis; + transMult[1] = TransScBmDiffFront * surfWin.glazedFrac * construct.TransDiffVis / (1 - ReflGlDiffDiffFront * ReflScDiffDiffBack) * + surfWin.lightWellEff; + transBmBmMult[1] = state.dataMaterial->Screens(surfWin.screenNum).BmBmTransVis; } else if (BlindOn) { // Blind: get beam-diffuse and beam-beam vis trans of blind+glazing system // PETER: As long as only interior blinds are allowed for TDDs, no need to change TransMult calculation // for TDDs because it is based on TVISBR which is correctly calculated for TDDs above. - - ProfileAngle(state, IWin, U, state.dataMaterial->Blind(BlNum).SlatOrientation, ProfAng); + auto const &blind = state.dataMaterial->Blind(BlNum); + Real64 ProfAng = ProfileAngle(state, IWin, U, blind.SlatOrientation); for (int JB = 1; JB <= Material::MaxSlatAngs; ++JB) { if (!state.dataSurface->SurfWinMovableSlats(IWin) && JB > 1) break; - TransBlBmDiffFront = - WindowManager::InterpProfAng(ProfAng, state.dataMaterial->Blind(BlNum).VisFrontBeamDiffTrans(JB, {1, 37})); + TransBlBmDiffFront = WindowManager::InterpProfAng(ProfAng, blind.VisFrontBeamDiffTrans(JB, {1, 37})); if (ShType == WinShadingType::IntBlind) { // Interior blind - ReflGlDiffDiffBack = state.dataConstruction->Construct(IConst).ReflectVisDiffBack; - ReflBlBmDiffFront = - WindowManager::InterpProfAng(ProfAng, state.dataMaterial->Blind(BlNum).VisFrontBeamDiffRefl(JB, {1, 37})); - ReflBlDiffDiffFront = state.dataMaterial->Blind(BlNum).VisFrontDiffDiffRefl(JB); - TransBlDiffDiffFront = state.dataMaterial->Blind(BlNum).VisFrontDiffDiffTrans(JB); + ReflGlDiffDiffBack = construct.ReflectVisDiffBack; + ReflBlBmDiffFront = WindowManager::InterpProfAng(ProfAng, blind.VisFrontBeamDiffRefl(JB, {1, 37})); + ReflBlDiffDiffFront = blind.VisFrontDiffDiffRefl(JB); + TransBlDiffDiffFront = blind.VisFrontDiffDiffTrans(JB); transMult[JB] = TVISBR * (TransBlBmDiffFront + ReflBlBmDiffFront * ReflGlDiffDiffBack * TransBlDiffDiffFront / (1.0 - ReflBlDiffDiffFront * ReflGlDiffDiffBack)); } else if (ShType == WinShadingType::ExtBlind) { // Exterior blind - ReflGlDiffDiffFront = state.dataConstruction->Construct(IConst).ReflectVisDiffFront; - ReflBlDiffDiffBack = state.dataMaterial->Blind(BlNum).VisBackDiffDiffRefl(JB); - transMult[JB] = TransBlBmDiffFront * state.dataSurface->SurfWinGlazedFrac(IWin) * - state.dataConstruction->Construct(IConst).TransDiffVis / - (1.0 - ReflGlDiffDiffFront * ReflBlDiffDiffBack) * state.dataSurface->SurfWinLightWellEff(IWin); + ReflGlDiffDiffFront = construct.ReflectVisDiffFront; + ReflBlDiffDiffBack = blind.VisBackDiffDiffRefl(JB); + transMult[JB] = TransBlBmDiffFront * surfWin.glazedFrac * construct.TransDiffVis / + (1.0 - ReflGlDiffDiffFront * ReflBlDiffDiffBack) * surfWin.lightWellEff; } else { // Between-glass blind - t1 = General::POLYF(COSB, state.dataConstruction->Construct(IConst).tBareVisCoef(1)); - td2 = state.dataConstruction->Construct(IConst).tBareVisDiff(2); - rbd1 = state.dataConstruction->Construct(IConst).rbBareVisDiff(1); - rfd2 = state.dataConstruction->Construct(IConst).rfBareVisDiff(2); - tfshBd = WindowManager::InterpProfAng(ProfAng, state.dataMaterial->Blind(BlNum).VisFrontBeamDiffTrans(JB, {1, 37})); - tfshd = state.dataMaterial->Blind(BlNum).VisFrontDiffDiffTrans(JB); - rfshB = WindowManager::InterpProfAng(ProfAng, state.dataMaterial->Blind(BlNum).VisFrontBeamDiffRefl(JB, {1, 37})); - rbshd = state.dataMaterial->Blind(BlNum).VisFrontDiffDiffRefl(JB); - if (state.dataConstruction->Construct(IConst).TotGlassLayers == 2) { // 2 glass layers - transMult[JB] = - t1 * (tfshBd * (1.0 + rfd2 * rbshd) + rfshB * rbd1 * tfshd) * td2 * state.dataSurface->SurfWinLightWellEff(IWin); + Real64 t1 = General::POLYF(COSB, construct.tBareVisCoef(1)); + td2 = construct.tBareVisDiff(2); + rbd1 = construct.rbBareVisDiff(1); + rfd2 = construct.rfBareVisDiff(2); + Real64 tfshBd = WindowManager::InterpProfAng(ProfAng, blind.VisFrontBeamDiffTrans(JB, {1, 37})); + tfshd = blind.VisFrontDiffDiffTrans(JB); + Real64 rfshB = WindowManager::InterpProfAng(ProfAng, blind.VisFrontBeamDiffRefl(JB, {1, 37})); + rbshd = blind.VisFrontDiffDiffRefl(JB); + if (construct.TotGlassLayers == 2) { // 2 glass layers + transMult[JB] = t1 * (tfshBd * (1.0 + rfd2 * rbshd) + rfshB * rbd1 * tfshd) * td2 * surfWin.lightWellEff; } else { // 3 glass layers; blind between layers 2 and 3 - t2 = General::POLYF(COSB, state.dataConstruction->Construct(IConst).tBareVisCoef(2)); - td3 = state.dataConstruction->Construct(IConst).tBareVisDiff(3); - rfd3 = state.dataConstruction->Construct(IConst).rfBareVisDiff(3); - rbd2 = state.dataConstruction->Construct(IConst).rbBareVisDiff(2); + Real64 t2 = General::POLYF(COSB, construct.tBareVisCoef(2)); + td3 = construct.tBareVisDiff(3); + rfd3 = construct.rfBareVisDiff(3); + rbd2 = construct.rbBareVisDiff(2); transMult[JB] = t1 * t2 * (tfshBd * (1.0 + rfd3 * rbshd) + rfshB * (rbd2 * tfshd + td2 * rbd1 * td2 * tfshd)) * td3 * - state.dataSurface->SurfWinLightWellEff(IWin); + surfWin.lightWellEff; } } - if (state.dataSurface->SurfWinMovableSlats(IWin)) { - SlatAng = (JB - 1) * Constant::Pi / (Material::MaxSlatAngs - 1); - } else { - SlatAng = state.dataMaterial->Blind(BlNum).SlatAngle * Constant::DegToRadians; - } - transBmBmMult[JB] = TVISBR * WindowManager::BlindBeamBeamTrans(ProfAng, - SlatAng, - state.dataMaterial->Blind(BlNum).SlatWidth, - state.dataMaterial->Blind(BlNum).SlatSeparation, - state.dataMaterial->Blind(BlNum).SlatThickness); + Real64 SlatAng = (state.dataSurface->SurfWinMovableSlats(IWin)) ? ((JB - 1) * Constant::Pi / (Material::MaxSlatAngs - 1)) + : (blind.SlatAngle * Constant::DegToRadians); + + transBmBmMult[JB] = + TVISBR * WindowManager::BlindBeamBeamTrans(ProfAng, SlatAng, blind.SlatWidth, blind.SlatSeparation, blind.SlatThickness); } // End of loop over slat angles } else { // Diffusing glass - transMult[1] = General::POLYF(COSB, state.dataConstruction->Construct(IConstShaded).TransVisBeamCoef) * - state.dataSurface->SurfWinGlazedFrac(IWin) * state.dataSurface->SurfWinLightWellEff(IWin); + transMult[1] = General::POLYF(COSB, state.dataConstruction->Construct(IConstShaded).TransVisBeamCoef) * surfWin.glazedFrac * + surfWin.lightWellEff; } // End of check if shade, blind or diffusing glass - if (state.dataSurface->SurfWinOriginalClass(IWin) == SurfaceClass::TDD_Dome) { + if (state.dataSurface->Surface(IWin).OriginalClass == SurfaceClass::TDD_Dome) { // No beam is transmitted. This takes care of all types of screens and blinds. std::fill(transBmBmMult.begin(), transBmBmMult.end(), 0.0); } @@ -7945,15 +7543,15 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, // EXIT after first pass if not movable slats or exterior window screen if (!state.dataSurface->SurfWinMovableSlats(IWin) && JB > 1) break; - auto &wlumsk = state.dataDaylightingManager->WLUMSK(IHR, JB + 1); - auto &flfwsk = FLFWSK(JB + 1); - auto &flcwsk = FLCWSK(JB + 1); + auto &wlumsk = dl->winLum(IHR, JB + 1); + auto &flfwsk = FLFW[JB + 1]; + auto &flcwsk = FLCW[JB + 1]; for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { wlumsk.sky[iSky] += ZSK.sky[iSky] * transMult[JB] / Constant::Pi; - flfwsk.sky[iSky] += ZSK.sky[iSky] * transMult[JB] * (1.0 - state.dataSurface->SurfWinFractionUpgoing(IWin)); - flcwsk.sky[iSky] += ZSK.sky[iSky] * transMult[JB] * state.dataSurface->SurfWinFractionUpgoing(IWin); + flfwsk.sky[iSky] += ZSK.sky[iSky] * transMult[JB] * (1.0 - surfWin.fractionUpgoing); + flcwsk.sky[iSky] += ZSK.sky[iSky] * transMult[JB] * surfWin.fractionUpgoing; if (BlindOn || ScreenOn) { if (PH > 0.0) { @@ -7964,14 +7562,14 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, } } - state.dataDaylightingManager->WLUMSU(IHR, JB + 1) += ZSU * transMult[JB] / Constant::Pi; - FLFWSU(JB + 1) += ZSU * transMult[JB] * (1.0 - state.dataSurface->SurfWinFractionUpgoing(IWin)); - FLCWSU(JB + 1) += ZSU * transMult[JB] * state.dataSurface->SurfWinFractionUpgoing(IWin); + dl->winLum(IHR, JB + 1).sun += ZSU * transMult[JB] / Constant::Pi; + FLFW[JB + 1].sun += ZSU * transMult[JB] * (1.0 - surfWin.fractionUpgoing); + FLCW[JB + 1].sun += ZSU * transMult[JB] * surfWin.fractionUpgoing; if (BlindOn || ScreenOn) { if (PH > 0.0) { - FLFWSU(JB + 1) += ZSU * transBmBmMult[JB]; + FLFW[JB + 1].sun += ZSU * transBmBmMult[JB]; } else { - FLCWSU(JB + 1) += ZSU * transBmBmMult[JB]; + FLCW[JB + 1].sun += ZSU * transBmBmMult[JB]; } } } @@ -7984,10 +7582,10 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, // Add exterior diffuse illuminance due to outside shelf // Since all of the illuminance is added to the zone as upgoing diffuse, it can be added as a lump sum here - TVISBR = state.dataConstruction->Construct(IConst).TransDiffVis; // Assume diffuse transmittance for shelf illuminance + TVISBR = construct.TransDiffVis; // Assume diffuse transmittance for shelf illuminance - auto const &gilsk = state.dataDaylightingManager->GILSK(IHR); - auto &flcwsk = FLCWSK(1); + auto const &gilsk = dl->horIllum[IHR]; + auto &flcwsk = FLCW[1]; for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { // This is only an estimate because the anisotropic sky view of the shelf is not yet taken into account. // SurfAnisoSkyMult would be great to use but it is not available until the heat balance starts up. @@ -7995,12 +7593,12 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, state.dataDaylightingDevicesData->Shelf(ShelfNum).ViewFactor; // SurfaceWindow(IWin)%FractionUpgoing is already set to 1.0 earlier - flcwsk.sky[iSky] += ZSK.sky[iSky] * TVISBR * state.dataSurface->SurfWinFractionUpgoing(IWin); + flcwsk.sky[iSky] += ZSK.sky[iSky] * TVISBR * surfWin.fractionUpgoing; } // ISKY - ZSU = state.dataDaylightingManager->GILSU(IHR) * state.dataHeatBal->SurfSunlitFracHR(IHR, OutShelfSurf) * + ZSU = dl->horIllum[IHR].sun * state.dataHeatBal->SurfSunlitFracHR(IHR, OutShelfSurf) * state.dataDaylightingDevicesData->Shelf(ShelfNum).OutReflectVis * state.dataDaylightingDevicesData->Shelf(ShelfNum).ViewFactor; - FLCWSU(1) += ZSU * TVISBR * state.dataSurface->SurfWinFractionUpgoing(IWin); + FLCW[1].sun += ZSU * TVISBR * surfWin.fractionUpgoing; } // Sky-related portion of internally reflected illuminance. @@ -8010,17 +7608,15 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, for (int JSH = 1; JSH <= Material::MaxSlatAngs + 1; ++JSH) { if (!state.dataSurface->SurfWinMovableSlats(IWin) && JSH > 2) break; - auto &eintsk = state.dataDaylightingManager->EINTSK(IHR, JSH); - auto const &flfwsk = FLFWSK(JSH); - auto const &flcwsk = FLCWSK(JSH); + auto &eintsk = dl->reflIllum(IHR, JSH); + auto const &flfwsk = FLFW[JSH]; + auto const &flcwsk = FLCW[JSH]; for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { // Full area of window is used in following since effect of dividers on reducing // effective window transmittance has already been accounted for in calc of FLFWSK and FLCWSK. - eintsk.sky[iSky] = (flfwsk.sky[iSky] * state.dataSurface->SurfWinRhoFloorWall(IWin) + - flcwsk.sky[iSky] * state.dataSurface->SurfWinRhoCeilingWall(IWin)) * - (state.dataSurface->Surface(IWin).Area / state.dataSurface->SurfWinGlazedFrac(IWin)) / - (EnclInsideSurfArea * (1.0 - state.dataDaylightingData->enclDaylight(enclNum).aveVisDiffReflect)); + eintsk.sky[iSky] = (flfwsk.sky[iSky] * surfWin.rhoFloorWall + flcwsk.sky[iSky] * surfWin.rhoCeilingWall) * + (surf.Area / surfWin.glazedFrac) / (EnclInsideSurfArea * (1.0 - dl->enclDaylight(enclNum).aveVisDiffReflect)); } // for (iSky) } // for (jSH) @@ -8030,9 +7626,8 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, if (state.dataHeatBal->SurfSunlitFracHR(IHR, IWin) > 0.0) { // Cos of angle of incidence - COSBSun = state.dataDaylightingManager->SPHSUN * std::sin(state.dataSurface->SurfWinPhi(IWin)) + - state.dataDaylightingManager->CPHSUN * std::cos(state.dataSurface->SurfWinPhi(IWin)) * - std::cos(state.dataDaylightingManager->THSUN - state.dataSurface->SurfWinTheta(IWin)); + COSBSun = dl->sunAngles.sinPhi * std::sin(surfWin.phi) + + dl->sunAngles.cosPhi * std::cos(surfWin.phi) * std::cos(dl->sunAngles.theta - surfWin.theta); if (COSBSun > 0.0) { // Multiply direct normal illuminance (normalized to 1.0 lux) @@ -8046,31 +7641,30 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, // -- Bare window - if (state.dataSurface->SurfWinOriginalClass(IWin) == SurfaceClass::TDD_Dome) { + if (state.dataSurface->Surface(IWin).OriginalClass == SurfaceClass::TDD_Dome) { // Unshaded visible transmittance of TDD for collimated beam from the sun - TVISBSun = TransTDD(state, PipeNum, COSBSun, RadType::VisibleBeam) * state.dataSurface->SurfWinGlazedFrac(IWin); - state.dataDaylightingManager->TDDTransVisBeam(IHR, PipeNum) = TVISBSun; + TVISBSun = TransTDD(state, PipeNum, COSBSun, RadType::VisibleBeam) * surfWin.glazedFrac; + dl->TDDTransVisBeam(IHR, PipeNum) = TVISBSun; - FLFWSUdisk(1) = 0.0; // Diffuse light only + FLFW[1].sunDisk = 0.0; // Diffuse light only - state.dataDaylightingManager->WLUMSU(IHR, 1) += ZSU1 * TVISBSun / Constant::Pi; - FLFWSU(1) += ZSU1 * TVISBSun * (1.0 - state.dataSurface->SurfWinFractionUpgoing(IWin)); - FLCWSU(1) += ZSU1 * TVISBSun * state.dataSurface->SurfWinFractionUpgoing(IWin); + dl->winLum(IHR, 1).sun += ZSU1 * TVISBSun / Constant::Pi; + FLFW[1].sun += ZSU1 * TVISBSun * (1.0 - surfWin.fractionUpgoing); + FLCW[1].sun += ZSU1 * TVISBSun * surfWin.fractionUpgoing; } else { // Bare window - TVISBSun = General::POLYF(COSBSun, state.dataConstruction->Construct(IConst).TransVisBeamCoef) * - state.dataSurface->SurfWinGlazedFrac(IWin) * state.dataSurface->SurfWinLightWellEff(IWin); + TVISBSun = General::POLYF(COSBSun, construct.TransVisBeamCoef) * surfWin.glazedFrac * surfWin.lightWellEff; // Daylighting shelf simplification: No beam makes it past end of shelf, all light is diffuse - if (InShelfSurf > 0) { // Inside daylighting shelf - FLFWSUdisk(1) = 0.0; // Diffuse light only + if (InShelfSurf > 0) { // Inside daylighting shelf + FLFW[1].sunDisk = 0.0; // Diffuse light only // SurfaceWindow(IWin)%FractionUpgoing is already set to 1.0 earlier // WLUMSU(1,IHR) = WLUMSU(1,IHR) + ZSU1 * TVISBSun / PI // FLFWSU(1) = FLFWSU(1) + ZSU1 * TVISBSun * (1.0 - SurfaceWindow(IWin)%FractionUpgoing) - FLCWSU(1) += ZSU1 * TVISBSun * state.dataSurface->SurfWinFractionUpgoing(IWin); + FLCW[1].sun += ZSU1 * TVISBSun * surfWin.fractionUpgoing; } else { // Normal window - FLFWSUdisk(1) = ZSU1 * TVISBSun; + FLFW[1].sunDisk = ZSU1 * TVISBSun; } } @@ -8080,25 +7674,28 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, std::fill(transMult.begin(), transMult.end(), 0.0); // TH 7/7/2010 moved from inside the loop: DO JB = 1,MaxSlatAngs - if (BlindOn) - ProfileAngle(state, IWin, state.dataSurface->SurfSunCosHourly(IHR), state.dataMaterial->Blind(BlNum).SlatOrientation, ProfAng); + Real64 ProfAng; + if (BlindOn) { + auto const &blind = state.dataMaterial->Blind(BlNum); + ProfAng = ProfileAngle(state, IWin, state.dataSurface->SurfSunCosHourly(IHR), blind.SlatOrientation); + } for (int JB = 1; JB <= Material::MaxSlatAngs; ++JB) { if (!state.dataSurface->SurfWinMovableSlats(IWin) && JB > 1) break; if (ShadeOn || ScreenOn || state.dataSurface->SurfWinSolarDiffusing(IWin)) { // Shade or screen on or diffusing glass - if (state.dataSurface->SurfWinOriginalClass(IWin) == SurfaceClass::TDD_Dome) { + if (state.dataSurface->Surface(IWin).OriginalClass == SurfaceClass::TDD_Dome) { // Shaded visible transmittance of TDD for collimated beam from the sun - transMult[1] = TransTDD(state, PipeNum, COSBSun, RadType::VisibleBeam) * state.dataSurface->SurfWinGlazedFrac(IWin); + transMult[1] = TransTDD(state, PipeNum, COSBSun, RadType::VisibleBeam) * surfWin.glazedFrac; } else { if (ScreenOn) { - transMult[1] = state.dataMaterial->Screens(state.dataSurface->SurfWinScreenNumber(IWin)).BmBmTransVis * - state.dataSurface->SurfWinGlazedFrac(IWin) * state.dataSurface->SurfWinLightWellEff(IWin); + transMult[1] = + state.dataMaterial->Screens(surfWin.screenNum).BmBmTransVis * surfWin.glazedFrac * surfWin.lightWellEff; } else { int IConstShaded = state.dataSurface->SurfWinActiveShadedConstruction(IWin); - if (state.dataSurface->SurfWinSolarDiffusing(IWin)) IConstShaded = state.dataSurface->Surface(IWin).Construction; + if (state.dataSurface->SurfWinSolarDiffusing(IWin)) IConstShaded = surf.Construction; transMult[1] = General::POLYF(COSBSun, state.dataConstruction->Construct(IConstShaded).TransVisBeamCoef) * - state.dataSurface->SurfWinGlazedFrac(IWin) * state.dataSurface->SurfWinLightWellEff(IWin); + surfWin.glazedFrac * surfWin.lightWellEff; } } @@ -8106,81 +7703,74 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, // As long as only interior blinds are allowed for TDDs, no need to change TransMult calculation // for TDDs because it is based on TVISBSun which is correctly calculated for TDDs above. + auto const &blind = state.dataMaterial->Blind(BlNum); - TransBlBmDiffFront = - WindowManager::InterpProfAng(ProfAng, state.dataMaterial->Blind(BlNum).VisFrontBeamDiffTrans(JB, {1, 37})); + Real64 TransBlBmDiffFront = WindowManager::InterpProfAng(ProfAng, blind.VisFrontBeamDiffTrans(JB, {1, 37})); if (ShType == WinShadingType::IntBlind) { // Interior blind // TH CR 8121, 7/7/2010 // ReflBlBmDiffFront = WindowManager::InterpProfAng(ProfAng,Blind(BlNum)%VisFrontBeamDiffRefl) - ReflBlBmDiffFront = - WindowManager::InterpProfAng(ProfAng, state.dataMaterial->Blind(BlNum).VisFrontBeamDiffRefl(JB, {1, 37})); + Real64 ReflBlBmDiffFront = WindowManager::InterpProfAng(ProfAng, blind.VisFrontBeamDiffRefl(JB, {1, 37})); // TH added 7/12/2010 for CR 8121 - ReflBlDiffDiffFront = state.dataMaterial->Blind(BlNum).VisFrontDiffDiffRefl(JB); - TransBlDiffDiffFront = state.dataMaterial->Blind(BlNum).VisFrontDiffDiffTrans(JB); + Real64 ReflBlDiffDiffFront = blind.VisFrontDiffDiffRefl(JB); + Real64 TransBlDiffDiffFront = blind.VisFrontDiffDiffTrans(JB); transMult[JB] = TVISBSun * (TransBlBmDiffFront + ReflBlBmDiffFront * ReflGlDiffDiffBack * TransBlDiffDiffFront / (1.0 - ReflBlDiffDiffFront * ReflGlDiffDiffBack)); } else if (ShType == WinShadingType::ExtBlind) { // Exterior blind transMult[JB] = TransBlBmDiffFront * - (state.dataConstruction->Construct(IConst).TransDiffVis / - (1.0 - ReflGlDiffDiffFront * state.dataMaterial->Blind(BlNum).VisBackDiffDiffRefl(JB))) * - state.dataSurface->SurfWinGlazedFrac(IWin) * state.dataSurface->SurfWinLightWellEff(IWin); + (construct.TransDiffVis / (1.0 - ReflGlDiffDiffFront * blind.VisBackDiffDiffRefl(JB))) * + surfWin.glazedFrac * surfWin.lightWellEff; } else { // Between-glass blind - t1 = General::POLYF(COSBSun, state.dataConstruction->Construct(IConst).tBareVisCoef(1)); - tfshBd = WindowManager::InterpProfAng(ProfAng, state.dataMaterial->Blind(BlNum).VisFrontBeamDiffTrans(JB, {1, 37})); - rfshB = WindowManager::InterpProfAng(ProfAng, state.dataMaterial->Blind(BlNum).VisFrontBeamDiffRefl(JB, {1, 37})); - if (state.dataConstruction->Construct(IConst).TotGlassLayers == 2) { // 2 glass layers - transMult[JB] = - t1 * (tfshBd * (1.0 + rfd2 * rbshd) + rfshB * rbd1 * tfshd) * td2 * state.dataSurface->SurfWinLightWellEff(IWin); + Real64 t1 = General::POLYF(COSBSun, construct.tBareVisCoef(1)); + Real64 tfshBd = WindowManager::InterpProfAng(ProfAng, blind.VisFrontBeamDiffTrans(JB, {1, 37})); + Real64 rfshB = WindowManager::InterpProfAng(ProfAng, blind.VisFrontBeamDiffRefl(JB, {1, 37})); + if (construct.TotGlassLayers == 2) { // 2 glass layers + transMult[JB] = t1 * (tfshBd * (1.0 + rfd2 * rbshd) + rfshB * rbd1 * tfshd) * td2 * surfWin.lightWellEff; } else { // 3 glass layers; blind between layers 2 and 3 - t2 = General::POLYF(COSBSun, state.dataConstruction->Construct(IConst).tBareVisCoef(2)); + Real64 t2 = General::POLYF(COSBSun, construct.tBareVisCoef(2)); transMult[JB] = t1 * t2 * (tfshBd * (1.0 + rfd3 * rbshd) + rfshB * (rbd2 * tfshd + td2 * rbd1 * td2 * tfshd)) * td3 * - state.dataSurface->SurfWinLightWellEff(IWin); + surfWin.lightWellEff; } } - if (state.dataSurface->SurfWinMovableSlats(IWin)) { - SlatAng = (JB - 1) * Constant::Pi / (Material::MaxSlatAngs - 1); - } else { - SlatAng = state.dataMaterial->Blind(BlNum).SlatAngle * Constant::DegToRadians; - } - transBmBmMult[JB] = TVISBSun * WindowManager::BlindBeamBeamTrans(ProfAng, - SlatAng, - state.dataMaterial->Blind(BlNum).SlatWidth, - state.dataMaterial->Blind(BlNum).SlatSeparation, - state.dataMaterial->Blind(BlNum).SlatThickness); + + Real64 SlatAng = (state.dataSurface->SurfWinMovableSlats(IWin)) ? ((JB - 1) * Constant::Pi / (Material::MaxSlatAngs - 1)) + : (blind.SlatAngle * Constant::DegToRadians); + + transBmBmMult[JB] = TVISBSun * WindowManager::BlindBeamBeamTrans( + ProfAng, SlatAng, blind.SlatWidth, blind.SlatSeparation, blind.SlatThickness); } // ShadeOn/ScreenOn/BlindOn/Diffusing glass - if (state.dataSurface->SurfWinOriginalClass(IWin) == SurfaceClass::TDD_Dome) { + if (state.dataSurface->Surface(IWin).OriginalClass == SurfaceClass::TDD_Dome) { std::fill(transBmBmMult.begin(), transBmBmMult.end(), 0.0); // No beam, diffuse only } // Daylighting shelf simplification: No beam makes it past end of shelf, all light is diffuse - if (InShelfSurf > 0) { // Inside daylighting shelf - std::fill( - transBmBmMult.begin(), transBmBmMult.end(), 0.0); // No beam, diffuse only - // SurfaceWindow(IWin)%FractionUpgoing is already set to 1.0 earlier + if (InShelfSurf > 0) { // Inside daylighting shelf + std::fill(transBmBmMult.begin(), transBmBmMult.end(), 0.0); // No beam, diffuse only + // SurfaceWindow(IWin)%FractionUpgoing is already set to 1.0 earlier } - state.dataDaylightingManager->WLUMSU(IHR, JB + 1) += ZSU1 * transMult[JB] / Constant::Pi; - state.dataDaylightingManager->WLUMSUdisk(IHR, JB + 1) = ZSU1 * transBmBmMult[JB] / Constant::Pi; - FLFWSU(JB + 1) += ZSU1 * transMult[JB] * (1.0 - state.dataSurface->SurfWinFractionUpgoing(IWin)); - FLFWSUdisk(JB + 1) = ZSU1 * transBmBmMult[JB]; - FLCWSU(JB + 1) += ZSU1 * transMult[JB] * state.dataSurface->SurfWinFractionUpgoing(IWin); - } // End of loop over slat angles - } // End of window with shade or blind - } // COSBSun > 0 - } // SurfSunlitFracHR > 0 + dl->winLum(IHR, JB + 1).sun += ZSU1 * transMult[JB] / Constant::Pi; + dl->winLum(IHR, JB + 1).sunDisk = ZSU1 * transBmBmMult[JB] / Constant::Pi; + FLFW[JB + 1].sun += ZSU1 * transMult[JB] * (1.0 - surfWin.fractionUpgoing); + FLFW[JB + 1].sunDisk = ZSU1 * transBmBmMult[JB]; + FLCW[JB + 1].sun += ZSU1 * transMult[JB] * surfWin.fractionUpgoing; + } // for (JB) + } // if (BlindOn || ShadeOn) + } // if (COSBSun > 0) + } // if (SurfSunlitFracHR > 0) // Beam reaching window after specular reflection from exterior obstruction // In the following, Beam normal illuminance times ZSU1refl = illuminance on window due to // specular reflection from exterior surfaces - if (state.dataSurface->CalcSolRefl && state.dataSurface->SurfWinOriginalClass(IWin) != SurfaceClass::TDD_Dome) { + if (state.dataSurface->CalcSolRefl && state.dataSurface->Surface(IWin).OriginalClass != SurfaceClass::TDD_Dome) { + ZSU1refl = state.dataSurface->SurfReflFacBmToBmSolObs(IHR, IWin); if (ZSU1refl > 0.0) { @@ -8189,13 +7779,12 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, // -- Bare window. We use diffuse-diffuse transmittance here rather than beam-beam to avoid // complications due to specular reflection from multiple exterior surfaces - TVisSunRefl = state.dataConstruction->Construct(IConst).TransDiffVis * state.dataSurface->SurfWinGlazedFrac(IWin) * - state.dataSurface->SurfWinLightWellEff(IWin); + TVisSunRefl = construct.TransDiffVis * surfWin.glazedFrac * surfWin.lightWellEff; // In the following it is assumed that all reflected beam is going downward, as it would be in the // important case of reflection from a highly glazed facade of a neighboring building. However, in // rare cases (such as upward specular reflection from a flat horizontal skylight) it may // actually be going upward. - FLFWSUdisk(1) += ZSU1refl * TVisSunRefl; + FLFW[1].sunDisk += ZSU1refl * TVisSunRefl; // -- Window with shade, blind or diffusing glass @@ -8208,47 +7797,44 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, if (ShadeOn || state.dataSurface->SurfWinSolarDiffusing(IWin)) { // Shade on or diffusing glass int IConstShaded = state.dataSurface->SurfWinActiveShadedConstruction(IWin); - if (state.dataSurface->SurfWinSolarDiffusing(IWin)) IConstShaded = state.dataSurface->Surface(IWin).Construction; - transMult[1] = state.dataConstruction->Construct(IConstShaded).TransDiffVis * state.dataSurface->SurfWinGlazedFrac(IWin) * - state.dataSurface->SurfWinLightWellEff(IWin); + if (state.dataSurface->SurfWinSolarDiffusing(IWin)) IConstShaded = surf.Construction; + transMult[1] = state.dataConstruction->Construct(IConstShaded).TransDiffVis * surfWin.glazedFrac * surfWin.lightWellEff; } else if (ScreenOn) { // Exterior screen on - TransScDiffDiffFront = state.dataMaterial->Screens(state.dataSurface->SurfWinScreenNumber(IWin)).DifDifTransVis; - transMult[1] = TransScDiffDiffFront * - (state.dataConstruction->Construct(IConst).TransDiffVis / (1.0 - ReflGlDiffDiffFront * ReflScDiffDiffBack)) * - state.dataSurface->SurfWinGlazedFrac(IWin) * state.dataSurface->SurfWinLightWellEff(IWin); + Real64 TransScDiffDiffFront = state.dataMaterial->Screens(surfWin.screenNum).DifDifTransVis; + transMult[1] = TransScDiffDiffFront * (construct.TransDiffVis / (1.0 - ReflGlDiffDiffFront * ReflScDiffDiffBack)) * + surfWin.glazedFrac * surfWin.lightWellEff; } else { // Blind on - TransBlDiffDiffFront = state.dataMaterial->Blind(BlNum).VisFrontDiffDiffTrans(JB); + auto const &blind = state.dataMaterial->Blind(BlNum); + Real64 TransBlDiffDiffFront = blind.VisFrontDiffDiffTrans(JB); if (ShType == WinShadingType::IntBlind) { // Interior blind - ReflBlDiffDiffFront = state.dataMaterial->Blind(BlNum).VisFrontDiffDiffRefl(JB); + ReflBlDiffDiffFront = blind.VisFrontDiffDiffRefl(JB); transMult[JB] = TVisSunRefl * (TransBlDiffDiffFront + ReflBlDiffDiffFront * ReflGlDiffDiffBack * TransBlDiffDiffFront / (1.0 - ReflBlDiffDiffFront * ReflGlDiffDiffBack)); } else if (ShType == WinShadingType::ExtBlind) { // Exterior blind transMult[JB] = TransBlDiffDiffFront * - (state.dataConstruction->Construct(IConst).TransDiffVis / - (1.0 - ReflGlDiffDiffFront * state.dataMaterial->Blind(BlNum).VisBackDiffDiffRefl(JB))) * - state.dataSurface->SurfWinGlazedFrac(IWin) * state.dataSurface->SurfWinLightWellEff(IWin); + (construct.TransDiffVis / (1.0 - ReflGlDiffDiffFront * blind.VisBackDiffDiffRefl(JB))) * + surfWin.glazedFrac * surfWin.lightWellEff; } else { // Between-glass blind - t1 = state.dataConstruction->Construct(IConst).tBareVisDiff(1); - tfshBd = state.dataMaterial->Blind(BlNum).VisFrontDiffDiffTrans(JB); - rfshB = state.dataMaterial->Blind(BlNum).VisFrontDiffDiffRefl(JB); - if (state.dataConstruction->Construct(IConst).TotGlassLayers == 2) { // 2 glass layers - transMult[JB] = - t1 * (tfshBd * (1.0 + rfd2 * rbshd) + rfshB * rbd1 * tfshd) * td2 * state.dataSurface->SurfWinLightWellEff(IWin); + Real64 t1 = construct.tBareVisDiff(1); + Real64 tfshBd = blind.VisFrontDiffDiffTrans(JB); + Real64 rfshB = blind.VisFrontDiffDiffRefl(JB); + if (construct.TotGlassLayers == 2) { // 2 glass layers + transMult[JB] = t1 * (tfshBd * (1.0 + rfd2 * rbshd) + rfshB * rbd1 * tfshd) * td2 * surfWin.lightWellEff; } else { // 3 glass layers; blind between layers 2 and 3 - t2 = state.dataConstruction->Construct(IConst).tBareVisDiff(2); + Real64 t2 = construct.tBareVisDiff(2); transMult[JB] = t1 * t2 * (tfshBd * (1.0 + rfd3 * rbshd) + rfshB * (rbd2 * tfshd + td2 * rbd1 * td2 * tfshd)) * td3 * - state.dataSurface->SurfWinLightWellEff(IWin); + surfWin.lightWellEff; } } // End of check of interior/exterior/between-glass blind } // ShadeOn/BlindOn - state.dataDaylightingManager->WLUMSU(IHR, JB + 1) += ZSU1refl * transMult[JB] / Constant::Pi; - FLFWSU(JB + 1) += ZSU1refl * transMult[JB] * (1.0 - state.dataSurface->SurfWinFractionUpgoing(IWin)); - FLCWSU(JB + 1) += ZSU1refl * transMult[JB] * state.dataSurface->SurfWinFractionUpgoing(IWin); + dl->winLum(IHR, JB + 1).sun += ZSU1refl * transMult[JB] / Constant::Pi; + FLFW[JB + 1].sun += ZSU1refl * transMult[JB] * (1.0 - surfWin.fractionUpgoing); + FLCW[JB + 1].sun += ZSU1refl * transMult[JB] * surfWin.fractionUpgoing; } // End of loop over slat angles } // End of check if window has shade, blind or diffusing glass } // End of check if ZSU1refl > 0.0 @@ -8263,16 +7849,13 @@ void DayltgInterReflectedIllum(EnergyPlusData &state, // effective window transmittance already accounted for in calc of FLFWSU and FLCWSU // CR 7869 added effect of intervening interior windows on transmittance and // added inside surface area of adjacent zone - state.dataDaylightingManager->EINTSU(IHR, JSH) = - (FLFWSU(JSH) * state.dataSurface->SurfWinRhoFloorWall(IWin) + FLCWSU(JSH) * state.dataSurface->SurfWinRhoCeilingWall(IWin)) * - (state.dataSurface->Surface(IWin).Area / state.dataSurface->SurfWinGlazedFrac(IWin)) / - (EnclInsideSurfArea * (1.0 - thisEnclDaylight.aveVisDiffReflect)); + dl->reflIllum(IHR, JSH).sun = (FLFW[JSH].sun * surfWin.rhoFloorWall + FLCW[JSH].sun * surfWin.rhoCeilingWall) * + (surf.Area / surfWin.glazedFrac) / (EnclInsideSurfArea * (1.0 - thisEnclDaylight.aveVisDiffReflect)); - state.dataDaylightingManager->EINTSUdisk(IHR, JSH) = FLFWSUdisk(JSH) * state.dataSurface->SurfWinRhoFloorWall(IWin) * - (state.dataSurface->Surface(IWin).Area / state.dataSurface->SurfWinGlazedFrac(IWin)) / - (EnclInsideSurfArea * (1.0 - thisEnclDaylight.aveVisDiffReflect)); + dl->reflIllum(IHR, JSH).sunDisk = FLFW[JSH].sunDisk * surfWin.rhoFloorWall * (surf.Area / surfWin.glazedFrac) / + (EnclInsideSurfArea * (1.0 - thisEnclDaylight.aveVisDiffReflect)); } -} +} // DayltgInterReflectedIllum() void ComplexFenestrationLuminances(EnergyPlusData &state, int const IWin, @@ -8280,9 +7863,7 @@ void ComplexFenestrationLuminances(EnergyPlusData &state, int const NBasis, int const IHR, int const iRefPoint, - Array1D &ElementLuminanceSky, // sky related luminance at window element (exterior side) - Array1D &ElementLuminanceSun, // sun related luminance at window element (exterior side), - Array1D &ElementLuminanceSunDisk, // sun related luminance at window element (exterior side), + Array1D &ElementLuminance, // luminance at window element (exterior side) CalledFor const CalledFrom, int const MapNum) { @@ -8294,6 +7875,8 @@ void ComplexFenestrationLuminances(EnergyPlusData &state, Vector3 obsHitPt; // Coordinates of hit point on an obstruction (m) Vector3 groundHitPt; // Coordinates of point that ray from window center hits the ground (m) + auto &dl = state.dataDayltg; + int CurCplxFenState = state.dataSurface->SurfaceWindow(IWin).ComplexFen.CurrentState; auto &complexWinGeom = state.dataBSDFWindow->ComplexWind(IWin).Geom(CurCplxFenState); // Calculate luminance from sky and sun excluding exterior obstruction transmittances and obstruction multipliers @@ -8304,35 +7887,33 @@ void ComplexFenestrationLuminances(EnergyPlusData &state, // DA = ComplexWind(IWin)%Geom(CurCplxFenState)%DAInc(iIncElem) Real64 Altitude = complexWinGeom.pInc(iIncElem).Altitude; Real64 Azimuth = complexWinGeom.pInc(iIncElem).Azimuth; - auto &elemLumSky = ElementLuminanceSky(iIncElem); - auto const &gilsk = state.dataDaylightingManager->GILSK(IHR); + auto &elemLum = ElementLuminance(iIncElem); + auto const &gilsk = dl->horIllum[IHR]; if (Altitude > 0.0) { // Ray from sky element for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { - elemLumSky.sky[iSky] = DayltgSkyLuminance(state, static_cast(iSky), Azimuth, Altitude) * LambdaInc; + elemLum.sky[iSky] = DayltgSkyLuminance(state, static_cast(iSky), Azimuth, Altitude) * LambdaInc; } } else if (Altitude < 0.0) { // Ray from ground element // BeamObstrMultiplier = ComplexWind(IWin)%DaylghtGeom(CurCplxFenState)%GndObstrMultiplier(WinEl, iIncElem) for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { - elemLumSky.sky[iSky] = gilsk.sky[iSky] * state.dataEnvrn->GndReflectanceForDayltg / Constant::Pi * LambdaInc; + elemLum.sky[iSky] = gilsk.sky[iSky] * state.dataEnvrn->GndReflectanceForDayltg / Constant::Pi * LambdaInc; } - ElementLuminanceSun(iIncElem) = - state.dataDaylightingManager->GILSU(IHR) * state.dataEnvrn->GndReflectanceForDayltg / Constant::Pi * LambdaInc; + elemLum.sun = dl->horIllum[IHR].sun * state.dataEnvrn->GndReflectanceForDayltg / Constant::Pi * LambdaInc; } else { // Ray from the element which is half sky and half ground for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { // in this case half of the pach is coming from the sky and half from the ground - elemLumSky.sky[iSky] = 0.5 * DayltgSkyLuminance(state, static_cast(iSky), Azimuth, Altitude) * LambdaInc + - 0.5 * gilsk.sky[iSky] * state.dataEnvrn->GndReflectanceForDayltg / Constant::Pi * LambdaInc; + elemLum.sky[iSky] = 0.5 * DayltgSkyLuminance(state, static_cast(iSky), Azimuth, Altitude) * LambdaInc + + 0.5 * gilsk.sky[iSky] * state.dataEnvrn->GndReflectanceForDayltg / Constant::Pi * LambdaInc; } - ElementLuminanceSun(iIncElem) = - 0.5 * state.dataDaylightingManager->GILSU(IHR) * state.dataEnvrn->GndReflectanceForDayltg / Constant::Pi * LambdaInc; + elemLum.sun = 0.5 * dl->horIllum[IHR].sun * state.dataEnvrn->GndReflectanceForDayltg / Constant::Pi * LambdaInc; } // Sun beam calculations if ((SolBmIndex == iIncElem) && (state.dataHeatBal->SurfSunlitFracHR(IHR, IWin) > 0.0)) { - ElementLuminanceSunDisk(iIncElem) = 1.0; + elemLum.sunDisk = 1.0; } } @@ -8345,12 +7926,12 @@ void ComplexFenestrationLuminances(EnergyPlusData &state, Real64 ObstrTrans = complexWinRefPoint.TransOutSurf(iReflElem, WinEl); int iReflElemIndex = complexWinRefPoint.RefSurfIndex(iReflElem, WinEl); - auto &elemLumSky = ElementLuminanceSky(iReflElemIndex); + auto &elemLum = ElementLuminance(iReflElemIndex); for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { - elemLumSky.sky[iSky] *= ObstrTrans; + elemLum.sky[iSky] *= ObstrTrans; } - ElementLuminanceSun(iReflElemIndex) *= ObstrTrans; - ElementLuminanceSunDisk(iReflElemIndex) *= ObstrTrans; + elemLum.sun *= ObstrTrans; + elemLum.sunDisk *= ObstrTrans; } // add exterior ground element obstruction multipliers to calculated luminances. For sun reflection, calculate if @@ -8363,9 +7944,9 @@ void ComplexFenestrationLuminances(EnergyPlusData &state, Real64 BeamObstrMultiplier = complexWinRefPoint.GndObstrMultiplier(iGndElem, WinEl); int iGndElemIndex = complexWinRefPoint.GndIndex(iGndElem, WinEl); - auto &elemLumSky = ElementLuminanceSky(iGndElemIndex); + auto &elemLum = ElementLuminance(iGndElemIndex); for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { - elemLumSky.sky[iSky] *= BeamObstrMultiplier; + elemLum.sky[iSky] *= BeamObstrMultiplier; } // direct sun disk reflect off the ground @@ -8374,15 +7955,14 @@ void ComplexFenestrationLuminances(EnergyPlusData &state, // Sun reaches ground point if vector from this point to the sun is unobstructed for (int ObsSurfNum : state.dataSurface->AllShadowPossObstrSurfaceList) { groundHitPt = complexWinRefPoint.GndPt(iGndElem, WinEl); - bool hitObs = false; - PierceSurface(state, ObsSurfNum, groundHitPt, SUNCOS_IHR, obsHitPt, hitObs); + bool hitObs = PierceSurface(state, ObsSurfNum, groundHitPt, SUNCOS_IHR, obsHitPt); if (hitObs) { SunObstrMultiplier = 0.0; break; } } } - ElementLuminanceSun(iGndElemIndex) *= SunObstrMultiplier; + elemLum.sun *= SunObstrMultiplier; } } else { // if (CalledFrom != RefPoint) @@ -8392,13 +7972,13 @@ void ComplexFenestrationLuminances(EnergyPlusData &state, for (int iReflElem = 1; iReflElem <= complexWinIllumMap.NReflSurf(WinEl); ++iReflElem) { Real64 ObstrTrans = complexWinIllumMap.TransOutSurf(iReflElem, WinEl); int iReflElemIndex = complexWinIllumMap.RefSurfIndex(iReflElem, WinEl); - auto &elemLumSky = ElementLuminanceSky(iReflElemIndex); + auto &elemLum = ElementLuminance(iReflElemIndex); for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { - elemLumSky.sky[iSky] *= ObstrTrans; + elemLum.sky[iSky] *= ObstrTrans; } - ElementLuminanceSun(iReflElemIndex) *= ObstrTrans; - ElementLuminanceSunDisk(iReflElemIndex) *= ObstrTrans; + elemLum.sun *= ObstrTrans; + elemLum.sunDisk *= ObstrTrans; } // add exterior ground element obstruction multipliers to calculated luminances. For sun reflection, calculate if @@ -8410,9 +7990,9 @@ void ComplexFenestrationLuminances(EnergyPlusData &state, Real64 BeamObstrMultiplier = complexWinIllumMap.GndObstrMultiplier(iGndElem, WinEl); int iGndElemIndex = complexWinIllumMap.GndIndex(iGndElem, WinEl); - auto &elemLumSky = ElementLuminanceSky(iGndElemIndex); + auto &elemLum = ElementLuminance(iGndElemIndex); for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { - elemLumSky.sky[iSky] *= BeamObstrMultiplier; + elemLum.sky[iSky] *= BeamObstrMultiplier; } // direct sun disk reflect off the ground @@ -8422,18 +8002,17 @@ void ComplexFenestrationLuminances(EnergyPlusData &state, for (int ObsSurfNum : state.dataSurface->AllShadowPossObstrSurfaceList) { groundHitPt = complexWinIllumMap.GndPt(iGndElem, WinEl); - bool hitObs = false; - PierceSurface(state, ObsSurfNum, groundHitPt, SUNCOS_IHR, obsHitPt, hitObs); + bool hitObs = PierceSurface(state, ObsSurfNum, groundHitPt, SUNCOS_IHR, obsHitPt); if (hitObs) { SunObstrMultiplier = 0.0; break; } } } - ElementLuminanceSun(iGndElemIndex) *= SunObstrMultiplier; + elemLum.sun *= SunObstrMultiplier; } } // if (CalledFrom == RefPoint) -} +} // ComplexFenestrationLuminances() void DayltgInterReflectedIllumComplexFenestration(EnergyPlusData &state, int const IWin, // Window index @@ -8457,137 +8036,131 @@ void DayltgInterReflectedIllumComplexFenestration(EnergyPlusData &state, // the center of the window and then reflecting this // light from the inside surfaces of the space. - Array1D FLSK; // Sky related luminous flux - Array1D FLSU; // Sun related luminous flux, excluding entering beam - Array1D FLSUdisk; // Sun related luminous flux, due to entering beam + auto &dl = state.dataDayltg; - Array1D FirstFluxSK; // Sky related first reflected flux - Array1D FirstFluxSU; // Sun related first reflected flux, excluding entering beam - Array1D FirstFluxSUdisk; // Sun related first reflected flux, due to entering beam + Array1D FL; // Sky related luminous flux + // Array1D FLSU; // Sun related luminous flux, excluding entering beam + // Array1D FLSUdisk; // Sun related luminous flux, due to entering beam - Array1D ElementLuminanceSky; // sky related luminance at window element (exterior side) - Array1D ElementLuminanceSun; // sun related luminance at window element (exterior side), exluding beam - Array1D ElementLuminanceSunDisk; // sun related luminance at window element (exterior side), due to sun beam - Real64 FLSUTot; - Real64 FLSUdiskTot; - - // Total for first relflected fluxes - auto &FFSKTot = state.dataDaylightingManager->FFSKTot; - Real64 FFSUTot; - Real64 FFSUdiskTot; + Array1D FirstFlux; // Sky related first reflected flux + // Array1D FirstFluxSU; // Sun related first reflected flux, excluding entering beam + // Array1D FirstFluxSUdisk; // Sun related first reflected flux, due to entering beam - Real64 COSIncSun; // cosine of sun incidence angle (from basis elements) + Array1D ElementLuminance; // sky related luminance at window element (exterior side) + // Array1D ElementLuminanceSun; // sun related luminance at window element (exterior side), exluding beam + // Array1D ElementLuminanceSunDisk; // sun related luminance at window element (exterior side), due to sun beam + Illums FLTot; + // Real64 FLSUTot; + // Real64 FLSUdiskTot; - int iConst; // Construction number + // Total for first relflected fluxes + Illums FFTot = Illums(); + // Real64 FFSUTot; + // Real64 FFSUdiskTot; int NIncBasis; - int NTrnBasis; int SolBmIndex; // index of current sun position Real64 LambdaInc; // current lambda value for incoming direction // REAL(r64) :: LambdaTrn ! current lambda value for incoming direction Real64 dirTrans; // directional bsdf transmittance - int CurCplxFenState = state.dataSurface->SurfaceWindow(IWin).ComplexFen.CurrentState; + auto const &surf = state.dataSurface->Surface(IWin); + auto const &surfWin = state.dataSurface->SurfaceWindow(IWin); + + int CurCplxFenState = surfWin.ComplexFen.CurrentState; auto &complexWinGeom = state.dataBSDFWindow->ComplexWind(IWin).Geom(CurCplxFenState); - iConst = state.dataSurface->SurfaceWindow(IWin).ComplexFen.State(CurCplxFenState).Konst; - NTrnBasis = complexWinGeom.Trn.NBasis; + int iConst = surfWin.ComplexFen.State(CurCplxFenState).Konst; + int NTrnBasis = complexWinGeom.Trn.NBasis; - if (!allocated(FLSK)) FLSK.allocate(NTrnBasis); - FLSK = Illums(); - if (!allocated(FLSU)) FLSU.dimension(NTrnBasis, 0.0); - if (!allocated(FLSUdisk)) FLSUdisk.dimension(NTrnBasis, 0.0); + if (!allocated(FL)) FL.allocate(NTrnBasis); + FL = Illums(); + // if (!allocated(FLSU)) FLSU.dimension(NTrnBasis, 0.0); + // if (!allocated(FLSUdisk)) FLSUdisk.dimension(NTrnBasis, 0.0); - if (!allocated(FirstFluxSK)) FirstFluxSK.allocate(NTrnBasis); - FirstFluxSK = Illums(); - if (!allocated(FirstFluxSU)) FirstFluxSU.dimension(NTrnBasis, 0.0); - if (!allocated(FirstFluxSUdisk)) FirstFluxSUdisk.dimension(NTrnBasis, 0.0); + if (!allocated(FirstFlux)) FirstFlux.allocate(NTrnBasis); + FirstFlux = Illums(); + // if (!allocated(FirstFluxSU)) FirstFluxSU.dimension(NTrnBasis, 0.0); + // if (!allocated(FirstFluxSUdisk)) FirstFluxSUdisk.dimension(NTrnBasis, 0.0); NIncBasis = complexWinGeom.Inc.NBasis; - if (!allocated(ElementLuminanceSky)) ElementLuminanceSky.allocate(NIncBasis); - ElementLuminanceSky = Illums(); - if (!allocated(ElementLuminanceSun)) ElementLuminanceSun.dimension(NIncBasis, 0.0); - if (!allocated(ElementLuminanceSunDisk)) ElementLuminanceSunDisk.dimension(NIncBasis, 0.0); + if (!allocated(ElementLuminance)) ElementLuminance.allocate(NIncBasis); + ElementLuminance = Illums(); + // if (!allocated(ElementLuminanceSun)) ElementLuminanceSun.dimension(NIncBasis, 0.0); + // if (!allocated(ElementLuminanceSunDisk)) ElementLuminanceSunDisk.dimension(NIncBasis, 0.0); // Integration over sky/ground/sun elements is done over window incoming basis element and flux is calculated for each // outgoing direction. This is used to calculate first reflected flux - ComplexFenestrationLuminances( - state, IWin, WinEl, NIncBasis, IHR, iRefPoint, ElementLuminanceSky, ElementLuminanceSun, ElementLuminanceSunDisk, CalledFrom, MapNum); + ComplexFenestrationLuminances(state, IWin, WinEl, NIncBasis, IHR, iRefPoint, ElementLuminance, CalledFrom, MapNum); // luminance from sun disk needs to include fraction of sunlit area SolBmIndex = complexWinGeom.SolBmIndex(IHR, state.dataGlobal->TimeStep); - if (SolBmIndex > 0) { - COSIncSun = complexWinGeom.CosInc(SolBmIndex); - } else { - COSIncSun = 0.0; - } - ElementLuminanceSunDisk *= state.dataHeatBal->SurfSunlitFracHR(IHR, IWin) * COSIncSun; + Real64 COSIncSun = (SolBmIndex > 0) ? complexWinGeom.CosInc(SolBmIndex) : 0.0; + + for (int i = 1; i <= (int)ElementLuminance.size(); ++i) + ElementLuminance(i).sunDisk *= state.dataHeatBal->SurfSunlitFracHR(IHR, IWin) * COSIncSun; // FLSKTot = 0.0; - FLSUTot = 0.0; - FLSUdiskTot = 0.0; - FFSKTot = Illums(); - FFSUTot = 0.0; - FFSUdiskTot = 0.0; + FLTot.sun = 0.0; + FLTot.sunDisk = 0.0; + FFTot.sun = 0.0; + FFTot.sunDisk = 0.0; // now calculate flux into each outgoing direction by integrating over all incoming directions for (int iBackElem = 1; iBackElem <= NTrnBasis; ++iBackElem) { for (int iIncElem = 1; iIncElem <= NIncBasis; ++iIncElem) { LambdaInc = complexWinGeom.Inc.Lamda(iIncElem); dirTrans = state.dataConstruction->Construct(iConst).BSDFInput.VisFrtTrans(iBackElem, iIncElem); - auto &flsk = FLSK(iBackElem); - auto const &elemLumSky = ElementLuminanceSky(iIncElem); + auto &fl = FL(iBackElem); + auto const &elemLum = ElementLuminance(iIncElem); for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { - flsk.sky[iSky] += dirTrans * LambdaInc * elemLumSky.sky[iSky]; + fl.sky[iSky] += dirTrans * LambdaInc * elemLum.sky[iSky]; } - FLSU(iBackElem) += dirTrans * LambdaInc * ElementLuminanceSun(iIncElem); - FLSUdisk(iBackElem) += dirTrans * LambdaInc * ElementLuminanceSunDisk(iIncElem); + fl.sun += dirTrans * LambdaInc * elemLum.sun; + fl.sunDisk += dirTrans * LambdaInc * elemLum.sunDisk; } - auto &firstFluxSK = FirstFluxSK(iBackElem); - auto const &flsk = FLSK(iBackElem); + auto &firstFlux = FirstFlux(iBackElem); + auto const &fl = FL(iBackElem); for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { - firstFluxSK.sky[iSky] = flsk.sky[iSky] * complexWinGeom.AveRhoVisOverlap(iBackElem); - FFSKTot.sky[iSky] += firstFluxSK.sky[iSky]; + firstFlux.sky[iSky] = fl.sky[iSky] * complexWinGeom.AveRhoVisOverlap(iBackElem); + FFTot.sky[iSky] += firstFlux.sky[iSky]; // FLSKTot( iSky ) += FLSK( iSky, iBackElem ); } - FirstFluxSU(iBackElem) = FLSU(iBackElem) * complexWinGeom.AveRhoVisOverlap(iBackElem); - FFSUTot += FirstFluxSU(iBackElem); - FLSUTot += FLSU(iBackElem); + firstFlux.sun = fl.sun * complexWinGeom.AveRhoVisOverlap(iBackElem); + FFTot.sun += firstFlux.sun; + FLTot.sun += fl.sun; - FirstFluxSUdisk(iBackElem) = FLSUdisk(iBackElem) * complexWinGeom.AveRhoVisOverlap(iBackElem); - FFSUdiskTot += FirstFluxSUdisk(iBackElem); - FLSUdiskTot += FLSUdisk(iBackElem); + firstFlux.sunDisk = fl.sunDisk * complexWinGeom.AveRhoVisOverlap(iBackElem); + FFTot.sunDisk += firstFlux.sunDisk; + FLTot.sunDisk += fl.sunDisk; } - auto const &thisEnclDaylight = state.dataDaylightingData->enclDaylight(state.dataDaylightingData->daylightControl(daylightCtrlNum).enclIndex); + auto const &thisEnclDaylight = dl->enclDaylight(dl->daylightControl(daylightCtrlNum).enclIndex); Real64 EnclInsideSurfArea = thisEnclDaylight.totInsSurfArea; - auto &eintsk = state.dataDaylightingManager->EINTSK(IHR, 1); + auto &eintsk = dl->reflIllum(IHR, 1); for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { - eintsk.sky[iSky] = FFSKTot.sky[iSky] * (state.dataSurface->Surface(IWin).Area / state.dataSurface->SurfWinGlazedFrac(IWin)) / - (EnclInsideSurfArea * (1.0 - thisEnclDaylight.aveVisDiffReflect)); + eintsk.sky[iSky] = FFTot.sky[iSky] * (surf.Area / surfWin.glazedFrac) / (EnclInsideSurfArea * (1.0 - thisEnclDaylight.aveVisDiffReflect)); } // for (iSky) - state.dataDaylightingManager->EINTSU(IHR, 1) = FFSUTot * (state.dataSurface->Surface(IWin).Area / state.dataSurface->SurfWinGlazedFrac(IWin)) / - (EnclInsideSurfArea * (1.0 - thisEnclDaylight.aveVisDiffReflect)); - state.dataDaylightingManager->EINTSUdisk(IHR, 1) = FFSUdiskTot * - (state.dataSurface->Surface(IWin).Area / state.dataSurface->SurfWinGlazedFrac(IWin)) / - (EnclInsideSurfArea * (1.0 - thisEnclDaylight.aveVisDiffReflect)); + dl->reflIllum(IHR, 1).sun = FFTot.sun * (surf.Area / surfWin.glazedFrac) / (EnclInsideSurfArea * (1.0 - thisEnclDaylight.aveVisDiffReflect)); + dl->reflIllum(IHR, 1).sunDisk = + FFTot.sunDisk * (surf.Area / surfWin.glazedFrac) / (EnclInsideSurfArea * (1.0 - thisEnclDaylight.aveVisDiffReflect)); - if (allocated(FLSK)) FLSK.deallocate(); - if (allocated(FLSU)) FLSU.deallocate(); - if (allocated(FLSUdisk)) FLSUdisk.deallocate(); + if (allocated(FL)) FL.deallocate(); + // if (allocated(FLSU)) FLSU.deallocate(); + // if (allocated(FLSUdisk)) FLSUdisk.deallocate(); - if (allocated(FirstFluxSK)) FirstFluxSK.deallocate(); - if (allocated(FirstFluxSU)) FirstFluxSU.deallocate(); - if (allocated(FirstFluxSUdisk)) FirstFluxSUdisk.deallocate(); + if (allocated(FirstFlux)) FirstFlux.deallocate(); + // if (allocated(FirstFluxSU)) FirstFluxSU.deallocate(); + // if (allocated(FirstFluxSUdisk)) FirstFluxSUdisk.deallocate(); - if (allocated(ElementLuminanceSky)) ElementLuminanceSky.deallocate(); - if (allocated(ElementLuminanceSun)) ElementLuminanceSun.deallocate(); - if (allocated(ElementLuminanceSunDisk)) ElementLuminanceSunDisk.deallocate(); + if (allocated(ElementLuminance)) ElementLuminance.deallocate(); + // if (allocated(ElementLuminanceSun)) ElementLuminanceSun.deallocate(); + // if (allocated(ElementLuminanceSunDisk)) ElementLuminanceSunDisk.deallocate(); } void DayltgDirectIllumComplexFenestration(EnergyPlusData &state, @@ -8603,18 +8176,16 @@ void DayltgDirectIllumComplexFenestration(EnergyPlusData &state, // AUTHOR Simon Vidanovic // DATE WRITTEN June 2013 + auto &dl = state.dataDayltg; + // Luminances from different sources to the window - Array1D ElementLuminanceSky; // sky related luminance at window element (exterior side) - Array1D ElementLuminanceSun; // sun related luminance at window element (exterior side), + Array1D ElementLuminance; // sky related luminance at window element (exterior side) + // Array1D ElementLuminanceSun; // sun related luminance at window element (exterior side), // exluding beam - Array1D ElementLuminanceSunDisk; // sun related luminance at window element (exterior side), + // Array1D ElementLuminanceSunDisk; // sun related luminance at window element (exterior side), // due to sun beam - auto &WinLumSK = state.dataDaylightingManager->WinLumSK; // Sky related window luminance - auto &EDirSky = state.dataDaylightingManager->EDirSky; // Sky related direct illuminance - Real64 WinLumSU; // Sun related window luminance, excluding entering beam - Real64 EDirSun; // Sun related direct illuminance, excluding entering beam - int RefPointIndex; // reference point patch number + int RefPointIndex; // reference point patch number Real64 dirTrans; // directional BSDF transmittance Real64 dOmega; // solid view angle of current element @@ -8626,13 +8197,12 @@ void DayltgDirectIllumComplexFenestration(EnergyPlusData &state, int iConst = state.dataSurface->SurfaceWindow(IWin).ComplexFen.State(CurCplxFenState).Konst; int NIncBasis = complexWin.Geom(CurCplxFenState).Inc.NBasis; - if (!allocated(ElementLuminanceSky)) ElementLuminanceSky.allocate(NIncBasis); - ElementLuminanceSky = Illums(); - if (!allocated(ElementLuminanceSun)) ElementLuminanceSun.dimension(NIncBasis, 0.0); - if (!allocated(ElementLuminanceSunDisk)) ElementLuminanceSunDisk.dimension(NIncBasis, 0.0); + if (!allocated(ElementLuminance)) ElementLuminance.allocate(NIncBasis); + ElementLuminance = Illums(); + // if (!allocated(ElementLuminanceSun)) ElementLuminanceSun.dimension(NIncBasis, 0.0); + // if (!allocated(ElementLuminanceSunDisk)) ElementLuminanceSunDisk.dimension(NIncBasis, 0.0); - ComplexFenestrationLuminances( - state, IWin, WinEl, NIncBasis, IHR, iRefPoint, ElementLuminanceSky, ElementLuminanceSun, ElementLuminanceSunDisk, CalledFrom, MapNum); + ComplexFenestrationLuminances(state, IWin, WinEl, NIncBasis, IHR, iRefPoint, ElementLuminance, CalledFrom, MapNum); // find number of outgoing basis towards current reference point if (CalledFrom == CalledFor::RefPoint) { @@ -8646,47 +8216,43 @@ void DayltgDirectIllumComplexFenestration(EnergyPlusData &state, zProjection = complexWin.IlluminanceMap(iRefPoint, MapNum).SolidAngleVec(WinEl).z; } - WinLumSK = Illums(); - WinLumSU = 0.0; - // WinLumSUdisk = 0.0d0 - EDirSky = Illums(); - EDirSun = 0.0; - // EDirSunDisk = 0.0; //Unused Set but never used + Illums WinLum = Illums(); + Illums EDir = Illums(); for (int iIncElem = 1; iIncElem <= NIncBasis; ++iIncElem) { // LambdaInc = ComplexWind(IWin)%Geom(CurCplxFenState)%Inc%Lamda(iIncElem) dirTrans = state.dataConstruction->Construct(iConst).BSDFInput.VisFrtTrans(RefPointIndex, iIncElem); - auto const &elemLumSky = ElementLuminanceSky(iIncElem); + auto const &elemLum = ElementLuminance(iIncElem); for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { - WinLumSK.sky[iSky] += dirTrans * elemLumSky.sky[iSky]; + WinLum.sky[iSky] += dirTrans * elemLum.sky[iSky]; } - WinLumSU += dirTrans * ElementLuminanceSun(iIncElem); + WinLum.sun += dirTrans * elemLum.sun; // For sun disk need to go throug outgoing directions and see which directions actually contain reference point } if (zProjection > 0.0) { for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { - EDirSky.sky[iSky] = WinLumSK.sky[iSky] * dOmega * zProjection; + EDir.sky[iSky] = WinLum.sky[iSky] * dOmega * zProjection; } - EDirSun = WinLumSU * dOmega * zProjection; + EDir.sun = WinLum.sun * dOmega * zProjection; } // Store solution in global variables - auto &avwlsk = state.dataDaylightingManager->AVWLSK(IHR, 1); - auto &edirsk = state.dataDaylightingManager->EDIRSK(IHR, 1); + auto &avwlsk = dl->avgWinLum(IHR, 1); + auto &edirsk = dl->dirIllum(IHR, 1); for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { - avwlsk.sky[iSky] += WinLumSK.sky[iSky]; - edirsk.sky[iSky] += EDirSky.sky[iSky]; + avwlsk.sky[iSky] += WinLum.sky[iSky]; + edirsk.sky[iSky] += EDir.sky[iSky]; } - state.dataDaylightingManager->AVWLSU(IHR, 1) += WinLumSU; - state.dataDaylightingManager->EDIRSU(IHR, 1) += EDirSun; + dl->avgWinLum(IHR, 1).sun += WinLum.sun; + dl->dirIllum(IHR, 1).sun += EDir.sun; // AVWLSUdisk(1,IHR) = AVWLSUdisk(1,IHR) + WinLumSUdisk -} +} // DayltgDirectIllumComplexFenestration() void DayltgDirectSunDiskComplexFenestration(EnergyPlusData &state, int const iWin, // Window index @@ -8706,95 +8272,64 @@ void DayltgDirectSunDiskComplexFenestration(EnergyPlusData &state, // Calculate illuminance from sun disk for complex fenestration systems // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int CurCplxFenState; - int iConst; - int SolBmIndex; - int NTrnBasis; - Real64 WindowSolidAngleDaylightPoint(0.0); - Real64 XR; - Real64 YR; - Real64 PosFac; - Real64 dirTrans; - Real64 LambdaTrn; - Real64 WinLumSunDisk; // window luminance from sun disk - Real64 ELumSunDisk; // window illuminance from sun disk - Real64 TransBeam; // transmittance of the beam for given direction - Real64 RayZ; // z component of unit vector for outgoing direction - bool refPointIntersect; - - CurCplxFenState = state.dataSurface->SurfaceWindow(iWin).ComplexFen.CurrentState; - iConst = state.dataSurface->SurfaceWindow(iWin).ComplexFen.State(CurCplxFenState).Konst; - SolBmIndex = state.dataBSDFWindow->ComplexWind(iWin).Geom(CurCplxFenState).SolBmIndex(iHour, state.dataGlobal->TimeStep); - - switch (CalledFrom) { - case CalledFor::RefPoint: { - WindowSolidAngleDaylightPoint = state.dataSurface->SurfaceWindow(iWin).SolidAngAtRefPtWtd(iRefPoint); - } break; - case CalledFor::MapPoint: { - WindowSolidAngleDaylightPoint = 0.0; - } break; - default: { - assert(false); // Bad CalledFrom argument - } break; - } + auto &dl = state.dataDayltg; + assert(CalledFrom != CalledFor::MapPoint || MapNum > 0); + + auto const &window = state.dataSurface->SurfaceWindow(iWin); + int CurCplxFenState = window.ComplexFen.CurrentState; + int iConst = window.ComplexFen.State(CurCplxFenState).Konst; + + auto const &complexWindow = state.dataBSDFWindow->ComplexWind(iWin); + auto const &complexWindowGeom = complexWindow.Geom(CurCplxFenState); + auto const &complexWindowDayltgGeom = complexWindow.DaylghtGeom(CurCplxFenState); + int SolBmIndex = complexWindowGeom.SolBmIndex(iHour, state.dataGlobal->TimeStep); + + Real64 WindowSolidAngleDaylightPoint = (CalledFrom == CalledFor::RefPoint) ? window.refPts(iRefPoint).solidAngWtd : 0.0; if (WindowSolidAngleDaylightPoint < 1e-6) return; - WinLumSunDisk = 0.0; - ELumSunDisk = 0.0; - NTrnBasis = state.dataBSDFWindow->ComplexWind(iWin).Geom(CurCplxFenState).Trn.NBasis; + Illums WinLum; + Illums ElemLum; + + int NTrnBasis = complexWindowGeom.Trn.NBasis; for (int iTrnElem = 1; iTrnElem <= NTrnBasis; ++iTrnElem) { // if ray from any part of the window can reach reference point - if (CalledFrom == CalledFor::RefPoint) { - refPointIntersect = - state.dataBSDFWindow->ComplexWind(iWin).DaylghtGeom(CurCplxFenState).RefPoint(iRefPoint).RefPointIntersection(iTrnElem); - } else if (CalledFrom == CalledFor::MapPoint) { - assert(MapNum > 0); - refPointIntersect = - state.dataBSDFWindow->ComplexWind(iWin).DaylghtGeom(CurCplxFenState).IlluminanceMap(iRefPoint, MapNum).RefPointIntersection(iTrnElem); - } - if (refPointIntersect) { - if (CalledFrom == CalledFor::RefPoint) { - PosFac = state.dataBSDFWindow->ComplexWind(iWin).DaylghtGeom(CurCplxFenState).RefPoint(iRefPoint).RefPtIntPosFac(iTrnElem); - } else { - PosFac = - state.dataBSDFWindow->ComplexWind(iWin).DaylghtGeom(CurCplxFenState).IlluminanceMap(iRefPoint, MapNum).RefPtIntPosFac(iTrnElem); - } - RayZ = -state.dataBSDFWindow->ComplexWind(iWin).Geom(CurCplxFenState).sTrn(iTrnElem).z; - - // Need to recalculate position factor for dominant direction in case of specular bsdf. Otherwise this will produce - // very inaccurate results because of position factor of the sun and bsdf pach can vary by lot - if (iTrnElem == SolBmIndex) { - XR = std::tan(std::abs(Constant::PiOvr2 - AZVIEW - state.dataDaylightingManager->THSUN) + 0.001); - YR = std::tan(state.dataDaylightingManager->PHSUN + 0.001); - PosFac = DayltgGlarePositionFactor(XR, YR); - RayZ = state.dataDaylightingManager->SPHSUN; - } + int refPointIntersect = (CalledFrom == CalledFor::RefPoint) + ? complexWindowDayltgGeom.RefPoint(iRefPoint).RefPointIntersection(iTrnElem) + : complexWindowDayltgGeom.IlluminanceMap(iRefPoint, MapNum).RefPointIntersection(iTrnElem); - if (PosFac != 0.0) { - if (SolBmIndex > 0) { - dirTrans = state.dataConstruction->Construct(iConst).BSDFInput.VisFrtTrans(iTrnElem, SolBmIndex); - } else { - dirTrans = 0.0; - } - LambdaTrn = state.dataBSDFWindow->ComplexWind(iWin).Geom(CurCplxFenState).Trn.Lamda(iTrnElem); + if (refPointIntersect == 0) continue; - Vector3 V = -state.dataBSDFWindow->ComplexWind(iWin).Geom(CurCplxFenState).sTrn(iTrnElem); - // Window center - Vector3 RWin = state.dataSurface->Surface(iWin).Centroid; + Real64 PosFac = (CalledFrom == CalledFor::RefPoint) ? complexWindowDayltgGeom.RefPoint(iRefPoint).RefPtIntPosFac(iTrnElem) + : complexWindowDayltgGeom.IlluminanceMap(iRefPoint, MapNum).RefPtIntPosFac(iTrnElem); - DayltgHitObstruction(state, iHour, iWin, RWin, V, TransBeam); + Real64 RayZ = -complexWindowGeom.sTrn(iTrnElem).z; - WinLumSunDisk += (14700.0 * std::sqrt(0.000068 * PosFac) * double(NumEl) / std::pow(WindowSolidAngleDaylightPoint, 0.8)) * dirTrans * - LambdaTrn * TransBeam; - - ELumSunDisk += RayZ * dirTrans * LambdaTrn * TransBeam; - } + // Need to recalculate position factor for dominant direction in case of specular bsdf. Otherwise this will produce + // very inaccurate results because of position factor of the sun and bsdf pach can vary by lot + if (iTrnElem == SolBmIndex) { + Real64 XR = std::tan(std::abs(Constant::PiOvr2 - AZVIEW - dl->sunAngles.theta) + 0.001); + Real64 YR = std::tan(dl->sunAngles.phi + 0.001); + PosFac = DayltgGlarePositionFactor(XR, YR); + RayZ = dl->sunAngles.sinPhi; } - } - state.dataDaylightingManager->AVWLSUdisk(iHour, 1) = WinLumSunDisk; - state.dataDaylightingManager->EDIRSUdisk(iHour, 1) = ELumSunDisk; + if (PosFac == 0.0) continue; + + Real64 dirTrans = (SolBmIndex > 0) ? state.dataConstruction->Construct(iConst).BSDFInput.VisFrtTrans(iTrnElem, SolBmIndex) : 0.0; + Real64 LambdaTrn = complexWindowGeom.Trn.Lamda(iTrnElem); + Vector3 V = -complexWindowGeom.sTrn(iTrnElem); + Vector3 RWin = state.dataSurface->Surface(iWin).Centroid; + Real64 TransBeam = DayltgHitObstruction(state, iHour, iWin, RWin, V); + + WinLum.sunDisk += (14700.0 * std::sqrt(0.000068 * PosFac) * double(NumEl) / std::pow(WindowSolidAngleDaylightPoint, 0.8)) * dirTrans * + LambdaTrn * TransBeam; + + ElemLum.sunDisk += RayZ * dirTrans * LambdaTrn * TransBeam; + } // for (iTrnElem) + + dl->avgWinLum(iHour, 1).sunDisk = WinLum.sunDisk; + dl->dirIllum(iHour, 1).sunDisk = ElemLum.sunDisk; } Real64 DayltgSkyLuminance(EnergyPlusData const &state, @@ -8831,14 +8366,15 @@ Real64 DayltgSkyLuminance(EnergyPlusData const &state, // PHSKY ranges from 0 to Pi starting with 0 at the horizon and Pi/2 at the zenith. // FUNCTION LOCAL VARIABLE DECLARATIONS: + auto &dl = state.dataDayltg; + Real64 G = 0.0; // Angle between sun and element of sky (radians) Real64 COSG = 0.0; // Cosine of G Real64 SPHSKY = max(std::sin(PHSKY), 0.01); // Prevent floating point underflows - Real64 Z = Constant::PiOvr2 - state.dataDaylightingManager->PHSUN; + Real64 Z = Constant::PiOvr2 - dl->sunAngles.phi; if (sky != SkyType::Overcast) { // Following not needed for overcast sky - COSG = SPHSKY * state.dataDaylightingManager->SPHSUN + - std::cos(PHSKY) * state.dataDaylightingManager->CPHSUN * std::cos(THSKY - state.dataDaylightingManager->THSUN); + COSG = SPHSKY * dl->sunAngles.sinPhi + std::cos(PHSKY) * dl->sunAngles.cosPhi * std::cos(THSKY - dl->sunAngles.theta); COSG = max(DataPrecisionGlobals::constant_minusone, min(COSG, 1.0)); // Prevent out of range due to roundoff G = std::acos(COSG); } @@ -8847,24 +8383,23 @@ Real64 DayltgSkyLuminance(EnergyPlusData const &state, case SkyType::Clear: { Real64 Z1 = 0.910 + 10.0 * std::exp(-3.0 * G) + 0.45 * COSG * COSG; Real64 Z2 = 1.0 - std::exp(-0.32 / SPHSKY); - Real64 Z3 = 0.27385 * (0.91 + 10.0 * std::exp(-3.0 * Z) + 0.45 * state.dataDaylightingManager->SPHSUN * state.dataDaylightingManager->SPHSUN); + Real64 Z3 = 0.27385 * (0.91 + 10.0 * std::exp(-3.0 * Z) + 0.45 * dl->sunAngles.sinPhi * dl->sunAngles.sinPhi); return Z1 * Z2 / Z3; } break; case SkyType::ClearTurbid: { Real64 Z1 = 0.856 + 16.0 * std::exp(-3.0 * G) + 0.3 * COSG * COSG; Real64 Z2 = 1.0 - std::exp(-0.32 / SPHSKY); - Real64 Z3 = 0.27385 * (0.856 + 16.0 * std::exp(-3.0 * Z) + 0.3 * state.dataDaylightingManager->SPHSUN * state.dataDaylightingManager->SPHSUN); + Real64 Z3 = 0.27385 * (0.856 + 16.0 * std::exp(-3.0 * Z) + 0.3 * dl->sunAngles.sinPhi * dl->sunAngles.sinPhi); return Z1 * Z2 / Z3; } break; case SkyType::Intermediate: { - Real64 Z1 = - (1.35 * (std::sin(3.59 * PHSKY - 0.009) + 2.31) * std::sin(2.6 * state.dataDaylightingManager->PHSUN + 0.316) + PHSKY + 4.799) / 2.326; - Real64 Z2 = std::exp(-G * 0.563 * ((state.dataDaylightingManager->PHSUN - 0.008) * (PHSKY + 1.059) + 0.812)); - Real64 Z3 = 0.99224 * std::sin(2.6 * state.dataDaylightingManager->PHSUN + 0.316) + 2.73852; - Real64 Z4 = std::exp(-Z * 0.563 * ((state.dataDaylightingManager->PHSUN - 0.008) * 2.6298 + 0.812)); + Real64 Z1 = (1.35 * (std::sin(3.59 * PHSKY - 0.009) + 2.31) * std::sin(2.6 * dl->sunAngles.phi + 0.316) + PHSKY + 4.799) / 2.326; + Real64 Z2 = std::exp(-G * 0.563 * ((dl->sunAngles.phi - 0.008) * (PHSKY + 1.059) + 0.812)); + Real64 Z3 = 0.99224 * std::sin(2.6 * dl->sunAngles.phi + 0.316) + 2.73852; + Real64 Z4 = std::exp(-Z * 0.563 * ((dl->sunAngles.phi - 0.008) * 2.6298 + 0.812)); return Z1 * Z2 / (Z3 * Z4); } break; case SkyType::Overcast: { @@ -8876,11 +8411,10 @@ Real64 DayltgSkyLuminance(EnergyPlusData const &state, } } -void ProfileAngle(EnergyPlusData &state, - int const SurfNum, // Surface number - Vector3 const &CosDirSun, // Solar direction cosines - DataWindowEquivalentLayer::Orientation const HorOrVert, // If HORIZONTAL, calculates ProfileAngHor - Real64 &ProfileAng // Solar profile angle (radians). +Real64 ProfileAngle(EnergyPlusData &state, + int const SurfNum, // Surface number + Vector3 const &CosDirSun, // Solar direction cosines + DataWindowEquivalentLayer::Orientation const HorOrVert // If HORIZONTAL, calculates ProfileAngHor ) { @@ -8903,29 +8437,25 @@ void ProfileAngle(EnergyPlusData &state, // which the width of the window is measured). // If VERTICAL, calculates ProfileAngVert - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - Real64 ElevSun; // Sun elevation; angle between sun and horizontal (radians) - Real64 ElevWin; // Window elevation: angle between window outward normal and horizontal (radians) - Real64 AzimWin; // Window azimuth (radians) - Real64 AzimSun; // Sun azimuth (radians) - Real64 ThWin; // Azimuth angle of WinNorm - + auto const &surf = state.dataSurface->Surface(SurfNum); if (HorOrVert == DataWindowEquivalentLayer::Orientation::Horizontal) { // Profile angle for horizontal structures - ElevWin = Constant::PiOvr2 - state.dataSurface->Surface(SurfNum).Tilt * Constant::DegToRadians; - AzimWin = (90.0 - state.dataSurface->Surface(SurfNum).Azimuth) * Constant::DegToRadians; - ElevSun = std::asin(CosDirSun.z); - AzimSun = std::atan2(CosDirSun.y, CosDirSun.x); - ProfileAng = std::atan(std::sin(ElevSun) / std::abs(std::cos(ElevSun) * std::cos(AzimWin - AzimSun))) - ElevWin; + Real64 ElevWin = + Constant::PiOvr2 - surf.Tilt * Constant::DegToRadians; // Window elevation: angle between outward normal and horizontal (radians) + Real64 AzimWin = (90.0 - surf.Azimuth) * Constant::DegToRadians; // Window azimuth (radians) + Real64 ElevSun = std::asin(CosDirSun.z); // Sun elevation; angle between sun and horizontal (radians) + Real64 AzimSun = std::atan2(CosDirSun.y, CosDirSun.x); // Sun azimuth (radians) + return std::atan(std::sin(ElevSun) / std::abs(std::cos(ElevSun) * std::cos(AzimWin - AzimSun))) - ElevWin; } else { // Profile angle for vertical structures - ElevWin = Constant::PiOvr2 - state.dataSurface->Surface(SurfNum).Tilt * Constant::DegToRadians; - AzimWin = state.dataSurface->Surface(SurfNum).Azimuth * Constant::DegToRadians; // 7952 - AzimSun = std::atan2(CosDirSun.x, CosDirSun.y); // 7952 - if (std::abs(ElevWin) < 0.1) { // Near-vertical window - ProfileAng = AzimWin - AzimSun; // CR7952 allow sign changes. - } else { + Real64 ElevWin = Constant::PiOvr2 - surf.Tilt * Constant::DegToRadians; + Real64 AzimWin = surf.Azimuth * Constant::DegToRadians; // 7952 + Real64 AzimSun = std::atan2(CosDirSun.x, CosDirSun.y); // 7952 - Vector3 WinNorm = state.dataSurface->Surface(SurfNum).OutNormVec; // Window outward normal unit vector - ThWin = AzimWin - Constant::PiOvr2; + Real64 ProfileAng; + if (std::abs(ElevWin) < 0.1) { // Near-vertical window + ProfileAng = AzimWin - AzimSun; // CR7952 allow sign changes. + } else { + Vector3 WinNorm = surf.OutNormVec; // Window outward normal unit vector + Real64 ThWin = AzimWin - Constant::PiOvr2; Real64 const sin_ElevWin = std::sin(ElevWin); // Cross product of WinNorm and vector along window baseline Vector3 WinNormCrossBase = {-sin_ElevWin * std::cos(ThWin), sin_ElevWin * std::sin(ThWin), std::cos(ElevWin)}; @@ -8938,6 +8468,7 @@ void ProfileAngle(EnergyPlusData &state, } // Constrain to 0 to pi if (ProfileAng > Constant::Pi) ProfileAng = 2.0 * Constant::Pi - ProfileAng; + return ProfileAng; } } @@ -8972,25 +8503,26 @@ void DayltgClosestObstruction(EnergyPlusData &state, for (int ObsSurfNum : state.dataSurface->AllShadowPossObstrSurfaceList) { // Determine if this ray hits the surface and, if so, get the distance from the receiving point to the hit - PierceSurface(state, ObsSurfNum, RecPt, RayVec, HitPt, hit); - if (hit) { // Ray pierces surface - // If obstruction is a window and its base surface is the nearest obstruction hit so far set nearestHitSurface to this window - // Note that in this case NearestHitDistance_sq has already been calculated, so does not have to be recalculated - if ((state.dataSurface->Surface(ObsSurfNum).Class == SurfaceClass::Window) && - (state.dataSurface->Surface(ObsSurfNum).BaseSurf == NearestHitSurfNum)) { + hit = PierceSurface(state, ObsSurfNum, RecPt, RayVec, HitPt); + if (!hit) // Ray pierces surface + continue; + + // If obstruction is a window and its base surface is the nearest obstruction hit so far set nearestHitSurface to this window + // Note that in this case NearestHitDistance_sq has already been calculated, so does not have to be recalculated + if ((state.dataSurface->Surface(ObsSurfNum).Class == SurfaceClass::Window) && + (state.dataSurface->Surface(ObsSurfNum).BaseSurf == NearestHitSurfNum)) { + NearestHitSurfNum = ObsSurfNum; + } else { + // Distance squared from receiving point to hit point + Real64 const HitDistance_sq(distance_squared(HitPt, RecPt)); + // Reset NearestHitSurfNum and NearestHitDistance_sq if this hit point is closer than previous closest + if (HitDistance_sq < NearestHitDistance_sq) { + NearestHitDistance_sq = HitDistance_sq; NearestHitSurfNum = ObsSurfNum; - } else { - // Distance squared from receiving point to hit point - Real64 const HitDistance_sq(distance_squared(HitPt, RecPt)); - // Reset NearestHitSurfNum and NearestHitDistance_sq if this hit point is closer than previous closest - if (HitDistance_sq < NearestHitDistance_sq) { - NearestHitDistance_sq = HitDistance_sq; - NearestHitSurfNum = ObsSurfNum; - NearestHitPt = HitPt; - } + NearestHitPt = HitPt; } } // End of check if obstruction was hit - } // End of loop over possible obstructions for this ray + } // for (ObsSurfNum) } else { // Surface octree search @@ -9001,22 +8533,22 @@ void DayltgClosestObstruction(EnergyPlusData &state, if (surface.IsShadowPossibleObstruction) { Vector3 HitPt; // Determine if this ray hits the surface and, if so, get the distance from the receiving point to the hit - PierceSurface(surface, RecPt, RayVec, HitPt, hit); // Check if ray pierces surface - if (hit) { // Ray pierces surface - // If obstruction is a window and its base surface is the nearest obstruction hit so far set nearestHitSurface to this window - // Note that in this case NearestHitDistance_sq has already been calculated, so does not have to be recalculated - if ((surface.Class == SurfaceClass::Window) && (surface.BaseSurf > 0) && - (&state.dataSurface->Surface(surface.BaseSurf) == nearestHitSurface)) { + hit = PierceSurface(surface, RecPt, RayVec, HitPt); // Check if ray pierces surface + if (!hit) return; + + // If obstruction is a window and its base surface is the nearest obstruction hit so far set nearestHitSurface to this window + // Note that in this case NearestHitDistance_sq has already been calculated, so does not have to be recalculated + if ((surface.Class == SurfaceClass::Window) && (surface.BaseSurf > 0) && + (&state.dataSurface->Surface(surface.BaseSurf) == nearestHitSurface)) { + nearestHitSurface = &surface; + } else { + // Distance squared from receiving point to hit point + Real64 const HitDistance_sq(distance_squared(HitPt, RecPt)); + // Reset nearestHitSurface and NearestHitDistance_sq if this hit point is closer than previous closest + if (HitDistance_sq < NearestHitDistance_sq) { + NearestHitDistance_sq = HitDistance_sq; nearestHitSurface = &surface; - } else { - // Distance squared from receiving point to hit point - Real64 const HitDistance_sq(distance_squared(HitPt, RecPt)); - // Reset nearestHitSurface and NearestHitDistance_sq if this hit point is closer than previous closest - if (HitDistance_sq < NearestHitDistance_sq) { - NearestHitDistance_sq = HitDistance_sq; - nearestHitSurface = &surface; - NearestHitPt = HitPt; - } + NearestHitPt = HitPt; } } // End of check if obstruction was hit } @@ -9035,14 +8567,13 @@ void DayltgClosestObstruction(EnergyPlusData &state, assert(NearestHitSurfNum != 0); } } -} +} // DayltgClosestObstruction() -void DayltgSurfaceLumFromSun(EnergyPlusData &state, - int const IHR, // Hour number - Vector3 const &Ray, // Ray from window to reflecting surface (m) - int const ReflSurfNum, // Number of surface for which luminance is being calculated - Vector3 const &ReflHitPt, // Point on ReflSurfNum for luminance calculation (m) - Real64 &LumAtReflHitPtFrSun // Luminance at ReflHitPt from beam solar reflection for unit +Real64 DayltgSurfaceLumFromSun(EnergyPlusData &state, + int const IHR, // Hour number + Vector3 const &Ray, // Ray from window to reflecting surface (m) + int const ReflSurfNum, // Number of surface for which luminance is being calculated + Vector3 const &ReflHitPt // Point on ReflSurfNum for luminance calculation (m) ) { @@ -9061,49 +8592,51 @@ void DayltgSurfaceLumFromSun(EnergyPlusData &state, Vector3 SurfaceLumFromSunReflNorm; // Unit normal to reflecting surface (m) Vector3 SurfaceLumFromSunObsHitPt; // Hit point on obstruction (m) bool hitObs; // True iff obstruction is hit - Real64 CosIncAngAtHitPt; // Cosine of angle of incidence of sun at HitPt Real64 DiffVisRefl; // Diffuse visible reflectance of ReflSurfNum - LumAtReflHitPtFrSun = 0.0; // Skip daylighting shelves since reflection from these is separately calculated - if (state.dataSurface->SurfDaylightingShelfInd(ReflSurfNum) > 0) return; + if (state.dataSurface->SurfDaylightingShelfInd(ReflSurfNum) > 0) return 0.0; + + auto const &reflSurf = state.dataSurface->Surface(ReflSurfNum); + // Normal to reflecting surface in hemisphere containing window element - SurfaceLumFromSunReflNorm = state.dataSurface->Surface(ReflSurfNum).OutNormVec; - if (state.dataSurface->Surface(ReflSurfNum).IsShadowing) { + SurfaceLumFromSunReflNorm = reflSurf.OutNormVec; + if (reflSurf.IsShadowing) { if (dot(SurfaceLumFromSunReflNorm, Ray) > 0.0) { SurfaceLumFromSunReflNorm *= -1.0; } } // Cosine of angle of incidence of sun at HitPt if sun were to reach HitPt - Vector3 const SUNCOS_IHR(state.dataSurface->SurfSunCosHourly(IHR)); - CosIncAngAtHitPt = dot(SurfaceLumFromSunReflNorm, SUNCOS_IHR); + Vector3 const SUNCOS_IHR = state.dataSurface->SurfSunCosHourly(IHR); + Real64 CosIncAngAtHitPt = dot(SurfaceLumFromSunReflNorm, SUNCOS_IHR); // Require that the sun be in front of this surface relative to window element - if (CosIncAngAtHitPt <= 0.0) return; // Sun is in back of reflecting surface + if (CosIncAngAtHitPt <= 0.0) return 0.0; // Sun is in back of reflecting surface // Sun reaches ReflHitPt if vector from ReflHitPt to sun is unobstructed hitObs = false; for (int ObsSurfNum : state.dataSurface->AllShadowPossObstrSurfaceList) { // Exclude as a possible obstructor ReflSurfNum and its base surface (if it has one) - if (ObsSurfNum == ReflSurfNum || ObsSurfNum == state.dataSurface->Surface(ReflSurfNum).BaseSurf) continue; - PierceSurface(state, ObsSurfNum, ReflHitPt, SUNCOS_IHR, SurfaceLumFromSunObsHitPt, hitObs); + if (ObsSurfNum == ReflSurfNum || ObsSurfNum == reflSurf.BaseSurf) continue; + hitObs = PierceSurface(state, ObsSurfNum, ReflHitPt, SUNCOS_IHR, SurfaceLumFromSunObsHitPt); if (hitObs) break; } - if (hitObs) return; // Obstruction was hit, blocking s auto surfaceHit = [&state, &GroundHitPtun + + if (hitObs) return 0.0; // Obstruction was hit, blocking s auto surfaceHit = [&state, &GroundHitPtun // Obstruction was not hit; sun reaches ReflHitPt. // Calculate luminance at ReflHitPt due to beam solar reflection (for unit beam normal illuminance) - if (state.dataSurface->Surface(ReflSurfNum).IsShadowing) { + if (reflSurf.IsShadowing) { DiffVisRefl = state.dataSurface->SurfShadowDiffuseVisRefl(ReflSurfNum); // Note that if the shadowing surface has a non-zero glazing fraction (e.g., neighboring bldg) that the above is // (1 - glazing fraction) * (vis refl of opaque part of shadowing surface); specular reflection is // excluded in this value of DiffVisRefl. } else { // Exterior building surface - if (!state.dataConstruction->Construct(state.dataSurface->Surface(ReflSurfNum).Construction).TypeIsWindow) { - DiffVisRefl = 1.0 - state.dataConstruction->Construct(state.dataSurface->Surface(ReflSurfNum).Construction).OutsideAbsorpSolar; + if (!state.dataConstruction->Construct(reflSurf.Construction).TypeIsWindow) { + DiffVisRefl = 1.0 - state.dataConstruction->Construct(reflSurf.Construction).OutsideAbsorpSolar; } else { // Window; assume bare so no beam-to-diffuse reflection DiffVisRefl = 0.0; } } - LumAtReflHitPtFrSun = CosIncAngAtHitPt * DiffVisRefl / Constant::Pi; + return CosIncAngAtHitPt * DiffVisRefl / Constant::Pi; } void DayltgInteriorMapIllum(EnergyPlusData &state) @@ -9136,37 +8669,27 @@ void DayltgInteriorMapIllum(EnergyPlusData &state) // REFERENCES: // Based on DOE-2.1E subroutine DINTIL. + auto &dl = state.dataDayltg; // Locals - auto &daylight_illum = state.dataDaylightingManager->daylight_illum; + Array1D daylight_illum; // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int iSky1; // Sky type index values for averaging two sky types int iSky2; - auto &DFSUHR = state.dataDaylightingManager->DFSUHR; // Sun daylight factor for bare/shaded window - // auto &IConstShaded = state.dataDaylightingManager->IConstShaded; - auto &VTDark = state.dataDaylightingManager->VTDark; - // auto &VTMULT = state.dataDaylightingManager->VTMULT; - auto &DayltgInteriorMapIllumDFSUHR = state.dataDaylightingManager->DayltgInteriorMapIllumDFSUHR; - auto &DayltgInteriorMapIllumHorIllSky = state.dataDaylightingManager->DayltgInteriorMapIllumHorIllSky; - auto &DFSKHR = state.dataDaylightingManager->DayltgInteriorMapIllumDFSKHR; Real64 SkyWeight; // Weighting factor used to average two different sky types Real64 HorIllSkyFac; // Ratio between horizontal illuminance from sky horizontal irradiance and // luminous efficacy and horizontal illuminance from averaged sky - if (state.dataDaylightingManager->DayltgInteriorMapIllum_FirstTimeFlag) { - daylight_illum.allocate(MaxMapRefPoints); - state.dataDaylightingManager->DayltgInteriorMapIllum_FirstTimeFlag = false; - } - if (state.dataGlobal->WarmupFlag) return; + daylight_illum.allocate(MaxMapRefPoints); + // Initialize reference point illuminance and window background luminance - for (int mapNum = 1; mapNum <= (int)state.dataDaylightingData->IllumMap.size(); ++mapNum) { - auto &thisMap = state.dataDaylightingData->IllumMapCalc(mapNum); + for (auto &thisMap : dl->illumMaps) { int enclNum = thisMap.enclIndex; - auto &thisEnclDaylight = state.dataDaylightingData->enclDaylight(enclNum); + auto &thisEnclDaylight = dl->enclDaylight(enclNum); int NREFPT = thisMap.TotalMapRefPoints; // Number of daylighting map reference points @@ -9191,6 +8714,9 @@ void DayltgInteriorMapIllum(EnergyPlusData &state) // and to the glare numerator at each reference point. // Use shading flags set in WindowShadingManager. + auto &daylFacHrCurr = thisMap.daylFac[state.dataGlobal->HourOfDay]; + auto &daylFacHrPrev = thisMap.daylFac[state.dataGlobal->PreviousHour]; + for (int loop = 1; loop <= thisEnclDaylight.NumOfDayltgExtWins; ++loop) { int IWin = thisEnclDaylight.DayltgExtWinSurfNums(loop); @@ -9213,8 +8739,10 @@ void DayltgInteriorMapIllum(EnergyPlusData &state) Real64 wgtThisHr = state.dataGlobal->WeightNow; Real64 wgtPrevHr = state.dataGlobal->WeightPreviousHour; - auto &dfskhr = DFSKHR[(int)WinCover::Bare]; - auto &dfskhr2 = DFSKHR[(int)WinCover::Shaded]; + std::array DFHR; // Sky daylight factor for sky type, bare/shaded window + + auto &dfhr = DFHR[iWinCover_Bare]; + auto &dfhr2 = DFHR[iWinCover_Shaded]; int SurfWinSlatsAngIndex = state.dataSurface->SurfWinSlatsAngIndex(IWin); int slatAngLo = SurfWinSlatsAngIndex + 1; @@ -9224,20 +8752,20 @@ void DayltgInteriorMapIllum(EnergyPlusData &state) // Loop over reference points for (int ILB = 1; ILB <= NREFPT; ++ILB) { - auto const &illSkyCurr = thisMap.DaylIllFacSky(state.dataGlobal->HourOfDay, loop, ILB, 1); - auto const &illSkyPrev = thisMap.DaylIllFacSky(state.dataGlobal->PreviousHour, loop, ILB, 1); - auto const &ill2SkyCurr = thisMap.DaylIllFacSky(state.dataGlobal->HourOfDay, loop, ILB, 2); - auto const &ill2SkyPrev = thisMap.DaylIllFacSky(state.dataGlobal->PreviousHour, loop, ILB, 2); + auto const &illSkyCurr = daylFacHrCurr(loop, ILB, 1); + auto const &illSkyPrev = daylFacHrPrev(loop, ILB, 1); + auto const &ill2SkyCurr = daylFacHrCurr(loop, ILB, 2); + auto const &ill2SkyPrev = daylFacHrPrev(loop, ILB, 2); - auto const &illLoSkyCurr = thisMap.DaylIllFacSky(state.dataGlobal->HourOfDay, loop, ILB, slatAngLo); - auto const &illLoSkyPrev = thisMap.DaylIllFacSky(state.dataGlobal->PreviousHour, loop, ILB, slatAngLo); - auto const &illHiSkyCurr = thisMap.DaylIllFacSky(state.dataGlobal->HourOfDay, loop, ILB, slatAngHi); - auto const &illHiSkyPrev = thisMap.DaylIllFacSky(state.dataGlobal->PreviousHour, loop, ILB, slatAngHi); + auto const &illLoSkyCurr = daylFacHrCurr(loop, ILB, slatAngLo); + auto const &illLoSkyPrev = daylFacHrPrev(loop, ILB, slatAngLo); + auto const &illHiSkyCurr = daylFacHrCurr(loop, ILB, slatAngHi); + auto const &illHiSkyPrev = daylFacHrPrev(loop, ILB, slatAngHi); // Daylight factors for current sun position for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { // ===Bare window=== - dfskhr.sky[iSky] = VTRatio * (wgtThisHr * illSkyCurr.sky[iSky] + wgtPrevHr * illSkyPrev.sky[iSky]); + dfhr.sky[iSky] = VTRatio * (wgtThisHr * illSkyCurr.sky[iSky] + wgtPrevHr * illSkyPrev.sky[iSky]); if ((state.dataSurface->SurfWinWindowModelType(IWin) != WindowModel::BSDF) && (IS_SHADED(state.dataSurface->SurfWinShadingFlag(IWin)) || state.dataSurface->SurfWinSolarDiffusing(IWin))) { @@ -9245,22 +8773,21 @@ void DayltgInteriorMapIllum(EnergyPlusData &state) // ===Shaded window=== if (!state.dataSurface->SurfWinMovableSlats(IWin)) { // Shade, screen, blind with fixed slats, or diffusing glass - dfskhr2.sky[iSky] = VTRatio * (wgtThisHr * ill2SkyCurr.sky[iSky] + wgtPrevHr * ill2SkyPrev.sky[iSky]); + dfhr2.sky[iSky] = VTRatio * (wgtThisHr * ill2SkyCurr.sky[iSky] + wgtPrevHr * ill2SkyPrev.sky[iSky]); } else { // Blind with movable slats Real64 illSkyCurr = General::Interp(illLoSkyCurr.sky[iSky], illHiSkyCurr.sky[iSky], interpFac); Real64 illSkyPrev = General::Interp(illLoSkyPrev.sky[iSky], illHiSkyPrev.sky[iSky], interpFac); - dfskhr2.sky[iSky] = VTRatio * (wgtThisHr * illSkyCurr + wgtPrevHr * illSkyPrev); + dfhr2.sky[iSky] = VTRatio * (wgtThisHr * illSkyCurr + wgtPrevHr * illSkyPrev); } // End of check if window has blind with movable slats } // End of check if window is shaded or has diffusing glass } // for (iSky) - DayltgInteriorMapIllumDFSUHR[(int)WinCover::Bare] = - VTRatio * (wgtThisHr * (thisMap.DaylIllFacSun(state.dataGlobal->HourOfDay, loop, ILB, 1) + - thisMap.DaylIllFacSunDisk(state.dataGlobal->HourOfDay, loop, ILB, 1)) + - wgtPrevHr * (thisMap.DaylIllFacSun(state.dataGlobal->PreviousHour, loop, ILB, 1) + - thisMap.DaylIllFacSunDisk(state.dataGlobal->PreviousHour, loop, ILB, 1))); + // Sun daylight factor for bare/shaded window + std::array tmpDFHR; + tmpDFHR[iWinCover_Bare].sun = VTRatio * (wgtThisHr * (daylFacHrCurr(loop, ILB, 1).sun + daylFacHrCurr(loop, ILB, 1).sunDisk) + + wgtPrevHr * (daylFacHrPrev(loop, ILB, 1).sun + daylFacHrPrev(loop, ILB, 1).sunDisk)); if ((state.dataSurface->SurfWinWindowModelType(IWin) != WindowModel::BSDF) && (IS_SHADED(state.dataSurface->SurfWinShadingFlag(IWin)) || state.dataSurface->SurfWinSolarDiffusing(IWin))) { @@ -9268,41 +8795,33 @@ void DayltgInteriorMapIllum(EnergyPlusData &state) // ===Shaded window=== if (!state.dataSurface->SurfWinMovableSlats(IWin)) { // Shade, screen, blind with fixed slats, or diffusing glass - DayltgInteriorMapIllumDFSUHR[(int)WinCover::Shaded] = - VTRatio * (wgtThisHr * thisMap.DaylIllFacSun(state.dataGlobal->HourOfDay, loop, ILB, 2) + - wgtPrevHr * thisMap.DaylIllFacSun(state.dataGlobal->PreviousHour, loop, ILB, 2)); + tmpDFHR[iWinCover_Shaded].sun = + VTRatio * (wgtThisHr * daylFacHrCurr(loop, ILB, 2).sun + wgtPrevHr * daylFacHrPrev(loop, ILB, 2).sun); if (!state.dataSurface->SurfWinSlatsBlockBeam(IWin)) { - DayltgInteriorMapIllumDFSUHR[(int)WinCover::Shaded] += - VTRatio * (wgtThisHr * thisMap.DaylIllFacSunDisk(state.dataGlobal->HourOfDay, loop, ILB, 2) + - wgtPrevHr * thisMap.DaylIllFacSunDisk(state.dataGlobal->PreviousHour, loop, ILB, 2)); + tmpDFHR[iWinCover_Shaded].sun += + VTRatio * (wgtThisHr * daylFacHrCurr(loop, ILB, 2).sunDisk + wgtPrevHr * daylFacHrPrev(loop, ILB, 2).sunDisk); } } else { // Blind with movable slats int SurfWinSlatsAngIndex = state.dataSurface->SurfWinSlatsAngIndex(IWin); int slatAngLo = SurfWinSlatsAngIndex + 1; int slatAngHi = min(slatAngLo + 1, Material::MaxSlatAngs + 1); - Real64 SurfWinSlatsAngInterpFac = state.dataSurface->SurfWinSlatsAngInterpFac(IWin); + Real64 interpFac = state.dataSurface->SurfWinSlatsAngInterpFac(IWin); - Real64 DaylIllFacSunNow = General::Interp(thisMap.DaylIllFacSun(state.dataGlobal->HourOfDay, loop, ILB, slatAngLo), - thisMap.DaylIllFacSun(state.dataGlobal->HourOfDay, loop, ILB, slatAngHi), - SurfWinSlatsAngInterpFac); - Real64 DaylIllFacSunPrev = General::Interp(thisMap.DaylIllFacSun(state.dataGlobal->PreviousHour, loop, ILB, slatAngLo), - thisMap.DaylIllFacSun(state.dataGlobal->PreviousHour, loop, ILB, slatAngHi), - SurfWinSlatsAngInterpFac); - DFSUHR[(int)WinCover::Shaded] = VTRatio * (wgtThisHr * DaylIllFacSunNow + wgtPrevHr * DaylIllFacSunPrev); + Real64 DaylIllFacSunNow = + General::Interp(daylFacHrCurr(loop, ILB, slatAngLo).sun, daylFacHrCurr(loop, ILB, slatAngHi).sun, interpFac); + Real64 DaylIllFacSunPrev = + General::Interp(daylFacHrPrev(loop, ILB, slatAngLo).sun, daylFacHrPrev(loop, ILB, slatAngHi).sun, interpFac); + DFHR[iWinCover_Shaded].sun = VTRatio * (wgtThisHr * DaylIllFacSunNow + wgtPrevHr * DaylIllFacSunPrev); // We add the contribution from the solar disk if slats do not block beam solar // TH CR 8010, DaylIllFacSunDisk needs to be interpolated if (!state.dataSurface->SurfWinSlatsBlockBeam(IWin)) { Real64 DaylIllFacSunDiskNow = - General::Interp(thisMap.DaylIllFacSunDisk(state.dataGlobal->HourOfDay, loop, ILB, slatAngLo), - thisMap.DaylIllFacSunDisk(state.dataGlobal->HourOfDay, loop, ILB, slatAngHi), - SurfWinSlatsAngInterpFac); + General::Interp(daylFacHrCurr(loop, ILB, slatAngLo).sunDisk, daylFacHrCurr(loop, ILB, slatAngHi).sunDisk, interpFac); Real64 DaylIllFacSunDiskPrev = - General::Interp(thisMap.DaylIllFacSunDisk(state.dataGlobal->PreviousHour, loop, ILB, slatAngLo), - thisMap.DaylIllFacSunDisk(state.dataGlobal->PreviousHour, loop, ILB, slatAngHi), - SurfWinSlatsAngInterpFac); - DFSUHR[(int)WinCover::Shaded] += VTRatio * (wgtThisHr * DaylIllFacSunDiskNow + wgtPrevHr * DaylIllFacSunDiskPrev); + General::Interp(daylFacHrPrev(loop, ILB, slatAngLo).sunDisk, daylFacHrPrev(loop, ILB, slatAngHi).sunDisk, interpFac); + DFHR[iWinCover_Shaded].sun += VTRatio * (wgtThisHr * DaylIllFacSunDiskNow + wgtPrevHr * DaylIllFacSunDiskPrev); } } // End of check if window has blind with movable slats } // End of check if window is shaded or has diffusing glass @@ -9312,29 +8831,28 @@ void DayltgInteriorMapIllum(EnergyPlusData &state) // Adding 0.001 in the following prevents zero DayltgInteriorMapIllumHorIllSky in early morning or late evening when sun // is up in the present time step but GILSK(ISky,HourOfDay) and GILSK(ISky,NextHour) are both zero. - auto const &gilskCurr = state.dataDaylightingManager->GILSK(state.dataGlobal->HourOfDay); - auto const &gilskPrev = state.dataDaylightingManager->GILSK(state.dataGlobal->PreviousHour); + Illums tmpHorIll; // Horizontal illuminance for different sky types + auto const &gilCurr = dl->horIllum[state.dataGlobal->HourOfDay]; + auto const &gilPrev = dl->horIllum[state.dataGlobal->PreviousHour]; for (int iSky = (int)SkyType::Clear; iSky < (int)SkyType::Num; ++iSky) { - DayltgInteriorMapIllumHorIllSky.sky[iSky] = wgtThisHr * gilskCurr.sky[iSky] + wgtPrevHr * gilskPrev.sky[iSky] + 0.001; + tmpHorIll.sky[iSky] = wgtThisHr * gilCurr.sky[iSky] + wgtPrevHr * gilPrev.sky[iSky] + 0.001; } // HISKF is current time step horizontal illuminance from sky, calculated in DayltgLuminousEfficacy, // which is called in WeatherManager. HISUNF is current time step horizontal illuminance from sun, // also calculated in DayltgLuminousEfficacy. - HorIllSkyFac = state.dataEnvrn->HISKF / ((1.0 - SkyWeight) * DayltgInteriorMapIllumHorIllSky.sky[iSky2] + - SkyWeight * DayltgInteriorMapIllumHorIllSky.sky[iSky1]); + HorIllSkyFac = state.dataEnvrn->HISKF / ((1.0 - SkyWeight) * tmpHorIll.sky[iSky2] + SkyWeight * tmpHorIll.sky[iSky1]); for (int iWinCover = 0; iWinCover < (int)WinCover::Num; ++iWinCover) { - if (iWinCover == (int)WinCover::Shaded) { + if (iWinCover == iWinCover_Shaded) { if (state.dataSurface->SurfWinWindowModelType(IWin) == WindowModel::BSDF) break; if (NOT_SHADED(state.dataSurface->SurfWinShadingFlag(IWin)) && !state.dataSurface->SurfWinSolarDiffusing(IWin)) break; } - auto const &dfskhr = DFSKHR[iWinCover]; + auto const &dfhr = DFHR[iWinCover]; - thisMap.IllumFromWinAtMapPt(loop, ILB)[iWinCover] = - DayltgInteriorMapIllumDFSUHR[iWinCover] * state.dataEnvrn->HISUNF + - HorIllSkyFac * (dfskhr.sky[iSky1] * SkyWeight * DayltgInteriorMapIllumHorIllSky.sky[iSky1] + - dfskhr.sky[iSky2] * (1.0 - SkyWeight) * DayltgInteriorMapIllumHorIllSky.sky[iSky2]); + thisMap.refPts(ILB).winLums(loop)[iWinCover] = tmpDFHR[iWinCover].sun * state.dataEnvrn->HISUNF + + HorIllSkyFac * (dfhr.sky[iSky1] * SkyWeight * tmpHorIll.sky[iSky1] + + dfhr.sky[iSky2] * (1.0 - SkyWeight) * tmpHorIll.sky[iSky2]); } } // End of reference point loop @@ -9346,6 +8864,7 @@ void DayltgInteriorMapIllum(EnergyPlusData &state) for (int loop = 1; loop <= thisEnclDaylight.NumOfDayltgExtWins; ++loop) { int IWin = thisEnclDaylight.DayltgExtWinSurfNums(loop); + auto const &surfWin = state.dataSurface->SurfaceWindow(IWin); int IS = findWinShadingStatus(state, IWin); @@ -9360,25 +8879,26 @@ void DayltgInteriorMapIllum(EnergyPlusData &state) // switchable windows in partial or fully switched state, // get its intermediate VT calculated in DayltgInteriorIllum int IConstShaded = state.dataSurface->Surface(IWin).activeShadedConstruction; - if (IConstShaded > 0) - VTDark = General::POLYF(1.0, state.dataConstruction->Construct(IConstShaded).TransVisBeamCoef) * - state.dataSurface->SurfWinGlazedFrac(IWin); - if (VTDark > 0) VTMULT = state.dataSurface->SurfWinVisTransSelected(IWin) / VTDark; + if (IConstShaded > 0) { + // Visible transmittance (VT) of electrochromic (EC) windows in fully dark state + Real64 VTDark = General::POLYF(1.0, state.dataConstruction->Construct(IConstShaded).TransVisBeamCoef) * surfWin.glazedFrac; + if (VTDark > 0) VTMULT = state.dataSurface->SurfWinVisTransSelected(IWin) / VTDark; + } } } for (int IL = 1; IL <= NREFPT; ++IL) { // Determine if illuminance contribution is from bare or shaded window - daylight_illum(IL) += VTMULT * thisMap.IllumFromWinAtMapPt(loop, IL)[IS - 1]; + daylight_illum(IL) += VTMULT * thisMap.refPts(IL).winLums(loop)[IS - 1]; } } // End of second window loop // Variables for reporting for (int IL = 1; IL <= NREFPT; ++IL) { - thisMap.DaylIllumAtMapPt(IL) = max(daylight_illum(IL), 0.0); + thisMap.refPts(IL).lums[iLum_Illum] = max(daylight_illum(IL), 0.0); } } // End loop over maps -} +} // DayltgInteriorMapIllum() void ReportIllumMap(EnergyPlusData &state, int const MapNum) { @@ -9395,19 +8915,20 @@ void ReportIllumMap(EnergyPlusData &state, int const MapNum) // SUBROUTINE LOCAL VARIABLE DECLARATIONS: std::string MapNoString; + auto &dl = state.dataDayltg; - if (state.dataDaylightingManager->ReportIllumMap_firstTime) { - state.dataDaylightingManager->ReportIllumMap_firstTime = false; - state.dataDaylightingManager->FirstTimeMaps.dimension((int)state.dataDaylightingData->IllumMap.size(), true); - state.dataDaylightingManager->EnvrnPrint.dimension((int)state.dataDaylightingData->IllumMap.size(), true); - state.dataDaylightingManager->SavedMnDy.allocate((int)state.dataDaylightingData->IllumMap.size()); + if (dl->ReportIllumMap_firstTime) { + dl->ReportIllumMap_firstTime = false; + dl->FirstTimeMaps.dimension((int)dl->illumMaps.size(), true); + dl->EnvrnPrint.dimension((int)dl->illumMaps.size(), true); + dl->SavedMnDy.allocate((int)dl->illumMaps.size()); } - auto &illumMap = state.dataDaylightingData->IllumMap(MapNum); + auto &illumMap = dl->illumMaps(MapNum); - if (state.dataDaylightingManager->FirstTimeMaps(MapNum)) { + if (dl->FirstTimeMaps(MapNum)) { - state.dataDaylightingManager->FirstTimeMaps(MapNum) = false; + dl->FirstTimeMaps(MapNum) = false; auto openMapFile = [&](const fs::path &filePath) -> InputOutputFile & { auto &outputFile = *illumMap.mapFile; @@ -9415,10 +8936,10 @@ void ReportIllumMap(EnergyPlusData &state, int const MapNum) outputFile.ensure_open(state, "ReportIllumMap"); return outputFile; }; - if (state.dataDaylightingData->MapColSep == DataStringGlobals::CharTab) { + if (dl->MapColSep == DataStringGlobals::CharTab) { if (!openMapFile(state.files.outputMapTabFilePath).good()) return; // CommaDelimited = false; //Unused Set but never used - } else if (state.dataDaylightingData->MapColSep == DataStringGlobals::CharComma) { + } else if (dl->MapColSep == DataStringGlobals::CharComma) { if (!openMapFile(state.files.outputMapCsvFilePath).good()) return; // CommaDelimited = true; //Unused Set but never used } else { @@ -9426,29 +8947,24 @@ void ReportIllumMap(EnergyPlusData &state, int const MapNum) // CommaDelimited = false; //Unused Set but never used } - state.dataDaylightingManager->SavedMnDy(MapNum) = state.dataEnvrn->CurMnDyHr.substr(0, 5); + dl->SavedMnDy(MapNum) = state.dataEnvrn->CurMnDyHr.substr(0, 5); illumMap.Name = format("{} at {:.2R}m", illumMap.Name, illumMap.Z); } - if (state.dataDaylightingManager->SavedMnDy(MapNum) != state.dataEnvrn->CurMnDyHr.substr(0, 5)) { - state.dataDaylightingManager->EnvrnPrint(MapNum) = true; - state.dataDaylightingManager->SavedMnDy(MapNum) = state.dataEnvrn->CurMnDyHr.substr(0, 5); + if (dl->SavedMnDy(MapNum) != state.dataEnvrn->CurMnDyHr.substr(0, 5)) { + dl->EnvrnPrint(MapNum) = true; + dl->SavedMnDy(MapNum) = state.dataEnvrn->CurMnDyHr.substr(0, 5); } illumMap.pointsHeader = ""; int rCount = 0; - for (int daylightCtrlNum = 1; daylightCtrlNum <= (int)state.dataDaylightingData->daylightControl.size(); ++daylightCtrlNum) { - if (state.dataDaylightingData->daylightControl(daylightCtrlNum).zoneIndex == illumMap.zoneIndex) { - auto &thisDaylightControl = state.dataDaylightingData->daylightControl(daylightCtrlNum); - - for (int R = 1; R <= thisDaylightControl.TotalDaylRefPoints; ++R) { - ++rCount; - illumMap.pointsHeader += format(" RefPt{}=({:.2R}:{:.2R}:{:.2R}),", - rCount, - thisDaylightControl.DaylRefPtAbsCoord(R).x, - thisDaylightControl.DaylRefPtAbsCoord(R).y, - thisDaylightControl.DaylRefPtAbsCoord(R).z); - } + for (auto &thisDayltgCtrl : dl->daylightControl) { + if (thisDayltgCtrl.zoneIndex != illumMap.zoneIndex) continue; + + for (int R = 1; R <= thisDayltgCtrl.TotalDaylRefPoints; ++R) { + ++rCount; + auto const &refPt = thisDayltgCtrl.refPts(R); + illumMap.pointsHeader += format(" RefPt{}=({:.2R}:{:.2R}:{:.2R}),", rCount, refPt.absCoords.x, refPt.absCoords.y, refPt.absCoords.z); } } @@ -9456,26 +8972,23 @@ void ReportIllumMap(EnergyPlusData &state, int const MapNum) // Remove trailing comma illumMap.pointsHeader.pop_back(); } - if (state.dataDaylightingManager->EnvrnPrint(MapNum)) { + if (dl->EnvrnPrint(MapNum)) { WriteDaylightMapTitle( state, MapNum, *illumMap.mapFile, illumMap.Name, state.dataEnvrn->EnvironmentName, illumMap.zoneIndex, illumMap.pointsHeader, illumMap.Z); - state.dataDaylightingManager->EnvrnPrint(MapNum) = false; + dl->EnvrnPrint(MapNum) = false; } if (!state.dataGlobal->WarmupFlag) { if (state.dataGlobal->TimeStep == state.dataGlobal->NumOfTimeStepInHour) { // Report only hourly - auto const &illumMapCalc = state.dataDaylightingData->IllumMapCalc(MapNum); int linelen = 0; // Write X scale column header - std::string mapLine = format(" {} {:02}:00", state.dataDaylightingManager->SavedMnDy(MapNum), state.dataGlobal->HourOfDay); + std::string mapLine = format(" {} {:02}:00", dl->SavedMnDy(MapNum), state.dataGlobal->HourOfDay); if (illumMap.HeaderXLineLengthNeeded) linelen = int(len(mapLine)); int RefPt = 1; for (int X = 1; X <= illumMap.Xnum; ++X) { - const std::string AddXorYString = format("{}({:.2R};{:.2R})=", - state.dataDaylightingData->MapColSep, - state.dataDaylightingData->IllumMapCalc(MapNum).MapRefPtAbsCoord(RefPt).x, - state.dataDaylightingData->IllumMapCalc(MapNum).MapRefPtAbsCoord(RefPt).y); + const std::string AddXorYString = + format("{}({:.2R};{:.2R})=", dl->MapColSep, illumMap.refPts(RefPt).absCoords.x, illumMap.refPts(RefPt).absCoords.y); if (illumMap.HeaderXLineLengthNeeded) linelen += int(len(AddXorYString)); mapLine += AddXorYString; ++RefPt; @@ -9498,17 +9011,15 @@ void ReportIllumMap(EnergyPlusData &state, int const MapNum) // Write Y scale prefix and illuminance values RefPt = 1; for (int Y = 1; Y <= illumMap.Ynum; ++Y) { - mapLine = format("({:.2R};{:.2R})=", illumMapCalc.MapRefPtAbsCoord(RefPt).x, illumMapCalc.MapRefPtAbsCoord(RefPt).y); + mapLine = format("({:.2R};{:.2R})=", illumMap.refPts(RefPt).absCoords.x, illumMap.refPts(RefPt).absCoords.y); for (int R = RefPt; R <= RefPt + illumMap.Xnum - 1; ++R) { - int IllumOut = nint(illumMapCalc.DaylIllumAtMapPtHr(R)); - std::string String; - if (illumMapCalc.MapRefPtInBounds(R)) { - String = fmt::to_string(IllumOut); - } else { - String = fmt::to_string(IllumOut); + int IllumOut = nint(illumMap.refPts(R).lumsHr[iLum_Illum]); + std::string String = fmt::to_string(IllumOut); + ; + if (!illumMap.refPts(R).inBounds) { String = "*" + String; } - mapLine += state.dataDaylightingData->MapColSep + String; + mapLine += dl->MapColSep + String; } print(*illumMap.mapFile, "{}\n", mapLine); @@ -9517,23 +9028,23 @@ void ReportIllumMap(EnergyPlusData &state, int const MapNum) } // X if (state.dataSQLiteProcedures->sqlite) { - if (state.dataDaylightingManager->SQFirstTime) { - int const nX(maxval(state.dataDaylightingData->IllumMap, &IllumMapData::Xnum)); - int const nY(maxval(state.dataDaylightingData->IllumMap, &IllumMapData::Ynum)); - state.dataDaylightingManager->XValue.allocate(nX); - state.dataDaylightingManager->YValue.allocate(nY); - state.dataDaylightingManager->IllumValue.allocate(nX, nY); - state.dataDaylightingManager->SQFirstTime = false; + if (dl->SQFirstTime) { + int const nX(maxval(dl->illumMaps, &IllumMap::Xnum)); + int const nY(maxval(dl->illumMaps, &IllumMap::Ynum)); + dl->XValue.allocate(nX); + dl->YValue.allocate(nY); + dl->IllumValue.allocate(nX, nY); + dl->SQFirstTime = false; } for (int Y = 1; Y <= illumMap.Ynum; ++Y) { - state.dataDaylightingManager->YValue(Y) = illumMap.Ymin + (Y - 1) * illumMap.Yinc; + dl->YValue(Y) = illumMap.Ymin + (Y - 1) * illumMap.Yinc; for (int X = 1; X <= illumMap.Xnum; ++X) { - state.dataDaylightingManager->XValue(X) = illumMap.Xmin + (X - 1) * illumMap.Xinc; + dl->XValue(X) = illumMap.Xmin + (X - 1) * illumMap.Xinc; int IllumIndex = X + (Y - 1) * illumMap.Xnum; - state.dataDaylightingManager->IllumValue(X, Y) = nint(illumMapCalc.DaylIllumAtMapPtHr(IllumIndex)); - if (!illumMapCalc.MapRefPtInBounds(IllumIndex)) { - state.dataDaylightingManager->IllumValue(X, Y) = -state.dataDaylightingManager->IllumValue(X, Y); + dl->IllumValue(X, Y) = nint(illumMap.refPts(IllumIndex).lumsHr[iLum_Illum]); + if (!illumMap.refPts(IllumIndex).inBounds) { + dl->IllumValue(X, Y) = -dl->IllumValue(X, Y); } } // X Loop } // Y Loop @@ -9546,10 +9057,10 @@ void ReportIllumMap(EnergyPlusData &state, int const MapNum) state.dataEnvrn->DayOfMonth, state.dataGlobal->HourOfDay, illumMap.Xnum, - state.dataDaylightingManager->XValue, + dl->XValue, illumMap.Ynum, - state.dataDaylightingManager->YValue, - state.dataDaylightingManager->IllumValue); + dl->YValue, + dl->IllumValue); } // WriteOutputToSQLite } // end time step @@ -9568,11 +9079,13 @@ void CloseReportIllumMaps(EnergyPlusData &state) // into the "eplusout.map" file. // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - if ((int)state.dataDaylightingData->IllumMap.size() > 0) { + auto &dl = state.dataDayltg; + + if ((int)dl->illumMaps.size() > 0) { // Write map header - if (state.dataDaylightingData->MapColSep == DataStringGlobals::CharTab) { + if (dl->MapColSep == DataStringGlobals::CharTab) { state.files.map.filePath = state.files.outputMapTabFilePath; - } else if (state.dataDaylightingData->MapColSep == DataStringGlobals::CharComma) { + } else if (dl->MapColSep == DataStringGlobals::CharComma) { state.files.map.filePath = state.files.outputMapCsvFilePath; } else { state.files.map.filePath = state.files.outputMapTxtFilePath; @@ -9580,8 +9093,8 @@ void CloseReportIllumMaps(EnergyPlusData &state) state.files.map.ensure_open(state, "CloseReportIllumMaps"); - for (int MapNum = 1; MapNum <= (int)state.dataDaylightingData->IllumMap.size(); ++MapNum) { - auto &illumMap = state.dataDaylightingData->IllumMap(MapNum); + for (int MapNum = 1; MapNum <= (int)dl->illumMaps.size(); ++MapNum) { + auto &illumMap = dl->illumMaps(MapNum); if (!illumMap.mapFile->good()) continue; // fatal error processing const std::vector mapLines = illumMap.mapFile->getLines(); @@ -9595,7 +9108,7 @@ void CloseReportIllumMaps(EnergyPlusData &state) illumMap.mapFile->del(); } - if (!state.dataDaylightingData->mapResultsReported && !state.dataErrTracking->AbortProcessing) { + if (!dl->mapResultsReported && !state.dataErrTracking->AbortProcessing) { const std::string message = "CloseReportIllumMaps: Illuminance maps requested but no data ever reported. Likely cause is no solar."; ShowSevereError(state, message); print(state.files.map, "{}\n", message); @@ -9635,15 +9148,17 @@ void DayltgSetupAdjZoneListsAndPointers(EnergyPlusData &state) // an adjacent enclosure, daylit or not, that shares interior windows with the target zone's enclosure. // Count number of exterior Windows (use to allocate arrays) + auto &dl = state.dataDayltg; + for (int enclNum = 1; enclNum <= state.dataViewFactor->NumOfSolarEnclosures; ++enclNum) { - auto &thisEnclDaylight = state.dataDaylightingData->enclDaylight(enclNum); + auto &thisEnclDaylight = dl->enclDaylight(enclNum); thisEnclDaylight.TotalExtWindows = 0; // Count exterior windows in this solar enclosure for (int const surfNum : state.dataViewFactor->EnclSolInfo(enclNum).SurfacePtr) { - if ((state.dataSurface->Surface(surfNum).Class == SurfaceClass::Window && - state.dataSurface->Surface(surfNum).ExtBoundCond == ExternalEnvironment) || - state.dataSurface->SurfWinOriginalClass(surfNum) == SurfaceClass::TDD_Diffuser) { + auto const &surf = state.dataSurface->Surface(surfNum); + if ((surf.Class == SurfaceClass::Window && surf.ExtBoundCond == ExternalEnvironment) || + surf.OriginalClass == SurfaceClass::TDD_Diffuser) { ++thisEnclDaylight.TotalExtWindows; } } @@ -9652,7 +9167,7 @@ void DayltgSetupAdjZoneListsAndPointers(EnergyPlusData &state) for (int enclNum = 1; enclNum <= state.dataViewFactor->NumOfSolarEnclosures; ++enclNum) { int NumList = 0; if (state.dataViewFactor->EnclSolInfo(enclNum).TotalEnclosureDaylRefPoints == 0) continue; - auto &thisEnclDaylight = state.dataDaylightingData->enclDaylight(enclNum); + auto &thisEnclDaylight = dl->enclDaylight(enclNum); if (!thisEnclDaylight.hasSplitFluxDaylighting) continue; // This is a Daylighting:Detailed enclosure // Find adjacent zones/enclosures @@ -9670,10 +9185,10 @@ void DayltgSetupAdjZoneListsAndPointers(EnergyPlusData &state) if (!AdjEnclHasExtWins) continue; // Loop again through surfaces in ZoneNumAdj and see if any are interior windows adjacent to ZoneNum for (int SurfNumAdj : state.dataViewFactor->EnclSolInfo(adjEnclNum).SurfacePtr) { - if ((state.dataSurface->Surface(SurfNumAdj).Class == SurfaceClass::Window) && - (state.dataSurface->Surface(SurfNumAdj).ExtBoundCond >= 1)) { + auto const &surfAdj = state.dataSurface->Surface(SurfNumAdj); + if ((surfAdj.Class == SurfaceClass::Window) && (surfAdj.ExtBoundCond >= 1)) { // This is an interior window in ZoneNumAdj - if (state.dataSurface->Surface(state.dataSurface->Surface(SurfNumAdj).ExtBoundCond).SolarEnclIndex == enclNum) { + if (state.dataSurface->Surface(surfAdj.ExtBoundCond).SolarEnclIndex == enclNum) { // This interior window is adjacent to ZoneNum ++NumList; break; @@ -9688,7 +9203,7 @@ void DayltgSetupAdjZoneListsAndPointers(EnergyPlusData &state) for (int enclNum = 1; enclNum <= state.dataViewFactor->NumOfSolarEnclosures; ++enclNum) { int NumList = 0; if (state.dataViewFactor->EnclSolInfo(enclNum).TotalEnclosureDaylRefPoints == 0) continue; - auto &thisEnclDaylight = state.dataDaylightingData->enclDaylight(enclNum); + auto &thisEnclDaylight = dl->enclDaylight(enclNum); if (!thisEnclDaylight.hasSplitFluxDaylighting) continue; // This is a Daylighting:Detailed enclosure // Find adjacent zones/enclosures @@ -9697,8 +9212,8 @@ void DayltgSetupAdjZoneListsAndPointers(EnergyPlusData &state) // Require that adjEnclNum have a least one exterior window bool AdjEnclHasExtWins = false; for (int SurfNumAdj : state.dataViewFactor->EnclSolInfo(adjEnclNum).SurfacePtr) { - if ((state.dataSurface->Surface(SurfNumAdj).Class == SurfaceClass::Window) && - (state.dataSurface->Surface(SurfNumAdj).ExtBoundCond == ExternalEnvironment)) { + auto const &surfAdj = state.dataSurface->Surface(SurfNumAdj); + if (surfAdj.Class == SurfaceClass::Window && surfAdj.ExtBoundCond == ExternalEnvironment) { AdjEnclHasExtWins = true; break; } @@ -9706,18 +9221,18 @@ void DayltgSetupAdjZoneListsAndPointers(EnergyPlusData &state) if (!AdjEnclHasExtWins) continue; // Loop again through surfaces in ZoneNumAdj and see if any are interior windows adjacent to enclNum for (int SurfNumAdj : state.dataViewFactor->EnclSolInfo(adjEnclNum).SurfacePtr) { - if ((state.dataSurface->Surface(SurfNumAdj).Class == SurfaceClass::Window) && - (state.dataSurface->Surface(SurfNumAdj).ExtBoundCond >= 1)) { - // This is an interior window in adjEnclNum - if (state.dataSurface->Surface(state.dataSurface->Surface(SurfNumAdj).ExtBoundCond).SolarEnclIndex == enclNum) { - // This interior window is adjacent to ZoneNum - ++NumList; - int enclNumAdj = state.dataSurface->Surface(SurfNumAdj).SolarEnclIndex; - thisEnclDaylight.AdjIntWinEnclNums(NumList) = enclNumAdj; - state.dataDaylightingData->enclDaylight(enclNumAdj).adjEnclHasDayltgCtrl = true; - break; - } - } + auto const &surfAdj = state.dataSurface->Surface(SurfNumAdj); + if (surfAdj.Class != SurfaceClass::Window || surfAdj.ExtBoundCond < 1) continue; + + // This is an interior window in adjEnclNum + if (state.dataSurface->Surface(surfAdj.ExtBoundCond).SolarEnclIndex != enclNum) continue; + + // This interior window is adjacent to ZoneNum + ++NumList; + int enclNumAdj = surfAdj.SolarEnclIndex; + thisEnclDaylight.AdjIntWinEnclNums(NumList) = enclNumAdj; + dl->enclDaylight(enclNumAdj).adjEnclHasDayltgCtrl = true; + break; } } thisEnclDaylight.NumOfIntWinAdjEncls = NumList; @@ -9725,63 +9240,64 @@ void DayltgSetupAdjZoneListsAndPointers(EnergyPlusData &state) // now fill out information on relationship between adjacent exterior windows and associated interior windows for (int enclNum = 1; enclNum <= state.dataViewFactor->NumOfSolarEnclosures; ++enclNum) { - auto &thisEnclDaylight = state.dataDaylightingData->enclDaylight(enclNum); + auto &enclDayl = dl->enclDaylight(enclNum); // first find count of exterior windows - if (thisEnclDaylight.NumOfIntWinAdjEncls <= 0) { - thisEnclDaylight.NumOfIntWinAdjEnclExtWins = 0; + if (enclDayl.NumOfIntWinAdjEncls <= 0) { + enclDayl.NumOfIntWinAdjEnclExtWins = 0; continue; } - for (int adjEnclNum : thisEnclDaylight.AdjIntWinEnclNums) { + for (int adjEnclNum : enclDayl.AdjIntWinEnclNums) { for (int SurfNumAdj : state.dataViewFactor->EnclSolInfo(adjEnclNum).SurfacePtr) { if ((state.dataSurface->Surface(SurfNumAdj).Class == SurfaceClass::Window) && (state.dataSurface->Surface(SurfNumAdj).ExtBoundCond == ExternalEnvironment)) { - ++thisEnclDaylight.NumOfIntWinAdjEnclExtWins; + ++enclDayl.NumOfIntWinAdjEnclExtWins; } } } // now allocate nested struct based on exterior window count - thisEnclDaylight.IntWinAdjEnclExtWin.allocate(thisEnclDaylight.NumOfIntWinAdjEnclExtWins); + enclDayl.IntWinAdjEnclExtWin.allocate(enclDayl.NumOfIntWinAdjEnclExtWins); // now fill nested structure int ExtWinIndex = 0; - for (int adjEnclNum : thisEnclDaylight.AdjIntWinEnclNums) { + for (int adjEnclNum : enclDayl.AdjIntWinEnclNums) { for (int SurfNumAdj : state.dataViewFactor->EnclSolInfo(adjEnclNum).SurfacePtr) { - if ((state.dataSurface->Surface(SurfNumAdj).Class == SurfaceClass::Window) && - (state.dataSurface->Surface(SurfNumAdj).ExtBoundCond == ExternalEnvironment)) { - ++ExtWinIndex; - thisEnclDaylight.IntWinAdjEnclExtWin(ExtWinIndex).SurfNum = SurfNumAdj; - - // now count interior windows shared by both zones - int NumOfIntWindowsCount = 0; - for (int SurfNumAdj2 : state.dataViewFactor->EnclSolInfo(adjEnclNum).SurfacePtr) { - if ((state.dataSurface->Surface(SurfNumAdj2).Class == SurfaceClass::Window) && - (state.dataSurface->Surface(SurfNumAdj2).ExtBoundCond >= 1)) { - // This is an interior window in ZoneNumAdj - if (state.dataSurface->Surface(state.dataSurface->Surface(SurfNumAdj2).ExtBoundCond).SolarEnclIndex == enclNum) { - // This interior window is adjacent to ZoneNum and associated with this - ++NumOfIntWindowsCount; - } + auto const &surfAdj = state.dataSurface->Surface(SurfNumAdj); + if (surfAdj.Class != SurfaceClass::Window || surfAdj.ExtBoundCond != ExternalEnvironment) continue; + + ++ExtWinIndex; + auto &intWinAdjEnclExtWin = enclDayl.IntWinAdjEnclExtWin(ExtWinIndex); + intWinAdjEnclExtWin.SurfNum = SurfNumAdj; + + // now count interior windows shared by both zones + int NumOfIntWindowsCount = 0; + for (int SurfNumAdj2 : state.dataViewFactor->EnclSolInfo(adjEnclNum).SurfacePtr) { + auto const &surfAdj2 = state.dataSurface->Surface(SurfNumAdj2); + if ((surfAdj2.Class == SurfaceClass::Window) && (surfAdj2.ExtBoundCond >= 1)) { + // This is an interior window in ZoneNumAdj + if (state.dataSurface->Surface(surfAdj2.ExtBoundCond).SolarEnclIndex == enclNum) { + // This interior window is adjacent to ZoneNum and associated with this + ++NumOfIntWindowsCount; } } - // allocate nested array - thisEnclDaylight.IntWinAdjEnclExtWin(ExtWinIndex).IntWinNum.allocate(NumOfIntWindowsCount); - thisEnclDaylight.IntWinAdjEnclExtWin(ExtWinIndex).IntWinNum = 0; - int IntWinIndex = 0; - for (int SurfNumAdj2 : state.dataViewFactor->EnclSolInfo(adjEnclNum).SurfacePtr) { - if ((state.dataSurface->Surface(SurfNumAdj2).Class == SurfaceClass::Window) && - (state.dataSurface->Surface(SurfNumAdj2).ExtBoundCond >= 1)) { - // This is an interior window in ZoneNumAdj - if (state.dataSurface->Surface(state.dataSurface->Surface(SurfNumAdj2).ExtBoundCond).SolarEnclIndex == enclNum) { - // This interior window is adjacent to ZoneNum and associated with this - ++IntWinIndex; - thisEnclDaylight.IntWinAdjEnclExtWin(ExtWinIndex).IntWinNum(IntWinIndex) = SurfNumAdj2; - } - } + } // for (SurfNumAdj2) + + // allocate nested array + intWinAdjEnclExtWin.IntWinNum.allocate(NumOfIntWindowsCount); + intWinAdjEnclExtWin.IntWinNum = 0; + int IntWinIndex = 0; + for (int SurfNumAdj2 : state.dataViewFactor->EnclSolInfo(adjEnclNum).SurfacePtr) { + auto const &surfAdj2 = state.dataSurface->Surface(SurfNumAdj2); + if (surfAdj2.Class != SurfaceClass::Window || surfAdj2.ExtBoundCond < 1) continue; + + // This is an interior window in ZoneNumAdj + if (state.dataSurface->Surface(surfAdj2.ExtBoundCond).SolarEnclIndex == enclNum) { + // This interior window is adjacent to ZoneNum and associated with this + intWinAdjEnclExtWin.IntWinNum(++IntWinIndex) = SurfNumAdj2; } - } - } - } - } // End of primary enclosure loop + } // for (SurfNumAdj2) + } // for (SurfNumAdj) + } // for (adjEnclNum) + } // End of primary enclosure loop Array1D_int enclExtWin; enclExtWin.dimension(state.dataViewFactor->NumOfSolarEnclosures, 0); @@ -9789,38 +9305,38 @@ void DayltgSetupAdjZoneListsAndPointers(EnergyPlusData &state) for (int enclNum = 1; enclNum <= state.dataViewFactor->NumOfSolarEnclosures; ++enclNum) { enclExtWin(enclNum) = 0; if (state.dataViewFactor->EnclSolInfo(enclNum).TotalEnclosureDaylRefPoints == 0) continue; - auto const &thisEnclDaylight = state.dataDaylightingData->enclDaylight(enclNum); + auto const &thisEnclDaylight = dl->enclDaylight(enclNum); if (!thisEnclDaylight.hasSplitFluxDaylighting) continue; // This is a Daylighting:Detailed zone // Get exterior windows in this solar enclosure for (int const surfNum : state.dataViewFactor->EnclSolInfo(enclNum).SurfacePtr) { - if ((state.dataSurface->Surface(surfNum).Class == SurfaceClass::Window && - state.dataSurface->Surface(surfNum).ExtBoundCond == ExternalEnvironment) || - state.dataSurface->SurfWinOriginalClass(surfNum) == SurfaceClass::TDD_Diffuser) { + auto const &surf = state.dataSurface->Surface(surfNum); + if ((surf.Class == SurfaceClass::Window && surf.ExtBoundCond == ExternalEnvironment) || + surf.OriginalClass == SurfaceClass::TDD_Diffuser) { ++enclExtWin(enclNum); } } // Get exterior windows in adjacent enclosures that share interior windows with enclNum - if (thisEnclDaylight.NumOfIntWinAdjEncls > 0) { - for (int adjEnclNum : thisEnclDaylight.AdjIntWinEnclNums) { - // Get exterior windows in EnclNumAdj -- there must be at least one, otherwise - // it would not be an "AdjIntWinEncl" - for (int SurfNumAdj : state.dataViewFactor->EnclSolInfo(adjEnclNum).SurfacePtr) { - if ((state.dataSurface->Surface(SurfNumAdj).Class == SurfaceClass::Window && - state.dataSurface->Surface(SurfNumAdj).ExtBoundCond == ExternalEnvironment) || - state.dataSurface->SurfWinOriginalClass(SurfNumAdj) == SurfaceClass::TDD_Diffuser) { - ++enclExtWin(enclNum); - } + if (thisEnclDaylight.NumOfIntWinAdjEncls == 0) continue; + + for (int adjEnclNum : thisEnclDaylight.AdjIntWinEnclNums) { + // Get exterior windows in EnclNumAdj -- there must be at least one, otherwise + // it would not be an "AdjIntWinEncl" + for (int SurfNumAdj : state.dataViewFactor->EnclSolInfo(adjEnclNum).SurfacePtr) { + auto const &surfAdj = state.dataSurface->Surface(SurfNumAdj); + if ((surfAdj.Class == SurfaceClass::Window && surfAdj.ExtBoundCond == ExternalEnvironment) || + surfAdj.OriginalClass == SurfaceClass::TDD_Diffuser) { + ++enclExtWin(enclNum); } } - } - } // End of primary enclosure loop + } // for (adjEnclNum) + } // for (enclNum) - std::size_t maxShadeDeployOrderExtWinsSize(0); + dl->maxShadeDeployOrderExtWins = 0; for (int enclNum = 1; enclNum <= state.dataViewFactor->NumOfSolarEnclosures; ++enclNum) { - auto &thisEnclDaylight = state.dataDaylightingData->enclDaylight(enclNum); + auto &thisEnclDaylight = dl->enclDaylight(enclNum); if (!thisEnclDaylight.hasSplitFluxDaylighting) continue; thisEnclDaylight.NumOfDayltgExtWins = 0; int thisEnclNumRefPoints = state.dataViewFactor->EnclSolInfo(enclNum).TotalEnclosureDaylRefPoints; @@ -9832,22 +9348,15 @@ void DayltgSetupAdjZoneListsAndPointers(EnergyPlusData &state) thisEnclDaylight.DayltgExtWinSurfNums.allocate(enclExtWin(enclNum)); thisEnclDaylight.DayltgExtWinSurfNums = 0; for (int controlNum : thisEnclDaylight.daylightControlIndexes) { - auto &thisDaylightControl = state.dataDaylightingData->daylightControl(controlNum); - thisDaylightControl.MapShdOrdToLoopNum.allocate(enclExtWin(enclNum)); - thisDaylightControl.MapShdOrdToLoopNum = 0; - - thisDaylightControl.SolidAngAtRefPt.allocate(enclExtWin(enclNum), thisDaylightControl.TotalDaylRefPoints); - thisDaylightControl.SolidAngAtRefPt = 0.0; - thisDaylightControl.SolidAngAtRefPtWtd.allocate(enclExtWin(enclNum), thisDaylightControl.TotalDaylRefPoints); - thisDaylightControl.SolidAngAtRefPtWtd = 0.0; - thisDaylightControl.IllumFromWinAtRefPt.allocate(enclExtWin(enclNum), thisDaylightControl.TotalDaylRefPoints); - thisDaylightControl.BackLumFromWinAtRefPt.allocate(enclExtWin(enclNum), thisDaylightControl.TotalDaylRefPoints); - thisDaylightControl.SourceLumFromWinAtRefPt.allocate(enclExtWin(enclNum), thisDaylightControl.TotalDaylRefPoints); - for (int iExtWin = 1; iExtWin <= enclExtWin(enclNum); ++iExtWin) { - for (int iRefPt = 1; iRefPt <= thisDaylightControl.TotalDaylRefPoints; ++iRefPt) { - thisDaylightControl.IllumFromWinAtRefPt(iExtWin, iRefPt) = {0.0, 0.0}; - thisDaylightControl.BackLumFromWinAtRefPt(iExtWin, iRefPt) = {0.0, 0.0}; - thisDaylightControl.SourceLumFromWinAtRefPt(iExtWin, iRefPt) = {0.0, 0.0}; + auto &thisDayltgCtrl = dl->daylightControl(controlNum); + thisDayltgCtrl.MapShdOrdToLoopNum.allocate(enclExtWin(enclNum)); + thisDayltgCtrl.MapShdOrdToLoopNum = 0; + + assert((int)thisDayltgCtrl.refPts.size() == thisDayltgCtrl.TotalDaylRefPoints); + for (auto &refPt : thisDayltgCtrl.refPts) { + refPt.extWins.allocate(enclExtWin(enclNum)); + for (auto &extWin : refPt.extWins) { + new (&extWin) DaylRefPtExtWin(); } } } @@ -9855,9 +9364,9 @@ void DayltgSetupAdjZoneListsAndPointers(EnergyPlusData &state) int enclExtWinCtr = 0; for (int const surfNum : state.dataViewFactor->EnclSolInfo(enclNum).SurfacePtr) { - if ((state.dataSurface->Surface(surfNum).Class == SurfaceClass::Window && - state.dataSurface->Surface(surfNum).ExtBoundCond == ExternalEnvironment) || - state.dataSurface->SurfWinOriginalClass(surfNum) == SurfaceClass::TDD_Diffuser) { + auto const &surf = state.dataSurface->Surface(surfNum); + if ((surf.Class == SurfaceClass::Window && surf.ExtBoundCond == ExternalEnvironment) || + surf.OriginalClass == SurfaceClass::TDD_Diffuser) { ++enclExtWinCtr; thisEnclDaylight.DayltgExtWinSurfNums(enclExtWinCtr) = surfNum; } @@ -9869,75 +9378,47 @@ void DayltgSetupAdjZoneListsAndPointers(EnergyPlusData &state) // Get exterior windows in EnclNumAdj -- there must be at least one, otherwise // it would not be an "AdjIntWinEncl" for (int SurfNumAdj : state.dataViewFactor->EnclSolInfo(adjEnclNum).SurfacePtr) { - if ((state.dataSurface->Surface(SurfNumAdj).Class == SurfaceClass::Window && - state.dataSurface->Surface(SurfNumAdj).ExtBoundCond == ExternalEnvironment) || - state.dataSurface->SurfWinOriginalClass(SurfNumAdj) == SurfaceClass::TDD_Diffuser) { + auto &surfAdj = state.dataSurface->Surface(SurfNumAdj); + if ((surfAdj.Class == SurfaceClass::Window && surfAdj.ExtBoundCond == ExternalEnvironment) || + surfAdj.OriginalClass == SurfaceClass::TDD_Diffuser) { ++enclExtWinCtr; thisEnclDaylight.DayltgExtWinSurfNums(enclExtWinCtr) = SurfNumAdj; + auto &surfWinAdj = state.dataSurface->SurfaceWindow(SurfNumAdj); // If no daylighting in the adjacent enclosure, set up variables anyway: if (state.dataViewFactor->EnclSolInfo(adjEnclNum).TotalEnclosureDaylRefPoints == 0 && !state.dataSurface->SurfWinSurfDayLightInit(SurfNumAdj)) { - auto &surfWinAdj = state.dataSurface->SurfaceWindow(SurfNumAdj); - surfWinAdj.SolidAngAtRefPt.allocate(thisEnclNumRefPoints); - surfWinAdj.SolidAngAtRefPt = 0.0; - surfWinAdj.SolidAngAtRefPtWtd.allocate(thisEnclNumRefPoints); - surfWinAdj.SolidAngAtRefPtWtd = 0.0; - surfWinAdj.IllumFromWinAtRefPt.allocate(thisEnclNumRefPoints); - surfWinAdj.BackLumFromWinAtRefPt.allocate(thisEnclNumRefPoints); - surfWinAdj.SourceLumFromWinAtRefPt.allocate(thisEnclNumRefPoints); - - for (int iRefPt = 1; iRefPt < (int)surfWinAdj.IllumFromWinAtRefPt.size(); ++iRefPt) { - surfWinAdj.IllumFromWinAtRefPt(iRefPt) = {0.0, 0.0}; - surfWinAdj.BackLumFromWinAtRefPt(iRefPt) = {0.0, 0.0}; - surfWinAdj.SourceLumFromWinAtRefPt(iRefPt) = {0.0, 0.0}; + surfWinAdj.refPts.allocate(thisEnclNumRefPoints); + for (auto &refPt : surfWinAdj.refPts) { + new (&refPt) SurfaceWindowRefPt(); } state.dataSurface->SurfWinSurfDayLightInit(SurfNumAdj) = true; } } - } - } - } + } // for (SurfNumAdj) + } // for (adjEnclNum) + } // if (thisEnclDaylight.NumOfIntWinAdjEncls > 0) thisEnclDaylight.NumOfDayltgExtWins = enclExtWin(enclNum); int winSize = enclExtWin(enclNum); int numSlatAngs = state.dataSurface->actualMaxSlatAngs + 1; for (int controlNum : thisEnclDaylight.daylightControlIndexes) { - auto &thisDaylightControl = state.dataDaylightingData->daylightControl(controlNum); - int refSize = thisDaylightControl.TotalDaylRefPoints; - thisDaylightControl.DaylIllFacSky.allocate(Constant::HoursInDay, winSize, refSize, numSlatAngs); - thisDaylightControl.DaylSourceFacSky.allocate(Constant::HoursInDay, winSize, refSize, numSlatAngs); - thisDaylightControl.DaylBackFacSky.allocate(Constant::HoursInDay, winSize, refSize, numSlatAngs); - thisDaylightControl.DaylIllFacSun.allocate(Constant::HoursInDay, winSize, refSize, numSlatAngs); - thisDaylightControl.DaylIllFacSunDisk.allocate(Constant::HoursInDay, winSize, refSize, numSlatAngs); - thisDaylightControl.DaylSourceFacSun.allocate(Constant::HoursInDay, winSize, refSize, numSlatAngs); - thisDaylightControl.DaylSourceFacSunDisk.allocate(Constant::HoursInDay, winSize, refSize, numSlatAngs); - thisDaylightControl.DaylBackFacSun.allocate(Constant::HoursInDay, winSize, refSize, numSlatAngs); - thisDaylightControl.DaylBackFacSunDisk.allocate(Constant::HoursInDay, winSize, refSize, numSlatAngs); + auto &thisDayltgCtrl = dl->daylightControl(controlNum); + int refSize = thisDayltgCtrl.TotalDaylRefPoints; + for (int iHr = 1; iHr <= (int)Constant::HoursInDay; ++iHr) { + thisDayltgCtrl.daylFac[iHr].allocate(winSize, refSize, numSlatAngs); + } } - } // End of check if thisEnclNumRefPoints > 0 + } // if (thisEncl.NumOfRefPoints > 0) if (state.dataSurface->TotWinShadingControl > 0) { - std::size_t maxSize = CreateShadeDeploymentOrder(state, enclNum); - if (maxSize > maxShadeDeployOrderExtWinsSize) maxShadeDeployOrderExtWinsSize = maxSize; + CreateShadeDeploymentOrder(state, enclNum); } - } // End of primary enclosure loop - - // size these for the maximum of the shade deployment order - state.dataDaylightingManager->DILLSW.allocate(maxShadeDeployOrderExtWinsSize); - state.dataDaylightingManager->DILLUN.allocate(maxShadeDeployOrderExtWinsSize); - state.dataDaylightingManager->WDAYIL.allocate(state.dataDaylightingData->maxRefPointsPerControl, maxShadeDeployOrderExtWinsSize); - state.dataDaylightingManager->WBACLU.allocate(state.dataDaylightingData->maxRefPointsPerControl, maxShadeDeployOrderExtWinsSize); - state.dataDaylightingManager->RDAYIL.allocate(state.dataDaylightingData->maxRefPointsPerControl, maxShadeDeployOrderExtWinsSize); - state.dataDaylightingManager->RBACLU.allocate(state.dataDaylightingData->maxRefPointsPerControl, maxShadeDeployOrderExtWinsSize); - - state.dataDaylightingManager->TVIS1.allocate(maxShadeDeployOrderExtWinsSize); - state.dataDaylightingManager->TVIS2.allocate(maxShadeDeployOrderExtWinsSize); - state.dataDaylightingManager->ASETIL.allocate(maxShadeDeployOrderExtWinsSize); + } // for (enclNum) int numSlatAngs = state.dataSurface->actualMaxSlatAngs + 1; for (int enclNum = 1; enclNum <= state.dataViewFactor->NumOfSolarEnclosures; ++enclNum) { - auto const &thisEnclDaylight = state.dataDaylightingData->enclDaylight(enclNum); + auto const &thisEnclDaylight = dl->enclDaylight(enclNum); if (!thisEnclDaylight.hasSplitFluxDaylighting) continue; int thisEnclNumRefPoints = state.dataViewFactor->EnclSolInfo(enclNum).TotalEnclosureDaylRefPoints; if (thisEnclNumRefPoints > 0) { @@ -9947,48 +9428,36 @@ void DayltgSetupAdjZoneListsAndPointers(EnergyPlusData &state) } } - for (int mapNum = 1; mapNum <= (int)state.dataDaylightingData->IllumMap.size(); ++mapNum) { - auto &illumMapCalc = state.dataDaylightingData->IllumMapCalc(mapNum); - int numExtWin = enclExtWin(illumMapCalc.enclIndex); - int numMapRefPts = illumMapCalc.TotalMapRefPoints; + for (auto &illumMap : dl->illumMaps) { + assert((int)illumMap.refPts.size() == illumMap.TotalMapRefPoints); + if (illumMap.TotalMapRefPoints == 0) continue; - if (numMapRefPts > 0) { - illumMapCalc.IllumFromWinAtMapPt.allocate(numExtWin, numMapRefPts); - for (int iExtWin = 1; iExtWin <= numExtWin; ++iExtWin) { - for (int iRefPt = 1; iRefPt <= numMapRefPts; ++iRefPt) { - illumMapCalc.IllumFromWinAtMapPt(iExtWin, iRefPt) = {0.0, 0.0}; - } + int numExtWin = enclExtWin(illumMap.enclIndex); + if (numExtWin == 0) continue; + + for (auto &refPt : illumMap.refPts) { + refPt.winLums.allocate(numExtWin); + for (auto &winLums : refPt.winLums) { + winLums = {0.0, 0.0}; } + } - illumMapCalc.DaylIllFacSky.allocate(Constant::HoursInDay, numExtWin, numMapRefPts, numSlatAngs); - illumMapCalc.DaylIllFacSun.allocate(Constant::HoursInDay, numExtWin, numMapRefPts, numSlatAngs); - illumMapCalc.DaylIllFacSunDisk.allocate(Constant::HoursInDay, numExtWin, numMapRefPts, numSlatAngs); + for (int iHr = 1; iHr <= (int)Constant::HoursInDay; ++iHr) { + illumMap.daylFac[iHr].allocate(numExtWin, illumMap.TotalMapRefPoints, numSlatAngs); } + } // End of map loop - state.dataDaylightingManager->EINTSK.dimension(Constant::HoursInDay, numSlatAngs, Illums()); - state.dataDaylightingManager->EINTSU.dimension(Constant::HoursInDay, numSlatAngs, 0.0); - state.dataDaylightingManager->EINTSUdisk.dimension(Constant::HoursInDay, numSlatAngs, 0.0); - state.dataDaylightingManager->WLUMSK.dimension(Constant::HoursInDay, numSlatAngs, Illums()); - state.dataDaylightingManager->WLUMSU.dimension(Constant::HoursInDay, numSlatAngs, 0.0); - state.dataDaylightingManager->WLUMSUdisk.dimension(Constant::HoursInDay, numSlatAngs, 0.0); - state.dataDaylightingManager->EDIRSK.dimension(Constant::HoursInDay, numSlatAngs, Illums()); - state.dataDaylightingManager->EDIRSU.dimension(Constant::HoursInDay, numSlatAngs); - state.dataDaylightingManager->EDIRSUdisk.dimension(Constant::HoursInDay, numSlatAngs); - state.dataDaylightingManager->AVWLSK.dimension(Constant::HoursInDay, numSlatAngs, Illums()); - state.dataDaylightingManager->AVWLSU.dimension(Constant::HoursInDay, numSlatAngs); - state.dataDaylightingManager->AVWLSUdisk.dimension(Constant::HoursInDay, numSlatAngs); - state.dataDaylightingManager->FLFWSU.dimension(numSlatAngs); - state.dataDaylightingManager->FLFWSUdisk.dimension(numSlatAngs); - state.dataDaylightingManager->FLCWSU.dimension(numSlatAngs); - state.dataDaylightingManager->FLCWSK.dimension(numSlatAngs, Illums()); - state.dataDaylightingManager->FLFWSK.dimension(numSlatAngs, Illums()); + dl->dirIllum.dimension(Constant::HoursInDay, numSlatAngs, Illums()); + dl->reflIllum.dimension(Constant::HoursInDay, numSlatAngs, Illums()); + dl->winLum.dimension(Constant::HoursInDay, numSlatAngs, Illums()); + dl->avgWinLum.dimension(Constant::HoursInDay, numSlatAngs, Illums()); static constexpr std::string_view Format_700("! , Enclosure Name, Number of Exterior Windows, " "Number of Exterior Windows in Adjacent Enclosures\n"); print(state.files.eio, Format_700); for (int enclNum = 1; enclNum <= state.dataViewFactor->NumOfSolarEnclosures; ++enclNum) { - auto &thisEnclDaylight = state.dataDaylightingData->enclDaylight(enclNum); + auto &thisEnclDaylight = dl->enclDaylight(enclNum); if (!thisEnclDaylight.hasSplitFluxDaylighting) continue; if (state.dataViewFactor->EnclSolInfo(enclNum).TotalEnclosureDaylRefPoints == 0) continue; static constexpr std::string_view Format_701("Enclosure/Window Adjacency Daylighting Counts, {},{},{}\n"); @@ -10003,7 +9472,7 @@ void DayltgSetupAdjZoneListsAndPointers(EnergyPlusData &state) "Enclosure Names - 1st 100 (max)\n"); print(state.files.eio, Format_702); for (int enclNum = 1; enclNum <= state.dataViewFactor->NumOfSolarEnclosures; ++enclNum) { - auto &thisEnclDaylight = state.dataDaylightingData->enclDaylight(enclNum); + auto &thisEnclDaylight = dl->enclDaylight(enclNum); if (!thisEnclDaylight.hasSplitFluxDaylighting) continue; if (state.dataViewFactor->EnclSolInfo(enclNum).TotalEnclosureDaylRefPoints == 0) continue; static constexpr std::string_view Format_703("Enclosure/Window Adjacency Daylighting Matrix, {},{}"); @@ -10017,11 +9486,13 @@ void DayltgSetupAdjZoneListsAndPointers(EnergyPlusData &state) enclExtWin.deallocate(); } -std::size_t CreateShadeDeploymentOrder(EnergyPlusData &state, int const enclNum) +void CreateShadeDeploymentOrder(EnergyPlusData &state, int const enclNum) { // J. Glazer - 2018 // create sorted list for shade deployment order // first step is to create a sortable list of WindowShadingControl objects by sequence + auto &dl = state.dataDayltg; + std::vector> shadeControlSequence; // sequence, WindowShadingControl for (int iShadeCtrl = 1; iShadeCtrl <= state.dataSurface->TotWinShadingControl; ++iShadeCtrl) { auto &winShadeControl = state.dataSurface->WindowShadingControl(iShadeCtrl); @@ -10038,9 +9509,9 @@ std::size_t CreateShadeDeploymentOrder(EnergyPlusData &state, int const enclNum) // now make the deployment list of lists. // each sublist is a group of surfaces that should be deployed together // often the sublist is just a single item. - std::size_t maxShadeDeployOrderExtWinsSize = 0; - for (int controlNum : state.dataDaylightingData->enclDaylight(enclNum).daylightControlIndexes) { - auto &thisDaylightCtrl = state.dataDaylightingData->daylightControl(controlNum); + dl->maxShadeDeployOrderExtWins = 0; + for (int controlNum : dl->enclDaylight(enclNum).daylightControlIndexes) { + auto &thisDaylightCtrl = dl->daylightControl(controlNum); for (auto sequence : shadeControlSequence) { // This is an iterator (THIS_AUTO_OK) int curShadeControlNum = sequence.second; auto const &winShadeControl = state.dataSurface->WindowShadingControl(curShadeControlNum); @@ -10052,7 +9523,7 @@ std::size_t CreateShadeDeploymentOrder(EnergyPlusData &state, int const enclNum) } thisDaylightCtrl.ShadeDeployOrderExtWins.push_back(group); } else { - // add each individial surface as a separate list so they are deployed individually + // add each individual surface as a separate list so they are deployed individually for (int i = 1; i <= winShadeControl.FenestrationCount; i++) { std::vector singleMemberVector; singleMemberVector.push_back(winShadeControl.FenestrationIndex(i)); @@ -10060,58 +9531,59 @@ std::size_t CreateShadeDeploymentOrder(EnergyPlusData &state, int const enclNum) } } } - maxShadeDeployOrderExtWinsSize = max(maxShadeDeployOrderExtWinsSize, thisDaylightCtrl.ShadeDeployOrderExtWins.size()); + dl->maxShadeDeployOrderExtWins = max(dl->maxShadeDeployOrderExtWins, (int)thisDaylightCtrl.ShadeDeployOrderExtWins.size()); } - int maxNumOfDayltgExtWins = 0; - for (int encloNum = 1; encloNum <= state.dataViewFactor->NumOfSolarEnclosures; ++encloNum) { - maxNumOfDayltgExtWins = max(maxNumOfDayltgExtWins, state.dataDaylightingData->enclDaylight(encloNum).NumOfDayltgExtWins); + + dl->maxDayltgExtWins = 0; + for (auto const &enclDayl : dl->enclDaylight) { + dl->maxDayltgExtWins = max(dl->maxDayltgExtWins, enclDayl.NumOfDayltgExtWins); } - state.dataDaylightingManager->previously_shaded.allocate(maxNumOfDayltgExtWins); - return maxShadeDeployOrderExtWinsSize; -} +} // CreateShadeDeploymentOrder() void MapShadeDeploymentOrderToLoopNumber(EnergyPlusData &state, int const enclNum) { // J. Glazer - 2018 // Allow a way to map back to the original "loop" index that is used in many other places in the // ZoneDayLight data structure when traversing the list in the order of the window shaded deployment + auto &dl = state.dataDayltg; - auto const &thisEnclDaylight = state.dataDaylightingData->enclDaylight(enclNum); - std::string const &thisSolEnclosureName = state.dataViewFactor->EnclSolInfo(enclNum).Name; - if (state.dataViewFactor->EnclSolInfo(enclNum).TotalEnclosureDaylRefPoints > 0 && thisEnclDaylight.NumOfDayltgExtWins > 0) { - for (int controlNum : state.dataDaylightingData->enclDaylight(enclNum).daylightControlIndexes) { - auto &thisDaylightCtrl = state.dataDaylightingData->daylightControl(controlNum); - if (thisDaylightCtrl.ShadeDeployOrderExtWins.size() > 0) { - int count = 0; - bool showOnce = true; - for (std::vector listOfExtWin : thisDaylightCtrl.ShadeDeployOrderExtWins) { - for (int IWinShdOrd : listOfExtWin) { - ++count; - if (count > thisEnclDaylight.NumOfDayltgExtWins) { - if (showOnce) { - ShowWarningError(state, - format("MapShadeDeploymentOrderToLoopNumber: too many controlled shaded windows in enclosure {}", - thisSolEnclosureName)); - ShowContinueError( - state, "Check the Zone Name in the WindowShadingControl that references the following fenestration surfaces:"); - showOnce = false; - } - ShowContinueError(state, format(" - {}", state.dataSurface->Surface(IWinShdOrd).Name)); - } - for (int loop = 1; loop <= thisEnclDaylight.NumOfDayltgExtWins; ++loop) { - int IWinLoop = thisEnclDaylight.DayltgExtWinSurfNums(loop); - if (IWinShdOrd == IWinLoop) { - thisDaylightCtrl.MapShdOrdToLoopNum(count) = loop; - break; - } - } + auto const &thisEnclDaylight = dl->enclDaylight(enclNum); + auto const &thisEnclSol = state.dataViewFactor->EnclSolInfo(enclNum); + + if (thisEnclSol.TotalEnclosureDaylRefPoints == 0 || thisEnclDaylight.NumOfDayltgExtWins == 0) return; + + for (int controlNum : thisEnclDaylight.daylightControlIndexes) { + auto &thisDaylightCtrl = dl->daylightControl(controlNum); + if (thisDaylightCtrl.ShadeDeployOrderExtWins.size() == 0) continue; + + int count = 0; + bool showOnce = true; + for (auto const &listOfExtWin : thisDaylightCtrl.ShadeDeployOrderExtWins) { + for (int IWinShdOrd : listOfExtWin) { + ++count; + if (count > thisEnclDaylight.NumOfDayltgExtWins) { + if (showOnce) { + ShowWarningError( + state, + format("MapShadeDeploymentOrderToLoopNumber: too many controlled shaded windows in enclosure {}", thisEnclSol.Name)); + ShowContinueError(state, + "Check the Zone Name in the WindowShadingControl that references the following fenestration surfaces:"); + showOnce = false; + } + ShowContinueError(state, format(" - {}", state.dataSurface->Surface(IWinShdOrd).Name)); + } + for (int loop = 1; loop <= thisEnclDaylight.NumOfDayltgExtWins; ++loop) { + int IWinLoop = thisEnclDaylight.DayltgExtWinSurfNums(loop); + if (IWinShdOrd == IWinLoop) { + thisDaylightCtrl.MapShdOrdToLoopNum(count) = loop; + break; } } } - } // controlNum loop - } -} + } // for (listOfExtWin) + } // for (controlNum) +} // MapShadeDeploymentOrderToLoopNumber() void DayltgInterReflIllFrIntWins(EnergyPlusData &state, int const enclNum) { @@ -10126,48 +9598,39 @@ void DayltgInterReflIllFrIntWins(EnergyPlusData &state, int const enclNum) // is determined by the split-flux method and is assumed to be uniform, i.e., the same // at all reference points. - Real64 QDifTrans; // Luminous flux transmitted through an int win from adjacent zone's enclosure (lumens) - Real64 QDifTransUp; // Upgoing part of QDifTrans (lumens) - Real64 QDifTransDn; // Downgoing part of QDifTrans (lumens) - Real64 DifInterReflIllThisWin; // Inter-reflected illuminance due to QDifTrans (lux) - Real64 BmInterReflIll; // Inter-reflected illuminance due to beam solar entering ZoneNum's enclosure - // through its interior windows (lux) - - auto &thisEnclDaylight = state.dataDaylightingData->enclDaylight(enclNum); - thisEnclDaylight.InterReflIllFrIntWins = 0.0; - - auto const &thisEnclSurfaces(state.dataViewFactor->EnclSolInfo(enclNum).SurfacePtr); - for (int const IWin : thisEnclSurfaces) { - if (state.dataSurface->Surface(IWin).Class == SurfaceClass::Window && state.dataSurface->Surface(IWin).ExtBoundCond >= 1) { - // This is an interior window in ZoneNum - int const ConstrNum = state.dataSurface->Surface(IWin).Construction; - int const adjEnclNum = state.dataSurface->Surface(state.dataSurface->Surface(IWin).ExtBoundCond).SolarEnclIndex; - QDifTrans = state.dataHeatBal->EnclSolQSDifSol(adjEnclNum) * state.dataConstruction->Construct(ConstrNum).TransDiffVis * - state.dataSurface->Surface(IWin).Area * state.dataEnvrn->PDIFLW; - QDifTransUp = QDifTrans * state.dataSurface->SurfWinFractionUpgoing(IWin); - QDifTransDn = QDifTrans * (1.0 - state.dataSurface->SurfWinFractionUpgoing(IWin)); - if (thisEnclDaylight.totInsSurfArea * (1.0 - thisEnclDaylight.aveVisDiffReflect) != 0.0) { - DifInterReflIllThisWin = - (QDifTransDn * state.dataSurface->SurfWinRhoFloorWall(IWin) + QDifTransUp * state.dataSurface->SurfWinRhoCeilingWall(IWin)) / - (thisEnclDaylight.totInsSurfArea * (1.0 - thisEnclDaylight.aveVisDiffReflect)); - } else { - DifInterReflIllThisWin = 0.0; - } - thisEnclDaylight.InterReflIllFrIntWins += DifInterReflIllThisWin; + auto &dl = state.dataDayltg; + + auto &enclDayl = dl->enclDaylight(enclNum); + auto &enclSol = state.dataViewFactor->EnclSolInfo(enclNum); + + enclDayl.InterReflIllFrIntWins = 0.0; + + for (int const IWin : enclSol.SurfacePtr) { + auto &surf = state.dataSurface->Surface(IWin); + if (surf.Class != SurfaceClass::Window || surf.ExtBoundCond < 1) continue; + auto const &surfWin = state.dataSurface->SurfaceWindow(IWin); + // This is an interior window in ZoneNum + int const ConstrNum = surf.Construction; + int const adjEnclNum = state.dataSurface->Surface(surf.ExtBoundCond).SolarEnclIndex; + // Luminous flux transmitted through an int win from adjacent zone's enclosure (lumens) + Real64 QDifTrans = state.dataHeatBal->EnclSolQSDifSol(adjEnclNum) * state.dataConstruction->Construct(ConstrNum).TransDiffVis * surf.Area * + state.dataEnvrn->PDIFLW; + Real64 QDifTransUp = QDifTrans * surfWin.fractionUpgoing; // Upgoing part of QDifTrans (lumens) + Real64 QDifTransDn = QDifTrans * (1.0 - surfWin.fractionUpgoing); // Downgoing part of QDifTrans (lumens) + if (enclDayl.totInsSurfArea * (1.0 - enclDayl.aveVisDiffReflect) != 0.0) { + enclDayl.InterReflIllFrIntWins += (QDifTransDn * surfWin.rhoFloorWall + QDifTransUp * surfWin.rhoCeilingWall) / + (enclDayl.totInsSurfArea * (1.0 - enclDayl.aveVisDiffReflect)); } - } + } // for (iWin) // Add inter-reflected illuminance from beam solar entering enclosure through interior windows // TH, CR 7873, 9/17/2009 - BmInterReflIll = 0.0; - if (state.dataDaylightingData->enclDaylight(enclNum).totInsSurfArea > 0) { - BmInterReflIll = - (state.dataHeatBal->EnclSolDBIntWin(enclNum) * state.dataEnvrn->BeamSolarRad * state.dataEnvrn->PDIRLW * thisEnclDaylight.floorVisRefl) / - (thisEnclDaylight.totInsSurfArea * (1.0 - thisEnclDaylight.aveVisDiffReflect)); + if (dl->enclDaylight(enclNum).totInsSurfArea > 0) { + enclDayl.InterReflIllFrIntWins += + (state.dataHeatBal->EnclSolDBIntWin(enclNum) * state.dataEnvrn->BeamSolarRad * state.dataEnvrn->PDIRLW * enclDayl.floorVisRefl) / + (enclDayl.totInsSurfArea * (1.0 - enclDayl.aveVisDiffReflect)); } - - thisEnclDaylight.InterReflIllFrIntWins += BmInterReflIll; -} +} // DayltgInterReflIllFrIntWins() void CalcMinIntWinSolidAngs(EnergyPlusData &state) { @@ -10180,8 +9643,11 @@ void CalcMinIntWinSolidAngs(EnergyPlusData &state) // For each Daylighting:Detailed zone finds the minimum solid angle subtended // by interior windows through which daylight can pass from adjacent zones with // exterior windows. + + auto &dl = state.dataDayltg; + for (int enclNum = 1; enclNum <= state.dataViewFactor->NumOfSolarEnclosures; ++enclNum) { - auto &thisEnclDaylight = state.dataDaylightingData->enclDaylight(enclNum); + auto &thisEnclDaylight = dl->enclDaylight(enclNum); thisEnclDaylight.MinIntWinSolidAng = 2.0 * Constant::Pi; if (state.dataViewFactor->EnclSolInfo(enclNum).TotalEnclosureDaylRefPoints == 0) continue; if (thisEnclDaylight.NumOfIntWinAdjEncls == 0) continue; @@ -10204,10 +9670,10 @@ void CalcMinIntWinSolidAngs(EnergyPlusData &state) if (!IntWinNextToIntWinAdjZone) continue; for (int controlNum : thisEnclDaylight.daylightControlIndexes) { - auto &thisDaylightControl = state.dataDaylightingData->daylightControl(controlNum); - for (int IL = 1; IL <= thisDaylightControl.TotalDaylRefPoints; ++IL) { + auto &thisDayltgCtrl = dl->daylightControl(controlNum); + for (int IL = 1; IL <= thisDayltgCtrl.TotalDaylRefPoints; ++IL) { // Reference point in absolute coordinate system - Vector3 RREF = thisDaylightControl.DaylRefPtAbsCoord(IL); + Vector3 RREF = thisDayltgCtrl.refPts(IL).absCoords; bool is_Triangle = (surf.Sides == 3); bool is_Rectangle = (surf.Sides == 4); @@ -10273,7 +9739,7 @@ void CheckForGeometricTransform(EnergyPlusData &state, bool &doTransform, Real64 // ratio for the entire building based on user input. // SUBROUTINE PARAMETER DEFINITIONS: - static std::string const CurrentModuleObject("GeometryTransform"); + static constexpr std::string_view CurrentModuleObject = "GeometryTransform"; // SUBROUTINE LOCAL VARIABLE DECLARATIONS: Array1D_string cAlphas(1); @@ -10285,23 +9751,24 @@ void CheckForGeometricTransform(EnergyPlusData &state, bool &doTransform, Real64 OldAspectRatio = 1.0; NewAspectRatio = 1.0; + auto &ip = state.dataInputProcessing->inputProcessor; auto const &ipsc = state.dataIPShortCut; - if (state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, CurrentModuleObject) == 1) { + if (ip->getNumObjectsFound(state, CurrentModuleObject) == 1) { int NAlphas; int NNum; int IOStat; - state.dataInputProcessing->inputProcessor->getObjectItem(state, - CurrentModuleObject, - 1, - cAlphas, - NAlphas, - rNumerics, - NNum, - IOStat, - ipsc->lNumericFieldBlanks, - ipsc->lAlphaFieldBlanks, - ipsc->cAlphaFieldNames, - ipsc->cNumericFieldNames); + ip->getObjectItem(state, + CurrentModuleObject, + 1, + cAlphas, + NAlphas, + rNumerics, + NNum, + IOStat, + ipsc->lNumericFieldBlanks, + ipsc->lAlphaFieldBlanks, + ipsc->cAlphaFieldNames, + ipsc->cNumericFieldNames); OldAspectRatio = rNumerics(1); NewAspectRatio = rNumerics(2); std::string transformPlane = cAlphas(1); @@ -10334,20 +9801,14 @@ void WriteDaylightMapTitle(EnergyPlusData &state, // The purpose of the routine is to allow the daylighting map data to be written in various formats // must add correct number of commas at end - const std::string fullmapName = - fmt::format("{}:{}:{} Illuminance [lux] (Hourly)", state.dataHeatBal->Zone(ZoneNum).Name, environmentName, mapName); - print(mapFile, - "Date/Time{}{}{}{}{}{}\n", - state.dataDaylightingData->MapColSep, - fullmapName, - state.dataDaylightingData->MapColSep, - refPts, - state.dataDaylightingData->MapColSep, - state.dataDaylightingData->MapColSep); + auto &dl = state.dataDayltg; + + std::string fullmapName = fmt::format("{}:{}:{} Illuminance [lux] (Hourly)", state.dataHeatBal->Zone(ZoneNum).Name, environmentName, mapName); + print(mapFile, "Date/Time{}{}{}{}{}{}\n", dl->MapColSep, fullmapName, dl->MapColSep, refPts, dl->MapColSep, dl->MapColSep); if (state.dataSQLiteProcedures->sqlite) { state.dataSQLiteProcedures->sqlite->createSQLiteDaylightMapTitle(mapNum, fullmapName, environmentName, ZoneNum, refPts, zcoord); } -} +} // WritDaylightMapTitle() } // namespace EnergyPlus::Dayltg diff --git a/src/EnergyPlus/DaylightingManager.hh b/src/EnergyPlus/DaylightingManager.hh index 9cf95022c8b..2db0b1b7ce7 100644 --- a/src/EnergyPlus/DaylightingManager.hh +++ b/src/EnergyPlus/DaylightingManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -87,6 +87,14 @@ namespace Dayltg { constexpr int NPHMAX(10); // Number of sky/ground integration steps in altitude constexpr int NTHMAX(16); // Number of sky/ground integration steps in azimuth + struct SunAngles + { + Real64 phi = 0.0; // Solar altitude (radians) + Real64 sinPhi = 0.0; + Real64 cosPhi = 0.0; + Real64 theta = 0.0; // Solar azimuth (rad) in Absolute Coordinate System (azimuth=0 along east) + }; + void DayltgAveInteriorReflectance(EnergyPlusData &state, int const enclNum); // Enclosure number void CalcDayltgCoefficients(EnergyPlusData &state); @@ -319,44 +327,39 @@ namespace Dayltg { int findWinShadingStatus(int const IWin); - void DayltgGlare(EnergyPlusData &state, - int IL, // Reference point index: 1=first ref pt, 2=second ref pt - Real64 BLUM, // Window background (surround) luminance (cd/m2) - Real64 &GLINDX, // Glare index - int const daylightCtrlNum // Current daylighting control number + Real64 DayltgGlare(EnergyPlusData &state, + int IL, // Reference point index: 1=first ref pt, 2=second ref pt + Real64 BLUM, // Window background (surround) luminance (cd/m2) + int const daylightCtrlNum // Current daylighting control number ); void DayltgGlareWithIntWins(EnergyPlusData &state, - Array1D &GLINDX, // Glare index int const daylightCtrlNum // Current daylighting control number ); void DayltgExtHorizIllum(EnergyPlusData &state, - Illums &HISK, // Horizontal illuminance from sky for different sky types - Real64 &HISU // Horizontal illuminance from sun for unit beam normal + Illums &HI // Horizontal illuminance from sky for different sky types ); - void DayltgHitObstruction(EnergyPlusData &state, - int const IHOUR, // Hour number - int const IWin, // Window index - Vector3 const &R1, // Origin of ray (m) - Vector3 const &RN, // Unit vector along ray - Real64 &ObTrans // Product of solar transmittances of exterior obstructions + // Product of solar transmittances of exterior obstructions + Real64 DayltgHitObstruction(EnergyPlusData &state, + int const IHOUR, // Hour number + int const IWin, // Window index + Vector3 const &R1, // Origin of ray (m) + Vector3 const &RN // Destination of ray (m) ); - void DayltgHitInteriorObstruction(EnergyPlusData &state, + bool DayltgHitInteriorObstruction(EnergyPlusData &state, int const IWin, // Window index Vector3 const &R1, // Origin of ray (m) - Vector3 const &R2, // Destination of ray (m) - bool &hit // True iff ray hits an obstruction + Vector3 const &R2 // Destination of ray (m) ); - void DayltgHitBetWinObstruction(EnergyPlusData &state, + bool DayltgHitBetWinObstruction(EnergyPlusData &state, int const IWin1, // Surface number of origin window int const IWin2, // Surface number of destination window Vector3 const &R1, // Origin of ray (on IWin1) (m) - Vector3 const &R2, // Destination of ray (on IWin2) (m) - bool &hit // True iff ray hits an obstruction + Vector3 const &R2 // Destination of ray (on IWin2) (m) ); void initDaylighting(EnergyPlusData &state, bool const initSurfaceHeatBalancefirstTime); @@ -385,9 +388,7 @@ namespace Dayltg { int const NBasis, int const IHR, int const iRefPoint, - Array1D &ElementLuminanceSky, // sky related luminance at window element (exterior side) - Array1D &ElementLuminanceSun, // sun related luminance at window element (exterior side), - Array1D &ElementLuminanceSunDisk, // sun related luminance at window element (exterior side), + Array1D &ElementLuminanceSky, // sky related luminance at window element (exterior side) CalledFor const CalledFrom, int const MapNum = 0); @@ -422,11 +423,11 @@ namespace Dayltg { Real64 const THSKY, // Azimuth and altitude of sky element (radians) Real64 const PHSKY); - void ProfileAngle(EnergyPlusData &state, - int const SurfNum, // Surface number - Vector3 const &CosDirSun, // Solar direction cosines - DataWindowEquivalentLayer::Orientation const HorOrVert, // If HORIZONTAL, calculates ProfileAngHor - Real64 &ProfileAng // Solar profile angle (radians). + // Solar profile angle (radians). + Real64 ProfileAngle(EnergyPlusData &state, + int const SurfNum, // Surface number + Vector3 const &CosDirSun, // Solar direction cosines + DataWindowEquivalentLayer::Orientation const HorOrVert // If HORIZONTAL, calculates ProfileAngHor ); void DayltgClosestObstruction(EnergyPlusData &state, @@ -436,12 +437,12 @@ namespace Dayltg { Vector3 &NearestHitPt // Ray's hit point on nearest obstruction (m) ); - void DayltgSurfaceLumFromSun(EnergyPlusData &state, - int const IHR, // Hour number - Vector3 const &Ray, // Ray from window to reflecting surface (m) - int const ReflSurfNum, // Number of surface for which luminance is being calculated - Vector3 const &ReflHitPt, // Point on ReflSurfNum for luminance calculation (m) - Real64 &LumAtReflHitPtFrSun // Luminance at ReflHitPt from beam solar reflection for unit + // Luminance at ReflHitPt from beam solar reflection for unit + Real64 DayltgSurfaceLumFromSun(EnergyPlusData &state, + int const IHR, // Hour number + Vector3 const &Ray, // Ray from window to reflecting surface (m) + int const ReflSurfNum, // Number of surface for which luminance is being calculated + Vector3 const &ReflHitPt // Point on ReflSurfNum for luminance calculation (m) ); void DayltgInteriorMapIllum(EnergyPlusData &state); @@ -454,7 +455,7 @@ namespace Dayltg { void DayltgSetupAdjZoneListsAndPointers(EnergyPlusData &state); - std::size_t CreateShadeDeploymentOrder(EnergyPlusData &state, int const enclNum); + void CreateShadeDeploymentOrder(EnergyPlusData &state, int const enclNum); void MapShadeDeploymentOrderToLoopNumber(EnergyPlusData &state, int const enclNum); @@ -475,8 +476,26 @@ namespace Dayltg { } // namespace Dayltg -struct DaylightingManagerData : BaseGlobalStruct +struct DaylightingData : BaseGlobalStruct { + int maxControlRefPoints = 0; + int maxShadeDeployOrderExtWins = 0; + int maxDayltgExtWins = 0; + int maxEnclSubSurfaces = 0; + + bool mapResultsToReport = false; // used when only partial hour has "sun up" + bool mapResultsReported = false; // when no map results are ever reported this will still be false + char MapColSep; // Character for separating map columns (tab, space, comma) + bool DFSReportSizingDays = false; + bool DFSReportAllShadowCalculationDays = false; + + Array1D enclDaylight; + Array1D ZoneDaylight; + Array1D daylightControl; + Array1D illumMaps; + Array1D DaylRefPt; + Array1D DElightComplexFene; + Array1D spacePowerReductionFactor; // Average electric power reduction factor for space due to daylighting bool CalcDayltghCoefficients_firstTime = true; bool getDaylightingParametersInputFlag = true; @@ -497,38 +516,21 @@ struct DaylightingManagerData : BaseGlobalStruct Array1D DaylIllum; // Daylight illuminance at reference points (lux) int maxNumRefPtInAnyDaylCtrl = 0; // The most number of reference points that any single daylighting control has int maxNumRefPtInAnyEncl = 0; // The most number of reference points that any single enclosure has - Real64 PHSUN = 0.0; // Solar altitude (radians) - Real64 SPHSUN = 0.0; // Sine of solar altitude - Real64 CPHSUN = 0.0; // Cosine of solar altitude - Real64 THSUN = 0.0; // Solar azimuth (rad) in Absolute Coordinate System (azimuth=0 along east) - Array1D PHSUNHR = Array1D(Constant::HoursInDay, 0.0); // Hourly values of PHSUN - Array1D SPHSUNHR = Array1D(Constant::HoursInDay, 0.0); // Hourly values of the sine of PHSUN - Array1D CPHSUNHR = Array1D(Constant::HoursInDay, 0.0); // Hourly values of the cosine of PHSUN - Array1D THSUNHR = Array1D(Constant::HoursInDay, 0.0); // Hourly values of THSUN + + Dayltg::SunAngles sunAngles = Dayltg::SunAngles(); + std::array sunAnglesHr = {Dayltg::SunAngles()}; // In the following I,J,K arrays: // I = 1 for clear sky, 2 for clear turbid, 3 for intermediate, 4 for overcast; // J = 1 for bare window, 2 - 12 for shaded; // K = sun position index. - Array2D EINTSK; // Sky-related portion of internally reflected illuminance - Array2D EINTSU; // Sun-related portion of internally reflected illuminance, - // excluding entering beam - Array2D EINTSUdisk; // Sun-related portion of internally reflected illuminance - // due to entering beam - Array2D WLUMSK; // Sky-related window luminance - Array2D WLUMSU; // Sun-related window luminance, excluding view of solar disk - Array2D WLUMSUdisk; // Sun-related window luminance, due to view of solar disk - - Array1D GILSK = - Array1D(Constant::HoursInDay, Dayltg::Illums()); // Horizontal illuminance from sky, by sky type, for each hour of the day - Array1D GILSU = Array1D(Constant::HoursInDay, 0.0); // Horizontal illuminance from sun for each hour of the day - - Array2D EDIRSK; // Sky-related component of direct illuminance - Array2D EDIRSU; // Sun-related component of direct illuminance (excluding beam solar at ref pt) - Array2D EDIRSUdisk; // Sun-related component of direct illuminance due to beam solar at ref pt - Array2D AVWLSK; // Sky-related average window luminance - Array2D AVWLSU; // Sun-related average window luminance, excluding view of solar disk - Array2D AVWLSUdisk; // Sun-related average window luminance due to view of solar disk + std::array horIllum = { + Dayltg::Illums()}; // Horizontal illuminance from sky, by sky type, for each hour of the day + Array2D dirIllum; // Sky-related component of direct illuminance + Array2D reflIllum; // Sky-related portion of internally reflected illuminance + Array2D winLum; // Sky-related window luminance + + Array2D avgWinLum; // Sky-related average window luminance // Allocatable daylight factor arrays -- are in the ZoneDaylight Structure @@ -542,84 +544,30 @@ struct DaylightingManagerData : BaseGlobalStruct bool MySunIsUpFlag = false; bool CalcDayltgCoeffsMapPointsMySunIsUpFlag = false; int AltSteps_last = 0; - Array1D cos_Phi; // cos( Phi ) table - Array1D sin_Phi; // sin( Phi ) table + std::array cos_Phi = {0.0}; // cos( Phi ) table + std::array sin_Phi = {0.0}; // sin( Phi ) table int AzimSteps_last = 0; - Array1D cos_Theta; // cos( Theta ) table - Array1D sin_Theta; // sin( Theta ) table - - // int IConstShaded = 0; // The shaded window construction for switchable windows - Real64 VTDark = 0.0; // Visible transmittance (VT) of electrochromic (EC) windows in fully dark state - // Real64 VTMULT = 1.0; // VT multiplier for EC windows // I don't think this is used anywhere - std::array DFSUHR; // Sun daylight factor for bare/shaded window - std::array BFSUHR; // Sun background luminance factor for bare/shaded window - std::array SFSUHR; // Sun source luminance factor for bare/shaded window - Dayltg::Illums HorIllSky; // Horizontal illuminance for different sky types - Dayltg::Illums TDDTransVisDiff; // Weighted diffuse visible transmittance for each sky type - Dayltg::Illums ZSK; // Sky-related and sun-related illuminance on window from sky/ground - Dayltg::Illums FFSKTot; - Dayltg::Illums WinLumSK; // Sky related window luminance - Dayltg::Illums EDirSky; // Sky related direct illuminance - std::array DayltgInteriorMapIllumDFSUHR; // Sun daylight factor for bare/shaded window - Dayltg::Illums DayltgInteriorMapIllumHorIllSky; // Horizontal illuminance for different sky types - - // Sky daylight factor for sky type (first index), bare/shaded window (second index) - std::array DayltgInteriorMapIllumDFSKHR; - // Sky background luminance factor for sky type (first index), bare/shaded window (second index) - std::array DayltgInteriorMapIllumBFSKHR; - // Sky source luminance factor for sky type (first index), bare/shaded window (second index) - std::array DayltgInteriorMapIllumSFSKHR; - - Array1D BACLUM; - Array1D DayltgInteriorMapIllumGLRNDX; - Array1D daylight_illum; - Array1D FLFWSU; // Sun-related downgoing luminous flux, excluding entering beam - Array1D FLFWSUdisk; // Sun-related downgoing luminous flux, due to entering beam - Array1D FLCWSU; // Sun-related upgoing luminous flux - std::array PH; // Altitude of sky element (radians) + std::array cos_Theta = {0.0}; // cos( Theta ) table + std::array sin_Theta = {0.0}; // sin( Theta ) table + + std::array PH; // Altitude of sky element (radians) + + // Ratio of obstructed to unobstructed sky diffuse at a ground point for each (TH,PH) direction std::array TH; // Azimuth of sky element (radians) std::array SPHCPH; // Sine times cosine of altitude of sky element - Array1D SetPnt; // Illuminance setpoint at reference points (lux) - Array1D GLRNDX; // Glare index at reference point - Array1D GLRNEW; // New glare index at reference point - Array1D FLCWSK; // Sky-related upgoing luminous flux - // Ratio of obstructed to unobstructed sky diffuse at a ground point for each (TH,PH) direction + + // Not sure why these need to be state variables and can't local + // variable of DayltgInterReflectIllum(), but some EMS tests break + // if they are made local std::array, Dayltg::NPHMAX + 1> SkyObstructionMult; - Array1D FLFWSK; // Sky-related downgoing luminous flux std::array, Dayltg::NPHMAX + 1> ObTransM; // ObTrans value for each (TH,PH) direction - std::array SFSKHR; // Sky source luminance factor for sky type, bare/shaded window - std::array DFSKHR; // Sky daylight factor for sky type, bare/shaded window - std::array BFSKHR; // Sky background luminance factor for sky type, bare/shaded window - Array2D> tmpIllumFromWinAtRefPt; - Array2D> tmpBackLumFromWinAtRefPt; - Array2D> tmpSourceLumFromWinAtRefPt; Array1D_bool FirstTimeMaps; Array1D_bool EnvrnPrint; Array1D_string SavedMnDy; Array1D XValue; Array1D YValue; Array2D IllumValue; - Array1D DILLSW; // Illuminance a ref point from a group of windows that can be switched together, - Array1D DILLUN; // and from those that aren't (lux) - Array1D_bool previously_shaded; // array of flags to indicate that previously groups would have already shaded this window - Array2D> WDAYIL; // Illuminance from window at reference point (second index) - // the number of shade deployment groups (third index) - Array2D> WBACLU; // Background illuminance from window at reference point (second index) - // the number of shade deployment groups (third index) - Array2D RDAYIL; // Illuminance from window at reference point after closing shade - Array2D RBACLU; // Background illuminance from window at reference point after closing shade - Array1D TVIS1; // Visible transmittance at normal incidence of unswitched glazing - Array1D TVIS2; // Visible transmittance at normal incidence of fully-switched glazing - Array1D ASETIL; // Illuminance ratio (lux) - - DaylightingManagerData() - { - this->cos_Phi = Array1D(DataSurfaces::AltAngStepsForSolReflCalc / 2); // cos( Phi ) table - this->sin_Phi = Array1D(DataSurfaces::AltAngStepsForSolReflCalc / 2); // sin( Phi ) table - this->cos_Theta = Array1D(2 * DataSurfaces::AzimAngStepsForSolReflCalc); // cos( Theta ) table - this->sin_Theta = Array1D(2 * DataSurfaces::AzimAngStepsForSolReflCalc); // sin( Theta ) table - } void clear_state() override { @@ -641,28 +589,15 @@ struct DaylightingManagerData : BaseGlobalStruct this->DaylIllum.deallocate(); this->maxNumRefPtInAnyDaylCtrl = 0; this->maxNumRefPtInAnyEncl = 0; - this->PHSUN = 0.0; - this->SPHSUN = 0.0; - this->CPHSUN = 0.0; - this->THSUN = 0.0; - this->PHSUNHR = Array1D(Constant::HoursInDay, 0.0); - this->SPHSUNHR = Array1D(Constant::HoursInDay, 0.0); - this->CPHSUNHR = Array1D(Constant::HoursInDay, 0.0); - this->THSUNHR = Array1D(Constant::HoursInDay, 0.0); - this->EINTSK.deallocate(); - this->EINTSU.deallocate(); - this->EINTSUdisk.deallocate(); - this->WLUMSK.deallocate(); - this->WLUMSU.deallocate(); - this->WLUMSUdisk.deallocate(); - this->GILSK = Array1D(Constant::HoursInDay, Dayltg::Illums()); - this->GILSU = Array1D(Constant::HoursInDay, 0.0); - this->EDIRSK.deallocate(); - this->EDIRSU.deallocate(); - this->EDIRSUdisk.deallocate(); - this->AVWLSK.deallocate(); - this->AVWLSU.deallocate(); - this->AVWLSUdisk.deallocate(); + this->sunAngles = Dayltg::SunAngles(); + this->sunAnglesHr = {Dayltg::SunAngles()}; + + this->horIllum = {Dayltg::Illums()}; + this->dirIllum.deallocate(); + this->reflIllum.deallocate(); + this->winLum.deallocate(); + this->avgWinLum.deallocate(); + this->TDDTransVisBeam.deallocate(); this->TDDFluxInc.deallocate(); this->TDDFluxTrans.deallocate(); @@ -672,45 +607,16 @@ struct DaylightingManagerData : BaseGlobalStruct this->CalcDayltgCoeffsMapPointsMySunIsUpFlag = false; this->AltSteps_last = 0; this->AzimSteps_last = 0; - this->cos_Phi = Array1D(DataSurfaces::AltAngStepsForSolReflCalc / 2); // cos( Phi ) table - this->sin_Phi = Array1D(DataSurfaces::AltAngStepsForSolReflCalc / 2); // sin( Phi ) table - this->cos_Theta = Array1D(2 * DataSurfaces::AzimAngStepsForSolReflCalc); // cos( Theta ) table - this->sin_Theta = Array1D(2 * DataSurfaces::AzimAngStepsForSolReflCalc); // sin( Theta ) table - - // this->IConstShaded = 0; - this->VTDark = 0.0; - // this->VTMULT = 1.0; - - this->BACLUM.clear(); - this->DayltgInteriorMapIllumGLRNDX.clear(); - this->daylight_illum.clear(); - this->FLFWSU.clear(); - this->FLFWSUdisk.clear(); - this->FLCWSU.clear(); - this->SetPnt.clear(); - this->GLRNDX.clear(); - this->GLRNEW.clear(); - this->FLCWSK.clear(); - this->FLFWSK.clear(); - this->tmpIllumFromWinAtRefPt.clear(); - this->tmpBackLumFromWinAtRefPt.clear(); - this->tmpSourceLumFromWinAtRefPt.clear(); + this->cos_Phi = {0.0}; + this->sin_Phi = {0.0}; + this->cos_Theta = {0.0}; + this->sin_Theta = {0.0}; this->FirstTimeMaps.clear(); this->EnvrnPrint.clear(); this->SavedMnDy.clear(); this->XValue.clear(); this->YValue.clear(); this->IllumValue.clear(); - this->DILLSW.clear(); - this->DILLUN.clear(); - this->previously_shaded.clear(); - this->WDAYIL.clear(); - this->WBACLU.clear(); - this->RDAYIL.clear(); - this->RBACLU.clear(); - this->TVIS1.clear(); - this->TVIS2.clear(); - this->ASETIL.clear(); } }; diff --git a/src/EnergyPlus/DemandManager.cc b/src/EnergyPlus/DemandManager.cc index 06f35413e2b..afd99a7c688 100644 --- a/src/EnergyPlus/DemandManager.cc +++ b/src/EnergyPlus/DemandManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -353,14 +353,14 @@ void GetDemandManagerListInput(EnergyPlusData &state) thisDemandMgrList.Meter = GetMeterIndex(state, state.dataIPShortCut->cAlphaArgs(2)); - if (thisDemandMgrList.Meter == 0) { + if (thisDemandMgrList.Meter == -1) { ShowSevereError(state, format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); ShowContinueError(state, format("Entered in {} = {}", cCurrentModuleObject, thisDemandMgrList.Name)); ErrorsFound = true; } else { - if ((state.dataOutputProcessor->EnergyMeters(thisDemandMgrList.Meter).ResourceType == "Electricity") || - (state.dataOutputProcessor->EnergyMeters(thisDemandMgrList.Meter).ResourceType == "ElectricityNet")) { + if ((state.dataOutputProcessor->meters[thisDemandMgrList.Meter]->resource == Constant::eResource::Electricity) || + (state.dataOutputProcessor->meters[thisDemandMgrList.Meter]->resource == Constant::eResource::ElectricityNet)) { } else { ShowSevereError(state, format("{} = \"{}\" invalid value {} = \"{}\".", @@ -470,7 +470,7 @@ void GetDemandManagerListInput(EnergyPlusData &state) // Setup report variables SetupOutputVariable(state, "Demand Manager Meter Demand Power", - OutputProcessor::Unit::W, + Constant::Units::W, thisDemandMgrList.MeterDemand, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -478,7 +478,7 @@ void GetDemandManagerListInput(EnergyPlusData &state) SetupOutputVariable(state, "Demand Manager Average Demand Power", - OutputProcessor::Unit::W, + Constant::Units::W, thisDemandMgrList.AverageDemand, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -486,7 +486,7 @@ void GetDemandManagerListInput(EnergyPlusData &state) SetupOutputVariable(state, "Demand Manager Peak Demand Power", - OutputProcessor::Unit::W, + Constant::Units::W, thisDemandMgrList.PeakDemand, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -494,7 +494,7 @@ void GetDemandManagerListInput(EnergyPlusData &state) SetupOutputVariable(state, "Demand Manager Scheduled Limit Power", - OutputProcessor::Unit::W, + Constant::Units::W, thisDemandMgrList.ScheduledLimit, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -502,7 +502,7 @@ void GetDemandManagerListInput(EnergyPlusData &state) SetupOutputVariable(state, "Demand Manager Demand Limit Power", - OutputProcessor::Unit::W, + Constant::Units::W, thisDemandMgrList.DemandLimit, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -510,7 +510,7 @@ void GetDemandManagerListInput(EnergyPlusData &state) SetupOutputVariable(state, "Demand Manager Over Limit Power", - OutputProcessor::Unit::W, + Constant::Units::W, thisDemandMgrList.OverLimit, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -518,7 +518,7 @@ void GetDemandManagerListInput(EnergyPlusData &state) SetupOutputVariable(state, "Demand Manager Over Limit Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, thisDemandMgrList.OverLimitDuration, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -533,7 +533,7 @@ void GetDemandManagerListInput(EnergyPlusData &state) // Iteration diagnostic reporting for all DEMAND MANAGER LISTs SetupOutputVariable(state, "Demand Manager Exterior Energy Iteration Count", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataDemandManager->DemandManagerExtIterations, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -541,7 +541,7 @@ void GetDemandManagerListInput(EnergyPlusData &state) SetupOutputVariable(state, "Demand Manager Heat Balance Iteration Count", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataDemandManager->DemandManagerHBIterations, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -549,7 +549,7 @@ void GetDemandManagerListInput(EnergyPlusData &state) SetupOutputVariable(state, "Demand Manager HVAC Iteration Count", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataDemandManager->DemandManagerHVACIterations, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, diff --git a/src/EnergyPlus/DemandManager.hh b/src/EnergyPlus/DemandManager.hh index 1e92dcc6671..fcaade78004 100644 --- a/src/EnergyPlus/DemandManager.hh +++ b/src/EnergyPlus/DemandManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DesiccantDehumidifiers.cc b/src/EnergyPlus/DesiccantDehumidifiers.cc index 4c713588b72..d118e208e56 100644 --- a/src/EnergyPlus/DesiccantDehumidifiers.cc +++ b/src/EnergyPlus/DesiccantDehumidifiers.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -1448,82 +1448,81 @@ namespace DesiccantDehumidifiers { // Setup Report variables for the Desiccant Dehumidifiers SetupOutputVariable(state, "Dehumidifier Removed Water Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, desicDehum.WaterRemove, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, desicDehum.Name); SetupOutputVariable(state, "Dehumidifier Removed Water Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, desicDehum.WaterRemoveRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, desicDehum.Name); SetupOutputVariable(state, "Dehumidifier Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, desicDehum.PartLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, desicDehum.Name); SetupOutputVariable(state, "Dehumidifier Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, desicDehum.ElecUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, desicDehum.Name); SetupOutputVariable(state, "Dehumidifier Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, desicDehum.ElecUseEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, desicDehum.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Dehumidifier Regeneration Specific Energy", - OutputProcessor::Unit::J_kgWater, + Constant::Units::J_kgWater, desicDehum.SpecRegenEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, desicDehum.Name); SetupOutputVariable(state, "Dehumidifier Regeneration Rate", - OutputProcessor::Unit::W, + Constant::Units::W, desicDehum.QRegen, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, desicDehum.Name); SetupOutputVariable(state, "Dehumidifier Regeneration Energy", - OutputProcessor::Unit::J, + Constant::Units::J, desicDehum.RegenEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, desicDehum.Name); SetupOutputVariable(state, "Dehumidifier Regeneration Air Speed", - OutputProcessor::Unit::m_s, + Constant::Units::m_s, desicDehum.RegenAirVel, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, desicDehum.Name); SetupOutputVariable(state, "Dehumidifier Regeneration Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, desicDehum.RegenAirInMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, desicDehum.Name); SetupOutputVariable(state, "Dehumidifier Process Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, desicDehum.ProcAirInMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1538,21 +1537,21 @@ namespace DesiccantDehumidifiers { // Setup Report variables for the Desiccant Dehumidifiers SetupOutputVariable(state, "Dehumidifier Removed Water Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, desicDehum.WaterRemove, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, desicDehum.Name); SetupOutputVariable(state, "Dehumidifier Removed Water Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, desicDehum.WaterRemoveRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, desicDehum.Name); SetupOutputVariable(state, "Dehumidifier Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, desicDehum.PartLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1560,23 +1559,22 @@ namespace DesiccantDehumidifiers { if (desicDehum.ExhaustFanMaxVolFlowRate > 0) { SetupOutputVariable(state, "Dehumidifier Exhaust Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, desicDehum.ExhaustFanPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, desicDehum.Name); SetupOutputVariable(state, "Dehumidifier Exhaust Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, desicDehum.ExhaustFanElecConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, desicDehum.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } } diff --git a/src/EnergyPlus/DesiccantDehumidifiers.hh b/src/EnergyPlus/DesiccantDehumidifiers.hh index 5473a539e60..945ee7c882e 100644 --- a/src/EnergyPlus/DesiccantDehumidifiers.hh +++ b/src/EnergyPlus/DesiccantDehumidifiers.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DisplacementVentMgr.cc b/src/EnergyPlus/DisplacementVentMgr.cc index 228cde79ef6..fd2c017c054 100644 --- a/src/EnergyPlus/DisplacementVentMgr.cc +++ b/src/EnergyPlus/DisplacementVentMgr.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DisplacementVentMgr.hh b/src/EnergyPlus/DisplacementVentMgr.hh index a750cc76407..dd03fb974ac 100644 --- a/src/EnergyPlus/DisplacementVentMgr.hh +++ b/src/EnergyPlus/DisplacementVentMgr.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -78,7 +78,7 @@ namespace RoomAir { void CalcDispVent3Node(EnergyPlusData &state, int ZoneNum); // Which Zonenum - static constexpr std::array IntGainTypesOccupied = { + static constexpr std::array IntGainTypesOccupied = { DataHeatBalance::IntGainType::People, DataHeatBalance::IntGainType::WaterHeaterMixed, DataHeatBalance::IntGainType::WaterHeaterStratified, @@ -90,6 +90,7 @@ namespace RoomAir { DataHeatBalance::IntGainType::HotWaterEquipment, DataHeatBalance::IntGainType::SteamEquipment, DataHeatBalance::IntGainType::OtherEquipment, + DataHeatBalance::IntGainType::IndoorGreen, DataHeatBalance::IntGainType::ZoneBaseboardOutdoorTemperatureControlled, DataHeatBalance::IntGainType::GeneratorFuelCell, DataHeatBalance::IntGainType::WaterUseEquipment, diff --git a/src/EnergyPlus/DisplayRoutines.cc b/src/EnergyPlus/DisplayRoutines.cc index 3da9f77ac1d..101da2a44ad 100644 --- a/src/EnergyPlus/DisplayRoutines.cc +++ b/src/EnergyPlus/DisplayRoutines.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DisplayRoutines.hh b/src/EnergyPlus/DisplayRoutines.hh index 1cca7c12380..0ca8c99a33a 100644 --- a/src/EnergyPlus/DisplayRoutines.hh +++ b/src/EnergyPlus/DisplayRoutines.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DualDuct.cc b/src/EnergyPlus/DualDuct.cc index bbb6bd73993..c9312e66973 100644 --- a/src/EnergyPlus/DualDuct.cc +++ b/src/EnergyPlus/DualDuct.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -347,14 +347,14 @@ namespace DualDuct { // CurrentModuleObject='AirTerminal:DualDuct:ConstantVolume' SetupOutputVariable(state, "Zone Air Terminal Cold Supply Duct Damper Position", - OutputProcessor::Unit::None, + Constant::Units::None, thisDD.ColdAirDamperPosition, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDD.Name); SetupOutputVariable(state, "Zone Air Terminal Hot Supply Duct Damper Position", - OutputProcessor::Unit::None, + Constant::Units::None, thisDD.HotAirDamperPosition, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -502,21 +502,21 @@ namespace DualDuct { // CurrentModuleObject='AirTerminal:DualDuct:VAV' SetupOutputVariable(state, "Zone Air Terminal Cold Supply Duct Damper Position", - OutputProcessor::Unit::None, + Constant::Units::None, thisDD.ColdAirDamperPosition, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDD.Name); SetupOutputVariable(state, "Zone Air Terminal Hot Supply Duct Damper Position", - OutputProcessor::Unit::None, + Constant::Units::None, thisDD.HotAirDamperPosition, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDD.Name); SetupOutputVariable(state, "Zone Air Terminal Outdoor Air Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, thisDD.OutdoorAirFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -707,21 +707,21 @@ namespace DualDuct { // Setup the Average damper Position output variable SetupOutputVariable(state, "Zone Air Terminal Outdoor Air Duct Damper Position", - OutputProcessor::Unit::None, + Constant::Units::None, thisDD.OADamperPosition, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDD.Name); SetupOutputVariable(state, "Zone Air Terminal Recirculated Air Duct Damper Position", - OutputProcessor::Unit::None, + Constant::Units::None, thisDD.RecircAirDamperPosition, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisDD.Name); SetupOutputVariable(state, "Zone Air Terminal Outdoor Air Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, thisDD.OAFraction, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/DualDuct.hh b/src/EnergyPlus/DualDuct.hh index c4ca64b1232..fa9666e51a2 100644 --- a/src/EnergyPlus/DualDuct.hh +++ b/src/EnergyPlus/DualDuct.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EMSManager.cc b/src/EnergyPlus/EMSManager.cc index edabad5bab3..bbfb180fda3 100644 --- a/src/EnergyPlus/EMSManager.cc +++ b/src/EnergyPlus/EMSManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -432,7 +432,7 @@ namespace EMSManager { // Update sensors with current data for (int SensorNum = 1; SensorNum <= state.dataRuntimeLang->NumSensors; ++SensorNum) { int ErlVariableNum = state.dataRuntimeLang->Sensor(SensorNum).VariableNum; - if ((ErlVariableNum > 0) && (state.dataRuntimeLang->Sensor(SensorNum).Index > 0)) { + if ((ErlVariableNum > 0) && (state.dataRuntimeLang->Sensor(SensorNum).Index > -1)) { if (state.dataRuntimeLang->Sensor(SensorNum).SchedNum == 0) { // not a schedule so get from output processor state.dataRuntimeLang->ErlVariable(ErlVariableNum).Value = RuntimeLanguageProcessor::SetErlValueNumber( @@ -601,7 +601,7 @@ namespace EMSManager { thisSensor.OutputVarName = cAlphaArgs(3); int VarIndex = GetMeterIndex(state, cAlphaArgs(3)); - if (VarIndex > 0) { + if (VarIndex > -1) { if (!lAlphaFieldBlanks(2)) { ShowWarningError(state, format("Unused{}={}", cAlphaFieldNames(2), cAlphaArgs(2))); ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); @@ -614,9 +614,9 @@ namespace EMSManager { } else { // Search for variable names GetVariableTypeAndIndex(state, cAlphaArgs(3), cAlphaArgs(2), VarType, VarIndex); - if (VarType != OutputProcessor::VariableType::NotFound) { + if (VarType != OutputProcessor::VariableType::Invalid) { thisSensor.VariableType = VarType; - if (VarIndex != 0) { + if (VarIndex != -1) { thisSensor.Index = VarIndex; thisSensor.CheckedOkay = true; } @@ -947,7 +947,7 @@ namespace EMSManager { // try again to process sensor. int VarIndex = GetMeterIndex(state, state.dataRuntimeLang->Sensor(SensorNum).OutputVarName); - if (VarIndex > 0) { + if (VarIndex > -1) { state.dataRuntimeLang->Sensor(SensorNum).VariableType = OutputProcessor::VariableType::Meter; state.dataRuntimeLang->Sensor(SensorNum).Index = VarIndex; @@ -959,7 +959,7 @@ namespace EMSManager { state.dataRuntimeLang->Sensor(SensorNum).UniqueKeyName, VarType, VarIndex); - if (VarType == OutputProcessor::VariableType::NotFound) { + if (VarType == OutputProcessor::VariableType::Invalid) { if (reportErrors) { ShowSevereError( state, @@ -968,7 +968,7 @@ namespace EMSManager { ShowContinueError(state, "Output:Variable Name not found"); ErrorsFound = true; } - } else if (VarIndex == 0) { + } else if (VarIndex == -1) { if (reportErrors) { ShowSevereError(state, format("Invalid Output:Variable or Output:Meter Index Key Name ={}", @@ -1204,37 +1204,35 @@ namespace EMSManager { int NumKeys; OutputProcessor::StoreType AvgOrSum; OutputProcessor::TimeStepType StepType; - OutputProcessor::Unit Units(OutputProcessor::Unit::None); - Array1D_string KeyName; + Constant::Units units = Constant::Units::None; + Array1D_string keyName; Array1D_int KeyIndex; - VarType = OutputProcessor::VariableType::NotFound; - VarIndex = 0; - GetVariableKeyCountandType(state, VarName, NumKeys, VarType, AvgOrSum, StepType, Units); + VarType = OutputProcessor::VariableType::Invalid; + VarIndex = -1; + GetVariableKeyCountandType(state, VarName, NumKeys, VarType, AvgOrSum, StepType, units); // note that schedules are not getting VarType set right... if (NumKeys > 0) { - KeyName.allocate(NumKeys); KeyIndex.allocate(NumKeys); - GetVariableKeys(state, VarName, VarType, KeyName, KeyIndex); + keyName.allocate(NumKeys); + GetVariableKeys(state, VarName, VarType, keyName, KeyIndex); - if (KeyName(1) == "ENVIRONMENT") { + if (VarType == OutputProcessor::VariableType::Schedule) { + VarIndex = KeyIndex(1); + } else if (keyName(1) == "ENVIRONMENT") { VarIndex = KeyIndex(1); } else { - int KeyNum; - bool Found = false; - for (KeyNum = 1; KeyNum <= NumKeys; ++KeyNum) { - if (KeyName(KeyNum) == VarKeyName) { - Found = true; + for (int KeyNum = 1; KeyNum <= NumKeys; ++KeyNum) { + if (state.dataOutputProcessor->outVars[KeyIndex(KeyNum)]->keyUC == VarKeyName) { + VarIndex = KeyIndex(KeyNum); break; } } - if (Found) VarIndex = KeyIndex(KeyNum); } - - KeyName.deallocate(); KeyIndex.deallocate(); + keyName.deallocate(); } } diff --git a/src/EnergyPlus/EMSManager.hh b/src/EnergyPlus/EMSManager.hh index d7a7ef54c1d..ee7c16abde8 100644 --- a/src/EnergyPlus/EMSManager.hh +++ b/src/EnergyPlus/EMSManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EPVector.hh b/src/EnergyPlus/EPVector.hh index 9b5c02f294a..9d556b4e9f2 100644 --- a/src/EnergyPlus/EPVector.hh +++ b/src/EnergyPlus/EPVector.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EarthTube.cc b/src/EnergyPlus/EarthTube.cc index 314ffda2444..56927c51330 100644 --- a/src/EnergyPlus/EarthTube.cc +++ b/src/EnergyPlus/EarthTube.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -478,124 +478,123 @@ void GetEarthTube(EnergyPlusData &state, bool &ErrorsFound) // If errors found i SetupOutputVariable(state, "Earth Tube Zone Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZnRptET.EarthTubeHeatLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::NonState, zone.Name); SetupOutputVariable(state, "Earth Tube Zone Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisZnRptET.EarthTubeHeatLossRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Earth Tube Zone Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZnRptET.EarthTubeHeatGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::NonState, zone.Name); SetupOutputVariable(state, "Earth Tube Zone Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisZnRptET.EarthTubeHeatGainRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Earth Tube Air Flow Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisZnRptET.EarthTubeVolume, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::NonState, zone.Name); SetupOutputVariable(state, "Earth Tube Current Density Air Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, thisZnRptET.EarthTubeVolFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Earth Tube Standard Density Air Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, thisZnRptET.EarthTubeVolFlowRateStd, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Earth Tube Air Flow Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, thisZnRptET.EarthTubeMass, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::NonState, zone.Name); SetupOutputVariable(state, "Earth Tube Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisZnRptET.EarthTubeMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Earth Tube Water Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisZnRptET.EarthTubeWaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Earth Tube Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZnRptET.EarthTubeFanElec, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::NonState, zone.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Invalid, {}, - eResourceSOV::Electricity, - {}, - {}, - GroupSOV::Building); + OutputProcessor::SOVGroup::Building); SetupOutputVariable(state, "Earth Tube Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisZnRptET.EarthTubeFanElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Earth Tube Zone Inlet Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisZnRptET.EarthTubeAirTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Earth Tube Ground Interface Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisEarthTube.GroundTempt, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Earth Tube Outdoor Air Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisZnRptET.EarthTubeOATreatmentPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Earth Tube Zone Inlet Wet Bulb Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisZnRptET.EarthTubeWetBulbTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Earth Tube Zone Inlet Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, thisZnRptET.EarthTubeHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::State, @@ -739,14 +738,14 @@ void initEarthTubeVertical(EnergyPlusData &state) for (int nodeNum = 1; nodeNum <= thisEarthTube.totNodes; ++nodeNum) { SetupOutputVariable(state, format("Earth Tube Node Temperature {}", nodeNum), - OutputProcessor::Unit::C, + Constant::Units::C, thisEarthTube.tCurrent[nodeNum - 1], OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, format("Earth Tube Undisturbed Ground Temperature {}", nodeNum), - OutputProcessor::Unit::C, + Constant::Units::C, thisEarthTube.tUndist[nodeNum - 1], OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -754,14 +753,14 @@ void initEarthTubeVertical(EnergyPlusData &state) } SetupOutputVariable(state, "Earth Tube Upper Boundary Ground Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisEarthTube.tUpperBound, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Earth Tube Lower Boundary Ground Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisEarthTube.tLowerBound, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, diff --git a/src/EnergyPlus/EarthTube.hh b/src/EnergyPlus/EarthTube.hh index 80a28b9a1c4..9948816c40c 100644 --- a/src/EnergyPlus/EarthTube.hh +++ b/src/EnergyPlus/EarthTube.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EcoRoofManager.cc b/src/EnergyPlus/EcoRoofManager.cc index 74f2d64bd57..68a8e756425 100644 --- a/src/EnergyPlus/EcoRoofManager.cc +++ b/src/EnergyPlus/EcoRoofManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -539,70 +539,70 @@ namespace EcoRoofManager { // DJS NOVEMBER 2010 - Make calls to SetupOutput Variable to allow for reporting of ecoroof variables SetupOutputVariable(state, "Green Roof Soil Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisEcoRoof->Tg, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, "Environment"); SetupOutputVariable(state, "Green Roof Vegetation Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisEcoRoof->Tf, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, "Environment"); SetupOutputVariable(state, "Green Roof Soil Root Moisture Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisEcoRoof->MeanRootMoisture, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, "Environment"); SetupOutputVariable(state, "Green Roof Soil Near Surface Moisture Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisEcoRoof->Moisture, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, "Environment"); SetupOutputVariable(state, "Green Roof Soil Sensible Heat Transfer Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, thisEcoRoof->sensibleg, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, "Environment"); SetupOutputVariable(state, "Green Roof Vegetation Sensible Heat Transfer Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, thisEcoRoof->sensiblef, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, "Environment"); SetupOutputVariable(state, "Green Roof Vegetation Moisture Transfer Rate", - OutputProcessor::Unit::m_s, + Constant::Units::m_s, thisEcoRoof->Vfluxf, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, "Environment"); SetupOutputVariable(state, "Green Roof Soil Moisture Transfer Rate", - OutputProcessor::Unit::m_s, + Constant::Units::m_s, thisEcoRoof->Vfluxg, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, "Environment"); SetupOutputVariable(state, "Green Roof Vegetation Latent Heat Transfer Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, thisEcoRoof->Lf, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, "Environment"); SetupOutputVariable(state, "Green Roof Soil Latent Heat Transfer Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, thisEcoRoof->Lg, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -610,56 +610,56 @@ namespace EcoRoofManager { SetupOutputVariable(state, "Green Roof Cumulative Precipitation Depth", - OutputProcessor::Unit::m, + Constant::Units::m, thisEcoRoof->CumPrecip, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, "Environment"); SetupOutputVariable(state, "Green Roof Cumulative Irrigation Depth", - OutputProcessor::Unit::m, + Constant::Units::m, thisEcoRoof->CumIrrigation, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, "Environment"); SetupOutputVariable(state, "Green Roof Cumulative Runoff Depth", - OutputProcessor::Unit::m, + Constant::Units::m, thisEcoRoof->CumRunoff, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, "Environment"); SetupOutputVariable(state, "Green Roof Cumulative Evapotranspiration Depth", - OutputProcessor::Unit::m, + Constant::Units::m, thisEcoRoof->CumET, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, "Environment"); SetupOutputVariable(state, "Green Roof Current Precipitation Depth", - OutputProcessor::Unit::m, + Constant::Units::m, thisEcoRoof->CurrentPrecipitation, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Environment"); SetupOutputVariable(state, "Green Roof Current Irrigation Depth", - OutputProcessor::Unit::m, + Constant::Units::m, thisEcoRoof->CurrentIrrigation, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Environment"); SetupOutputVariable(state, "Green Roof Current Runoff Depth", - OutputProcessor::Unit::m, + Constant::Units::m, thisEcoRoof->CurrentRunoff, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Environment"); SetupOutputVariable(state, "Green Roof Current Evapotranspiration Depth", - OutputProcessor::Unit::m, + Constant::Units::m, thisEcoRoof->CurrentET, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, diff --git a/src/EnergyPlus/EcoRoofManager.hh b/src/EnergyPlus/EcoRoofManager.hh index 047add9da5b..4a3b9c8e40c 100644 --- a/src/EnergyPlus/EcoRoofManager.hh +++ b/src/EnergyPlus/EcoRoofManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EconomicLifeCycleCost.cc b/src/EnergyPlus/EconomicLifeCycleCost.cc index 9059324cf66..222dfb74a73 100644 --- a/src/EnergyPlus/EconomicLifeCycleCost.cc +++ b/src/EnergyPlus/EconomicLifeCycleCost.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EconomicLifeCycleCost.hh b/src/EnergyPlus/EconomicLifeCycleCost.hh index 895b6875485..5614b34b7c5 100644 --- a/src/EnergyPlus/EconomicLifeCycleCost.hh +++ b/src/EnergyPlus/EconomicLifeCycleCost.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EconomicTariff.cc b/src/EnergyPlus/EconomicTariff.cc index f10310c1b5b..090b644b9f3 100644 --- a/src/EnergyPlus/EconomicTariff.cc +++ b/src/EnergyPlus/EconomicTariff.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -145,9 +145,9 @@ void GetInputEconomicsTariff(EnergyPlusData &state, bool &ErrorsFound) // true i OutputProcessor::VariableType TypeVar; OutputProcessor::StoreType AvgSumVar; OutputProcessor::TimeStepType StepTypeVar; - OutputProcessor::Unit UnitsVar(OutputProcessor::Unit::None); // Units sting, may be blank - Array1D_string NamesOfKeys; // Specific key name - Array1D_int IndexesForKeyVar; // Array index + Constant::Units UnitsVar = Constant::Units::None; // Units sting, may be blank + Array1D_string NamesOfKeys; // Specific key name + Array1D_int IndexesForKeyVar; // Array index auto &tariff(state.dataEconTariff->tariff); @@ -200,7 +200,7 @@ void GetInputEconomicsTariff(EnergyPlusData &state, bool &ErrorsFound) // true i ShowContinueError(state, format("Meter referenced is not present due to a lack of equipment that uses that energy source/meter:\"{}\".", tariff(iInObj).reportMeter)); - tariff(iInObj).reportMeterIndx = 0; + tariff(iInObj).reportMeterIndx = -1; } else { NamesOfKeys.allocate(KeyCount); IndexesForKeyVar.allocate(KeyCount); @@ -224,32 +224,41 @@ void GetInputEconomicsTariff(EnergyPlusData &state, bool &ErrorsFound) // true i tariff(iInObj).kindGasMtr = kindMeterNotGas; // Determine whether this meter is related to electricity, or water, or gas - if (tariff(iInObj).reportMeterIndx != 0) { - - std::string const &SELECT_CASE_var(Util::makeUPPER(state.dataOutputProcessor->EnergyMeters(tariff(iInObj).reportMeterIndx).ResourceType)); - + if (tariff(iInObj).reportMeterIndx != -1) { + switch (state.dataOutputProcessor->meters[tariff(iInObj).reportMeterIndx]->resource) { // Various types of electricity meters - if (SELECT_CASE_var == "ELECTRICITY") { + case Constant::eResource::Electricity: { tariff(iInObj).kindElectricMtr = kindMeterElecSimple; - } else if (SELECT_CASE_var == "ELECTRICITYPRODUCED") { + } break; + case Constant::eResource::ElectricityProduced: { tariff(iInObj).kindElectricMtr = kindMeterElecProduced; - } else if (SELECT_CASE_var == "ELECTRICITYPURCHASED") { + } break; + case Constant::eResource::ElectricityPurchased: { tariff(iInObj).kindElectricMtr = kindMeterElecPurchased; - } else if (SELECT_CASE_var == "ELECTRICITYSURPLUSSOLD") { + } break; + case Constant::eResource::ElectricitySurplusSold: { tariff(iInObj).kindElectricMtr = kindMeterElecSurplusSold; - } else if (SELECT_CASE_var == "ELECTRICITYNET") { + } break; + case Constant::eResource::ElectricityNet: { tariff(iInObj).kindElectricMtr = kindMeterElecNet; - - // Handle the case where its a water meter - } else if (SELECT_CASE_var == "WATER" || SELECT_CASE_var == "H2O" || SELECT_CASE_var == "ONSITEWATER" || - SELECT_CASE_var == "WATERPRODUCED" || SELECT_CASE_var == "ONSITE WATER" || SELECT_CASE_var == "MAINSWATER" || - SELECT_CASE_var == "WATERSUPPLY" || SELECT_CASE_var == "RAINWATER" || SELECT_CASE_var == "PRECIPITATION" || - SELECT_CASE_var == "WELLWATER" || SELECT_CASE_var == "GROUNDWATER" || SELECT_CASE_var == "CONDENSATE") { + } break; + // Handle the case where its a water meter + case Constant::eResource::Water: + case Constant::eResource::OnSiteWater: + case Constant::eResource::MainsWater: + case Constant::eResource::RainWater: + case Constant::eResource::WellWater: + case Constant::eResource::Condensate: { tariff(iInObj).kindWaterMtr = kindMeterWater; - // Or a Natural Gas meter - } else if (SELECT_CASE_var == "GAS" || SELECT_CASE_var == "NATURALGAS") { + } break; + // Or a Natural Gas meter + case Constant::eResource::NaturalGas: { tariff(iInObj).kindGasMtr = kindMeterGas; - } + } break; + default: { + // Do or assert something here? + } break; + } // switch } // Assign the right conversion factors based on the resource type @@ -661,9 +670,8 @@ void GetInputEconomicsTariff(EnergyPlusData &state, bool &ErrorsFound) // true i OutputReportTabular::AddTOCEntry(state, "Tariff Report", tariff(iInObj).tariffName); } // associate the resource number with each tariff - if (tariff(iInObj).reportMeterIndx >= 1) { - tariff(iInObj).resource = static_cast(getEnumValue( - Constant::eResourceNamesUC, Util::makeUPPER(state.dataOutputProcessor->EnergyMeters(tariff(iInObj).reportMeterIndx).ResourceType))); + if (tariff(iInObj).reportMeterIndx != -1) { + tariff(iInObj).resource = state.dataOutputProcessor->meters[tariff(iInObj).reportMeterIndx]->resource; } } } @@ -2708,7 +2716,7 @@ void ComputeTariff(EnergyPlusData &state) Real64 annualAggregate; - if (!(state.files.outputControl.tabular || state.files.outputControl.sqlite)) { + if (!state.files.outputControl.writeTabular(state)) { state.dataOutRptTab->WriteTabularFiles = false; return; } @@ -4113,7 +4121,8 @@ void WriteTabularTariffReports(EnergyPlusData &state) // do unit conversions if necessary std::string perAreaUnitName; - if (unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPound) { + if ((unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPound) || + (unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity)) { int unitConvIndex = 0; std::string SIunit = "[~~$~~/m2]"; OutputReportTabular::LookupSItoIP(state, SIunit, unitConvIndex, perAreaUnitName); diff --git a/src/EnergyPlus/EconomicTariff.hh b/src/EnergyPlus/EconomicTariff.hh index b55769c3bb5..3657c87aae8 100644 --- a/src/EnergyPlus/EconomicTariff.hh +++ b/src/EnergyPlus/EconomicTariff.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ElectricBaseboardRadiator.cc b/src/EnergyPlus/ElectricBaseboardRadiator.cc index 67703ca644b..544f2bc8667 100644 --- a/src/EnergyPlus/ElectricBaseboardRadiator.cc +++ b/src/EnergyPlus/ElectricBaseboardRadiator.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -409,6 +409,7 @@ namespace ElectricBaseboardRadiator { } if (elecBaseboard.SurfacePtr(SurfNum) != 0) { state.dataSurface->surfIntConv(elecBaseboard.SurfacePtr(SurfNum)).getsRadiantHeat = true; + state.dataSurface->allGetsRadiantHeatSurfaceList.emplace_back(elecBaseboard.SurfacePtr(SurfNum)); } AllFracsSummed += elecBaseboard.FracDistribToSurf(SurfNum); @@ -438,7 +439,7 @@ namespace ElectricBaseboardRadiator { // CurrentModuleObject='ZoneHVAC:Baseboard:RadiantConvective:Electric' SetupOutputVariable(state, "Baseboard Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, elecBaseboard.TotPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -446,14 +447,14 @@ namespace ElectricBaseboardRadiator { SetupOutputVariable(state, "Baseboard Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, elecBaseboard.ConvPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, elecBaseboard.EquipName); SetupOutputVariable(state, "Baseboard Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, elecBaseboard.RadPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -461,46 +462,44 @@ namespace ElectricBaseboardRadiator { SetupOutputVariable(state, "Baseboard Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, elecBaseboard.ElecUseLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, elecBaseboard.EquipName, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "HEATING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Baseboard Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, elecBaseboard.ElecUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, elecBaseboard.EquipName); SetupOutputVariable(state, "Baseboard Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, elecBaseboard.TotEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, elecBaseboard.EquipName, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Baseboard, {}, - "ENERGYTRANSFER", - "BASEBOARD", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Baseboard Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, elecBaseboard.ConvEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, elecBaseboard.EquipName); SetupOutputVariable(state, "Baseboard Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, elecBaseboard.RadEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -905,7 +904,12 @@ namespace ElectricBaseboardRadiator { Real64 constexpr SmallestArea(0.001); // Smallest area in meters squared (to avoid a divide by zero) // Initialize arrays - state.dataHeatBalFanSys->SurfQElecBaseboard = 0.0; + for (auto &elecBaseboard : state.dataElectBaseboardRad->ElecBaseboard) { + for (int radSurfNum = 1; radSurfNum <= elecBaseboard.TotSurfToDistrib; ++radSurfNum) { + int surfNum = elecBaseboard.SurfacePtr(radSurfNum); + state.dataHeatBalFanSys->surfQRadFromHVAC(surfNum).ElecBaseboard = 0.0; + } + } state.dataHeatBalFanSys->ZoneQElecBaseboardToPerson = 0.0; for (auto &elecBaseboard : state.dataElectBaseboardRad->ElecBaseboard) { @@ -918,8 +922,7 @@ namespace ElectricBaseboardRadiator { if (state.dataSurface->Surface(SurfNum).Area > SmallestArea) { Real64 ThisSurfIntensity = (elecBaseboard.QBBElecRadSource * elecBaseboard.FracDistribToSurf(RadSurfNum) / state.dataSurface->Surface(SurfNum).Area); - state.dataHeatBalFanSys->SurfQElecBaseboard(SurfNum) += ThisSurfIntensity; - state.dataHeatBalSurf->AnyRadiantSystems = true; + state.dataHeatBalFanSys->surfQRadFromHVAC(SurfNum).ElecBaseboard += ThisSurfIntensity; if (ThisSurfIntensity > DataHeatBalFanSys::MaxRadHeatFlux) { ShowSevereError(state, "DistributeBBElecRadGains: excessive thermal radiation heat flux intensity detected"); ShowContinueError(state, "Surface = " + state.dataSurface->Surface(SurfNum).Name); diff --git a/src/EnergyPlus/ElectricBaseboardRadiator.hh b/src/EnergyPlus/ElectricBaseboardRadiator.hh index 698c7e10122..e449e2f5d2f 100644 --- a/src/EnergyPlus/ElectricBaseboardRadiator.hh +++ b/src/EnergyPlus/ElectricBaseboardRadiator.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ElectricPowerServiceManager.cc b/src/EnergyPlus/ElectricPowerServiceManager.cc index 1e031e8257b..f9efa0d1260 100644 --- a/src/EnergyPlus/ElectricPowerServiceManager.cc +++ b/src/EnergyPlus/ElectricPowerServiceManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -125,19 +125,20 @@ void ElectricPowerServiceManager::manageElectricPowerService( if (!state.dataGlobal->BeginEnvrnFlag) newEnvironmentFlag_ = true; // retrieve data from meters for demand and production - totalBldgElecDemand_ = GetInstantMeterValue(state, elecFacilityIndex_, OutputProcessor::TimeStepType::Zone) / state.dataGlobal->TimeStepZoneSec; + totalBldgElecDemand_ = + GetInstantMeterValue(state, elecFacilityMeterIndex_, OutputProcessor::TimeStepType::Zone) / state.dataGlobal->TimeStepZoneSec; totalHVACElecDemand_ = - GetInstantMeterValue(state, elecFacilityIndex_, OutputProcessor::TimeStepType::System) / (state.dataHVACGlobal->TimeStepSysSec); + GetInstantMeterValue(state, elecFacilityMeterIndex_, OutputProcessor::TimeStepType::System) / (state.dataHVACGlobal->TimeStepSysSec); totalElectricDemand_ = totalBldgElecDemand_ + totalHVACElecDemand_; elecProducedPVRate_ = - GetInstantMeterValue(state, elecProducedPVIndex_, OutputProcessor::TimeStepType::System) / (state.dataHVACGlobal->TimeStepSysSec); + GetInstantMeterValue(state, elecProducedPVMeterIndex_, OutputProcessor::TimeStepType::System) / (state.dataHVACGlobal->TimeStepSysSec); elecProducedWTRate_ = - GetInstantMeterValue(state, elecProducedWTIndex_, OutputProcessor::TimeStepType::System) / (state.dataHVACGlobal->TimeStepSysSec); + GetInstantMeterValue(state, elecProducedWTMeterIndex_, OutputProcessor::TimeStepType::System) / (state.dataHVACGlobal->TimeStepSysSec); elecProducedStorageRate_ = - GetInstantMeterValue(state, elecProducedStorageIndex_, OutputProcessor::TimeStepType::System) / (state.dataHVACGlobal->TimeStepSysSec); + GetInstantMeterValue(state, elecProducedStorageMeterIndex_, OutputProcessor::TimeStepType::System) / (state.dataHVACGlobal->TimeStepSysSec); elecProducedCoGenRate_ = - GetInstantMeterValue(state, elecProducedCoGenIndex_, OutputProcessor::TimeStepType::System) / (state.dataHVACGlobal->TimeStepSysSec); - elecProducedPowerConversionRate_ = GetInstantMeterValue(state, elecProducedPowerConversionIndex_, OutputProcessor::TimeStepType::System) / + GetInstantMeterValue(state, elecProducedCoGenMeterIndex_, OutputProcessor::TimeStepType::System) / (state.dataHVACGlobal->TimeStepSysSec); + elecProducedPowerConversionRate_ = GetInstantMeterValue(state, elecProducedPowerConversionMeterIndex_, OutputProcessor::TimeStepType::System) / (state.dataHVACGlobal->TimeStepSysSec); wholeBldgRemainingLoad_ = totalElectricDemand_; @@ -245,7 +246,7 @@ void ElectricPowerServiceManager::getPowerManagerInput(EnergyPlusData &state) // but only if there are any other electricity components set up (yet) for metering int anyElectricityPresent = GetMeterIndex(state, "ELECTRICITY:FACILITY"); int anyPlantLoadProfilePresent = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, "LoadProfile:Plant"); - if (anyElectricityPresent > 0 || anyPlantLoadProfilePresent > 0) { + if (anyElectricityPresent > -1 || anyPlantLoadProfilePresent > 0) { elecLoadCenterObjs.emplace_back(new ElectPowerLoadCenter(state, 0)); numLoadCenters_ = 1; } @@ -314,81 +315,78 @@ void ElectricPowerServiceManager::getPowerManagerInput(EnergyPlusData &state) if (numLoadCenters_ > 0) { SetupOutputVariable(state, "Facility Total Purchased Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, electPurchRate_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Facility Total Purchased Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, electricityPurch_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_, + Constant::eResource::ElectricityPurchased, + OutputProcessor::SOVEndUseCat::Cogeneration, {}, - "ElectricityPurchased", - "COGENERATION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Facility Total Surplus Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, electSurplusRate_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Facility Total Surplus Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, electricitySurplus_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_, + Constant::eResource::ElectricitySurplusSold, + OutputProcessor::SOVEndUseCat::Cogeneration, {}, - "ElectricitySurplusSold", - "COGENERATION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Facility Net Purchased Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, electricityNetRate_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Facility Net Purchased Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, electricityNet_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_, + Constant::eResource::ElectricityNet, + OutputProcessor::SOVEndUseCat::Cogeneration, {}, - "ElectricityNet", - "COGENERATION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Facility Total Building Electricity Demand Rate", - OutputProcessor::Unit::W, + Constant::Units::W, totalBldgElecDemand_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Facility Total HVAC Electricity Demand Rate", - OutputProcessor::Unit::W, + Constant::Units::W, totalHVACElecDemand_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Facility Total Electricity Demand Rate", - OutputProcessor::Unit::W, + Constant::Units::W, totalElectricDemand_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -396,14 +394,14 @@ void ElectricPowerServiceManager::getPowerManagerInput(EnergyPlusData &state) SetupOutputVariable(state, "Facility Total Produced Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, electProdRate_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Facility Total Produced Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, electricityProd_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -419,12 +417,12 @@ void ElectricPowerServiceManager::getPowerManagerInput(EnergyPlusData &state) void ElectricPowerServiceManager::setupMeterIndices(EnergyPlusData &state) { - elecFacilityIndex_ = EnergyPlus::GetMeterIndex(state, "Electricity:Facility"); - elecProducedCoGenIndex_ = EnergyPlus::GetMeterIndex(state, "Cogeneration:ElectricityProduced"); - elecProducedPVIndex_ = EnergyPlus::GetMeterIndex(state, "Photovoltaic:ElectricityProduced"); - elecProducedWTIndex_ = EnergyPlus::GetMeterIndex(state, "WindTurbine:ElectricityProduced"); - elecProducedStorageIndex_ = EnergyPlus::GetMeterIndex(state, "ElectricStorage:ElectricityProduced"); - elecProducedPowerConversionIndex_ = EnergyPlus::GetMeterIndex(state, "PowerConversion:ElectricityProduced"); + elecFacilityMeterIndex_ = GetMeterIndex(state, "ELECTRICITY:FACILITY"); + elecProducedCoGenMeterIndex_ = GetMeterIndex(state, "COGENERATION:ELECTRICITYPRODUCED"); + elecProducedPVMeterIndex_ = GetMeterIndex(state, "PHOTOVOLTAIC:ELECTRICITYPRODUCED"); + elecProducedWTMeterIndex_ = GetMeterIndex(state, "WINDTURBINE:ELECTRICITYPRODUCED"); + elecProducedStorageMeterIndex_ = GetMeterIndex(state, "ELECTRICSTORAGE:ELECTRICITYPRODUCED"); + elecProducedPowerConversionMeterIndex_ = GetMeterIndex(state, "POWERCONVERSION:ELECTRICITYPRODUCED"); if (numLoadCenters_ > 0) { for (auto &e : elecLoadCenterObjs) { @@ -479,19 +477,20 @@ void ElectricPowerServiceManager::updateWholeBuildingRecords(EnergyPlusData &sta { // main panel balancing. - totalBldgElecDemand_ = GetInstantMeterValue(state, elecFacilityIndex_, OutputProcessor::TimeStepType::Zone) / state.dataGlobal->TimeStepZoneSec; + totalBldgElecDemand_ = + GetInstantMeterValue(state, elecFacilityMeterIndex_, OutputProcessor::TimeStepType::Zone) / state.dataGlobal->TimeStepZoneSec; totalHVACElecDemand_ = - GetInstantMeterValue(state, elecFacilityIndex_, OutputProcessor::TimeStepType::System) / (state.dataHVACGlobal->TimeStepSysSec); + GetInstantMeterValue(state, elecFacilityMeterIndex_, OutputProcessor::TimeStepType::System) / (state.dataHVACGlobal->TimeStepSysSec); totalElectricDemand_ = totalBldgElecDemand_ + totalHVACElecDemand_; elecProducedPVRate_ = - GetInstantMeterValue(state, elecProducedPVIndex_, OutputProcessor::TimeStepType::System) / (state.dataHVACGlobal->TimeStepSysSec); + GetInstantMeterValue(state, elecProducedPVMeterIndex_, OutputProcessor::TimeStepType::System) / (state.dataHVACGlobal->TimeStepSysSec); elecProducedWTRate_ = - GetInstantMeterValue(state, elecProducedWTIndex_, OutputProcessor::TimeStepType::System) / (state.dataHVACGlobal->TimeStepSysSec); + GetInstantMeterValue(state, elecProducedWTMeterIndex_, OutputProcessor::TimeStepType::System) / (state.dataHVACGlobal->TimeStepSysSec); elecProducedStorageRate_ = - GetInstantMeterValue(state, elecProducedStorageIndex_, OutputProcessor::TimeStepType::System) / (state.dataHVACGlobal->TimeStepSysSec); + GetInstantMeterValue(state, elecProducedStorageMeterIndex_, OutputProcessor::TimeStepType::System) / (state.dataHVACGlobal->TimeStepSysSec); elecProducedCoGenRate_ = - GetInstantMeterValue(state, elecProducedCoGenIndex_, OutputProcessor::TimeStepType::System) / (state.dataHVACGlobal->TimeStepSysSec); - elecProducedPowerConversionRate_ = GetInstantMeterValue(state, elecProducedPowerConversionIndex_, OutputProcessor::TimeStepType::System) / + GetInstantMeterValue(state, elecProducedCoGenMeterIndex_, OutputProcessor::TimeStepType::System) / (state.dataHVACGlobal->TimeStepSysSec); + elecProducedPowerConversionRate_ = GetInstantMeterValue(state, elecProducedPowerConversionMeterIndex_, OutputProcessor::TimeStepType::System) / (state.dataHVACGlobal->TimeStepSysSec); electProdRate_ = elecProducedCoGenRate_ + elecProducedPVRate_ + elecProducedWTRate_ + elecProducedStorageRate_ + elecProducedPowerConversionRate_; @@ -1131,49 +1130,49 @@ ElectPowerLoadCenter::ElectPowerLoadCenter(EnergyPlusData &state, int const obje // Setup general output variables for reporting in the electric load center SetupOutputVariable(state, "Electric Load Center Produced Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, genElectProdRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Electric Load Center Produced Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, genElectricProd, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_); SetupOutputVariable(state, "Electric Load Center Supplied Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, subpanelFeedInRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Electric Load Center Drawn Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, subpanelDrawRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Electric Load Center Produced Thermal Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thermalProdRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Electric Load Center Produced Thermal Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thermalProd, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_); SetupOutputVariable(state, "Electric Load Center Requested Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, totalPowerRequest_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -2287,7 +2286,7 @@ GeneratorController::GeneratorController(EnergyPlusData &state, SetupOutputVariable(state, "Generator Requested Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, powerRequestThisTimestep, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -2624,98 +2623,96 @@ DCtoACInverter::DCtoACInverter(EnergyPlusData &state, std::string const &objectN SetupOutputVariable(state, "Inverter DC to AC Efficiency", - OutputProcessor::Unit::None, + Constant::Units::None, efficiency_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Inverter DC Input Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, dCPowerIn_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Inverter DC Input Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, dCEnergyIn_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_); SetupOutputVariable(state, "Inverter AC Output Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, aCPowerOut_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Inverter AC Output Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, aCEnergyOut_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_); SetupOutputVariable(state, "Inverter Conversion Loss Power", - OutputProcessor::Unit::W, + Constant::Units::W, conversionLossPower_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Inverter Conversion Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, conversionLossEnergy_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_); SetupOutputVariable(state, "Inverter Conversion Loss Decrement Energy", - OutputProcessor::Unit::J, + Constant::Units::J, conversionLossEnergyDecrement_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_, + Constant::eResource::ElectricityProduced, + OutputProcessor::SOVEndUseCat::PowerConversion, {}, - "ElectricityProduced", - "POWERCONVERSION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Inverter Thermal Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thermLossRate_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Inverter Thermal Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thermLossEnergy_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_); SetupOutputVariable(state, "Inverter Ancillary AC Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, ancillACuseRate_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Inverter Ancillary AC Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, ancillACuseEnergy_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_, - {}, - "Electricity", - "Cogeneration", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cogeneration, "DCtoACInverter Ancillary", - "Plant"); // called cogeneration for end use table + OutputProcessor::SOVGroup::Plant); // called cogeneration for end use table if (zoneNum_ > 0) { switch (modelType_) { case InverterModelType::SimpleConstantEff: { @@ -3084,98 +3081,96 @@ ACtoDCConverter::ACtoDCConverter(EnergyPlusData &state, std::string const &objec SetupOutputVariable(state, "Converter AC to DC Efficiency", - OutputProcessor::Unit::None, + Constant::Units::None, efficiency_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Converter AC Input Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, aCPowerIn_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Converter AC Input Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, aCEnergyIn_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_); SetupOutputVariable(state, "Converter DC Output Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, dCPowerOut_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Converter DC Output Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, dCEnergyOut_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_); SetupOutputVariable(state, "Converter Electricity Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, conversionLossPower_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Converter Electricity Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, conversionLossEnergy_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_); SetupOutputVariable(state, "Converter Electricity Loss Decrement Energy", - OutputProcessor::Unit::J, + Constant::Units::J, conversionLossEnergyDecrement_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_, + Constant::eResource::ElectricityProduced, + OutputProcessor::SOVEndUseCat::PowerConversion, {}, - "ElectricityProduced", - "POWERCONVERSION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Converter Thermal Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thermLossRate_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Converter Thermal Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thermLossEnergy_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_); SetupOutputVariable(state, "Converter Ancillary AC Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, ancillACuseRate_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Converter Ancillary AC Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, ancillACuseEnergy_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_, - {}, - "Electricity", - "Cogeneration", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cogeneration, "ACtoDCConverter Ancillary", - "Plant"); // called cogeneration for end use table + OutputProcessor::SOVGroup::Plant); // called cogeneration for end use table if (zoneNum_ > 0) { SetupZoneInternalGain( state, zoneNum_, name_, DataHeatBalance::IntGainType::ElectricLoadCenterConverter, &qdotConvZone_, nullptr, &qdotRadZone_); @@ -3396,7 +3391,7 @@ ElectricStorage::ElectricStorage( // main constructor startingEnergyStored_ = state.dataIPShortCut->rNumericArgs(7); SetupOutputVariable(state, "Electric Storage Simple Charge State", - OutputProcessor::Unit::J, + Constant::Units::J, electEnergyinStorage_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3652,35 +3647,35 @@ ElectricStorage::ElectricStorage( // main constructor if (storageModelMode_ == StorageModelType::KIBaMBattery || storageModelMode_ == StorageModelType::LiIonNmcBattery) { SetupOutputVariable(state, "Electric Storage Operating Mode Index", - OutputProcessor::Unit::None, + Constant::Units::None, storageMode_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Electric Storage Battery Charge State", - OutputProcessor::Unit::Ah, + Constant::Units::Ah, absoluteSOC_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); // issue #4921 SetupOutputVariable(state, "Electric Storage Charge Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, fractionSOC_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Electric Storage Total Current", - OutputProcessor::Unit::A, + Constant::Units::A, batteryCurrent_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Electric Storage Total Voltage", - OutputProcessor::Unit::V, + Constant::Units::V, batteryVoltage_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3689,7 +3684,7 @@ ElectricStorage::ElectricStorage( // main constructor if (lifeCalculation_ == BatteryDegradationModelType::LifeCalculationYes) { SetupOutputVariable(state, "Electric Storage Degradation Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, batteryDamage_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3699,59 +3694,57 @@ ElectricStorage::ElectricStorage( // main constructor SetupOutputVariable(state, "Electric Storage Charge Power", - OutputProcessor::Unit::W, + Constant::Units::W, storedPower_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Electric Storage Charge Energy", - OutputProcessor::Unit::J, + Constant::Units::J, storedEnergy_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_); SetupOutputVariable(state, "Electric Storage Production Decrement Energy", - OutputProcessor::Unit::J, + Constant::Units::J, decrementedEnergyStored_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_, + Constant::eResource::ElectricityProduced, + OutputProcessor::SOVEndUseCat::ElectricStorage, {}, - "ElectricityProduced", - "ELECTRICSTORAGE", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Electric Storage Discharge Power", - OutputProcessor::Unit::W, + Constant::Units::W, drawnPower_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Electric Storage Discharge Energy", - OutputProcessor::Unit::J, + Constant::Units::J, drawnEnergy_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_, + Constant::eResource::ElectricityProduced, + OutputProcessor::SOVEndUseCat::ElectricStorage, {}, - "ElectricityProduced", - "ELECTRICSTORAGE", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Electric Storage Thermal Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thermLossRate_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Electric Storage Thermal Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thermLossEnergy_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -3766,7 +3759,7 @@ ElectricStorage::ElectricStorage( // main constructor if (storageModelMode_ == StorageModelType::LiIonNmcBattery) { SetupOutputVariable(state, "Electric Storage Battery Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, batteryTemperature_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -4867,77 +4860,77 @@ ElectricTransformer::ElectricTransformer(EnergyPlusData &state, std::string cons } SetupOutputVariable(state, "Transformer Efficiency", - OutputProcessor::Unit::None, + Constant::Units::None, efficiency_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Transformer Input Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, powerIn_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Transformer Input Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, energyIn_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_); SetupOutputVariable(state, "Transformer Output Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, powerOut_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Transformer Output Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, energyOut_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_); SetupOutputVariable(state, "Transformer No Load Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, noLoadLossRate_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Transformer No Load Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, noLoadLossEnergy_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_); SetupOutputVariable(state, "Transformer Load Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, loadLossRate_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Transformer Load Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, loadLossEnergy_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_); SetupOutputVariable(state, "Transformer Thermal Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thermalLossRate_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Transformer Thermal Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thermalLossEnergy_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -4945,44 +4938,41 @@ ElectricTransformer::ElectricTransformer(EnergyPlusData &state, std::string cons if (usageMode_ == TransformerUse::PowerInFromGrid) { // power losses metered as an end use exterior equipment SetupOutputVariable(state, "Transformer Distribution Electricity Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, elecUseMeteredUtilityLosses_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_, - {}, - "Electricity", - "ExteriorEquipment", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorEquipment, "Transformer", - "System"); + OutputProcessor::SOVGroup::HVAC); // Is this correct? } if (usageMode_ == TransformerUse::PowerOutFromBldgToGrid) { SetupOutputVariable(state, "Transformer Cogeneration Electricity Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, powerConversionMeteredLosses_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_, + Constant::eResource::ElectricityProduced, + OutputProcessor::SOVEndUseCat::PowerConversion, {}, - "ElectricityProduced", - "POWERCONVERSION", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); // Is this correct? } if (usageMode_ == TransformerUse::PowerBetweenLoadCenterAndBldg) { SetupOutputVariable(state, "Transformer Conversion Electricity Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, powerConversionMeteredLosses_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_, + Constant::eResource::ElectricityProduced, + OutputProcessor::SOVEndUseCat::PowerConversion, {}, - "ElectricityProduced", - "POWERCONVERSION", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); // Is this correct? } if (zoneNum_ > 0) { @@ -5204,8 +5194,11 @@ void ElectricTransformer::setupMeterIndices(EnergyPlusData &state) // Index function is used here because some resource types are not Electricity but strings containing // Electricity such as ElectricityPurchased and ElectricityProduced. // It is not proper to have this check in GetInput routine because the meter index may have not been defined - if (!has(GetMeterResourceType(state, wiredMeterPtrs_[meterNum]), "Electricity")) { - EnergyPlus::ShowFatalError(state, format("Non-electricity meter used for {}", name_)); + auto *meter = state.dataOutputProcessor->meters[wiredMeterPtrs_[meterNum]]; + if (meter->resource != Constant::eResource::Electricity && meter->resource != Constant::eResource::ElectricityPurchased && + meter->resource != Constant::eResource::ElectricitySurplusSold && meter->resource != Constant::eResource::ElectricityProduced && + meter->resource != Constant::eResource::ElectricityNet) { + ShowFatalError(state, format("Non-electricity meter used for {}", name_)); } } } diff --git a/src/EnergyPlus/ElectricPowerServiceManager.hh b/src/EnergyPlus/ElectricPowerServiceManager.hh index 17be5085db7..2b91a2cfc13 100644 --- a/src/EnergyPlus/ElectricPowerServiceManager.hh +++ b/src/EnergyPlus/ElectricPowerServiceManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -747,13 +747,13 @@ public: // Creation // Default Constructor ElectricPowerServiceManager() : newEnvironmentInternalGainsFlag(true), numElecStorageDevices(0), getInputFlag_(true), newEnvironmentFlag_(true), numLoadCenters_(0), - numTransformers_(0), setupMeterIndexFlag_(true), elecFacilityIndex_(0), elecProducedCoGenIndex_(0), elecProducedPVIndex_(0), - elecProducedWTIndex_(0), elecProducedStorageIndex_(0), elecProducedPowerConversionIndex_(0), name_("Whole Building"), - facilityPowerInTransformerPresent_(false), numPowerOutTransformers_(0), wholeBldgRemainingLoad_(0.0), electricityProd_(0.0), - electProdRate_(0.0), electricityPurch_(0.0), electPurchRate_(0.0), electSurplusRate_(0.0), electricitySurplus_(0.0), - electricityNetRate_(0.0), electricityNet_(0.0), totalBldgElecDemand_(0.0), totalHVACElecDemand_(0.0), totalElectricDemand_(0.0), - elecProducedPVRate_(0.0), elecProducedWTRate_(0.0), elecProducedStorageRate_(0.0), elecProducedPowerConversionRate_(0.0), - elecProducedCoGenRate_(0.0), pvTotalCapacity_(0.0), windTotalCapacity_(0.0) + numTransformers_(0), setupMeterIndexFlag_(true), elecFacilityMeterIndex_(-1), elecProducedCoGenMeterIndex_(-1), + elecProducedPVMeterIndex_(-1), elecProducedWTMeterIndex_(-1), elecProducedStorageMeterIndex_(-1), + elecProducedPowerConversionMeterIndex_(-1), name_("Whole Building"), facilityPowerInTransformerPresent_(false), numPowerOutTransformers_(0), + wholeBldgRemainingLoad_(0.0), electricityProd_(0.0), electProdRate_(0.0), electricityPurch_(0.0), electPurchRate_(0.0), + electSurplusRate_(0.0), electricitySurplus_(0.0), electricityNetRate_(0.0), electricityNet_(0.0), totalBldgElecDemand_(0.0), + totalHVACElecDemand_(0.0), totalElectricDemand_(0.0), elecProducedPVRate_(0.0), elecProducedWTRate_(0.0), elecProducedStorageRate_(0.0), + elecProducedPowerConversionRate_(0.0), elecProducedCoGenRate_(0.0), pvTotalCapacity_(0.0), windTotalCapacity_(0.0) { } @@ -794,12 +794,12 @@ private: // data int numLoadCenters_; int numTransformers_; bool setupMeterIndexFlag_; // control if object needs to make calls to GetMeterIndex - int elecFacilityIndex_; - int elecProducedCoGenIndex_; - int elecProducedPVIndex_; - int elecProducedWTIndex_; - int elecProducedStorageIndex_; - int elecProducedPowerConversionIndex_; + int elecFacilityMeterIndex_; + int elecProducedCoGenMeterIndex_; + int elecProducedPVMeterIndex_; + int elecProducedWTMeterIndex_; + int elecProducedStorageMeterIndex_; + int elecProducedPowerConversionMeterIndex_; std::string name_; bool facilityPowerInTransformerPresent_; std::string facilityPowerInTransformerName_; // hold name for verificaton and error messages diff --git a/src/EnergyPlus/EnergyPlus.hh b/src/EnergyPlus/EnergyPlus.hh index e683385f5b4..9d1f11abe98 100644 --- a/src/EnergyPlus/EnergyPlus.hh +++ b/src/EnergyPlus/EnergyPlus.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EnergyPlusLogger.cc b/src/EnergyPlus/EnergyPlusLogger.cc index 657f0540798..e0f6e396d00 100644 --- a/src/EnergyPlus/EnergyPlusLogger.cc +++ b/src/EnergyPlus/EnergyPlusLogger.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EnergyPlusLogger.hh b/src/EnergyPlus/EnergyPlusLogger.hh index c30b3960e9a..d553e621c4b 100644 --- a/src/EnergyPlus/EnergyPlusLogger.hh +++ b/src/EnergyPlus/EnergyPlusLogger.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EvaporativeCoolers.cc b/src/EnergyPlus/EvaporativeCoolers.cc index 9332979998a..ea298d9e8a3 100644 --- a/src/EnergyPlus/EvaporativeCoolers.cc +++ b/src/EnergyPlus/EvaporativeCoolers.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -322,7 +322,7 @@ void GetEvapInput(EnergyPlusData &state) SetupOutputVariable(state, "Evaporative Cooler Wet Bulb Effectiveness", - OutputProcessor::Unit::None, + Constant::Units::None, thisEvapCooler.SatEff, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -425,14 +425,14 @@ void GetEvapInput(EnergyPlusData &state) SetupOutputVariable(state, "Evaporative Cooler Wetbulb Effectiveness", - OutputProcessor::Unit::None, + Constant::Units::None, thisEvapCooler.SatEff, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisEvapCooler.Name); SetupOutputVariable(state, "Evaporative Cooler Total Stage Effectiveness", - OutputProcessor::Unit::None, + Constant::Units::None, thisEvapCooler.StageEff, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -555,7 +555,7 @@ void GetEvapInput(EnergyPlusData &state) SetupOutputVariable(state, "Evaporative Cooler Total Stage Effectiveness", - OutputProcessor::Unit::None, + Constant::Units::None, thisEvapCooler.StageEff, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -773,14 +773,14 @@ void GetEvapInput(EnergyPlusData &state) SetupOutputVariable(state, "Evaporative Cooler Total Stage Effectiveness", - OutputProcessor::Unit::None, + Constant::Units::None, thisEvapCooler.StageEff, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisEvapCooler.Name); SetupOutputVariable(state, "Evaporative Cooler Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisEvapCooler.PartLoadFract, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -788,14 +788,14 @@ void GetEvapInput(EnergyPlusData &state) SetupOutputVariable(state, "Evaporative Cooler Dewpoint Bound Status", - OutputProcessor::Unit::None, + Constant::Units::None, thisEvapCooler.DewPointBoundFlag, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisEvapCooler.Name); SetupOutputVariable(state, "Evaporative Cooler Operating Mode Status", - OutputProcessor::Unit::None, + Constant::Units::None, thisEvapCooler.IECOperatingStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -925,7 +925,7 @@ void GetEvapInput(EnergyPlusData &state) SetupOutputVariable(state, "Evaporative Cooler Stage Effectiveness", - OutputProcessor::Unit::None, + Constant::Units::None, thisEvapCooler.StageEff, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -941,19 +941,18 @@ void GetEvapInput(EnergyPlusData &state) // Setup Report variables for the Evap Coolers SetupOutputVariable(state, "Evaporative Cooler Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisEvapCooler.EvapCoolerEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisEvapCooler.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Evaporative Cooler Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisEvapCooler.EvapCoolerPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -962,66 +961,61 @@ void GetEvapInput(EnergyPlusData &state) if (thisEvapCooler.EvapWaterSupplyMode == WaterSupply::FromMains) { SetupOutputVariable(state, "Evaporative Cooler Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisEvapCooler.EvapWaterConsump, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisEvapCooler.Name, + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Water", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Evaporative Cooler Mains Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisEvapCooler.EvapWaterConsump, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisEvapCooler.Name, + Constant::eResource::MainsWater, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "MainsWater", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } else if (thisEvapCooler.EvapWaterSupplyMode == WaterSupply::FromTank) { SetupOutputVariable(state, "Evaporative Cooler Storage Tank Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisEvapCooler.EvapWaterConsump, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisEvapCooler.Name, + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Water", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Evaporative Cooler Starved Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisEvapCooler.EvapWaterStarvMakup, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisEvapCooler.Name, + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Water", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Evaporative Cooler Starved Mains Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisEvapCooler.EvapWaterStarvMakup, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisEvapCooler.Name, + Constant::eResource::MainsWater, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "MainsWater", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } } } @@ -3673,75 +3667,74 @@ void GetInputZoneEvaporativeCoolerUnit(EnergyPlusData &state) auto &thisZoneEvapUnit = ZoneEvapUnit(UnitLoop); SetupOutputVariable(state, "Zone Evaporative Cooler Unit Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisZoneEvapUnit.UnitTotalCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisZoneEvapUnit.Name); SetupOutputVariable(state, "Zone Evaporative Cooler Unit Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZoneEvapUnit.UnitTotalCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZoneEvapUnit.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "ENERGYTRANSFER", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Zone Evaporative Cooler Unit Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisZoneEvapUnit.UnitSensibleCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisZoneEvapUnit.Name); SetupOutputVariable(state, "Zone Evaporative Cooler Unit Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZoneEvapUnit.UnitSensibleCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZoneEvapUnit.Name); SetupOutputVariable(state, "Zone Evaporative Cooler Unit Latent Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisZoneEvapUnit.UnitLatentHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisZoneEvapUnit.Name); SetupOutputVariable(state, "Zone Evaporative Cooler Unit Latent Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZoneEvapUnit.UnitLatentHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZoneEvapUnit.Name); SetupOutputVariable(state, "Zone Evaporative Cooler Unit Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisZoneEvapUnit.UnitLatentCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisZoneEvapUnit.Name); SetupOutputVariable(state, "Zone Evaporative Cooler Unit Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZoneEvapUnit.UnitLatentCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZoneEvapUnit.Name); SetupOutputVariable(state, "Zone Evaporative Cooler Unit Fan Speed Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisZoneEvapUnit.UnitFanSpeedRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisZoneEvapUnit.Name); SetupOutputVariable(state, "Zone Evaporative Cooler Unit Fan Availability Status", - OutputProcessor::Unit::None, + Constant::Units::None, thisZoneEvapUnit.FanAvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3749,7 +3742,7 @@ void GetInputZoneEvaporativeCoolerUnit(EnergyPlusData &state) if (thisZoneEvapUnit.ControlSchemeType != ControlType::ZoneCoolingLoadVariableSpeedFan) { SetupOutputVariable(state, "Zone Evaporative Cooler Unit Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisZoneEvapUnit.UnitPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/EvaporativeCoolers.hh b/src/EnergyPlus/EvaporativeCoolers.hh index 67a90a3d86c..33051c42f1a 100644 --- a/src/EnergyPlus/EvaporativeCoolers.hh +++ b/src/EnergyPlus/EvaporativeCoolers.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EvaporativeFluidCoolers.cc b/src/EnergyPlus/EvaporativeFluidCoolers.cc index ac01a6ad906..fb1009e8239 100644 --- a/src/EnergyPlus/EvaporativeFluidCoolers.cc +++ b/src/EnergyPlus/EvaporativeFluidCoolers.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -984,7 +984,7 @@ namespace EvaporativeFluidCoolers { // Added for fluid bypass SetupOutputVariable(state, "Cooling Tower Bypass Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, this->BypassFraction, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -996,7 +996,7 @@ namespace EvaporativeFluidCoolers { if (this->SuppliedByWaterSystem) { SetupOutputVariable(state, "Cooling Tower Make Up Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->MakeUpVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1004,7 +1004,7 @@ namespace EvaporativeFluidCoolers { SetupOutputVariable(state, "Cooling Tower Make Up Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->MakeUpVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1012,7 +1012,7 @@ namespace EvaporativeFluidCoolers { SetupOutputVariable(state, "Cooling Tower Storage Tank Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->TankSupplyVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1020,20 +1020,19 @@ namespace EvaporativeFluidCoolers { SetupOutputVariable(state, "Cooling Tower Storage Tank Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->TankSupplyVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "Water", - "HeatRejection", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Cooling Tower Starved Storage Tank Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->StarvedMakeUpVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1041,34 +1040,32 @@ namespace EvaporativeFluidCoolers { SetupOutputVariable(state, "Cooling Tower Starved Storage Tank Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->StarvedMakeUpVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "Water", - "HeatRejection", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Cooling Tower Make Up Mains Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->StarvedMakeUpVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::MainsWater, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "MainsWater", - "HeatRejection", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } else { // Evaporative fluid cooler water from mains and gets metered SetupOutputVariable(state, "Cooling Tower Make Up Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->MakeUpVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1076,34 +1073,32 @@ namespace EvaporativeFluidCoolers { SetupOutputVariable(state, "Cooling Tower Make Up Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->MakeUpVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "Water", - "HeatRejection", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Cooling Tower Make Up Mains Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->MakeUpVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::MainsWater, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "MainsWater", - "HeatRejection", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } SetupOutputVariable(state, "Cooling Tower Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->fluidCoolerInletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1111,7 +1106,7 @@ namespace EvaporativeFluidCoolers { SetupOutputVariable(state, "Cooling Tower Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->fluidCoolerOutletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1119,7 +1114,7 @@ namespace EvaporativeFluidCoolers { SetupOutputVariable(state, "Cooling Tower Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->WaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1127,7 +1122,7 @@ namespace EvaporativeFluidCoolers { SetupOutputVariable(state, "Cooling Tower Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Qactual, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1135,7 +1130,7 @@ namespace EvaporativeFluidCoolers { SetupOutputVariable(state, "Cooling Tower Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->FanPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1143,20 +1138,19 @@ namespace EvaporativeFluidCoolers { SetupOutputVariable(state, "Cooling Tower Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->FanEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "Electricity", - "HeatRejection", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Cooling Tower Water Evaporation Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->EvaporationVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1164,7 +1158,7 @@ namespace EvaporativeFluidCoolers { SetupOutputVariable(state, "Cooling Tower Water Evaporation Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->EvaporationVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1172,7 +1166,7 @@ namespace EvaporativeFluidCoolers { SetupOutputVariable(state, "Cooling Tower Water Drift Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->DriftVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1180,7 +1174,7 @@ namespace EvaporativeFluidCoolers { SetupOutputVariable(state, "Cooling Tower Water Drift Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->DriftVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1188,7 +1182,7 @@ namespace EvaporativeFluidCoolers { SetupOutputVariable(state, "Cooling Tower Water Blowdown Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->BlowdownVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1196,7 +1190,7 @@ namespace EvaporativeFluidCoolers { SetupOutputVariable(state, "Cooling Tower Water Blowdown Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->BlowdownVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, diff --git a/src/EnergyPlus/EvaporativeFluidCoolers.hh b/src/EnergyPlus/EvaporativeFluidCoolers.hh index 9d2b97e8da3..19d71ae26b8 100644 --- a/src/EnergyPlus/EvaporativeFluidCoolers.hh +++ b/src/EnergyPlus/EvaporativeFluidCoolers.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ExhaustAirSystemManager.cc b/src/EnergyPlus/ExhaustAirSystemManager.cc index c61e5370ac6..980175529c7 100644 --- a/src/EnergyPlus/ExhaustAirSystemManager.cc +++ b/src/EnergyPlus/ExhaustAirSystemManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -191,7 +191,7 @@ namespace ExhaustAirSystemManager { SetupOutputVariable(state, "Central Exhaust Fan Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisExhSys.centralFan_MassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -199,7 +199,7 @@ namespace ExhaustAirSystemManager { SetupOutputVariable(state, "Central Exhaust Fan Volumetric Flow Rate Standard", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, thisExhSys.centralFan_VolumeFlowRate_Std, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -207,7 +207,7 @@ namespace ExhaustAirSystemManager { SetupOutputVariable(state, "Central Exhaust Fan Volumetric Flow Rate Current", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, thisExhSys.centralFan_VolumeFlowRate_Cur, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -215,7 +215,7 @@ namespace ExhaustAirSystemManager { SetupOutputVariable(state, "Central Exhaust Fan Power", - OutputProcessor::Unit::W, + Constant::Units::W, thisExhSys.centralFan_Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -223,7 +223,7 @@ namespace ExhaustAirSystemManager { SetupOutputVariable(state, "Central Exhaust Fan Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisExhSys.centralFan_Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -266,7 +266,7 @@ namespace ExhaustAirSystemManager { SetupOutputVariable(state, "Central Exhaust Fan Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisExhSys.centralFan_MassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -274,7 +274,7 @@ namespace ExhaustAirSystemManager { SetupOutputVariable(state, "Central Exhaust Fan Volumetric Flow Rate Standard", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, thisExhSys.centralFan_VolumeFlowRate_Std, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -282,7 +282,7 @@ namespace ExhaustAirSystemManager { SetupOutputVariable(state, "Central Exhaust Fan Volumetric Flow Rate Current", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, thisExhSys.centralFan_VolumeFlowRate_Cur, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -290,7 +290,7 @@ namespace ExhaustAirSystemManager { SetupOutputVariable(state, "Central Exhaust Fan Power", - OutputProcessor::Unit::W, + Constant::Units::W, thisExhSys.centralFan_Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -298,7 +298,7 @@ namespace ExhaustAirSystemManager { SetupOutputVariable(state, "Central Exhaust Fan Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisExhSys.centralFan_Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, diff --git a/src/EnergyPlus/ExhaustAirSystemManager.hh b/src/EnergyPlus/ExhaustAirSystemManager.hh index 9ffd895afb3..e39a357a699 100644 --- a/src/EnergyPlus/ExhaustAirSystemManager.hh +++ b/src/EnergyPlus/ExhaustAirSystemManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ExteriorEnergyUse.cc b/src/EnergyPlus/ExteriorEnergyUse.cc index f5293f07e66..262458b500f 100644 --- a/src/EnergyPlus/ExteriorEnergyUse.cc +++ b/src/EnergyPlus/ExteriorEnergyUse.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -114,18 +114,19 @@ namespace ExteriorEnergyUse { using ScheduleManager::GetScheduleName; using namespace OutputReportPredefined; // SUBROUTINE PARAMETER DEFINITIONS: - std::string_view constexpr RoutineName("GetExteriorEnergyUseInput: "); + std::string_view constexpr routineName = "GetExteriorEnergyUseInput"; // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int NumAlphas; // Number of Alphas for each GetObjectItem call int NumNumbers; // Number of Numbers for each GetObjectItem call int IOStatus; // Used in GetObjectItem bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine - std::string TypeString; // Fuel Type string (returned from Validation) std::string EndUseSubcategoryName; Real64 SchMax; // Max value of schedule for item Real64 SchMin; // Min value of schedule for item + auto &ipsc = state.dataIPShortCut; + state.dataExteriorEnergyUse->NumExteriorLights = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, "Exterior:Lights"); state.dataExteriorEnergyUse->ExteriorLights.allocate(state.dataExteriorEnergyUse->NumExteriorLights); @@ -143,36 +144,36 @@ namespace ExteriorEnergyUse { state.dataInputProcessing->inputProcessor->getObjectItem(state, cCurrentModuleObject, Item, - state.dataIPShortCut->cAlphaArgs, + ipsc->cAlphaArgs, NumAlphas, - state.dataIPShortCut->rNumericArgs, + ipsc->rNumericArgs, NumNumbers, IOStatus, - state.dataIPShortCut->lNumericFieldBlanks, - state.dataIPShortCut->lAlphaFieldBlanks, - state.dataIPShortCut->cAlphaFieldNames, - state.dataIPShortCut->cNumericFieldNames); + ipsc->lNumericFieldBlanks, + ipsc->lAlphaFieldBlanks, + ipsc->cAlphaFieldNames, + ipsc->cNumericFieldNames); - state.dataExteriorEnergyUse->ExteriorLights(Item).Name = state.dataIPShortCut->cAlphaArgs(1); - state.dataExteriorEnergyUse->ExteriorLights(Item).SchedPtr = GetScheduleIndex(state, state.dataIPShortCut->cAlphaArgs(2)); + state.dataExteriorEnergyUse->ExteriorLights(Item).Name = ipsc->cAlphaArgs(1); + state.dataExteriorEnergyUse->ExteriorLights(Item).SchedPtr = GetScheduleIndex(state, ipsc->cAlphaArgs(2)); if (state.dataExteriorEnergyUse->ExteriorLights(Item).SchedPtr == 0) { - if (state.dataIPShortCut->lAlphaFieldBlanks(2)) { + if (ipsc->lAlphaFieldBlanks(2)) { ShowSevereError(state, - format("{}{}: {} is required, missing for {}={}", - RoutineName, + format("{}: {}: {} is required, missing for {}={}", + routineName, cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(2), - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); + ipsc->cAlphaFieldNames(2), + ipsc->cAlphaFieldNames(1), + ipsc->cAlphaArgs(1))); } else { ShowSevereError(state, - format("{}{}: invalid {} entered={} for {}={}", - RoutineName, + format("{}: {}: invalid {} entered={} for {}={}", + routineName, cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(2), - state.dataIPShortCut->cAlphaArgs(2), - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); + ipsc->cAlphaFieldNames(2), + ipsc->cAlphaArgs(2), + ipsc->cAlphaFieldNames(1), + ipsc->cAlphaArgs(1))); } ErrorsFound = true; } else { // check min/max on schedule @@ -181,31 +182,29 @@ namespace ExteriorEnergyUse { if (SchMin < 0.0 || SchMax < 0.0) { if (SchMin < 0.0) { ShowSevereError(state, - format("{}{}: invalid {} minimum, is < 0.0 for {}={}", - RoutineName, + format("{}: {}: invalid {} minimum, is < 0.0 for {}={}", + routineName, cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(2), - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - format("{}\". Minimum is [{:.1R}]. Values must be >= 0.0.", state.dataIPShortCut->cAlphaArgs(2), SchMin)); + ipsc->cAlphaFieldNames(2), + ipsc->cAlphaFieldNames(1), + ipsc->cAlphaArgs(1))); + ShowContinueError(state, format("{}\". Minimum is [{:.1R}]. Values must be >= 0.0.", ipsc->cAlphaArgs(2), SchMin)); ErrorsFound = true; } if (SchMax < 0.0) { ShowSevereError(state, - format("{}{}: invalid {} maximum, is < 0.0 for {}={}", - RoutineName, + format("{}: {}: invalid {} maximum, is < 0.0 for {}={}", + routineName, cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(2), - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - format("{}\". Maximum is [{:.1R}]. Values must be >= 0.0.", state.dataIPShortCut->cAlphaArgs(2), SchMax)); + ipsc->cAlphaFieldNames(2), + ipsc->cAlphaFieldNames(1), + ipsc->cAlphaArgs(1))); + ShowContinueError(state, format("{}\". Maximum is [{:.1R}]. Values must be >= 0.0.", ipsc->cAlphaArgs(2), SchMax)); ErrorsFound = true; } } } - if (state.dataIPShortCut->lAlphaFieldBlanks(3)) { + if (ipsc->lAlphaFieldBlanks(3)) { state.dataExteriorEnergyUse->ExteriorLights(Item).ControlMode = ExteriorEnergyUse::LightControlType::ScheduleOnly; } else if (Util::SameString(state.dataIPShortCut->cAlphaArgs(3), "ScheduleNameOnly")) { state.dataExteriorEnergyUse->ExteriorLights(Item).ControlMode = ExteriorEnergyUse::LightControlType::ScheduleOnly; @@ -213,8 +212,8 @@ namespace ExteriorEnergyUse { state.dataExteriorEnergyUse->ExteriorLights(Item).ControlMode = ExteriorEnergyUse::LightControlType::AstroClockOverride; } else { ShowSevereError(state, - format("{}{}: invalid {} entered={} for {}={}", - RoutineName, + format("{}: {}: invalid {} entered={} for {}={}", + routineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3), @@ -241,7 +240,7 @@ namespace ExteriorEnergyUse { SetupOutputVariable(state, "Exterior Lights Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataExteriorEnergyUse->ExteriorLights(Item).Power, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -249,14 +248,13 @@ namespace ExteriorEnergyUse { SetupOutputVariable(state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataExteriorEnergyUse->ExteriorLights(Item).CurrentUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataExteriorEnergyUse->ExteriorLights(Item).Name, - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, EndUseSubcategoryName); // entries for predefined tables @@ -304,8 +302,12 @@ namespace ExteriorEnergyUse { state.dataIPShortCut->cAlphaFieldNames(1), ErrorsFound); + ErrorObjectHeader eoh{routineName, ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1)}; + ++state.dataExteriorEnergyUse->NumExteriorEqs; - state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).Name = state.dataIPShortCut->cAlphaArgs(1); + + auto &exteriorEquip = state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs); + exteriorEquip.Name = state.dataIPShortCut->cAlphaArgs(1); if (NumAlphas > 3) { EndUseSubcategoryName = state.dataIPShortCut->cAlphaArgs(4); @@ -313,128 +315,103 @@ namespace ExteriorEnergyUse { EndUseSubcategoryName = "General"; } - state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).FuelType = - static_cast(getEnumValue(Constant::eFuelNamesUC, state.dataIPShortCut->cAlphaArgs(2))); - TypeString = Constant::eFuelNames[static_cast( - state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).FuelType)]; + if (state.dataIPShortCut->lAlphaFieldBlanks(2)) { + ShowSevereEmptyField(state, eoh, ipsc->cAlphaFieldNames(2)); + ErrorsFound = true; - if (state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).FuelType == Constant::eFuel::Invalid) { - if (state.dataIPShortCut->lAlphaFieldBlanks(2)) { - ShowSevereError(state, - format("{}{}: {} is required, missing for {}={}", - RoutineName, - cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(2), - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); - } else { - ShowSevereError(state, - format("{}{}: invalid {} entered={} for {}={}", - RoutineName, - cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(2), - state.dataIPShortCut->cAlphaArgs(2), - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); - } + } else if ((exteriorEquip.FuelType = static_cast( + getEnumValue(Constant::eFuelNamesUC, Util::makeUPPER(ipsc->cAlphaArgs(2))))) == Constant::eFuel::Invalid) { + ShowSevereInvalidKey(state, eoh, ipsc->cAlphaFieldNames(2), ipsc->cAlphaArgs(2)); ErrorsFound = true; + + } else if (exteriorEquip.FuelType != Constant::eFuel::Water) { + SetupOutputVariable(state, + "Exterior Equipment Fuel Rate", + Constant::Units::W, + exteriorEquip.Power, + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Average, + exteriorEquip.Name); + SetupOutputVariable(state, + format("Exterior Equipment {} Energy", Constant::eFuelNames[(int)exteriorEquip.FuelType]), + Constant::Units::J, + exteriorEquip.CurrentUse, + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Summed, + exteriorEquip.Name, + Constant::eFuel2eResource[(int)exteriorEquip.FuelType], + OutputProcessor::SOVEndUseCat::ExteriorEquipment, + EndUseSubcategoryName); } else { - if (state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).FuelType != Constant::eFuel::Water) { - SetupOutputVariable(state, - "Exterior Equipment Fuel Rate", - OutputProcessor::Unit::W, - state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).Power, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Average, - state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).Name); - SetupOutputVariable(state, - "Exterior Equipment " + TypeString + " Energy", - OutputProcessor::Unit::J, - state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).CurrentUse, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, - state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).Name, - {}, - TypeString, - "ExteriorEquipment", - EndUseSubcategoryName); - } else { - SetupOutputVariable(state, - "Exterior Equipment Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, - state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).Power, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Average, - state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).Name); - SetupOutputVariable(state, - "Exterior Equipment " + TypeString + " Volume", - OutputProcessor::Unit::m3, - state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).CurrentUse, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, - state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).Name, - {}, - TypeString, - "ExteriorEquipment", - EndUseSubcategoryName); - } + SetupOutputVariable(state, + "Exterior Equipment Water Volume Flow Rate", + Constant::Units::m3_s, + exteriorEquip.Power, + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Average, + exteriorEquip.Name); + SetupOutputVariable(state, + format("Exterior Equipment {} Volume", Constant::eFuelNames[(int)exteriorEquip.FuelType]), + Constant::Units::m3, + exteriorEquip.CurrentUse, + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Summed, + exteriorEquip.Name, + Constant::eFuel2eResource[(int)exteriorEquip.FuelType], + OutputProcessor::SOVEndUseCat::ExteriorEquipment, + EndUseSubcategoryName); } - state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).SchedPtr = - GetScheduleIndex(state, state.dataIPShortCut->cAlphaArgs(3)); - if (state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).SchedPtr == 0) { - if (state.dataIPShortCut->lAlphaFieldBlanks(3)) { + + exteriorEquip.SchedPtr = GetScheduleIndex(state, ipsc->cAlphaArgs(3)); + if (exteriorEquip.SchedPtr == 0) { + if (ipsc->lAlphaFieldBlanks(3)) { ShowSevereError(state, - format("{}{}: {} is required, missing for {}={}", - RoutineName, + format("{}: {}: {} is required, missing for {}={}", + routineName, cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(3), - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); + ipsc->cAlphaFieldNames(3), + ipsc->cAlphaFieldNames(1), + ipsc->cAlphaArgs(1))); } else { ShowSevereError(state, - format("{}{}: invalid {} entered={} for {}={}", - RoutineName, + format("{}: {}: invalid {} entered={} for {}={}", + routineName, cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(3), - state.dataIPShortCut->cAlphaArgs(3), - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); + ipsc->cAlphaFieldNames(3), + ipsc->cAlphaArgs(3), + ipsc->cAlphaFieldNames(1), + ipsc->cAlphaArgs(1))); } ErrorsFound = true; } else { // check min/max on schedule - SchMin = - GetScheduleMinValue(state, state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).SchedPtr); - SchMax = - GetScheduleMaxValue(state, state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).SchedPtr); + SchMin = GetScheduleMinValue(state, exteriorEquip.SchedPtr); + SchMax = GetScheduleMaxValue(state, exteriorEquip.SchedPtr); if (SchMin < 0.0 || SchMax < 0.0) { if (SchMin < 0.0) { ShowSevereError(state, - format("{}{}: invalid {} minimum, is < 0.0 for {}={}", - RoutineName, + format("{}: {}: invalid {} minimum, is < 0.0 for {}={}", + routineName, cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(3), - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - format("{}\". Minimum is [{:.1R}]. Values must be >= 0.0.", state.dataIPShortCut->cAlphaArgs(3), SchMin)); + ipsc->cAlphaFieldNames(3), + ipsc->cAlphaFieldNames(1), + ipsc->cAlphaArgs(1))); + ShowContinueError(state, format("{}\". Minimum is [{:.1R}]. Values must be >= 0.0.", ipsc->cAlphaArgs(3), SchMin)); ErrorsFound = true; } if (SchMax < 0.0) { ShowSevereError(state, - format("{}{}: invalid {} maximum, is < 0.0 for {}={}", - RoutineName, + format("{}: {}: invalid {} maximum, is < 0.0 for {}={}", + routineName, cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(3), - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - format("{}\". Maximum is [{:.1R}]. Values must be >= 0.0.", state.dataIPShortCut->cAlphaArgs(3), SchMax)); + ipsc->cAlphaFieldNames(3), + ipsc->cAlphaFieldNames(1), + ipsc->cAlphaArgs(1))); + ShowContinueError(state, format("{}\". Maximum is [{:.1R}]. Values must be >= 0.0.", ipsc->cAlphaArgs(3), SchMax)); ErrorsFound = true; } } } - state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).DesignLevel = - state.dataIPShortCut->rNumericArgs(1); + exteriorEquip.DesignLevel = ipsc->rNumericArgs(1); } // ================================= Get Exterior Water Equipment @@ -444,123 +421,117 @@ namespace ExteriorEnergyUse { state.dataInputProcessing->inputProcessor->getObjectItem(state, cCurrentModuleObject, Item, - state.dataIPShortCut->cAlphaArgs, + ipsc->cAlphaArgs, NumAlphas, - state.dataIPShortCut->rNumericArgs, + ipsc->rNumericArgs, NumNumbers, IOStatus, - state.dataIPShortCut->lNumericFieldBlanks, - state.dataIPShortCut->lAlphaFieldBlanks, - state.dataIPShortCut->cAlphaFieldNames, - state.dataIPShortCut->cNumericFieldNames); + ipsc->lNumericFieldBlanks, + ipsc->lAlphaFieldBlanks, + ipsc->cAlphaFieldNames, + ipsc->cNumericFieldNames); GlobalNames::VerifyUniqueInterObjectName(state, state.dataExteriorEnergyUse->UniqueExteriorEquipNames, - state.dataIPShortCut->cAlphaArgs(1), + ipsc->cAlphaArgs(1), cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(1), + ipsc->cAlphaFieldNames(1), ErrorsFound); ++state.dataExteriorEnergyUse->NumExteriorEqs; - state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).Name = state.dataIPShortCut->cAlphaArgs(1); - state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).FuelType = Constant::eFuel::Water; - state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).SchedPtr = - GetScheduleIndex(state, state.dataIPShortCut->cAlphaArgs(3)); - if (state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).SchedPtr == 0) { - if (state.dataIPShortCut->lAlphaFieldBlanks(3)) { + + auto &exteriorEquip = state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs); + exteriorEquip.Name = ipsc->cAlphaArgs(1); + exteriorEquip.FuelType = Constant::eFuel::Water; + exteriorEquip.SchedPtr = GetScheduleIndex(state, ipsc->cAlphaArgs(3)); + if (exteriorEquip.SchedPtr == 0) { + if (ipsc->lAlphaFieldBlanks(3)) { ShowSevereError(state, - format("{}{}: {} is required, missing for {}={}", - RoutineName, + format("{}: {}: {} is required, missing for {}={}", + routineName, cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(3), - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); + ipsc->cAlphaFieldNames(3), + ipsc->cAlphaFieldNames(1), + ipsc->cAlphaArgs(1))); } else { ShowSevereError(state, - format("{}{}: invalid {} entered={} for {}={}", - RoutineName, + format("{}: {}: invalid {} entered={} for {}={}", + routineName, cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(3), - state.dataIPShortCut->cAlphaArgs(3), - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); + ipsc->cAlphaFieldNames(3), + ipsc->cAlphaArgs(3), + ipsc->cAlphaFieldNames(1), + ipsc->cAlphaArgs(1))); } ErrorsFound = true; } else { // check min/max on schedule - SchMin = - GetScheduleMinValue(state, state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).SchedPtr); - SchMax = - GetScheduleMaxValue(state, state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).SchedPtr); + SchMin = GetScheduleMinValue(state, exteriorEquip.SchedPtr); + SchMax = GetScheduleMaxValue(state, exteriorEquip.SchedPtr); if (SchMin < 0.0 || SchMax < 0.0) { if (SchMin < 0.0) { ShowSevereError(state, - format("{}{}: invalid {} minimum, is < 0.0 for {}={}", - RoutineName, + format("{}: {}: invalid {} minimum, is < 0.0 for {}={}", + routineName, cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(3), - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - format("{}\". Minimum is [{:.1R}]. Values must be >= 0.0.", state.dataIPShortCut->cAlphaArgs(3), SchMin)); + ipsc->cAlphaFieldNames(3), + ipsc->cAlphaFieldNames(1), + ipsc->cAlphaArgs(1))); + ShowContinueError(state, format("{}\". Minimum is [{:.1R}]. Values must be >= 0.0.", ipsc->cAlphaArgs(3), SchMin)); ErrorsFound = true; } if (SchMax < 0.0) { ShowSevereError(state, - format("{}{}: invalid {} maximum, is < 0.0 for {}={}", - RoutineName, + format("{}: {}: invalid {} maximum, is < 0.0 for {}={}", + routineName, cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(3), - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - format("{}\". Maximum is [{:.1R}]. Values must be >= 0.0.", state.dataIPShortCut->cAlphaArgs(3), SchMax)); + ipsc->cAlphaFieldNames(3), + ipsc->cAlphaFieldNames(1), + ipsc->cAlphaArgs(1))); + ShowContinueError(state, format("{}\". Maximum is [{:.1R}]. Values must be >= 0.0.", ipsc->cAlphaArgs(3), SchMax)); ErrorsFound = true; } } } if (NumAlphas > 3) { - EndUseSubcategoryName = state.dataIPShortCut->cAlphaArgs(4); + EndUseSubcategoryName = ipsc->cAlphaArgs(4); } else { EndUseSubcategoryName = "General"; } - state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).DesignLevel = - state.dataIPShortCut->rNumericArgs(1); + exteriorEquip.DesignLevel = ipsc->rNumericArgs(1); SetupOutputVariable(state, "Exterior Equipment Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, - state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).Power, + Constant::Units::m3_s, + exteriorEquip.Power, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).Name); + exteriorEquip.Name); SetupOutputVariable(state, "Exterior Equipment Water Volume", - OutputProcessor::Unit::m3, - state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).CurrentUse, + Constant::Units::m3, + exteriorEquip.CurrentUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).Name, - {}, - "Water", - "ExteriorEquipment", + exteriorEquip.Name, + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::ExteriorEquipment, EndUseSubcategoryName); SetupOutputVariable(state, "Exterior Equipment Mains Water Volume", - OutputProcessor::Unit::m3, - state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).CurrentUse, + Constant::Units::m3, + exteriorEquip.CurrentUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataExteriorEnergyUse->ExteriorEquipment(state.dataExteriorEnergyUse->NumExteriorEqs).Name, - {}, - "MainsWater", - "ExteriorEquipment", + exteriorEquip.Name, + Constant::eResource::MainsWater, + OutputProcessor::SOVEndUseCat::ExteriorEquipment, EndUseSubcategoryName); } if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in input. Program terminates.", RoutineName)); + ShowFatalError(state, format("{}Errors found in input. Program terminates.", routineName)); } } diff --git a/src/EnergyPlus/ExteriorEnergyUse.hh b/src/EnergyPlus/ExteriorEnergyUse.hh index 9b7ec59d54e..070eabbb16e 100644 --- a/src/EnergyPlus/ExteriorEnergyUse.hh +++ b/src/EnergyPlus/ExteriorEnergyUse.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ExternalInterface.cc b/src/EnergyPlus/ExternalInterface.cc index 3068eebf8e1..502409d65f4 100644 --- a/src/EnergyPlus/ExternalInterface.cc +++ b/src/EnergyPlus/ExternalInterface.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -2401,35 +2401,35 @@ void GetReportVariableKey( // Gets the sensor key index and type for the specified variable key and name // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - OutputProcessor::VariableType varType(OutputProcessor::VariableType::NotFound); // 0=not found, 1=integer, 2=real, 3=meter + OutputProcessor::VariableType varType(OutputProcessor::VariableType::Invalid); // 0=not found, 1=integer, 2=real, 3=meter int numKeys(0); // Number of keys found OutputProcessor::StoreType varAvgSum(OutputProcessor::StoreType::Averaged); // Variable is Averaged=1 or Summed=2 OutputProcessor::TimeStepType varStepType(OutputProcessor::TimeStepType::Zone); // Variable time step is Zone=1 or HVAC=2 - OutputProcessor::Unit varUnits(OutputProcessor::Unit::None); // Units sting, may be blank - Array1D_int keyIndexes; // Array index for - Array1D_string NamesOfKeys; // Specific key name - int Loop, iKey; // Loop counters + Constant::Units varUnits(Constant::Units::None); // Units sting, may be blank + Array1D_string keyNames; + Array1D_int keyIndexes; // Array index for + int Loop, iKey; // Loop counters // Get pointers for variables to be sent to Ptolemy for (Loop = 1; Loop <= numberOfKeys; ++Loop) { GetVariableKeyCountandType(state, VarNames(Loop), numKeys, varType, varAvgSum, varStepType, varUnits); - if (varType != OutputProcessor::VariableType::NotFound) { - NamesOfKeys.allocate(numKeys); + if (varType != OutputProcessor::VariableType::Invalid) { keyIndexes.allocate(numKeys); - GetVariableKeys(state, VarNames(Loop), varType, NamesOfKeys, keyIndexes); + keyNames.allocate(numKeys); + GetVariableKeys(state, VarNames(Loop), varType, keyNames, keyIndexes); // Find key index whose keyName is equal to keyNames(Loop) - int max(NamesOfKeys.size()); + int max(keyIndexes.size()); for (iKey = 1; iKey <= max; ++iKey) { - if (NamesOfKeys(iKey) == varKeys(Loop)) { + if (keyNames(iKey) == varKeys(Loop)) { keyVarIndexes(Loop) = keyIndexes(iKey); varTypes(Loop) = varType; break; } } keyIndexes.deallocate(); - NamesOfKeys.deallocate(); + keyNames.deallocate(); } - if ((varType == OutputProcessor::VariableType::NotFound) || (iKey > numKeys)) { + if ((varType == OutputProcessor::VariableType::Invalid) || (iKey > numKeys)) { ShowSevereError(state, format("ExternalInterface: Simulation model has no variable \"{}\" with key \"{}\".", VarNames(Loop), varKeys(Loop))); state.dataExternalInterface->ErrorsFound = true; diff --git a/src/EnergyPlus/ExternalInterface.hh b/src/EnergyPlus/ExternalInterface.hh index e99ec2308aa..ab20eff0912 100644 --- a/src/EnergyPlus/ExternalInterface.hh +++ b/src/EnergyPlus/ExternalInterface.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -126,7 +126,7 @@ namespace ExternalInterface { // Default Constructor eplusOutputVariableType() - : Name(std::string()), VarKey(std::string()), RTSValue(0.0), ITSValue(0), VarIndex(0), VarType(OutputProcessor::VariableType::NotFound), + : Name(std::string()), VarKey(std::string()), RTSValue(0.0), ITSValue(0), VarIndex(0), VarType(OutputProcessor::VariableType::Invalid), VarUnits(std::string()) { } diff --git a/src/EnergyPlus/FanCoilUnits.cc b/src/EnergyPlus/FanCoilUnits.cc index f8b2fa0207c..a0aee8a8243 100644 --- a/src/EnergyPlus/FanCoilUnits.cc +++ b/src/EnergyPlus/FanCoilUnits.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -877,56 +877,56 @@ namespace FanCoilUnits { // CurrentModuleObject='ZoneHVAC:FourPipeFanCoil' SetupOutputVariable(state, "Fan Coil Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, fanCoil.HeatPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, fanCoil.Name); SetupOutputVariable(state, "Fan Coil Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, fanCoil.HeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, fanCoil.Name); SetupOutputVariable(state, "Fan Coil Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, fanCoil.TotCoolPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, fanCoil.Name); SetupOutputVariable(state, "Fan Coil Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, fanCoil.TotCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, fanCoil.Name); SetupOutputVariable(state, "Fan Coil Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, fanCoil.SensCoolPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, fanCoil.Name); SetupOutputVariable(state, "Fan Coil Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, fanCoil.SensCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, fanCoil.Name); SetupOutputVariable(state, "Fan Coil Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, fanCoil.ElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, fanCoil.Name); SetupOutputVariable(state, "Fan Coil Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, fanCoil.ElecEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -934,14 +934,14 @@ namespace FanCoilUnits { if (fanCoil.CapCtrlMeth_Num == CCM::CycFan || fanCoil.CapCtrlMeth_Num == CCM::MultiSpeedFan) { SetupOutputVariable(state, "Fan Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, fanCoil.PLR, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, fanCoil.Name); SetupOutputVariable(state, "Fan Coil Fan Speed Level", - OutputProcessor::Unit::None, + Constant::Units::None, fanCoil.SpeedFanSel, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -949,14 +949,14 @@ namespace FanCoilUnits { if (fanCoil.CapCtrlMeth_Num == CCM::MultiSpeedFan) { SetupOutputVariable(state, "Fan Coil Speed Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, fanCoil.SpeedRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, fanCoil.Name); SetupOutputVariable(state, "Fan Coil Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, fanCoil.PLR, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -966,7 +966,7 @@ namespace FanCoilUnits { if (fanCoil.CapCtrlMeth_Num == CCM::VarFanVarFlow || fanCoil.CapCtrlMeth_Num == CCM::VarFanConsFlow) { SetupOutputVariable(state, "Fan Coil Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, fanCoil.PLR, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -974,7 +974,7 @@ namespace FanCoilUnits { } SetupOutputVariable(state, "Fan Coil Availability Status", - OutputProcessor::Unit::None, + Constant::Units::None, fanCoil.AvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/FanCoilUnits.hh b/src/EnergyPlus/FanCoilUnits.hh index 68e33ae0c66..300a6dd400a 100644 --- a/src/EnergyPlus/FanCoilUnits.hh +++ b/src/EnergyPlus/FanCoilUnits.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Fans.cc b/src/EnergyPlus/Fans.cc index 62745e042e2..6c86e82c2af 100644 --- a/src/EnergyPlus/Fans.cc +++ b/src/EnergyPlus/Fans.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -944,40 +944,39 @@ void GetFanInput(EnergyPlusData &state) // Setup Report variables for the Fans CurrentModuleObject='Fans' SetupOutputVariable(state, "Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisFan.FanPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisFan.FanName); SetupOutputVariable(state, "Fan Rise in Air Temperature", - OutputProcessor::Unit::deltaC, + Constant::Units::deltaC, thisFan.DeltaTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisFan.FanName); SetupOutputVariable(state, "Fan Heat Gain to Air", - OutputProcessor::Unit::W, + Constant::Units::W, thisFan.PowerLossToAir, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisFan.FanName); SetupOutputVariable(state, "Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisFan.FanEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisFan.FanName, - {}, - "Electricity", - "Fans", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Fans, thisFan.EndUseSubcategoryName, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Fan Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisFan.OutletAirMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -985,14 +984,14 @@ void GetFanInput(EnergyPlusData &state) if ((thisFan.FanType_Num == DataHVACGlobals::FanType_ZoneExhaust) && (thisFan.BalancedFractSchedNum > 0)) { SetupOutputVariable(state, "Fan Unbalanced Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisFan.UnbalancedOutletMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisFan.FanName); SetupOutputVariable(state, "Fan Balanced Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisFan.BalancedOutletMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1024,7 +1023,7 @@ void GetFanInput(EnergyPlusData &state) FanNum = NumSimpFan + NumVarVolFan + NumZoneExhFan + OnOffFanNum; SetupOutputVariable(state, "Fan Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, Fan(FanNum).FanRuntimeFraction, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/Fans.hh b/src/EnergyPlus/Fans.hh index 1d51b97266d..c2a82e516c1 100644 --- a/src/EnergyPlus/Fans.hh +++ b/src/EnergyPlus/Fans.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/FaultsManager.cc b/src/EnergyPlus/FaultsManager.cc index bb232f21803..99e70f52453 100644 --- a/src/EnergyPlus/FaultsManager.cc +++ b/src/EnergyPlus/FaultsManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -1808,7 +1808,7 @@ namespace FaultsManager { SetupOutputVariable(state, "Coil Fouling Factor", - OutputProcessor::Unit::K_W, + Constant::Units::K_W, state.dataWaterCoils->WaterCoil(CoilNum).FaultyCoilFoulingFactor, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1819,7 +1819,7 @@ namespace FaultsManager { if (state.dataWaterCoils->WaterCoil(CoilNum).WaterCoilType == DataPlant::PlantEquipmentType::CoilWaterCooling) { SetupOutputVariable(state, "Cooling Coil Total U Factor Times Area Value", - OutputProcessor::Unit::W_K, + Constant::Units::W_K, state.dataWaterCoils->WaterCoil(CoilNum).UACoilTotal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1827,7 +1827,7 @@ namespace FaultsManager { SetupOutputVariable(state, "Cooling Coil External U Factor Times Area Value", - OutputProcessor::Unit::W_K, + Constant::Units::W_K, state.dataWaterCoils->WaterCoil(CoilNum).UACoilExternal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1835,7 +1835,7 @@ namespace FaultsManager { SetupOutputVariable(state, "Cooling Coil Internal U Factor Times Area Value", - OutputProcessor::Unit::W_K, + Constant::Units::W_K, state.dataWaterCoils->WaterCoil(CoilNum).UACoilInternal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1843,7 +1843,7 @@ namespace FaultsManager { SetupOutputVariable(state, "Cooling Coil Total U Factor Times Area Value Before Fouling", - OutputProcessor::Unit::W_K, + Constant::Units::W_K, state.dataWaterCoils->WaterCoil(CoilNum).OriginalUACoilVariable, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1851,7 +1851,7 @@ namespace FaultsManager { SetupOutputVariable(state, "Cooling Coil External U Factor Times Area Value Before Fouling", - OutputProcessor::Unit::W_K, + Constant::Units::W_K, state.dataWaterCoils->WaterCoil(CoilNum).OriginalUACoilExternal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1859,7 +1859,7 @@ namespace FaultsManager { SetupOutputVariable(state, "Cooling Coil Internal U Factor Times Area Value Before Fouling", - OutputProcessor::Unit::W_K, + Constant::Units::W_K, state.dataWaterCoils->WaterCoil(CoilNum).OriginalUACoilInternal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1868,7 +1868,7 @@ namespace FaultsManager { } else { SetupOutputVariable(state, "Heating Coil U Factor Times Area Value Before Fouling", - OutputProcessor::Unit::W_K, + Constant::Units::W_K, state.dataWaterCoils->WaterCoil(CoilNum).OriginalUACoilVariable, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/FaultsManager.hh b/src/EnergyPlus/FaultsManager.hh index 5462348e9b8..99580560386 100644 --- a/src/EnergyPlus/FaultsManager.hh +++ b/src/EnergyPlus/FaultsManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/FileSystem.cc b/src/EnergyPlus/FileSystem.cc index 1ed21def7b4..2566f738473 100644 --- a/src/EnergyPlus/FileSystem.cc +++ b/src/EnergyPlus/FileSystem.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/FileSystem.hh b/src/EnergyPlus/FileSystem.hh index a8c31c20300..91f5754ece6 100644 --- a/src/EnergyPlus/FileSystem.hh +++ b/src/EnergyPlus/FileSystem.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/FluidCoolers.cc b/src/EnergyPlus/FluidCoolers.cc index aa82c01c825..038e7a355cc 100644 --- a/src/EnergyPlus/FluidCoolers.cc +++ b/src/EnergyPlus/FluidCoolers.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -425,51 +425,50 @@ void FluidCoolerspecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Cooling Tower Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->InletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->OutletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->WaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Qactual, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->FanPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Cooling Tower Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->FanEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "Electricity", - "HeatRejection", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } bool FluidCoolerspecs::validateSingleSpeedInputs(EnergyPlusData &state, diff --git a/src/EnergyPlus/FluidCoolers.hh b/src/EnergyPlus/FluidCoolers.hh index 26555a2c857..e2eb719ea5a 100644 --- a/src/EnergyPlus/FluidCoolers.hh +++ b/src/EnergyPlus/FluidCoolers.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/FluidProperties.cc b/src/EnergyPlus/FluidProperties.cc index 9b19cd717c5..c4353b32718 100644 --- a/src/EnergyPlus/FluidProperties.cc +++ b/src/EnergyPlus/FluidProperties.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/FluidProperties.hh b/src/EnergyPlus/FluidProperties.hh index 10748a41bb1..313a068cec4 100644 --- a/src/EnergyPlus/FluidProperties.hh +++ b/src/EnergyPlus/FluidProperties.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/FromChars.hh b/src/EnergyPlus/FromChars.hh index fcb0b6858fb..67946dde35f 100644 --- a/src/EnergyPlus/FromChars.hh +++ b/src/EnergyPlus/FromChars.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/FuelCellElectricGenerator.cc b/src/EnergyPlus/FuelCellElectricGenerator.cc index ab2d04705fb..10070a4f7f1 100644 --- a/src/EnergyPlus/FuelCellElectricGenerator.cc +++ b/src/EnergyPlus/FuelCellElectricGenerator.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -1098,7 +1098,7 @@ namespace FuelCellElectricGenerator { { SetupOutputVariable(state, "Generator Produced AC Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.ACPowerGen, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1106,20 +1106,19 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Produced AC Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.ACEnergyGen, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::ElectricityProduced, + OutputProcessor::SOVEndUseCat::Cogeneration, {}, - "ElectricityProduced", - "COGENERATION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Generator Produced Thermal Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.qHX, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1127,33 +1126,31 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Produced Thermal Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.HXenergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Cogeneration, {}, - "ENERGYTRANSFER", - "COGENERATION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Generator Fuel HHV Basis Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.FuelEnergyHHV, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::NaturalGas, + OutputProcessor::SOVEndUseCat::Cogeneration, {}, - "NaturalGas", - "COGENERATION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Generator Fuel HHV Basis Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.FuelEnergyUseRateHHV, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1161,7 +1158,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Zone Sensible Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.SkinLossPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1169,7 +1166,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Zone Sensible Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.SkinLossEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1177,7 +1174,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Zone Convection Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.SkinLossConvect, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1185,7 +1182,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Zone Radiation Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.SkinLossRadiat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1204,7 +1201,7 @@ namespace FuelCellElectricGenerator { if (state.dataGlobal->DisplayAdvancedReportVariables) { // show extra data originally needed for detailed comparative testing SetupOutputVariable(state, "Generator Air Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.TairInlet, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1212,7 +1209,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Power Module Entering Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.TairIntoFCPM, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1220,7 +1217,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Air Molar Flow Rate", - OutputProcessor::Unit::kmol_s, + Constant::Units::kmol_s, this->Report.NdotAir, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1228,7 +1225,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Power Module Entering Air Enthalpy", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.TotAirInEnthalphy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1236,7 +1233,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Blower Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.BlowerPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1244,7 +1241,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Blower Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.BlowerEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1252,7 +1249,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Blower Skin Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.BlowerSkinLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1260,7 +1257,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Fuel Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.TfuelInlet, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1268,7 +1265,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Power Module Entering Fuel Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.TfuelIntoFCPM, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1276,7 +1273,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Fuel Molar Flow Rate", - OutputProcessor::Unit::kmol_s, + Constant::Units::kmol_s, this->Report.NdotFuel, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1284,7 +1281,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Fuel Consumption LHV Basis Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.FuelEnergyLHV, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1292,7 +1289,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Fuel Consumption Rate LHV Basis", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.FuelEnergyUseRateLHV, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1300,7 +1297,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Power Module Entering Fuel Enthalpy", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.TotFuelInEnthalpy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1308,7 +1305,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Fuel Compressor Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.FuelCompressPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1316,7 +1313,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Fuel Compressor Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.FuelCompressEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1324,7 +1321,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Fuel Compressor Skin Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.FuelCompressSkinLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1332,7 +1329,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Fuel Reformer Water Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.TwaterInlet, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1340,7 +1337,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Power Module Entering Reforming Water Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.TwaterIntoFCPM, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1348,7 +1345,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Fuel Reformer Water Molar Flow Rate", - OutputProcessor::Unit::kmol_s, + Constant::Units::kmol_s, this->Report.NdotWater, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1356,7 +1353,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Fuel Reformer Water Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.WaterPumpPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1364,7 +1361,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Fuel Reformer Water Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.WaterPumpEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1372,7 +1369,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Power Module Entering Reforming Water Enthalpy", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.WaterIntoFCPMEnthalpy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1380,7 +1377,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Product Gas Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.TprodGas, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1388,7 +1385,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Product Gas Enthalpy", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.EnthalProdGas, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1396,7 +1393,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Product Gas Molar Flow Rate", - OutputProcessor::Unit::kmol_s, + Constant::Units::kmol_s, this->Report.NdotProdGas, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1404,7 +1401,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Product Gas Ar Molar Flow Rate", - OutputProcessor::Unit::kmol_s, + Constant::Units::kmol_s, this->Report.NdotProdAr, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1412,7 +1409,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Product Gas CO2 Molar Flow Rate", - OutputProcessor::Unit::kmol_s, + Constant::Units::kmol_s, this->Report.NdotProdCO2, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1420,7 +1417,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Product Gas H2O Vapor Molar Flow Rate", - OutputProcessor::Unit::kmol_s, + Constant::Units::kmol_s, this->Report.NdotProdH2O, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1428,7 +1425,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Product Gas N2 Molar Flow Rate", - OutputProcessor::Unit::kmol_s, + Constant::Units::kmol_s, this->Report.NdotProdN2, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1436,7 +1433,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Product Gas O2 Molar Flow Rate", - OutputProcessor::Unit::kmol_s, + Constant::Units::kmol_s, this->Report.NdotProdO2, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1444,7 +1441,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Heat Recovery Exit Gas Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.THXexh, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1452,7 +1449,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Heat Recovery Exit Gas H2O Vapor Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, this->Report.WaterVaporFractExh, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1460,7 +1457,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Heat Recovery Water Condensate Molar Flow Rate", - OutputProcessor::Unit::kmol_s, + Constant::Units::kmol_s, this->Report.CondensateRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1468,7 +1465,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Inverter Loss Power", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.PCUlosses, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1476,7 +1473,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Produced DC Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.DCPowerGen, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1484,7 +1481,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator DC Power Efficiency", - OutputProcessor::Unit::None, + Constant::Units::None, this->Report.DCPowerEff, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1492,7 +1489,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Electric Storage Charge State", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.ElectEnergyinStorage, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1500,7 +1497,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator DC Storage Charging Power", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.StoredPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1508,7 +1505,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator DC Storage Charging Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.StoredEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1516,7 +1513,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator DC Storage Discharging Power", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.DrawnPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1524,7 +1521,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator DC Storage Discharging Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.DrawnEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1532,7 +1529,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Ancillary AC Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.ACancillariesPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1540,7 +1537,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Ancillary AC Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.ACancillariesEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1548,7 +1545,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Fuel Cell Model Iteration Count", - OutputProcessor::Unit::None, + Constant::Units::None, this->Report.SeqSubstIterations, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1556,7 +1553,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Root Solver Iteration Count", - OutputProcessor::Unit::None, + Constant::Units::None, this->Report.RegulaFalsiIterations, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1564,7 +1561,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Number of Cycles", - OutputProcessor::Unit::None, + Constant::Units::None, this->Report.NumCycles, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1572,7 +1569,7 @@ namespace FuelCellElectricGenerator { SetupOutputVariable(state, "Generator Power Module Skin Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.FCPMSkinLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/FuelCellElectricGenerator.hh b/src/EnergyPlus/FuelCellElectricGenerator.hh index 3d446e90ebc..865ebef3154 100644 --- a/src/EnergyPlus/FuelCellElectricGenerator.hh +++ b/src/EnergyPlus/FuelCellElectricGenerator.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Furnaces.cc b/src/EnergyPlus/Furnaces.cc index 888941cb16d..ef16657bc20 100644 --- a/src/EnergyPlus/Furnaces.cc +++ b/src/EnergyPlus/Furnaces.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -4535,7 +4535,7 @@ namespace Furnaces { // Setup Report variables for the Furnace that are not reported in the components themselves SetupOutputVariable(state, "Unitary System Fan Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisFurnace.FanPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -4557,7 +4557,7 @@ namespace Furnaces { // Setup Report variables for Unitary System that are not reported in the components themselves SetupOutputVariable(state, "Unitary System Fan Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisFurnace.FanPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -4579,14 +4579,14 @@ namespace Furnaces { // Setup Report variables for the Furnace that are not reported in the components themselves SetupOutputVariable(state, "Unitary System Fan Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisFurnace.FanPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisFurnace.Name); SetupOutputVariable(state, "Unitary System Compressor Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisFurnace.CompPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -4632,14 +4632,14 @@ namespace Furnaces { // Setup Report variables for Unitary System that are not reported in the components themselves SetupOutputVariable(state, "Unitary System Fan Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisFurnace.FanPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisFurnace.Name); SetupOutputVariable(state, "Unitary System Compressor Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisFurnace.CompPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -4684,21 +4684,21 @@ namespace Furnaces { // Setup Report variables for Unitary System that are not reported in the components themselves SetupOutputVariable(state, "Unitary System Fan Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisFurnace.FanPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisFurnace.Name); SetupOutputVariable(state, "Unitary System Compressor Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisFurnace.CompPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisFurnace.Name); SetupOutputVariable(state, "Unitary System Dehumidification Induced Heating Demand Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisFurnace.DehumidInducedHeatingDemandRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -4723,42 +4723,42 @@ namespace Furnaces { // Setup Report variables for Unitary System that are not reported in the components themselves SetupOutputVariable(state, "Unitary System Fan Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisFurnace.FanPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisFurnace.Name); SetupOutputVariable(state, "Unitary System Compressor Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisFurnace.CompPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisFurnace.Name); SetupOutputVariable(state, "Unitary System Requested Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisFurnace.CoolingCoilSensDemand, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisFurnace.Name); SetupOutputVariable(state, "Unitary System Requested Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisFurnace.CoolingCoilLatentDemand, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisFurnace.Name); SetupOutputVariable(state, "Unitary System Requested Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisFurnace.HeatingCoilSensDemand, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisFurnace.Name); SetupOutputVariable(state, "Unitary System Dehumidification Induced Heating Demand Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisFurnace.DehumidInducedHeatingDemandRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/Furnaces.hh b/src/EnergyPlus/Furnaces.hh index 0ff1758b119..b1ac8b3e5a9 100644 --- a/src/EnergyPlus/Furnaces.hh +++ b/src/EnergyPlus/Furnaces.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/General.cc b/src/EnergyPlus/General.cc index f95237c8654..65a1dd95fed 100644 --- a/src/EnergyPlus/General.cc +++ b/src/EnergyPlus/General.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -64,7 +64,6 @@ #include #include #include -#include #include #include diff --git a/src/EnergyPlus/General.hh b/src/EnergyPlus/General.hh index b867b5a8c05..6a7383d194c 100644 --- a/src/EnergyPlus/General.hh +++ b/src/EnergyPlus/General.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GeneralRoutines.cc b/src/EnergyPlus/GeneralRoutines.cc index 88d3c39e212..9eac4560c9c 100644 --- a/src/EnergyPlus/GeneralRoutines.cc +++ b/src/EnergyPlus/GeneralRoutines.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GeneralRoutines.hh b/src/EnergyPlus/GeneralRoutines.hh index 0dab98fbb04..529b551e3ab 100644 --- a/src/EnergyPlus/GeneralRoutines.hh +++ b/src/EnergyPlus/GeneralRoutines.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GeneratorDynamicsManager.cc b/src/EnergyPlus/GeneratorDynamicsManager.cc index 1b1373fc96b..f20c5159d5b 100644 --- a/src/EnergyPlus/GeneratorDynamicsManager.cc +++ b/src/EnergyPlus/GeneratorDynamicsManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GeneratorDynamicsManager.hh b/src/EnergyPlus/GeneratorDynamicsManager.hh index ca5537462c2..de10999e7e4 100644 --- a/src/EnergyPlus/GeneratorDynamicsManager.hh +++ b/src/EnergyPlus/GeneratorDynamicsManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GeneratorFuelSupply.cc b/src/EnergyPlus/GeneratorFuelSupply.cc index 97ca5ea329d..ebbe59af1ac 100644 --- a/src/EnergyPlus/GeneratorFuelSupply.cc +++ b/src/EnergyPlus/GeneratorFuelSupply.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GeneratorFuelSupply.hh b/src/EnergyPlus/GeneratorFuelSupply.hh index 1290355c316..8593eb45276 100644 --- a/src/EnergyPlus/GeneratorFuelSupply.hh +++ b/src/EnergyPlus/GeneratorFuelSupply.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GlobalNames.cc b/src/EnergyPlus/GlobalNames.cc index 4df7f0f2ebe..85029613843 100644 --- a/src/EnergyPlus/GlobalNames.cc +++ b/src/EnergyPlus/GlobalNames.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GlobalNames.hh b/src/EnergyPlus/GlobalNames.hh index 13112da8317..7779714ba7e 100644 --- a/src/EnergyPlus/GlobalNames.hh +++ b/src/EnergyPlus/GlobalNames.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundHeatExchangers.cc b/src/EnergyPlus/GroundHeatExchangers.cc index 09232479fea..184dde80b57 100644 --- a/src/EnergyPlus/GroundHeatExchangers.cc +++ b/src/EnergyPlus/GroundHeatExchangers.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -2518,49 +2518,49 @@ void GLHEBase::setupOutput(EnergyPlusData &state) { SetupOutputVariable(state, "Ground Heat Exchanger Average Borehole Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->bhTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Ground Heat Exchanger Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QGLHE, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Ground Heat Exchanger Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->inletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Ground Heat Exchanger Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->outletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Ground Heat Exchanger Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->massFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Ground Heat Exchanger Average Fluid Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->aveFluidTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Ground Heat Exchanger Farfield Ground Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->tempGround, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/GroundHeatExchangers.hh b/src/EnergyPlus/GroundHeatExchangers.hh index 3d3db16654e..b25a201fdea 100644 --- a/src/EnergyPlus/GroundHeatExchangers.hh +++ b/src/EnergyPlus/GroundHeatExchangers.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/BaseGroundTemperatureModel.hh b/src/EnergyPlus/GroundTemperatureModeling/BaseGroundTemperatureModel.hh index 8911ad52fff..bb06d658b56 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/BaseGroundTemperatureModel.hh +++ b/src/EnergyPlus/GroundTemperatureModeling/BaseGroundTemperatureModel.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/FiniteDifferenceGroundTemperatureModel.cc b/src/EnergyPlus/GroundTemperatureModeling/FiniteDifferenceGroundTemperatureModel.cc index 0fd074e70d5..7cb4a0bb2b1 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/FiniteDifferenceGroundTemperatureModel.cc +++ b/src/EnergyPlus/GroundTemperatureModeling/FiniteDifferenceGroundTemperatureModel.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/FiniteDifferenceGroundTemperatureModel.hh b/src/EnergyPlus/GroundTemperatureModeling/FiniteDifferenceGroundTemperatureModel.hh index ab04b37bd28..83422a21780 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/FiniteDifferenceGroundTemperatureModel.hh +++ b/src/EnergyPlus/GroundTemperatureModeling/FiniteDifferenceGroundTemperatureModel.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/GroundTemperatureModelManager.cc b/src/EnergyPlus/GroundTemperatureModeling/GroundTemperatureModelManager.cc index 795254c01e6..913d2c0403e 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/GroundTemperatureModelManager.cc +++ b/src/EnergyPlus/GroundTemperatureModeling/GroundTemperatureModelManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/GroundTemperatureModelManager.hh b/src/EnergyPlus/GroundTemperatureModeling/GroundTemperatureModelManager.hh index 52462b36668..18d2bd65c4c 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/GroundTemperatureModelManager.hh +++ b/src/EnergyPlus/GroundTemperatureModeling/GroundTemperatureModelManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/KusudaAchenbachGroundTemperatureModel.cc b/src/EnergyPlus/GroundTemperatureModeling/KusudaAchenbachGroundTemperatureModel.cc index 8dc4986227e..950331d122b 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/KusudaAchenbachGroundTemperatureModel.cc +++ b/src/EnergyPlus/GroundTemperatureModeling/KusudaAchenbachGroundTemperatureModel.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/KusudaAchenbachGroundTemperatureModel.hh b/src/EnergyPlus/GroundTemperatureModeling/KusudaAchenbachGroundTemperatureModel.hh index 7f8e2e13bbd..0a7156bfc72 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/KusudaAchenbachGroundTemperatureModel.hh +++ b/src/EnergyPlus/GroundTemperatureModeling/KusudaAchenbachGroundTemperatureModel.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/SiteBuildingSurfaceGroundTemperatures.cc b/src/EnergyPlus/GroundTemperatureModeling/SiteBuildingSurfaceGroundTemperatures.cc index f11aa458cbd..3bff2068ed4 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/SiteBuildingSurfaceGroundTemperatures.cc +++ b/src/EnergyPlus/GroundTemperatureModeling/SiteBuildingSurfaceGroundTemperatures.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/SiteBuildingSurfaceGroundTemperatures.hh b/src/EnergyPlus/GroundTemperatureModeling/SiteBuildingSurfaceGroundTemperatures.hh index 0f47eea54d8..6fedf548608 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/SiteBuildingSurfaceGroundTemperatures.hh +++ b/src/EnergyPlus/GroundTemperatureModeling/SiteBuildingSurfaceGroundTemperatures.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/SiteDeepGroundTemperatures.cc b/src/EnergyPlus/GroundTemperatureModeling/SiteDeepGroundTemperatures.cc index 0b789c4f120..5e2561e8588 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/SiteDeepGroundTemperatures.cc +++ b/src/EnergyPlus/GroundTemperatureModeling/SiteDeepGroundTemperatures.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/SiteDeepGroundTemperatures.hh b/src/EnergyPlus/GroundTemperatureModeling/SiteDeepGroundTemperatures.hh index 25df4149e9d..1c899f46518 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/SiteDeepGroundTemperatures.hh +++ b/src/EnergyPlus/GroundTemperatureModeling/SiteDeepGroundTemperatures.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/SiteFCFactorMethodGroundTemperatures.cc b/src/EnergyPlus/GroundTemperatureModeling/SiteFCFactorMethodGroundTemperatures.cc index 6c06b546b09..7b3e780a5c4 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/SiteFCFactorMethodGroundTemperatures.cc +++ b/src/EnergyPlus/GroundTemperatureModeling/SiteFCFactorMethodGroundTemperatures.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/SiteFCFactorMethodGroundTemperatures.hh b/src/EnergyPlus/GroundTemperatureModeling/SiteFCFactorMethodGroundTemperatures.hh index e1ab2067dbb..6e59240ff8c 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/SiteFCFactorMethodGroundTemperatures.hh +++ b/src/EnergyPlus/GroundTemperatureModeling/SiteFCFactorMethodGroundTemperatures.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/SiteShallowGroundTemperatures.cc b/src/EnergyPlus/GroundTemperatureModeling/SiteShallowGroundTemperatures.cc index e0629f61588..05bfb920ed7 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/SiteShallowGroundTemperatures.cc +++ b/src/EnergyPlus/GroundTemperatureModeling/SiteShallowGroundTemperatures.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/SiteShallowGroundTemperatures.hh b/src/EnergyPlus/GroundTemperatureModeling/SiteShallowGroundTemperatures.hh index fa8050549c7..9334d00489b 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/SiteShallowGroundTemperatures.hh +++ b/src/EnergyPlus/GroundTemperatureModeling/SiteShallowGroundTemperatures.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/XingGroundTemperatureModel.cc b/src/EnergyPlus/GroundTemperatureModeling/XingGroundTemperatureModel.cc index 866475f9001..3f9701fb3c2 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/XingGroundTemperatureModel.cc +++ b/src/EnergyPlus/GroundTemperatureModeling/XingGroundTemperatureModel.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/XingGroundTemperatureModel.hh b/src/EnergyPlus/GroundTemperatureModeling/XingGroundTemperatureModel.hh index 08e19bf53c0..924f6566a0c 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/XingGroundTemperatureModel.hh +++ b/src/EnergyPlus/GroundTemperatureModeling/XingGroundTemperatureModel.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACControllers.cc b/src/EnergyPlus/HVACControllers.cc index 788b20c7286..54619d7bc78 100644 --- a/src/EnergyPlus/HVACControllers.cc +++ b/src/EnergyPlus/HVACControllers.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACControllers.hh b/src/EnergyPlus/HVACControllers.hh index d940edee5f2..629d3729c2b 100644 --- a/src/EnergyPlus/HVACControllers.hh +++ b/src/EnergyPlus/HVACControllers.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACCooledBeam.cc b/src/EnergyPlus/HVACCooledBeam.cc index 5d8f2d693b8..694f5a58429 100644 --- a/src/EnergyPlus/HVACCooledBeam.cc +++ b/src/EnergyPlus/HVACCooledBeam.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -373,59 +373,57 @@ namespace HVACCooledBeam { // CurrentModuleObject = "AirTerminal:SingleDuct:ConstantVolume:CooledBeam" SetupOutputVariable(state, "Zone Air Terminal Beam Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, CoolBeam(CBNum).BeamCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, CoolBeam(CBNum).Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "ENERGYTRANSFER", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Zone Air Terminal Beam Chilled Water Energy", - OutputProcessor::Unit::J, + Constant::Units::J, CoolBeam(CBNum).BeamCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, CoolBeam(CBNum).Name, + Constant::eResource::PlantLoopCoolingDemand, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "PLANTLOOPCOOLINGDEMAND", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Zone Air Terminal Beam Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, CoolBeam(CBNum).BeamCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, CoolBeam(CBNum).Name); SetupOutputVariable(state, "Zone Air Terminal Supply Air Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, CoolBeam(CBNum).SupAirCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, CoolBeam(CBNum).Name); SetupOutputVariable(state, "Zone Air Terminal Supply Air Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, CoolBeam(CBNum).SupAirCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, CoolBeam(CBNum).Name); SetupOutputVariable(state, "Zone Air Terminal Supply Air Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, CoolBeam(CBNum).SupAirHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, CoolBeam(CBNum).Name); SetupOutputVariable(state, "Zone Air Terminal Supply Air Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, CoolBeam(CBNum).SupAirHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -433,7 +431,7 @@ namespace HVACCooledBeam { SetupOutputVariable(state, "Zone Air Terminal Outdoor Air Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, CoolBeam(CBNum).OutdoorAirFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/HVACCooledBeam.hh b/src/EnergyPlus/HVACCooledBeam.hh index 0e741304eb9..8c3e389bb0d 100644 --- a/src/EnergyPlus/HVACCooledBeam.hh +++ b/src/EnergyPlus/HVACCooledBeam.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACDXHeatPumpSystem.cc b/src/EnergyPlus/HVACDXHeatPumpSystem.cc index a82518d383a..fe56374b8a3 100644 --- a/src/EnergyPlus/HVACDXHeatPumpSystem.cc +++ b/src/EnergyPlus/HVACDXHeatPumpSystem.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -414,7 +414,7 @@ namespace HVACDXHeatPumpSystem { // Setup Report variables for the DXHeatingSystem that is not reported in the components themselves SetupOutputVariable(state, "Coil System Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, DXHeatPumpSystem(DXHeatSysNum).PartLoadFrac, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/HVACDXHeatPumpSystem.hh b/src/EnergyPlus/HVACDXHeatPumpSystem.hh index f3ca7296b28..a470c5710fd 100644 --- a/src/EnergyPlus/HVACDXHeatPumpSystem.hh +++ b/src/EnergyPlus/HVACDXHeatPumpSystem.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACDuct.cc b/src/EnergyPlus/HVACDuct.cc index d448f8d3cd2..f470ec36024 100644 --- a/src/EnergyPlus/HVACDuct.cc +++ b/src/EnergyPlus/HVACDuct.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACDuct.hh b/src/EnergyPlus/HVACDuct.hh index 8f3fac43974..205c0c385e6 100644 --- a/src/EnergyPlus/HVACDuct.hh +++ b/src/EnergyPlus/HVACDuct.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACFan.cc b/src/EnergyPlus/HVACFan.cc index 8d934d8e3c8..e9531024d4c 100644 --- a/src/EnergyPlus/HVACFan.cc +++ b/src/EnergyPlus/HVACFan.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -605,40 +605,39 @@ namespace HVACFan { SetupOutputVariable(state, "Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, m_fanPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, "Fan Rise in Air Temperature", - OutputProcessor::Unit::deltaC, + Constant::Units::deltaC, m_deltaTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, "Fan Heat Gain to Air", - OutputProcessor::Unit::W, + Constant::Units::W, m_powerLossToAir, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, "Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, m_fanEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name, - {}, - "Electricity", - "Fans", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Fans, m_endUseSubcategoryName, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Fan Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, m_outletAirMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -646,7 +645,7 @@ namespace HVACFan { if (speedControl == SpeedControlMethod::Discrete && m_numSpeeds == 1) { SetupOutputVariable(state, "Fan Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, m_fanRunTimeFractionAtSpeed[0], OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -655,7 +654,7 @@ namespace HVACFan { for (int speedLoop = 0; speedLoop < m_numSpeeds; ++speedLoop) { SetupOutputVariable(state, "Fan Runtime Fraction Speed " + fmt::to_string(speedLoop + 1), - OutputProcessor::Unit::None, + Constant::Units::None, m_fanRunTimeFractionAtSpeed[speedLoop], OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/HVACFan.hh b/src/EnergyPlus/HVACFan.hh index c764c61b1bf..c0983e9a94e 100644 --- a/src/EnergyPlus/HVACFan.hh +++ b/src/EnergyPlus/HVACFan.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACFourPipeBeam.cc b/src/EnergyPlus/HVACFourPipeBeam.cc index 79ca6563ccd..b6d911f97a1 100644 --- a/src/EnergyPlus/HVACFourPipeBeam.cc +++ b/src/EnergyPlus/HVACFourPipeBeam.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -391,19 +391,18 @@ namespace FourPipeBeam { if (thisBeam->beamCoolingPresent) { SetupOutputVariable(state, "Zone Air Terminal Beam Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisBeam->beamCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisBeam->name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "ENERGYTRANSFER", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Zone Air Terminal Beam Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisBeam->beamCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -412,19 +411,18 @@ namespace FourPipeBeam { if (thisBeam->beamHeatingPresent) { SetupOutputVariable(state, "Zone Air Terminal Beam Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisBeam->beamHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisBeam->name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "ENERGYTRANSFER", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Zone Air Terminal Beam Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisBeam->beamHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -432,35 +430,35 @@ namespace FourPipeBeam { } SetupOutputVariable(state, "Zone Air Terminal Primary Air Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisBeam->supAirCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisBeam->name); SetupOutputVariable(state, "Zone Air Terminal Primary Air Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisBeam->supAirCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisBeam->name); SetupOutputVariable(state, "Zone Air Terminal Primary Air Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisBeam->supAirHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisBeam->name); SetupOutputVariable(state, "Zone Air Terminal Primary Air Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisBeam->supAirHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisBeam->name); SetupOutputVariable(state, "Zone Air Terminal Primary Air Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, thisBeam->primAirFlow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -468,7 +466,7 @@ namespace FourPipeBeam { SetupOutputVariable(state, "Zone Air Terminal Outdoor Air Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, thisBeam->OutdoorAirFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/HVACFourPipeBeam.hh b/src/EnergyPlus/HVACFourPipeBeam.hh index 4bc9911fd73..c8b6c537e11 100644 --- a/src/EnergyPlus/HVACFourPipeBeam.hh +++ b/src/EnergyPlus/HVACFourPipeBeam.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACHXAssistedCoolingCoil.cc b/src/EnergyPlus/HVACHXAssistedCoolingCoil.cc index 1f75e0cf4ef..4bad6a59634 100644 --- a/src/EnergyPlus/HVACHXAssistedCoolingCoil.cc +++ b/src/EnergyPlus/HVACHXAssistedCoolingCoil.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACHXAssistedCoolingCoil.hh b/src/EnergyPlus/HVACHXAssistedCoolingCoil.hh index e418dd6b6ec..f55a5417a2e 100644 --- a/src/EnergyPlus/HVACHXAssistedCoolingCoil.hh +++ b/src/EnergyPlus/HVACHXAssistedCoolingCoil.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACInterfaceManager.cc b/src/EnergyPlus/HVACInterfaceManager.cc index e55b8e9631b..22c05ff3976 100644 --- a/src/EnergyPlus/HVACInterfaceManager.cc +++ b/src/EnergyPlus/HVACInterfaceManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -1127,21 +1127,21 @@ void SetupCommonPipes(EnergyPlusData &state) thisCommonPipe.CommonPipeType = DataPlant::CommonPipeType::Single; SetupOutputVariable(state, "Plant Common Pipe Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisCommonPipe.Flow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisPlantLoop.Name); SetupOutputVariable(state, "Plant Common Pipe Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisCommonPipe.Temp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisPlantLoop.Name); SetupOutputVariable(state, "Plant Common Pipe Flow Direction Status", - OutputProcessor::Unit::None, + Constant::Units::None, thisCommonPipe.FlowDir, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1159,28 +1159,28 @@ void SetupCommonPipes(EnergyPlusData &state) thisCommonPipe.CommonPipeType = DataPlant::CommonPipeType::TwoWay; SetupOutputVariable(state, "Plant Common Pipe Primary Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisCommonPipe.PriCPLegFlow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisPlantLoop.Name); SetupOutputVariable(state, "Plant Common Pipe Secondary Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisCommonPipe.SecCPLegFlow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisPlantLoop.Name); SetupOutputVariable(state, "Plant Common Pipe Primary to Secondary Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisCommonPipe.PriToSecFlow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisPlantLoop.Name); SetupOutputVariable(state, "Plant Common Pipe Secondary to Primary Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisCommonPipe.SecToPriFlow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/HVACInterfaceManager.hh b/src/EnergyPlus/HVACInterfaceManager.hh index 0fe59847a08..13bdc7a0b14 100644 --- a/src/EnergyPlus/HVACInterfaceManager.hh +++ b/src/EnergyPlus/HVACInterfaceManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACManager.cc b/src/EnergyPlus/HVACManager.cc index 44e4ac90373..861ddc3ab12 100644 --- a/src/EnergyPlus/HVACManager.cc +++ b/src/EnergyPlus/HVACManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -78,6 +78,7 @@ #include #include #include +#include #include #include #include @@ -246,7 +247,7 @@ void ManageHVAC(EnergyPlusData &state) } } } - + IndoorGreen::SimIndoorGreen(state); InternalHeatGains::UpdateInternalGainValues(state, true, true); ZoneTempPredictorCorrector::ManageZoneAirUpdates(state, @@ -264,7 +265,6 @@ void ManageHVAC(EnergyPlusData &state) PriorTimeStep); SimHVAC(state); - if (state.dataGlobal->AnyIdealCondEntSetPointInModel && state.dataGlobal->MetersHaveBeenInitialized && !state.dataGlobal->WarmupFlag) { state.dataGlobal->RunOptCondEntTemp = true; while (state.dataGlobal->RunOptCondEntTemp) { @@ -712,28 +712,28 @@ void SimHVAC(EnergyPlusData &state) if (!state.dataHVACMgr->SimHVACIterSetup) { SetupOutputVariable(state, "HVAC System Solver Iteration Count", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataHVACMgr->HVACManageIteration, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, "SimHVAC"); SetupOutputVariable(state, "Air System Solver Iteration Count", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataHVACMgr->RepIterAir, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, "SimHVAC"); SetupOutputVariable(state, "Air System Relief Air Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->SysTotalHVACReliefHeatLoss, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, "SimHVAC"); SetupOutputVariable(state, "HVAC System Total Heat Rejection Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->SysTotalHVACRejectHeatLoss, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -751,14 +751,14 @@ void SimHVAC(EnergyPlusData &state) if (state.dataPlnt->TotNumLoops > 0) { SetupOutputVariable(state, "Plant Solver Sub Iteration Count", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataPlnt->PlantManageSubIterations, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, "SimHVAC"); SetupOutputVariable(state, "Plant Solver Half Loop Calls Count", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataPlnt->PlantManageHalfLoopCalls, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, diff --git a/src/EnergyPlus/HVACManager.hh b/src/EnergyPlus/HVACManager.hh index 841ba2889e9..d48cffc1223 100644 --- a/src/EnergyPlus/HVACManager.hh +++ b/src/EnergyPlus/HVACManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACMultiSpeedHeatPump.cc b/src/EnergyPlus/HVACMultiSpeedHeatPump.cc index 1c7307c5802..2a87130f7d1 100644 --- a/src/EnergyPlus/HVACMultiSpeedHeatPump.cc +++ b/src/EnergyPlus/HVACMultiSpeedHeatPump.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -1588,122 +1588,120 @@ namespace HVACMultiSpeedHeatPump { // Setup Report Variables for MSHP Equipment SetupOutputVariable(state, "Unitary System Ancillary Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisMSHeatPump.AuxElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisMSHeatPump.Name); SetupOutputVariable(state, "Unitary System Cooling Ancillary Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisMSHPReport.AuxElecCoolConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisMSHeatPump.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Unitary System Heating Ancillary Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisMSHPReport.AuxElecHeatConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisMSHeatPump.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "Heating", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Unitary System Fan Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisMSHeatPump.FanPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisMSHeatPump.Name); SetupOutputVariable(state, "Unitary System Compressor Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisMSHeatPump.CompPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisMSHeatPump.Name); SetupOutputVariable(state, "Unitary System Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisMSHeatPump.ElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisMSHeatPump.Name); SetupOutputVariable(state, "Unitary System Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisMSHPReport.ElecPowerConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisMSHeatPump.Name); SetupOutputVariable(state, "Unitary System DX Coil Cycling Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisMSHPReport.CycRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisMSHeatPump.Name); SetupOutputVariable(state, "Unitary System DX Coil Speed Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisMSHPReport.SpeedRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisMSHeatPump.Name); SetupOutputVariable(state, "Unitary System DX Coil Speed Level", - OutputProcessor::Unit::None, + Constant::Units::None, thisMSHPReport.SpeedNum, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisMSHeatPump.Name); SetupOutputVariable(state, "Unitary System Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisMSHeatPump.TotCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisMSHeatPump.Name); SetupOutputVariable(state, "Unitary System Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisMSHeatPump.TotHeatEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisMSHeatPump.Name); SetupOutputVariable(state, "Unitary System Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisMSHeatPump.SensCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisMSHeatPump.Name); SetupOutputVariable(state, "Unitary System Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisMSHeatPump.SensHeatEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisMSHeatPump.Name); SetupOutputVariable(state, "Unitary System Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisMSHeatPump.LatCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisMSHeatPump.Name); SetupOutputVariable(state, "Unitary System Latent Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisMSHeatPump.LatHeatEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1711,35 +1709,35 @@ namespace HVACMultiSpeedHeatPump { if (thisMSHeatPump.HeatRecActive) { SetupOutputVariable(state, "Unitary System Heat Recovery Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisMSHeatPump.HeatRecoveryRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisMSHeatPump.Name); SetupOutputVariable(state, "Unitary System Heat Recovery Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisMSHeatPump.HeatRecoveryInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisMSHeatPump.Name); SetupOutputVariable(state, "Unitary System Heat Recovery Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisMSHeatPump.HeatRecoveryOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisMSHeatPump.Name); SetupOutputVariable(state, "Unitary System Heat Recovery Fluid Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisMSHeatPump.HeatRecoveryMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisMSHeatPump.Name); SetupOutputVariable(state, "Unitary System Heat Recovery Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisMSHPReport.HeatRecoveryEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, diff --git a/src/EnergyPlus/HVACMultiSpeedHeatPump.hh b/src/EnergyPlus/HVACMultiSpeedHeatPump.hh index b39e2b7c571..acd78858462 100644 --- a/src/EnergyPlus/HVACMultiSpeedHeatPump.hh +++ b/src/EnergyPlus/HVACMultiSpeedHeatPump.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACSingleDuctInduc.cc b/src/EnergyPlus/HVACSingleDuctInduc.cc index 76bc507f1e6..d955d2b01b7 100644 --- a/src/EnergyPlus/HVACSingleDuctInduc.cc +++ b/src/EnergyPlus/HVACSingleDuctInduc.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -443,7 +443,7 @@ namespace HVACSingleDuctInduc { // report variable for all single duct air terminals SetupOutputVariable(state, "Zone Air Terminal Outdoor Air Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHVACSingleDuctInduc->IndUnit(IUNum).OutdoorAirFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/HVACSingleDuctInduc.hh b/src/EnergyPlus/HVACSingleDuctInduc.hh index a6ea45b0ee2..94bd5c9877b 100644 --- a/src/EnergyPlus/HVACSingleDuctInduc.hh +++ b/src/EnergyPlus/HVACSingleDuctInduc.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACSizingSimulationManager.cc b/src/EnergyPlus/HVACSizingSimulationManager.cc index e1f04b388c3..9dd268ccea2 100644 --- a/src/EnergyPlus/HVACSizingSimulationManager.cc +++ b/src/EnergyPlus/HVACSizingSimulationManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACSizingSimulationManager.hh b/src/EnergyPlus/HVACSizingSimulationManager.hh index 40822ddf271..02b5d2901f2 100644 --- a/src/EnergyPlus/HVACSizingSimulationManager.hh +++ b/src/EnergyPlus/HVACSizingSimulationManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACStandAloneERV.cc b/src/EnergyPlus/HVACStandAloneERV.cc index 1e51ed3711f..5feb260f008 100644 --- a/src/EnergyPlus/HVACStandAloneERV.cc +++ b/src/EnergyPlus/HVACStandAloneERV.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -993,42 +993,42 @@ void GetStandAloneERV(EnergyPlusData &state) auto &standAloneERV = state.dataHVACStandAloneERV->StandAloneERV(StandAloneERVIndex); SetupOutputVariable(state, "Zone Ventilator Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, standAloneERV.SensCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, standAloneERV.Name); SetupOutputVariable(state, "Zone Ventilator Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, standAloneERV.SensCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, standAloneERV.Name); SetupOutputVariable(state, "Zone Ventilator Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, standAloneERV.LatCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, standAloneERV.Name); SetupOutputVariable(state, "Zone Ventilator Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, standAloneERV.LatCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, standAloneERV.Name); SetupOutputVariable(state, "Zone Ventilator Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, standAloneERV.TotCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, standAloneERV.Name); SetupOutputVariable(state, "Zone Ventilator Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, standAloneERV.TotCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1036,42 +1036,42 @@ void GetStandAloneERV(EnergyPlusData &state) SetupOutputVariable(state, "Zone Ventilator Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, standAloneERV.SensHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, standAloneERV.Name); SetupOutputVariable(state, "Zone Ventilator Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, standAloneERV.SensHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, standAloneERV.Name); SetupOutputVariable(state, "Zone Ventilator Latent Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, standAloneERV.LatHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, standAloneERV.Name); SetupOutputVariable(state, "Zone Ventilator Latent Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, standAloneERV.LatHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, standAloneERV.Name); SetupOutputVariable(state, "Zone Ventilator Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, standAloneERV.TotHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, standAloneERV.Name); SetupOutputVariable(state, "Zone Ventilator Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, standAloneERV.TotHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1079,21 +1079,21 @@ void GetStandAloneERV(EnergyPlusData &state) SetupOutputVariable(state, "Zone Ventilator Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, standAloneERV.ElecUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, standAloneERV.Name); SetupOutputVariable(state, "Zone Ventilator Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, standAloneERV.ElecUseEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, standAloneERV.Name); SetupOutputVariable(state, "Zone Ventilator Supply Fan Availability Status", - OutputProcessor::Unit::None, + Constant::Units::None, standAloneERV.AvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/HVACStandAloneERV.hh b/src/EnergyPlus/HVACStandAloneERV.hh index eccfcb82546..4df0cbb79bd 100644 --- a/src/EnergyPlus/HVACStandAloneERV.hh +++ b/src/EnergyPlus/HVACStandAloneERV.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACSystemRootFindingAlgorithm.hh b/src/EnergyPlus/HVACSystemRootFindingAlgorithm.hh index 3c588cb7dde..4d6da61cbe8 100644 --- a/src/EnergyPlus/HVACSystemRootFindingAlgorithm.hh +++ b/src/EnergyPlus/HVACSystemRootFindingAlgorithm.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACUnitaryBypassVAV.cc b/src/EnergyPlus/HVACUnitaryBypassVAV.cc index 4a51fac6acb..7e2a5f6f171 100644 --- a/src/EnergyPlus/HVACUnitaryBypassVAV.cc +++ b/src/EnergyPlus/HVACUnitaryBypassVAV.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -1198,133 +1198,133 @@ namespace HVACUnitaryBypassVAV { auto &thisCBVAV = state.dataHVACUnitaryBypassVAV->CBVAV(CBVAVNum); SetupOutputVariable(state, "Unitary System Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCBVAV.TotHeatEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCBVAV.Name); SetupOutputVariable(state, "Unitary System Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCBVAV.TotHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisCBVAV.Name); SetupOutputVariable(state, "Unitary System Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCBVAV.TotCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCBVAV.Name); SetupOutputVariable(state, "Unitary System Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCBVAV.TotCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisCBVAV.Name); SetupOutputVariable(state, "Unitary System Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCBVAV.SensHeatEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCBVAV.Name); SetupOutputVariable(state, "Unitary System Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCBVAV.SensHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisCBVAV.Name); SetupOutputVariable(state, "Unitary System Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCBVAV.SensCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCBVAV.Name); SetupOutputVariable(state, "Unitary System Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCBVAV.SensCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisCBVAV.Name); SetupOutputVariable(state, "Unitary System Latent Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCBVAV.LatHeatEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCBVAV.Name); SetupOutputVariable(state, "Unitary System Latent Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCBVAV.LatHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisCBVAV.Name); SetupOutputVariable(state, "Unitary System Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCBVAV.LatCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCBVAV.Name); SetupOutputVariable(state, "Unitary System Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCBVAV.LatCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisCBVAV.Name); SetupOutputVariable(state, "Unitary System Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCBVAV.ElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCBVAV.Name); SetupOutputVariable(state, "Unitary System Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCBVAV.ElecConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisCBVAV.Name); SetupOutputVariable(state, "Unitary System Fan Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisCBVAV.FanPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCBVAV.Name); SetupOutputVariable(state, "Unitary System Compressor Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisCBVAV.CompPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCBVAV.Name); SetupOutputVariable(state, "Unitary System Bypass Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisCBVAV.BypassMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCBVAV.Name); SetupOutputVariable(state, "Unitary System Air Outlet Setpoint Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisCBVAV.OutletTempSetPoint, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCBVAV.Name); SetupOutputVariable(state, "Unitary System Operating Mode Index", - OutputProcessor::Unit::None, + Constant::Units::None, thisCBVAV.HeatCoolMode, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/HVACUnitaryBypassVAV.hh b/src/EnergyPlus/HVACUnitaryBypassVAV.hh index a2c5d144ed1..99c2ee70d4b 100644 --- a/src/EnergyPlus/HVACUnitaryBypassVAV.hh +++ b/src/EnergyPlus/HVACUnitaryBypassVAV.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc index d0e65502f05..185036c1e56 100644 --- a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc +++ b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -4795,61 +4795,60 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (thisVrfTU.CoolingCoilPresent) { SetupOutputVariable(state, "Zone VRF Air Terminal Cooling Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrfTU.ParasiticCoolElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrfTU.Name); SetupOutputVariable(state, "Zone VRF Air Terminal Cooling Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisVrfTU.ParasiticElecCoolConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisVrfTU.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Zone VRF Air Terminal Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrfTU.TotalCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrfTU.Name); SetupOutputVariable(state, "Zone VRF Air Terminal Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrfTU.SensibleCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrfTU.Name); SetupOutputVariable(state, "Zone VRF Air Terminal Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrfTU.LatentCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrfTU.Name); SetupOutputVariable(state, "Zone VRF Air Terminal Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisVrfTU.TotalCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisVrfTU.Name); SetupOutputVariable(state, "Zone VRF Air Terminal Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisVrfTU.SensibleCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisVrfTU.Name); SetupOutputVariable(state, "Zone VRF Air Terminal Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisVrfTU.LatentCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -4858,61 +4857,60 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (thisVrfTU.HeatingCoilPresent) { SetupOutputVariable(state, "Zone VRF Air Terminal Heating Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrfTU.ParasiticHeatElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrfTU.Name); SetupOutputVariable(state, "Zone VRF Air Terminal Heating Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisVrfTU.ParasiticElecHeatConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisVrfTU.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "HEATING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Zone VRF Air Terminal Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrfTU.TotalHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrfTU.Name); SetupOutputVariable(state, "Zone VRF Air Terminal Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrfTU.SensibleHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrfTU.Name); SetupOutputVariable(state, "Zone VRF Air Terminal Latent Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrfTU.LatentHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrfTU.Name); SetupOutputVariable(state, "Zone VRF Air Terminal Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisVrfTU.TotalHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisVrfTU.Name); SetupOutputVariable(state, "Zone VRF Air Terminal Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisVrfTU.SensibleHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisVrfTU.Name); SetupOutputVariable(state, "Zone VRF Air Terminal Latent Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisVrfTU.LatentHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -4920,7 +4918,7 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } SetupOutputVariable(state, "Zone VRF Air Terminal Fan Availability Status", - OutputProcessor::Unit::None, + Constant::Units::None, thisVrfTU.AvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -4937,21 +4935,21 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (thisVrfTU.NumOfSpeedCooling > 1 || thisVrfTU.NumOfSpeedHeating > 1) { SetupOutputVariable(state, "Zone VRF Air Terminal Multispeed Fan Cycling Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisVrfTU.CycRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrfTU.Name); SetupOutputVariable(state, "Zone VRF Air Terminal Multispeed Fan Speed Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisVrfTU.SpeedRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrfTU.Name); SetupOutputVariable(state, "Zone VRF Air Terminal Multispeed Fan Speed Level", - OutputProcessor::Unit::None, + Constant::Units::None, thisVrfTU.SpeedNum, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -4964,74 +4962,72 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) std::string_view const sFuelType = Constant::eFuelNames[static_cast(thisVrf.fuel)]; SetupOutputVariable(state, "VRF Heat Pump Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrf.TotalCoolingCapacity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrf.TotalHeatingCapacity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, format("VRF Heat Pump Cooling {} Rate", sFuelType), - OutputProcessor::Unit::W, + Constant::Units::W, thisVrf.ElecCoolingPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, format("VRF Heat Pump Cooling {} Energy", sFuelType), - OutputProcessor::Unit::J, + Constant::Units::J, thisVrf.CoolElecConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisVrf.Name, + Constant::eFuel2eResource[(int)thisVrf.fuel], + OutputProcessor::SOVEndUseCat::Cooling, {}, - sFuelType, - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, format("VRF Heat Pump Heating {} Rate", sFuelType), - OutputProcessor::Unit::W, + Constant::Units::W, thisVrf.ElecHeatingPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, format("VRF Heat Pump Heating {} Energy", sFuelType), - OutputProcessor::Unit::J, + Constant::Units::J, thisVrf.HeatElecConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisVrf.Name, + Constant::eFuel2eResource[(int)thisVrf.fuel], + OutputProcessor::SOVEndUseCat::Heating, {}, - sFuelType, - "HEATING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "VRF Heat Pump Cooling COP", - OutputProcessor::Unit::None, + Constant::Units::None, thisVrf.OperatingCoolingCOP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Heating COP", - OutputProcessor::Unit::None, + Constant::Units::None, thisVrf.OperatingHeatingCOP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump COP", - OutputProcessor::Unit::None, + Constant::Units::None, thisVrf.OperatingCOP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5041,91 +5037,91 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) // For VRF_FluidTCtrl Model SetupOutputVariable(state, "VRF Heat Pump Compressor Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrf.Ncomp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Outdoor Unit Fan Power", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrf.OUFanPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Compressor Rotating Speed", - OutputProcessor::Unit::rev_min, + Constant::Units::rev_min, thisVrf.CompActSpeed, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Indoor Unit Evaporating Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisVrf.IUEvaporatingTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Outdoor Unit Condensing Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisVrf.CondensingTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Indoor Unit Condensing Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisVrf.IUCondensingTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Outdoor Unit Evaporating Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisVrf.EvaporatingTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Cooling Capacity at Max Compressor Speed", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrf.CoolingCapacity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Heating Capacity at Max Compressor Speed", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrf.HeatingCapacity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Indoor Unit Piping Correction for Cooling", - OutputProcessor::Unit::None, + Constant::Units::None, thisVrf.PipingCorrectionCooling, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Indoor Unit Piping Correction for Heating", - OutputProcessor::Unit::None, + Constant::Units::None, thisVrf.PipingCorrectionHeating, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Outdoor Unit Evaporator Heat Extract Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrf.OUEvapHeatRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Outdoor Unit Condenser Heat Release Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrf.OUCondHeatRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5135,14 +5131,14 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) // For VRF_SysCurve Model SetupOutputVariable(state, "VRF Heat Pump Maximum Capacity Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHVACVarRefFlow->MaxCoolingCapacity(NumCond), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Maximum Capacity Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHVACVarRefFlow->MaxHeatingCapacity(NumCond), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5153,62 +5149,60 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) (thisVrf.DefrostStrategy == StandardRatings::DefrostStrat::ReverseCycle && thisVrf.fuel == Constant::eFuel::Electricity)) { SetupOutputVariable(state, "VRF Heat Pump Defrost Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrf.DefrostPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Defrost Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisVrf.DefrostConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisVrf.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "HEATING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } else { // defrost energy applied to fuel type SetupOutputVariable(state, format("VRF Heat Pump Defrost {} Rate", sFuelType), - OutputProcessor::Unit::W, + Constant::Units::W, thisVrf.DefrostPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, format("VRF Heat Pump Defrost {} Energy", sFuelType), - OutputProcessor::Unit::J, + Constant::Units::J, thisVrf.DefrostConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisVrf.Name, + Constant::eFuel2eResource[(int)thisVrf.fuel], + OutputProcessor::SOVEndUseCat::Heating, {}, - sFuelType, - "HEATING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } SetupOutputVariable(state, "VRF Heat Pump Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisVrf.VRFCondPLR, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, thisVrf.VRFCondRTF, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Cycling Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, thisVrf.VRFCondCyclingRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5216,14 +5210,14 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) SetupOutputVariable(state, "VRF Heat Pump Operating Mode", - OutputProcessor::Unit::None, + Constant::Units::None, thisVrf.OperatingMode, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Condenser Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisVrf.CondenserInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5231,33 +5225,32 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) SetupOutputVariable(state, "VRF Heat Pump Crankcase Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrf.CrankCaseHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Crankcase Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisVrf.CrankCaseHeaterElecConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisVrf.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "VRF Heat Pump Terminal Unit Cooling Load Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrf.TUCoolingLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Terminal Unit Heating Load Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrf.TUHeatingLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5265,119 +5258,115 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (thisVrf.HeatRecoveryUsed) { SetupOutputVariable(state, "VRF Heat Pump Heat Recovery Status Change Multiplier", - OutputProcessor::Unit::None, + Constant::Units::None, thisVrf.SUMultiplier, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Simultaneous Cooling and Heating Efficiency", - OutputProcessor::Unit::Btu_h_W, + Constant::Units::Btu_h_W, thisVrf.SCHE, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Heat Recovery Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrf.VRFHeatRec, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Heat Recovery Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisVrf.VRFHeatEnergyRec, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisVrf.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRecovery, {}, - "ENERGYTRANSFER", - "HEATRECOVERY", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } if (thisVrf.CondenserType == DataHeatBalance::RefrigCondenserType::Evap) { SetupOutputVariable(state, "VRF Heat Pump Evaporative Condenser Water Use Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisVrf.EvapWaterConsumpRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisVrf.Name, + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Water", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "VRF Heat Pump Evaporative Condenser Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrf.EvapCondPumpElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Evaporative Condenser Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisVrf.EvapCondPumpElecConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisVrf.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); if (thisVrf.BasinHeaterPowerFTempDiff > 0.0) { SetupOutputVariable(state, "VRF Heat Pump Basin Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrf.BasinHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Basin Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisVrf.BasinHeaterConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisVrf.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } } else if (thisVrf.CondenserType == DataHeatBalance::RefrigCondenserType::Water) { SetupOutputVariable(state, "VRF Heat Pump Condenser Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisVrf.CondenserSideOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Condenser Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisVrf.WaterCondenserMassFlow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Condenser Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisVrf.QCondenser, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisVrf.Name); SetupOutputVariable(state, "VRF Heat Pump Condenser Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisVrf.QCondEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, diff --git a/src/EnergyPlus/HVACVariableRefrigerantFlow.hh b/src/EnergyPlus/HVACVariableRefrigerantFlow.hh index 993ca696fff..4cd628289b2 100644 --- a/src/EnergyPlus/HVACVariableRefrigerantFlow.hh +++ b/src/EnergyPlus/HVACVariableRefrigerantFlow.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HWBaseboardRadiator.cc b/src/EnergyPlus/HWBaseboardRadiator.cc index f6e0d7acccf..c78037fb7b5 100644 --- a/src/EnergyPlus/HWBaseboardRadiator.cc +++ b/src/EnergyPlus/HWBaseboardRadiator.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -662,6 +662,7 @@ namespace HWBaseboardRadiator { } if (thisHWBaseboard.SurfacePtr(SurfNum) != 0) { state.dataSurface->surfIntConv(thisHWBaseboard.SurfacePtr(SurfNum)).getsRadiantHeat = true; + state.dataSurface->allGetsRadiantHeatSurfaceList.emplace_back(thisHWBaseboard.SurfacePtr(SurfNum)); } AllFracsSummed += thisHWBaseboard.FracDistribToSurf(SurfNum); @@ -697,7 +698,7 @@ namespace HWBaseboardRadiator { auto &thisHWBaseboard = state.dataHWBaseboardRad->HWBaseboard(BaseboardNum); SetupOutputVariable(state, "Baseboard Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisHWBaseboard.TotPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -705,95 +706,93 @@ namespace HWBaseboardRadiator { SetupOutputVariable(state, "Baseboard Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisHWBaseboard.ConvPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisHWBaseboard.Name); SetupOutputVariable(state, "Baseboard Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisHWBaseboard.RadPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisHWBaseboard.Name); SetupOutputVariable(state, "Baseboard Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisHWBaseboard.TotEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisHWBaseboard.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Baseboard, {}, - "ENERGYTRANSFER", - "BASEBOARD", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Baseboard Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisHWBaseboard.ConvEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisHWBaseboard.Name); SetupOutputVariable(state, "Baseboard Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisHWBaseboard.RadEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisHWBaseboard.Name); SetupOutputVariable(state, "Baseboard Hot Water Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisHWBaseboard.Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisHWBaseboard.Name, + Constant::eResource::PlantLoopHeatingDemand, + OutputProcessor::SOVEndUseCat::Baseboard, {}, - "PLANTLOOPHEATINGDEMAND", - "BASEBOARD", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Baseboard Hot Water Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisHWBaseboard.WaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisHWBaseboard.Name); SetupOutputVariable(state, "Baseboard Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisHWBaseboard.AirMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisHWBaseboard.Name); SetupOutputVariable(state, "Baseboard Air Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisHWBaseboard.AirInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisHWBaseboard.Name); SetupOutputVariable(state, "Baseboard Air Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisHWBaseboard.AirOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisHWBaseboard.Name); SetupOutputVariable(state, "Baseboard Water Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisHWBaseboard.WaterInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisHWBaseboard.Name); SetupOutputVariable(state, "Baseboard Water Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisHWBaseboard.WaterOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1489,13 +1488,15 @@ namespace HWBaseboardRadiator { // SUBROUTINE PARAMETER DEFINITIONS: Real64 constexpr SmallestArea(0.001); // Smallest area in meters squared (to avoid a divide by zero) - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int RadSurfNum; // Counter for surfaces receiving radiation from radiant heater - int SurfNum; // Pointer to the Surface derived type Real64 ThisSurfIntensity; // temporary for W/m2 term for rad on a surface // Initialize arrays - state.dataHeatBalFanSys->SurfQHWBaseboard = 0.0; + for (auto &thisHWBB : state.dataHWBaseboardRad->HWBaseboard) { + for (int radSurfNum = 1; radSurfNum <= thisHWBB.TotSurfToDistrib; ++radSurfNum) { + int surfNum = thisHWBB.SurfacePtr(radSurfNum); + state.dataHeatBalFanSys->surfQRadFromHVAC(surfNum).HWBaseboard = 0.0; + } + } state.dataHeatBalFanSys->ZoneQHWBaseboardToPerson = 0.0; for (auto &thisHWBB : state.dataHWBaseboardRad->HWBaseboard) { @@ -1505,12 +1506,11 @@ namespace HWBaseboardRadiator { if (ZoneNum <= 0) continue; state.dataHeatBalFanSys->ZoneQHWBaseboardToPerson(ZoneNum) += thisHWBB.QBBRadSource * HWBaseboardDesignDataObject.FracDistribPerson; - for (RadSurfNum = 1; RadSurfNum <= thisHWBB.TotSurfToDistrib; ++RadSurfNum) { - SurfNum = thisHWBB.SurfacePtr(RadSurfNum); + for (int RadSurfNum = 1; RadSurfNum <= thisHWBB.TotSurfToDistrib; ++RadSurfNum) { + int SurfNum = thisHWBB.SurfacePtr(RadSurfNum); if (state.dataSurface->Surface(SurfNum).Area > SmallestArea) { ThisSurfIntensity = (thisHWBB.QBBRadSource * thisHWBB.FracDistribToSurf(RadSurfNum) / state.dataSurface->Surface(SurfNum).Area); - state.dataHeatBalFanSys->SurfQHWBaseboard(SurfNum) += ThisSurfIntensity; - state.dataHeatBalSurf->AnyRadiantSystems = true; + state.dataHeatBalFanSys->surfQRadFromHVAC(SurfNum).HWBaseboard += ThisSurfIntensity; // CR 8074, trap for excessive intensity (throws off surface balance ) if (ThisSurfIntensity > DataHeatBalFanSys::MaxRadHeatFlux) { ShowSevereError(state, "DistributeBBRadGains: excessive thermal radiation heat flux intensity detected"); diff --git a/src/EnergyPlus/HWBaseboardRadiator.hh b/src/EnergyPlus/HWBaseboardRadiator.hh index 476ca540f89..983707dce0a 100644 --- a/src/EnergyPlus/HWBaseboardRadiator.hh +++ b/src/EnergyPlus/HWBaseboardRadiator.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalFiniteDiffManager.cc b/src/EnergyPlus/HeatBalFiniteDiffManager.cc index b27d38ba9e4..165354c8f40 100644 --- a/src/EnergyPlus/HeatBalFiniteDiffManager.cc +++ b/src/EnergyPlus/HeatBalFiniteDiffManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -881,7 +881,7 @@ namespace HeatBalFiniteDiffManager { SetupOutputVariable(state, "CondFD Inner Solver Loop Iteration Count", - OutputProcessor::Unit::None, + Constant::Units::None, SurfaceFD(SurfNum).GSloopCounter, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -896,14 +896,14 @@ namespace HeatBalFiniteDiffManager { for (int lay = 1; lay < thisConstruct.TotLayers; ++lay) { SetupOutputVariable(state, format("CondFD Internal Heat Source Power After Layer {}", lay), - OutputProcessor::Unit::W, + Constant::Units::W, SurfaceFD(SurfNum).heatSourceInternalFluxLayerReport(lay), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataSurface->Surface(SurfNum).Name); SetupOutputVariable(state, format("CondFD Internal Heat Source Energy After Layer {}", lay), - OutputProcessor::Unit::J, + Constant::Units::J, SurfaceFD(SurfNum).heatSourceInternalFluxEnergyLayerReport(lay), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -940,23 +940,22 @@ namespace HeatBalFiniteDiffManager { SurfaceFD(SurfNum).heatSourceFluxMaterialActuators(lay).actuatedValue); SetupOutputVariable(state, format("CondFD EMS Heat Source Power After Layer {}", lay), - OutputProcessor::Unit::W, + Constant::Units::W, SurfaceFD(SurfNum).heatSourceEMSFluxLayerReport(lay), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataSurface->Surface(SurfNum).Name); SetupOutputVariable(state, format("CondFD EMS Heat Source Energy After Layer {}", lay), - OutputProcessor::Unit::J, + Constant::Units::J, SurfaceFD(SurfNum).heatSourceEMSFluxEnergyLayerReport(lay), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataSurface->Surface(SurfNum).Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "Heating", - {}, - "Building"); + OutputProcessor::SOVGroup::Building); } } @@ -964,49 +963,49 @@ namespace HeatBalFiniteDiffManager { for (int node = 1; node <= TotNodes + 1; ++node) { // include inside face node SetupOutputVariable(state, format("CondFD Surface Temperature Node {}", node), - OutputProcessor::Unit::C, + Constant::Units::C, SurfaceFD(SurfNum).TDreport(node), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataSurface->Surface(SurfNum).Name); SetupOutputVariable(state, format("CondFD Surface Heat Flux Node {}", node), - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, SurfaceFD(SurfNum).QDreport(node), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataSurface->Surface(SurfNum).Name); SetupOutputVariable(state, format("CondFD Phase Change State {}", node), - OutputProcessor::Unit::None, + Constant::Units::None, SurfaceFD(SurfNum).PhaseChangeState(node), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataSurface->Surface(SurfNum).Name); SetupOutputVariable(state, format("CondFD Phase Change Previous State {}", node), - OutputProcessor::Unit::None, + Constant::Units::None, SurfaceFD(SurfNum).PhaseChangeStateOld(node), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataSurface->Surface(SurfNum).Name); SetupOutputVariable(state, format("CondFD Phase Change Node Temperature {}", node), - OutputProcessor::Unit::C, + Constant::Units::C, SurfaceFD(SurfNum).TDT(node), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataSurface->Surface(SurfNum).Name); SetupOutputVariable(state, format("CondFD Phase Change Node Conductivity {}", node), - OutputProcessor::Unit::W_mK, + Constant::Units::W_mK, SurfaceFD(SurfNum).condNodeReport(node), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataSurface->Surface(SurfNum).Name); SetupOutputVariable(state, format("CondFD Phase Change Node Specific Heat {}", node), - OutputProcessor::Unit::J_kgK, + Constant::Units::J_kgK, SurfaceFD(SurfNum).specHeatNodeReport(node), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -1014,14 +1013,14 @@ namespace HeatBalFiniteDiffManager { if (state.dataGlobal->DisplayAdvancedReportVariables) { SetupOutputVariable(state, format("CondFD Surface Heat Capacitance Outer Half Node {}", node), - OutputProcessor::Unit::W_m2K, + Constant::Units::W_m2K, SurfaceFD(SurfNum).CpDelXRhoS1(node), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataSurface->Surface(SurfNum).Name); SetupOutputVariable(state, format("CondFD Surface Heat Capacitance Inner Half Node {}", node), - OutputProcessor::Unit::W_m2K, + Constant::Units::W_m2K, SurfaceFD(SurfNum).CpDelXRhoS2(node), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, diff --git a/src/EnergyPlus/HeatBalFiniteDiffManager.hh b/src/EnergyPlus/HeatBalFiniteDiffManager.hh index d198d87c311..117987d7745 100644 --- a/src/EnergyPlus/HeatBalFiniteDiffManager.hh +++ b/src/EnergyPlus/HeatBalFiniteDiffManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceAirManager.cc b/src/EnergyPlus/HeatBalanceAirManager.cc index 032ead3aa18..23fc646d780 100644 --- a/src/EnergyPlus/HeatBalanceAirManager.cc +++ b/src/EnergyPlus/HeatBalanceAirManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -303,7 +303,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err } for (int Loop = 1; Loop <= state.dataGlobal->NumOfZones; ++Loop) { - std::string_view name = state.dataHeatBal->Zone(Loop).Name; + std::string const &name = state.dataHeatBal->Zone(Loop).Name; auto &thisZnAirRpt = state.dataHeatBal->ZnAirRpt(Loop); thisZnAirRpt.setUpOutputVars(state, DataStringGlobals::zonePrefix, name); if (state.dataHeatBal->doSpaceHeatBalanceSimulation) { @@ -317,14 +317,14 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (state.dataGlobal->DisplayAdvancedReportVariables) { SetupOutputVariable(state, "Zone Phase Change Material Melting Enthalpy", - OutputProcessor::Unit::J_kg, + Constant::Units::J_kg, thisZnAirRpt.SumEnthalpyM, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, "Zone Phase Change Material Freezing Enthalpy", - OutputProcessor::Unit::J_kg, + Constant::Units::J_kg, thisZnAirRpt.SumEnthalpyH, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -333,42 +333,42 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err SetupOutputVariable(state, "Zone Exfiltration Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisZnAirRpt.ExfilTotalLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, "Zone Exfiltration Sensible Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisZnAirRpt.ExfilSensiLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, "Zone Exfiltration Latent Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisZnAirRpt.ExfilLatentLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, "Zone Exhaust Air Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisZnAirRpt.ExhTotalLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, "Zone Exhaust Air Sensible Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisZnAirRpt.ExhSensiLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, "Zone Exhaust Air Latent Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisZnAirRpt.ExhLatentLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -377,14 +377,14 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err SetupOutputVariable(state, "Site Total Zone Exfiltration Heat Loss", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneTotalExfiltrationHeatLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, "Environment"); SetupOutputVariable(state, "Site Total Zone Exhaust Air Heat Loss", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneTotalExhaustHeatLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -553,107 +553,106 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err state.dataHeatBal->Zone(thisZoneAirBalance.ZonePtr).zoneOAQuadratureSum = true; SetupOutputVariable(state, "Zone Combined Outdoor Air Sensible Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisZoneAirBalance.ZonePtr).OABalanceHeatLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(thisZoneAirBalance.ZonePtr).Name); SetupOutputVariable(state, "Zone Combined Outdoor Air Sensible Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisZoneAirBalance.ZonePtr).OABalanceHeatGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(thisZoneAirBalance.ZonePtr).Name); SetupOutputVariable(state, "Zone Combined Outdoor Air Latent Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisZoneAirBalance.ZonePtr).OABalanceLatentLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(thisZoneAirBalance.ZonePtr).Name); SetupOutputVariable(state, "Zone Combined Outdoor Air Latent Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisZoneAirBalance.ZonePtr).OABalanceLatentGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(thisZoneAirBalance.ZonePtr).Name); SetupOutputVariable(state, "Zone Combined Outdoor Air Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisZoneAirBalance.ZonePtr).OABalanceTotalLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(thisZoneAirBalance.ZonePtr).Name); SetupOutputVariable(state, "Zone Combined Outdoor Air Total Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisZoneAirBalance.ZonePtr).OABalanceTotalGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(thisZoneAirBalance.ZonePtr).Name); SetupOutputVariable(state, "Zone Combined Outdoor Air Current Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZnAirRpt(thisZoneAirBalance.ZonePtr).OABalanceVdotCurDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(thisZoneAirBalance.ZonePtr).Name); SetupOutputVariable(state, "Zone Combined Outdoor Air Standard Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZnAirRpt(thisZoneAirBalance.ZonePtr).OABalanceVdotStdDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(thisZoneAirBalance.ZonePtr).Name); SetupOutputVariable(state, "Zone Combined Outdoor Air Current Density Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataHeatBal->ZnAirRpt(thisZoneAirBalance.ZonePtr).OABalanceVolumeCurDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(thisZoneAirBalance.ZonePtr).Name); SetupOutputVariable(state, "Zone Combined Outdoor Air Standard Density Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataHeatBal->ZnAirRpt(thisZoneAirBalance.ZonePtr).OABalanceVolumeStdDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(thisZoneAirBalance.ZonePtr).Name); SetupOutputVariable(state, "Zone Combined Outdoor Air Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, state.dataHeatBal->ZnAirRpt(thisZoneAirBalance.ZonePtr).OABalanceMass, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(thisZoneAirBalance.ZonePtr).Name); SetupOutputVariable(state, "Zone Combined Outdoor Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataHeatBal->ZnAirRpt(thisZoneAirBalance.ZonePtr).OABalanceMdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(thisZoneAirBalance.ZonePtr).Name); SetupOutputVariable(state, "Zone Combined Outdoor Air Changes per Hour", - OutputProcessor::Unit::ach, + Constant::Units::ach, state.dataHeatBal->ZnAirRpt(thisZoneAirBalance.ZonePtr).OABalanceAirChangeRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(thisZoneAirBalance.ZonePtr).Name); SetupOutputVariable(state, "Zone Combined Outdoor Air Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisZoneAirBalance.ZonePtr).OABalanceFanElec, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(thisZoneAirBalance.ZonePtr).Name, - {}, - "Electricity", - "Fans", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Fans, "Ventilation (simple)", - "Building", + OutputProcessor::SOVGroup::Building, state.dataHeatBal->Zone(thisZoneAirBalance.ZonePtr).Name); } } @@ -1127,91 +1126,91 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err // Object report variables SetupOutputVariable(state, "Infiltration Sensible Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->Infiltration(Loop).InfilHeatLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Infiltration(Loop).Name); SetupOutputVariable(state, "Infiltration Sensible Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->Infiltration(Loop).InfilHeatGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Infiltration(Loop).Name); SetupOutputVariable(state, "Infiltration Latent Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->Infiltration(Loop).InfilLatentLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Infiltration(Loop).Name); SetupOutputVariable(state, "Infiltration Latent Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->Infiltration(Loop).InfilLatentGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Infiltration(Loop).Name); SetupOutputVariable(state, "Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->Infiltration(Loop).InfilTotalLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Infiltration(Loop).Name); SetupOutputVariable(state, "Infiltration Total Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->Infiltration(Loop).InfilTotalGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Infiltration(Loop).Name); SetupOutputVariable(state, "Infiltration Current Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->Infiltration(Loop).InfilVdotCurDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Infiltration(Loop).Name); SetupOutputVariable(state, "Infiltration Standard Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->Infiltration(Loop).InfilVdotStdDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Infiltration(Loop).Name); SetupOutputVariable(state, "Infiltration Current Density Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataHeatBal->Infiltration(Loop).InfilVolumeCurDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Infiltration(Loop).Name); SetupOutputVariable(state, "Infiltration Standard Density Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataHeatBal->Infiltration(Loop).InfilVolumeStdDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Infiltration(Loop).Name); SetupOutputVariable(state, "Infiltration Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, state.dataHeatBal->Infiltration(Loop).InfilMass, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Infiltration(Loop).Name); SetupOutputVariable(state, "Infiltration Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataHeatBal->Infiltration(Loop).InfilMdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Infiltration(Loop).Name); SetupOutputVariable(state, "Infiltration Air Change Rate", - OutputProcessor::Unit::ach, + Constant::Units::ach, state.dataHeatBal->Infiltration(Loop).InfilAirChangeRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1221,91 +1220,91 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err RepVarSet(state.dataHeatBal->Infiltration(Loop).ZonePtr) = false; SetupOutputVariable(state, "Zone Infiltration Sensible Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(state.dataHeatBal->Infiltration(Loop).ZonePtr).InfilHeatLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(state.dataHeatBal->Infiltration(Loop).ZonePtr).Name); SetupOutputVariable(state, "Zone Infiltration Sensible Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(state.dataHeatBal->Infiltration(Loop).ZonePtr).InfilHeatGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(state.dataHeatBal->Infiltration(Loop).ZonePtr).Name); SetupOutputVariable(state, "Zone Infiltration Latent Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(state.dataHeatBal->Infiltration(Loop).ZonePtr).InfilLatentLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(state.dataHeatBal->Infiltration(Loop).ZonePtr).Name); SetupOutputVariable(state, "Zone Infiltration Latent Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(state.dataHeatBal->Infiltration(Loop).ZonePtr).InfilLatentGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(state.dataHeatBal->Infiltration(Loop).ZonePtr).Name); SetupOutputVariable(state, "Zone Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(state.dataHeatBal->Infiltration(Loop).ZonePtr).InfilTotalLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(state.dataHeatBal->Infiltration(Loop).ZonePtr).Name); SetupOutputVariable(state, "Zone Infiltration Total Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(state.dataHeatBal->Infiltration(Loop).ZonePtr).InfilTotalGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(state.dataHeatBal->Infiltration(Loop).ZonePtr).Name); SetupOutputVariable(state, "Zone Infiltration Current Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZnAirRpt(state.dataHeatBal->Infiltration(Loop).ZonePtr).InfilVdotCurDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(state.dataHeatBal->Infiltration(Loop).ZonePtr).Name); SetupOutputVariable(state, "Zone Infiltration Standard Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZnAirRpt(state.dataHeatBal->Infiltration(Loop).ZonePtr).InfilVdotStdDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(state.dataHeatBal->Infiltration(Loop).ZonePtr).Name); SetupOutputVariable(state, "Zone Infiltration Current Density Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataHeatBal->ZnAirRpt(state.dataHeatBal->Infiltration(Loop).ZonePtr).InfilVolumeCurDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(state.dataHeatBal->Infiltration(Loop).ZonePtr).Name); SetupOutputVariable(state, "Zone Infiltration Standard Density Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataHeatBal->ZnAirRpt(state.dataHeatBal->Infiltration(Loop).ZonePtr).InfilVolumeStdDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(state.dataHeatBal->Infiltration(Loop).ZonePtr).Name); SetupOutputVariable(state, "Zone Infiltration Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, state.dataHeatBal->ZnAirRpt(state.dataHeatBal->Infiltration(Loop).ZonePtr).InfilMass, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(state.dataHeatBal->Infiltration(Loop).ZonePtr).Name); SetupOutputVariable(state, "Zone Infiltration Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataHeatBal->ZnAirRpt(state.dataHeatBal->Infiltration(Loop).ZonePtr).InfilMdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(state.dataHeatBal->Infiltration(Loop).ZonePtr).Name); SetupOutputVariable(state, "Zone Infiltration Air Change Rate", - OutputProcessor::Unit::ach, + Constant::Units::ach, state.dataHeatBal->ZnAirRpt(state.dataHeatBal->Infiltration(Loop).ZonePtr).InfilAirChangeRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1906,111 +1905,110 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err RepVarSet(thisVentilation.ZonePtr) = false; SetupOutputVariable(state, "Zone Ventilation Sensible Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilHeatLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Sensible Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilHeatGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Latent Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilLatentLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Latent Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilLatentGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilTotalLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Total Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilTotalGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Current Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilVdotCurDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Standard Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilVdotStdDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Current Density Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilVolumeCurDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Standard Density Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilVolumeStdDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilMass, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilMdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Air Change Rate", - OutputProcessor::Unit::ach, + Constant::Units::ach, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilAirChangeRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilFanElec, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZone.Name, - {}, - "Electricity", - "Fans", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Fans, "Ventilation (simple)", - "Building", + OutputProcessor::SOVGroup::Building, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Air Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilAirTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -2390,111 +2388,110 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err RepVarSet(thisVentilation.ZonePtr) = false; SetupOutputVariable(state, "Zone Ventilation Sensible Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilHeatLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Sensible Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilHeatGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Latent Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilLatentLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Latent Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilLatentGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilTotalLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Total Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilTotalGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Current Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilVdotCurDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Standard Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilVdotStdDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Current Density Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilVolumeCurDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Standard Density Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilVolumeStdDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilMass, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilMdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Air Change Rate", - OutputProcessor::Unit::ach, + Constant::Units::ach, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilAirChangeRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilFanElec, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisZone.Name, - {}, - "Electricity", - "Fans", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Fans, "Ventilation (simple)", - "Building", + OutputProcessor::SOVGroup::Building, thisZone.Name); SetupOutputVariable(state, "Zone Ventilation Air Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBal->ZnAirRpt(thisVentilation.ZonePtr).VentilAirTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -2957,77 +2954,77 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err RepVarSet(thisMixing.ZonePtr) = false; SetupOutputVariable(state, "Zone Mixing Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataHeatBal->ZnAirRpt(thisMixing.ZonePtr).MixVolume, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(thisMixing.ZonePtr).Name); SetupOutputVariable(state, "Zone Mixing Current Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZnAirRpt(thisMixing.ZonePtr).MixVdotCurDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(thisMixing.ZonePtr).Name); SetupOutputVariable(state, "Zone Mixing Standard Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZnAirRpt(thisMixing.ZonePtr).MixVdotStdDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(thisMixing.ZonePtr).Name); SetupOutputVariable(state, "Zone Mixing Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, state.dataHeatBal->ZnAirRpt(thisMixing.ZonePtr).MixMass, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(thisMixing.ZonePtr).Name); SetupOutputVariable(state, "Zone Mixing Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataHeatBal->ZnAirRpt(thisMixing.ZonePtr).MixMdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(thisMixing.ZonePtr).Name); SetupOutputVariable(state, "Zone Mixing Sensible Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisMixing.ZonePtr).MixHeatLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(thisMixing.ZonePtr).Name); SetupOutputVariable(state, "Zone Mixing Sensible Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisMixing.ZonePtr).MixHeatGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(thisMixing.ZonePtr).Name); SetupOutputVariable(state, "Zone Mixing Latent Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisMixing.ZonePtr).MixLatentLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(thisMixing.ZonePtr).Name); SetupOutputVariable(state, "Zone Mixing Latent Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisMixing.ZonePtr).MixLatentGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(thisMixing.ZonePtr).Name); SetupOutputVariable(state, "Zone Mixing Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisMixing.ZonePtr).MixTotalLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(thisMixing.ZonePtr).Name); SetupOutputVariable(state, "Zone Mixing Total Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(thisMixing.ZonePtr).MixTotalGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -3603,77 +3600,77 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err RepVarSet(zoneNum) = false; SetupOutputVariable(state, "Zone Mixing Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisZnAirRpt.MixVolume, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, zoneName); SetupOutputVariable(state, "Zone Mixing Current Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, thisZnAirRpt.MixVdotCurDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, zoneName); SetupOutputVariable(state, "Zone Mixing Standard Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, thisZnAirRpt.MixVdotStdDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, zoneName); SetupOutputVariable(state, "Zone Mixing Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, thisZnAirRpt.MixMass, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, zoneName); SetupOutputVariable(state, "Zone Mixing Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisZnAirRpt.MixMdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, zoneName); SetupOutputVariable(state, "Zone Mixing Sensible Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZnAirRpt.MixHeatLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, zoneName); SetupOutputVariable(state, "Zone Mixing Sensible Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZnAirRpt.MixHeatGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, zoneName); SetupOutputVariable(state, "Zone Mixing Latent Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZnAirRpt.MixLatentLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, zoneName); SetupOutputVariable(state, "Zone Mixing Latent Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZnAirRpt.MixLatentGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, zoneName); SetupOutputVariable(state, "Zone Mixing Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZnAirRpt.MixTotalLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, zoneName); SetupOutputVariable(state, "Zone Mixing Total Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZnAirRpt.MixTotalGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -3688,77 +3685,77 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err auto &thisZnAirRpt = state.dataHeatBal->ZnAirRpt(fromZoneNum); SetupOutputVariable(state, "Zone Mixing Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisZnAirRpt.MixVolume, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, fromZoneName); SetupOutputVariable(state, "Zone Mixing Current Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, thisZnAirRpt.MixVdotCurDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, fromZoneName); SetupOutputVariable(state, "Zone Mixing Standard Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, thisZnAirRpt.MixVdotStdDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, fromZoneName); SetupOutputVariable(state, "Zone Mixing Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, thisZnAirRpt.MixMass, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, fromZoneName); SetupOutputVariable(state, "Zone Mixing Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisZnAirRpt.MixMdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, fromZoneName); SetupOutputVariable(state, "Zone Mixing Sensible Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZnAirRpt.MixHeatLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, fromZoneName); SetupOutputVariable(state, "Zone Mixing Sensible Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZnAirRpt.MixHeatGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, fromZoneName); SetupOutputVariable(state, "Zone Mixing Latent Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZnAirRpt.MixLatentLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, fromZoneName); SetupOutputVariable(state, "Zone Mixing Latent Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZnAirRpt.MixLatentGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, fromZoneName); SetupOutputVariable(state, "Zone Mixing Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZnAirRpt.MixTotalLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, fromZoneName); SetupOutputVariable(state, "Zone Mixing Total Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZnAirRpt.MixTotalGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -4036,77 +4033,77 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err RepVarSet(ZoneNumA) = false; SetupOutputVariable(state, "Zone Mixing Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataHeatBal->ZnAirRpt(ZoneNumA).MixVolume, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(ZoneNumA).Name); SetupOutputVariable(state, "Zone Mixing Current Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZnAirRpt(ZoneNumA).MixVdotCurDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(ZoneNumA).Name); SetupOutputVariable(state, "Zone Mixing Standard Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZnAirRpt(ZoneNumA).MixVdotStdDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(ZoneNumA).Name); SetupOutputVariable(state, "Zone Mixing Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, state.dataHeatBal->ZnAirRpt(ZoneNumA).MixMass, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(ZoneNumA).Name); SetupOutputVariable(state, "Zone Mixing Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataHeatBal->ZnAirRpt(ZoneNumA).MixMdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(ZoneNumA).Name); SetupOutputVariable(state, "Zone Mixing Sensible Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(ZoneNumA).MixHeatLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(ZoneNumA).Name); SetupOutputVariable(state, "Zone Mixing Sensible Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(ZoneNumA).MixHeatGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(ZoneNumA).Name); SetupOutputVariable(state, "Zone Mixing Latent Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(ZoneNumA).MixLatentLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(ZoneNumA).Name); SetupOutputVariable(state, "Zone Mixing Latent Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(ZoneNumA).MixLatentGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(ZoneNumA).Name); SetupOutputVariable(state, "Zone Mixing Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(ZoneNumA).MixTotalLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(ZoneNumA).Name); SetupOutputVariable(state, "Zone Mixing Total Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(ZoneNumA).MixTotalGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -4128,77 +4125,77 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err RepVarSet(ZoneNumB) = false; SetupOutputVariable(state, "Zone Mixing Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataHeatBal->ZnAirRpt(ZoneNumB).MixVolume, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(ZoneNumB).Name); SetupOutputVariable(state, "Zone Mixing Current Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZnAirRpt(ZoneNumB).MixVdotCurDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(ZoneNumB).Name); SetupOutputVariable(state, "Zone Mixing Standard Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZnAirRpt(ZoneNumB).MixVdotStdDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(ZoneNumB).Name); SetupOutputVariable(state, "Zone Mixing Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, state.dataHeatBal->ZnAirRpt(ZoneNumB).MixMass, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(ZoneNumB).Name); SetupOutputVariable(state, "Zone Mixing Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataHeatBal->ZnAirRpt(ZoneNumB).MixMdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(ZoneNumB).Name); SetupOutputVariable(state, "Zone Mixing Sensible Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(ZoneNumB).MixHeatLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(ZoneNumB).Name); SetupOutputVariable(state, "Zone Mixing Sensible Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(ZoneNumB).MixHeatGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(ZoneNumB).Name); SetupOutputVariable(state, "Zone Mixing Latent Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(ZoneNumB).MixLatentLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(ZoneNumB).Name); SetupOutputVariable(state, "Zone Mixing Latent Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(ZoneNumB).MixLatentGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(ZoneNumB).Name); SetupOutputVariable(state, "Zone Mixing Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(ZoneNumB).MixTotalLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(ZoneNumB).Name); SetupOutputVariable(state, "Zone Mixing Total Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(ZoneNumB).MixTotalGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -4472,21 +4469,21 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err for (int ZoneNum = 1; ZoneNum <= state.dataGlobal->NumOfZones; ++ZoneNum) { SetupOutputVariable(state, "Zone Air Mass Balance Supply Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataHeatBal->MassConservation(ZoneNum).InMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(ZoneNum).Name); SetupOutputVariable(state, "Zone Air Mass Balance Exhaust Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataHeatBal->MassConservation(ZoneNum).ExhMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(ZoneNum).Name); SetupOutputVariable(state, "Zone Air Mass Balance Return Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataHeatBal->MassConservation(ZoneNum).RetMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -4496,14 +4493,14 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err state.dataHeatBal->MassConservation(ZoneNum).NumReceivingZonesMixingObject) > 0)) { SetupOutputVariable(state, "Zone Air Mass Balance Mixing Receiving Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataHeatBal->MassConservation(ZoneNum).MixingMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(ZoneNum).Name); SetupOutputVariable(state, "Zone Air Mass Balance Mixing Source Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataHeatBal->MassConservation(ZoneNum).MixingSourceMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -4515,14 +4512,14 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (state.dataHeatBal->MassConservation(ZoneNum).InfiltrationPtr > 0) { SetupOutputVariable(state, "Zone Air Mass Balance Infiltration Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataHeatBal->MassConservation(ZoneNum).InfiltrationMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(ZoneNum).Name); SetupOutputVariable(state, "Zone Air Mass Balance Infiltration Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataHeatBal->MassConservation(ZoneNum).IncludeInfilToZoneMassBal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/HeatBalanceAirManager.hh b/src/EnergyPlus/HeatBalanceAirManager.hh index 2d179492a27..a4e7b202a89 100644 --- a/src/EnergyPlus/HeatBalanceAirManager.hh +++ b/src/EnergyPlus/HeatBalanceAirManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceHAMTManager.cc b/src/EnergyPlus/HeatBalanceHAMTManager.cc index c8cfb552ba5..7a177d9f990 100644 --- a/src/EnergyPlus/HeatBalanceHAMTManager.cc +++ b/src/EnergyPlus/HeatBalanceHAMTManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -942,42 +942,42 @@ namespace HeatBalanceHAMTManager { state.dataHeatBalHAMTMgr->surfvp(sid) = 0.0; SetupOutputVariable(state, "HAMT Surface Average Water Content Ratio", - OutputProcessor::Unit::kg_kg, + Constant::Units::kg_kg, state.dataHeatBalHAMTMgr->watertot(sid), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataSurface->Surface(sid).Name); SetupOutputVariable(state, "HAMT Surface Inside Face Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBalHAMTMgr->surftemp(sid), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataSurface->Surface(sid).Name); SetupOutputVariable(state, "HAMT Surface Inside Face Relative Humidity", - OutputProcessor::Unit::Perc, + Constant::Units::Perc, state.dataHeatBalHAMTMgr->surfrh(sid), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataSurface->Surface(sid).Name); SetupOutputVariable(state, "HAMT Surface Inside Face Vapor Pressure", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, state.dataHeatBalHAMTMgr->surfvp(sid), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataSurface->Surface(sid).Name); SetupOutputVariable(state, "HAMT Surface Outside Face Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBalHAMTMgr->surfexttemp(sid), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataSurface->Surface(sid).Name); SetupOutputVariable(state, "HAMT Surface Outside Face Relative Humidity", - OutputProcessor::Unit::Perc, + Constant::Units::Perc, state.dataHeatBalHAMTMgr->surfextrh(sid), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -1002,7 +1002,7 @@ namespace HeatBalanceHAMTManager { ++cellid, ++concell) { SetupOutputVariable(state, format("HAMT Surface Temperature Cell {}", concell), - OutputProcessor::Unit::C, + Constant::Units::C, cells(cellid).temp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -1012,7 +1012,7 @@ namespace HeatBalanceHAMTManager { ++cellid, ++concell) { SetupOutputVariable(state, format("HAMT Surface Water Content Cell {}", concell), - OutputProcessor::Unit::kg_kg, + Constant::Units::kg_kg, cells(cellid).wreport, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -1022,7 +1022,7 @@ namespace HeatBalanceHAMTManager { ++cellid, ++concell) { SetupOutputVariable(state, format("HAMT Surface Relative Humidity Cell {}", concell), - OutputProcessor::Unit::Perc, + Constant::Units::Perc, cells(cellid).rhp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, diff --git a/src/EnergyPlus/HeatBalanceHAMTManager.hh b/src/EnergyPlus/HeatBalanceHAMTManager.hh index 40dd3665911..98028809d7b 100644 --- a/src/EnergyPlus/HeatBalanceHAMTManager.hh +++ b/src/EnergyPlus/HeatBalanceHAMTManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceIntRadExchange.cc b/src/EnergyPlus/HeatBalanceIntRadExchange.cc index 80fa4496c43..4302656ac7e 100644 --- a/src/EnergyPlus/HeatBalanceIntRadExchange.cc +++ b/src/EnergyPlus/HeatBalanceIntRadExchange.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -271,24 +271,25 @@ namespace HeatBalanceIntRadExchange { Real64 CarrollMRTInKTo4th; // Carroll MRT for (size_type ZoneSurfNum = 0; ZoneSurfNum < s_zone_Surfaces; ++ZoneSurfNum) { int const SurfNum = zone_info.SurfacePtr[ZoneSurfNum]; - auto const &surface_window = state.dataSurface->SurfaceWindow(SurfNum); - int const ConstrNum = state.dataSurface->Surface(SurfNum).Construction; - auto const &construct = state.dataConstruction->Construct(ConstrNum); + auto const &surf = state.dataSurface->Surface(SurfNum); + auto const &surfWindow = state.dataSurface->SurfaceWindow(SurfNum); + int const constrNum = surf.Construction; + auto const &construct = state.dataConstruction->Construct(constrNum); if (construct.WindowTypeEQL) { SurfaceTempRad[ZoneSurfNum] = state.dataSurface->SurfWinEffInsSurfTemp(SurfNum); - SurfaceEmiss[ZoneSurfNum] = WindowEquivalentLayer::EQLWindowInsideEffectiveEmiss(state, ConstrNum); + SurfaceEmiss[ZoneSurfNum] = WindowEquivalentLayer::EQLWindowInsideEffectiveEmiss(state, constrNum); } else if (construct.WindowTypeBSDF && state.dataSurface->SurfWinShadingFlag(SurfNum) == DataSurfaces::WinShadingType::IntShade) { SurfaceTempRad[ZoneSurfNum] = state.dataSurface->SurfWinEffInsSurfTemp(SurfNum); - SurfaceEmiss[ZoneSurfNum] = surface_window.EffShBlindEmiss[0] + surface_window.EffGlassEmiss[0]; + SurfaceEmiss[ZoneSurfNum] = surfWindow.EffShBlindEmiss[1] + surfWindow.EffGlassEmiss[1]; } else if (construct.WindowTypeBSDF) { SurfaceTempRad[ZoneSurfNum] = state.dataSurface->SurfWinEffInsSurfTemp(SurfNum); SurfaceEmiss[ZoneSurfNum] = construct.InsideAbsorpThermal; - } else if (construct.TypeIsWindow && state.dataSurface->SurfWinOriginalClass(SurfNum) != DataSurfaces::SurfaceClass::TDD_Diffuser) { + } else if (construct.TypeIsWindow && surf.OriginalClass != DataSurfaces::SurfaceClass::TDD_Diffuser) { if (SurfIterations == 0 && NOT_SHADED(state.dataSurface->SurfWinShadingFlag(SurfNum))) { // If the window is bare this TS and it is the first time through we use the previous TS glass // temperature whether or not the window was shaded in the previous TS. If the window was shaded // the previous time step this temperature is a better starting value than the shade temperature. - SurfaceTempRad[ZoneSurfNum] = surface_window.ThetaFace(2 * construct.TotGlassLayers) - Constant::Kelvin; + SurfaceTempRad[ZoneSurfNum] = surfWindow.thetaFace[2 * construct.TotGlassLayers] - Constant::Kelvin; SurfaceEmiss[ZoneSurfNum] = construct.InsideAbsorpThermal; // For windows with an interior shade or blind an effective inside surface temp // and emiss is used here that is a weighted combination of shade/blind and glass temp and emiss. diff --git a/src/EnergyPlus/HeatBalanceIntRadExchange.hh b/src/EnergyPlus/HeatBalanceIntRadExchange.hh index aafa5fd79e7..4aea8263da8 100644 --- a/src/EnergyPlus/HeatBalanceIntRadExchange.hh +++ b/src/EnergyPlus/HeatBalanceIntRadExchange.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceInternalHeatGains.cc b/src/EnergyPlus/HeatBalanceInternalHeatGains.cc index fcf05c575ca..f3e1d129828 100644 --- a/src/EnergyPlus/HeatBalanceInternalHeatGains.cc +++ b/src/EnergyPlus/HeatBalanceInternalHeatGains.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceInternalHeatGains.hh b/src/EnergyPlus/HeatBalanceInternalHeatGains.hh index a9f1b256c56..1b16190f335 100644 --- a/src/EnergyPlus/HeatBalanceInternalHeatGains.hh +++ b/src/EnergyPlus/HeatBalanceInternalHeatGains.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceKivaManager.cc b/src/EnergyPlus/HeatBalanceKivaManager.cc index 435b29f05c0..43b42e620ef 100644 --- a/src/EnergyPlus/HeatBalanceKivaManager.cc +++ b/src/EnergyPlus/HeatBalanceKivaManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceKivaManager.hh b/src/EnergyPlus/HeatBalanceKivaManager.hh index cafd383aa60..5cc8015ba17 100644 --- a/src/EnergyPlus/HeatBalanceKivaManager.hh +++ b/src/EnergyPlus/HeatBalanceKivaManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceManager.cc b/src/EnergyPlus/HeatBalanceManager.cc index 29b3b2755c8..13b728e2a47 100644 --- a/src/EnergyPlus/HeatBalanceManager.cc +++ b/src/EnergyPlus/HeatBalanceManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -2006,7 +2006,7 @@ namespace HeatBalanceManager { state.dataGlobal->NumOfZones = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject); state.dataHeatBal->Zone.allocate(state.dataGlobal->NumOfZones); - state.dataDaylightingData->ZoneDaylight.allocate(state.dataGlobal->NumOfZones); + state.dataDayltg->ZoneDaylight.allocate(state.dataGlobal->NumOfZones); // always allocate as the data structure is needed in output variable Zone Heat Index, Zone Humidity Index state.dataHeatBal->Resilience.allocate(state.dataGlobal->NumOfZones); @@ -2523,28 +2523,28 @@ namespace HeatBalanceManager { // Zone outdoor environmental variables, used for zone infiltration/ventilation SetupOutputVariable(state, "Zone Outdoor Air Drybulb Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBal->Zone(ZoneLoop).OutDryBulbTemp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(ZoneLoop).Name); SetupOutputVariable(state, "Zone Outdoor Air Wetbulb Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBal->Zone(ZoneLoop).OutWetBulbTemp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(ZoneLoop).Name); SetupOutputVariable(state, "Zone Outdoor Air Wind Speed", - OutputProcessor::Unit::m_s, + Constant::Units::m_s, state.dataHeatBal->Zone(ZoneLoop).WindSpeed, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(ZoneLoop).Name); SetupOutputVariable(state, "Zone Outdoor Air Wind Direction", - OutputProcessor::Unit::deg, + Constant::Units::deg, state.dataHeatBal->Zone(ZoneLoop).WindDir, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -2782,7 +2782,8 @@ namespace HeatBalanceManager { state.dataHeatBalMgr->CountWarmupDayPoints = 0; for (int SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; SurfNum++) { - state.dataSurface->SurfaceWindow(SurfNum).ThetaFace = 296.15; + std::fill( + state.dataSurface->SurfaceWindow(SurfNum).thetaFace.begin(), state.dataSurface->SurfaceWindow(SurfNum).thetaFace.end(), 296.15); state.dataSurface->SurfWinEffInsSurfTemp(SurfNum) = 23.0; } } diff --git a/src/EnergyPlus/HeatBalanceManager.hh b/src/EnergyPlus/HeatBalanceManager.hh index ce11d1fe43e..a28a0c46910 100644 --- a/src/EnergyPlus/HeatBalanceManager.hh +++ b/src/EnergyPlus/HeatBalanceManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceSurfaceManager.cc b/src/EnergyPlus/HeatBalanceSurfaceManager.cc index dfcfe000f59..0952daf924a 100644 --- a/src/EnergyPlus/HeatBalanceSurfaceManager.cc +++ b/src/EnergyPlus/HeatBalanceSurfaceManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -547,17 +547,22 @@ void InitSurfaceHeatBalance(EnergyPlusData &state) state.dataHeatBalFanSys->QRadSysSource(SurfNum) = 0.0; state.dataHeatBalFanSys->QPVSysSource(SurfNum) = 0.0; - state.dataHeatBalFanSys->SurfQHTRadSys(SurfNum) = 0.0; - state.dataHeatBalFanSys->SurfQHWBaseboard(SurfNum) = 0.0; - state.dataHeatBalFanSys->SurfQSteamBaseboard(SurfNum) = 0.0; - state.dataHeatBalFanSys->SurfQElecBaseboard(SurfNum) = 0.0; - state.dataHeatBalFanSys->SurfQCoolingPanel(SurfNum) = 0.0; state.dataHeatBalFanSys->QPoolSurfNumerator(SurfNum) = 0.0; state.dataHeatBalFanSys->PoolHeatTransCoefs(SurfNum) = 0.0; + } // ...end of Zone Surf loop } } // ...end of Zone loop + for (int surfNum : state.dataSurface->allGetsRadiantHeatSurfaceList) { + auto &thisSurfQRadFromHVAC = state.dataHeatBalFanSys->surfQRadFromHVAC(surfNum); + thisSurfQRadFromHVAC.HTRadSys = 0.0; + thisSurfQRadFromHVAC.HWBaseboard = 0.0; + thisSurfQRadFromHVAC.SteamBaseboard = 0.0; + thisSurfQRadFromHVAC.ElecBaseboard = 0.0; + thisSurfQRadFromHVAC.CoolingPanel = 0.0; + } + if (state.dataGlobal->ZoneSizingCalc) GatherComponentLoadsSurfAbsFact(state); if (state.dataHeatBalSurfMgr->InitSurfaceHeatBalancefirstTime) { @@ -1123,12 +1128,10 @@ void GatherForPredefinedReport(EnergyPlusData &state) ++numExtSurfaces(currSurfaceClass); } if (surface.Class == DataSurfaces::SurfaceClass::Window) { - if (state.dataSurface->SurfWinOriginalClass(iSurf) == DataSurfaces::SurfaceClass::GlassDoor || - state.dataSurface->SurfWinOriginalClass(iSurf) == DataSurfaces::SurfaceClass::TDD_Diffuser) { - int currOriginalSurfaceClass = int(state.dataSurface->SurfWinOriginalClass(iSurf)); - ++numSurfaces(currOriginalSurfaceClass); + if (surface.OriginalClass == DataSurfaces::SurfaceClass::GlassDoor || surface.OriginalClass == DataSurfaces::SurfaceClass::TDD_Diffuser) { + ++numSurfaces((int)surface.OriginalClass); if (isExterior) { - ++numExtSurfaces(currOriginalSurfaceClass); + ++numExtSurfaces((int)surface.OriginalClass); } } } @@ -1375,7 +1378,6 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) state.dataHeatBalSurf->SurfQRadIntGainsInRep.dimension(state.dataSurface->TotSurfaces, 0.0); state.dataHeatBalSurf->SurfQdotRadIntGainsInRep.dimension(state.dataSurface->TotSurfaces, 0.0); - state.dataHeatBalSurf->AnyRadiantSystems.dimension(state.dataSurface->TotSurfaces, false); state.dataHeatBalSurf->SurfQRadHVACInRep.dimension(state.dataSurface->TotSurfaces, 0.0); state.dataHeatBalSurf->SurfQdotRadHVACInRep.dimension(state.dataSurface->TotSurfaces, 0.0); state.dataHeatBalSurf->SurfQdotRadHVACInPerArea.dimension(state.dataSurface->TotSurfaces, 0.0); @@ -1448,11 +1450,7 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) state.dataHeatBalFanSys->RadSysToHBQsrcCoef.dimension(state.dataSurface->TotSurfaces, 0.0); state.dataHeatBalFanSys->QRadSysSource.dimension(state.dataSurface->TotSurfaces, 0.0); state.dataHeatBalFanSys->TCondFDSourceNode.dimension(state.dataSurface->TotSurfaces, 15.0); - state.dataHeatBalFanSys->SurfQHTRadSys.dimension(state.dataSurface->TotSurfaces, 0.0); - state.dataHeatBalFanSys->SurfQHWBaseboard.dimension(state.dataSurface->TotSurfaces, 0.0); - state.dataHeatBalFanSys->SurfQSteamBaseboard.dimension(state.dataSurface->TotSurfaces, 0.0); - state.dataHeatBalFanSys->SurfQElecBaseboard.dimension(state.dataSurface->TotSurfaces, 0.0); - state.dataHeatBalFanSys->SurfQCoolingPanel.dimension(state.dataSurface->TotSurfaces, 0.0); + state.dataHeatBalFanSys->surfQRadFromHVAC.allocate(state.dataSurface->TotSurfaces); state.dataHeatBalFanSys->QRadSurfAFNDuct.dimension(state.dataSurface->TotSurfaces, 0.0); // allocate terms used for pool surface heat balance @@ -1498,14 +1496,14 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) if (!surface.HeatTransSurf) continue; SetupOutputVariable(state, "Surface Inside Face Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBalSurf->SurfTempIn(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Inside Face Interior Movable Insulation Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBalSurf->SurfTempInMovInsRep(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -1514,7 +1512,7 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) if (surface.ExtBoundCond != DataSurfaces::KivaFoundation) { SetupOutputVariable(state, "Surface Outside Face Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBalSurf->SurfTempOut(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -1523,35 +1521,35 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) SetupOutputVariable(state, "Surface Inside Face Adjacent Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBal->SurfTempEffBulkAir(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Inside Face Convection Heat Transfer Coefficient", - OutputProcessor::Unit::W_m2K, + Constant::Units::W_m2K, state.dataHeatBalSurf->SurfHConvInt(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Inside Face Convection Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBalSurf->SurfQdotConvInRep(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Inside Face Convection Heat Gain Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBalSurf->SurfQdotConvInPerArea(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Inside Face Convection Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBalSurf->SurfQConvInRep(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -1559,21 +1557,21 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) SetupOutputVariable(state, "Surface Inside Face Net Surface Thermal Radiation Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBalSurf->SurfQdotRadNetSurfInRep(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Inside Face Net Surface Thermal Radiation Heat Gain Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBalSurf->SurfQdotRadNetLWInPerArea(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Inside Face Net Surface Thermal Radiation Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBalSurf->SurfQRadNetSurfInRep(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -1582,21 +1580,21 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) if (surface.Class != DataSurfaces::SurfaceClass::Window) { SetupOutputVariable(state, "Surface Inside Face Solar Radiation Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBalSurf->SurfQdotRadSolarInRep(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Inside Face Solar Radiation Heat Gain Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBalSurf->SurfQdotRadSolarInRepPerArea(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Inside Face Solar Radiation Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBalSurf->SurfQRadSolarInRep(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -1604,21 +1602,21 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) SetupOutputVariable(state, "Surface Inside Face Lights Radiation Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBalSurf->SurfQdotRadLightsInRep(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Inside Face Lights Radiation Heat Gain Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBalSurf->SurfQdotRadLightsInPerArea(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Inside Face Lights Radiation Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBalSurf->SurfQRadLightsInRep(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -1627,21 +1625,21 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) SetupOutputVariable(state, "Surface Inside Face Internal Gains Radiation Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBalSurf->SurfQdotRadIntGainsInRep(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Inside Face Internal Gains Radiation Heat Gain Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBal->SurfQdotRadIntGainsInPerArea(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Inside Face Internal Gains Radiation Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBalSurf->SurfQRadIntGainsInRep(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -1649,21 +1647,21 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) SetupOutputVariable(state, "Surface Inside Face System Radiation Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBalSurf->SurfQdotRadHVACInRep(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Inside Face System Radiation Heat Gain Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBalSurf->SurfQdotRadHVACInPerArea(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Inside Face System Radiation Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBalSurf->SurfQRadHVACInRep(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -1672,112 +1670,112 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) if (surface.ExtBoundCond == DataSurfaces::ExternalEnvironment || state.dataGlobal->DisplayAdvancedReportVariables) { SetupOutputVariable(state, "Surface Outside Face Outdoor Air Drybulb Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSurface->SurfOutDryBulbTemp(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Outside Face Outdoor Air Wetbulb Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSurface->SurfOutWetBulbTemp(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Outside Face Outdoor Air Wind Speed", - OutputProcessor::Unit::m_s, + Constant::Units::m_s, state.dataSurface->SurfOutWindSpeed(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Outside Face Outdoor Air Wind Direction", - OutputProcessor::Unit::deg, + Constant::Units::deg, state.dataSurface->SurfOutWindDir(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Outside Face Convection Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBalSurf->SurfQdotConvOutRep(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Outside Face Convection Heat Gain Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBalSurf->SurfQdotConvOutPerArea(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Outside Face Convection Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBalSurf->SurfQConvOutReport(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, surface.Name); SetupOutputVariable(state, "Surface Outside Face Convection Heat Transfer Coefficient", - OutputProcessor::Unit::W_m2K, + Constant::Units::W_m2K, state.dataHeatBalSurf->SurfHConvExt(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Outside Face Net Thermal Radiation Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBalSurf->SurfQdotRadOutRep(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Outside Face Net Thermal Radiation Heat Gain Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBalSurf->SurfQdotRadOutRepPerArea(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Outside Face Net Thermal Radiation Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBalSurf->SurfQRadOutReport(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, surface.Name); SetupOutputVariable(state, "Surface Outside Face Thermal Radiation to Air Heat Transfer Coefficient", - OutputProcessor::Unit::W_m2K, + Constant::Units::W_m2K, state.dataHeatBalSurf->SurfHAirExt(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Outside Face Thermal Radiation to Sky Heat Transfer Coefficient", - OutputProcessor::Unit::W_m2K, + Constant::Units::W_m2K, state.dataHeatBalSurf->SurfHSkyExt(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Outside Face Thermal Radiation to Ground Heat Transfer Coefficient", - OutputProcessor::Unit::W_m2K, + Constant::Units::W_m2K, state.dataHeatBalSurf->SurfHGrdExt(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Outside Face Thermal Radiation to Air Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBalSurf->SurfQAirExtReport(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Outside Face Heat Emission to Air Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBalSurf->SurfQHeatEmiReport(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -1786,21 +1784,21 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) if (surface.Class != DataSurfaces::SurfaceClass::Window) { SetupOutputVariable(state, "Surface Outside Face Solar Radiation Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->SurfOpaqSWOutAbsTotalReport(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, surface.Name); SetupOutputVariable(state, "Surface Outside Face Solar Radiation Heat Gain Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBalSurf->SurfOpaqQRadSWOutAbs(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, surface.Name); SetupOutputVariable(state, "Surface Outside Face Solar Radiation Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->SurfOpaqSWOutAbsEnergyReport(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -1813,35 +1811,35 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) // IF (DisplayAdvancedReportVariables) THEN !CurrentModuleObject='Opaque Surfaces(Advanced)' SetupOutputVariable(state, "Surface Inside Face Conduction Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBalSurf->SurfOpaqInsFaceCond(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Inside Face Conduction Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBalSurf->SurfOpaqInsFaceCondGainRep(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Inside Face Conduction Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBalSurf->SurfOpaqInsFaceCondLossRep(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Inside Face Conduction Heat Transfer Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBalSurf->SurfOpaqInsFaceCondFlux(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Inside Face Conduction Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBalSurf->SurfOpaqInsFaceCondEnergy(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -1850,35 +1848,35 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) if (surface.ExtBoundCond != DataSurfaces::KivaFoundation) { SetupOutputVariable(state, "Surface Outside Face Conduction Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBalSurf->SurfOpaqOutFaceCond(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Outside Face Conduction Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBalSurf->SurfOpaqExtFaceCondGainRep(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Outside Face Conduction Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBalSurf->SurfOpaqExtFaceCondLossRep(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Outside Face Conduction Heat Transfer Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBalSurf->SurfOpaqOutFaceCondFlux(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Outside Face Conduction Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBalSurf->SurfOpaqOutFaceCondEnergy(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -1886,35 +1884,35 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) SetupOutputVariable(state, "Surface Average Face Conduction Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBalSurf->SurfOpaqAvgFaceCond(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Average Face Conduction Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBalSurf->SurfOpaqAvgFaceCondGainRep(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Average Face Conduction Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBalSurf->SurfOpaqAvgFaceCondLossRep(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Average Face Conduction Heat Transfer Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBalSurf->SurfOpaqAvgFaceCondFlux(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Average Face Conduction Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBalSurf->SurfOpaqAvgFaceCondEnergy(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -1922,35 +1920,35 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) SetupOutputVariable(state, "Surface Heat Storage Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBalSurf->SurfOpaqStorageCond(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Heat Storage Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBalSurf->SurfOpaqStorageCondGainRep(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Heat Storage Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBalSurf->SurfOpaqStorageCondLossRep(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Heat Storage Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBalSurf->SurfOpaqStorageCondFlux(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Heat Storage Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBalSurf->SurfOpaqStorageCondEnergy(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -1962,7 +1960,7 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) SetupOutputVariable(state, "Surface Inside Face Beam Solar Radiation Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBalSurf->SurfOpaqInsFaceBeamSolAbsorbed(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -1971,14 +1969,14 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) if (state.dataConstruction->Construct(surface.Construction).SourceSinkPresent) { SetupOutputVariable(state, "Surface Internal Source Location Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBalSurf->SurfTempSource(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Internal User Specified Location Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBalSurf->SurfTempUserLoc(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -1988,21 +1986,21 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) if (surface.Class == DataSurfaces::SurfaceClass::Window) { // CurrentModuleObject='Windows' SetupOutputVariable(state, "Surface Shading Device Is On Time Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinFracTimeShadingDeviceOn(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, surface.Name); SetupOutputVariable(state, "Surface Storm Window On Off Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinStormWinFlag(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surface.Name); SetupOutputVariable(state, "Surface Window Blind Slat Angle", - OutputProcessor::Unit::deg, + Constant::Units::deg, state.dataSurface->SurfWinSlatAngThisTSDeg(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -2011,21 +2009,21 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) // IF (DisplayAdvancedReportVariables) THEN !CurrentModuleObject='Opaque Surfaces(Advanced)' SetupOutputVariable(state, "Surface Inside Face Convection Classification Index", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->surfIntConv(loop).convClassRpt, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, surface.Name); SetupOutputVariable(state, "Surface Inside Face Convection Model Equation Index", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->surfIntConv(loop).hcModelEqRpt, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, surface.Name); SetupOutputVariable(state, "Surface Inside Face Convection Reference Air Index", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfTAirRefRpt(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -2033,21 +2031,21 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) if (surface.ExtBoundCond == DataSurfaces::ExternalEnvironment) { SetupOutputVariable(state, "Surface Outside Face Convection Classification Index", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->surfExtConv(loop).convClassRpt, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, surface.Name); SetupOutputVariable(state, "Surface Outside Face Forced Convection Model Equation Index", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->surfExtConv(loop).hfModelEqRpt, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, surface.Name); SetupOutputVariable(state, "Surface Outside Face Natural Convection Model Equation Index", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->surfExtConv(loop).hnModelEqRpt, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -2056,14 +2054,14 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) SetupOutputVariable(state, "Surface Inside Face Heat Source Gain Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBalSurf->SurfQAdditionalHeatSourceInside(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, surface.Name); SetupOutputVariable(state, "Surface Outside Face Heat Source Gain Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBalSurf->SurfQAdditionalHeatSourceOutside(loop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -2073,7 +2071,7 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) if (state.dataGlobal->DisplayAdvancedReportVariables) { SetupOutputVariable(state, "Surface Construction Index", - OutputProcessor::Unit::None, + Constant::Units::None, surface.Construction, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -2082,7 +2080,7 @@ void AllocateSurfaceHeatBalArrays(EnergyPlusData &state) } SetupOutputVariable(state, "Site Total Surface Heat Emission to Air", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBalSurf->SumSurfaceHeatEmission, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -2162,7 +2160,6 @@ void InitThermalAndFluxHistories(EnergyPlusData &state) state.dataHeatBalSurf->SurfQdotRadLightsInRep(SurfNum) = 0.0; state.dataHeatBalSurf->SurfQRadIntGainsInRep(SurfNum) = 0.0; state.dataHeatBalSurf->SurfQdotRadIntGainsInRep(SurfNum) = 0.0; - state.dataHeatBalSurf->AnyRadiantSystems(SurfNum) = false; state.dataHeatBalSurf->SurfQRadHVACInRep(SurfNum) = 0.0; state.dataHeatBalSurf->SurfQdotRadHVACInRep(SurfNum) = 0.0; state.dataHeatBalSurf->SurfQdotRadHVACInPerArea(SurfNum) = 0.0; @@ -3039,7 +3036,9 @@ void InitSolarHeatGains(EnergyPlusData &state) int const firstSurfWin = thisSpace.WindowSurfaceFirst; int const lastSurfWin = thisSpace.WindowSurfaceLast; for (int SurfNum = firstSurfWin; SurfNum <= lastSurfWin; ++SurfNum) { - if (Surface(SurfNum).ExtSolar || state.dataSurface->SurfWinOriginalClass(SurfNum) == DataSurfaces::SurfaceClass::TDD_Diffuser) { + auto &surf = state.dataSurface->Surface(SurfNum); + auto const &surfWin = state.dataSurface->SurfaceWindow(SurfNum); + if (surf.ExtSolar || surf.OriginalClass == DataSurfaces::SurfaceClass::TDD_Diffuser) { // Exclude special shading surfaces which required SurfOpaqQRadSWOut calculations above int const ConstrNum = state.dataSurface->SurfActiveConstruction(SurfNum); auto const &thisConstruct = state.dataConstruction->Construct(ConstrNum); @@ -3060,50 +3059,43 @@ void InitSolarHeatGains(EnergyPlusData &state) if (IS_SHADED(ShadeFlag)) { // Shaded window int const ConstrNumSh = state.dataSurface->SurfWinActiveShadedConstruction(SurfNum); // Shaded window construction + auto const &constructionSh = state.dataConstruction->Construct(ConstrNumSh); if (ANY_SHADE_SCREEN(ShadeFlag)) { // Shade/screen on for (int Lay = 1; Lay <= TotGlassLay; ++Lay) { - state.dataHeatBalSurfMgr->AbsDiffWin(Lay) = state.dataConstruction->Construct(ConstrNumSh).AbsDiff(Lay); + state.dataHeatBalSurfMgr->AbsDiffWin(Lay) = constructionSh.AbsDiff(Lay); } - state.dataSurface->SurfWinExtDiffAbsByShade(SurfNum) = - state.dataConstruction->Construct(ConstrNumSh).AbsDiffShade * (SkySolarInc + GndSolarInc); + state.dataSurface->SurfWinExtDiffAbsByShade(SurfNum) = constructionSh.AbsDiffShade * (SkySolarInc + GndSolarInc); } else if (ANY_BLIND(ShadeFlag)) { // Blind on int SurfWinSlatsAngIndex = state.dataSurface->SurfWinSlatsAngIndex(SurfNum); Real64 SurfWinSlatsAngInterpFac = state.dataSurface->SurfWinSlatsAngInterpFac(SurfNum); Real64 AbsDiffBlind; if (state.dataSurface->SurfWinMovableSlats(SurfNum)) { for (int Lay = 1; Lay <= TotGlassLay; ++Lay) { - AbsDiffWin(Lay) = - General::Interp(state.dataConstruction->Construct(ConstrNumSh).BlAbsDiff(SurfWinSlatsAngIndex, Lay), - state.dataConstruction->Construct(ConstrNumSh) - .BlAbsDiff(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1), Lay), - SurfWinSlatsAngInterpFac); + AbsDiffWin(Lay) = General::Interp( + constructionSh.BlAbsDiff(SurfWinSlatsAngIndex, Lay), + constructionSh.BlAbsDiff(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1), Lay), + SurfWinSlatsAngInterpFac); AbsDiffWinGnd(Lay) = General::Interp( - state.dataConstruction->Construct(ConstrNumSh).BlAbsDiffGnd(SurfWinSlatsAngIndex, Lay), - state.dataConstruction->Construct(ConstrNumSh) - .BlAbsDiffGnd(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1), Lay), + constructionSh.BlAbsDiffGnd(SurfWinSlatsAngIndex, Lay), + constructionSh.BlAbsDiffGnd(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1), Lay), SurfWinSlatsAngInterpFac); AbsDiffWinSky(Lay) = General::Interp( - state.dataConstruction->Construct(ConstrNumSh).BlAbsDiffSky(SurfWinSlatsAngIndex, Lay), - state.dataConstruction->Construct(ConstrNumSh) - .BlAbsDiffSky(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1), Lay), + constructionSh.BlAbsDiffSky(SurfWinSlatsAngIndex, Lay), + constructionSh.BlAbsDiffSky(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1), Lay), SurfWinSlatsAngInterpFac); } AbsDiffBlind = - General::Interp(state.dataConstruction->Construct(ConstrNumSh).AbsDiffBlind(SurfWinSlatsAngIndex), - state.dataConstruction->Construct(ConstrNumSh) - .AbsDiffBlind(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1)), + General::Interp(constructionSh.AbsDiffBlind(SurfWinSlatsAngIndex), + constructionSh.AbsDiffBlind(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1)), SurfWinSlatsAngInterpFac); } else { for (int Lay = 1; Lay <= TotGlassLay; ++Lay) { - state.dataHeatBalSurfMgr->AbsDiffWin(Lay) = - state.dataConstruction->Construct(ConstrNumSh).BlAbsDiff(1, Lay); - state.dataHeatBalSurfMgr->AbsDiffWinGnd(Lay) = - state.dataConstruction->Construct(ConstrNumSh).BlAbsDiffGnd(1, Lay); - state.dataHeatBalSurfMgr->AbsDiffWinSky(Lay) = - state.dataConstruction->Construct(ConstrNumSh).BlAbsDiffSky(1, Lay); + state.dataHeatBalSurfMgr->AbsDiffWin(Lay) = constructionSh.BlAbsDiff(1, Lay); + state.dataHeatBalSurfMgr->AbsDiffWinGnd(Lay) = constructionSh.BlAbsDiffGnd(1, Lay); + state.dataHeatBalSurfMgr->AbsDiffWinSky(Lay) = constructionSh.BlAbsDiffSky(1, Lay); } - AbsDiffBlind = state.dataConstruction->Construct(ConstrNumSh).AbsDiffBlind(1); + AbsDiffBlind = constructionSh.AbsDiffBlind(1); } state.dataSurface->SurfWinExtDiffAbsByShade(SurfNum) = AbsDiffBlind * (SkySolarInc + GndSolarInc); @@ -3113,19 +3105,17 @@ void InitSolarHeatGains(EnergyPlusData &state) Real64 AbsDiffBlindGnd; Real64 AbsDiffBlindSky; if (state.dataSurface->SurfWinMovableSlats(SurfNum)) { - AbsDiffBlindGnd = - General::Interp(state.dataConstruction->Construct(ConstrNumSh).AbsDiffBlindGnd(SurfWinSlatsAngIndex), - state.dataConstruction->Construct(ConstrNumSh) - .AbsDiffBlindGnd(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1)), - SurfWinSlatsAngInterpFac); - AbsDiffBlindSky = - General::Interp(state.dataConstruction->Construct(ConstrNumSh).AbsDiffBlindSky(SurfWinSlatsAngIndex), - state.dataConstruction->Construct(ConstrNumSh) - .AbsDiffBlindSky(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1)), - SurfWinSlatsAngInterpFac); + AbsDiffBlindGnd = General::Interp( + constructionSh.AbsDiffBlindGnd(SurfWinSlatsAngIndex), + constructionSh.AbsDiffBlindGnd(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1)), + SurfWinSlatsAngInterpFac); + AbsDiffBlindSky = General::Interp( + constructionSh.AbsDiffBlindSky(SurfWinSlatsAngIndex), + constructionSh.AbsDiffBlindSky(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1)), + SurfWinSlatsAngInterpFac); } else { - AbsDiffBlindGnd = state.dataConstruction->Construct(ConstrNumSh).AbsDiffBlindGnd(1); - AbsDiffBlindSky = state.dataConstruction->Construct(ConstrNumSh).AbsDiffBlindSky(1); + AbsDiffBlindGnd = constructionSh.AbsDiffBlindGnd(1); + AbsDiffBlindSky = constructionSh.AbsDiffBlindSky(1); } state.dataSurface->SurfWinExtDiffAbsByShade(SurfNum) = SkySolarInc * (0.5 * ACosTlt * AbsDiffBlindGnd + (1.0 - 0.5 * ACosTlt) * AbsDiffBlindSky) + @@ -3137,15 +3127,13 @@ void InitSolarHeatGains(EnergyPlusData &state) // not allowed in windows with between-glass shade/blind) if (ANY_INTERIOR_SHADE_BLIND(ShadeFlag) && state.dataSurface->SurfWinDividerArea(SurfNum) > 0.0) - state.dataSurface->SurfWinExtDiffAbsByShade(SurfNum) *= state.dataSurface->SurfWinGlazedFrac(SurfNum); + state.dataSurface->SurfWinExtDiffAbsByShade(SurfNum) *= surfWin.glazedFrac; if (ShadeFlag == DataSurfaces::WinShadingType::SwitchableGlazing) { // Switchable glazing Real64 SwitchFac = state.dataSurface->SurfWinSwitchingFactor(SurfNum); // Switching factor for switchable glazing for (int Lay = 1; Lay <= TotGlassLay; ++Lay) { - state.dataHeatBalSurfMgr->AbsDiffWin(Lay) = - WindowManager::InterpSw(SwitchFac, - state.dataHeatBalSurfMgr->AbsDiffWin(Lay), - state.dataConstruction->Construct(ConstrNumSh).AbsDiff(Lay)); + state.dataHeatBalSurfMgr->AbsDiffWin(Lay) = WindowManager::InterpSw( + SwitchFac, state.dataHeatBalSurfMgr->AbsDiffWin(Lay), constructionSh.AbsDiff(Lay)); } } @@ -3159,6 +3147,7 @@ void InitSolarHeatGains(EnergyPlusData &state) // SurfWinA is from InteriorSolarDistribution if (ANY_BLIND(ShadeFlag)) { int ConstrNumSh = Surface(SurfNum).activeShadedConstruction; + auto const &constructionSh = state.dataConstruction->Construct(ConstrNumSh); if (state.dataMaterial->Blind(state.dataSurface->SurfWinBlindNumber(SurfNum)).SlatOrientation == DataWindowEquivalentLayer::Orientation::Horizontal) { Real64 ACosTlt = std::abs(Surface(SurfNum).CosTilt); // Absolute value of cosine of surface tilt angle @@ -3166,22 +3155,18 @@ void InitSolarHeatGains(EnergyPlusData &state) Real64 AbsDiffGlassLaySky; // System glass layer sky diffuse solar absorptance with blind on if (state.dataSurface->SurfWinMovableSlats(SurfNum)) { AbsDiffGlassLayGnd = General::Interp( - state.dataConstruction->Construct(ConstrNumSh) - .BlAbsDiffGnd(state.dataSurface->SurfWinSlatsAngIndex(SurfNum), Lay), - state.dataConstruction->Construct(ConstrNumSh) - .BlAbsDiffGnd( - std::min(Material::MaxSlatAngs, state.dataSurface->SurfWinSlatsAngIndex(SurfNum) + 1), Lay), + constructionSh.BlAbsDiffGnd(state.dataSurface->SurfWinSlatsAngIndex(SurfNum), Lay), + constructionSh.BlAbsDiffGnd( + std::min(Material::MaxSlatAngs, state.dataSurface->SurfWinSlatsAngIndex(SurfNum) + 1), Lay), state.dataSurface->SurfWinSlatsAngInterpFac(SurfNum)); AbsDiffGlassLaySky = General::Interp( - state.dataConstruction->Construct(ConstrNumSh) - .BlAbsDiffSky(state.dataSurface->SurfWinSlatsAngIndex(SurfNum), Lay), - state.dataConstruction->Construct(ConstrNumSh) - .BlAbsDiffSky( - std::min(Material::MaxSlatAngs, state.dataSurface->SurfWinSlatsAngIndex(SurfNum) + 1), Lay), + constructionSh.BlAbsDiffSky(state.dataSurface->SurfWinSlatsAngIndex(SurfNum), Lay), + constructionSh.BlAbsDiffSky( + std::min(Material::MaxSlatAngs, state.dataSurface->SurfWinSlatsAngIndex(SurfNum) + 1), Lay), state.dataSurface->SurfWinSlatsAngInterpFac(SurfNum)); } else { - AbsDiffGlassLayGnd = state.dataConstruction->Construct(ConstrNumSh).BlAbsDiffGnd(1, Lay); - AbsDiffGlassLaySky = state.dataConstruction->Construct(ConstrNumSh).BlAbsDiffSky(1, Lay); + AbsDiffGlassLayGnd = constructionSh.BlAbsDiffGnd(1, Lay); + AbsDiffGlassLaySky = constructionSh.BlAbsDiffSky(1, Lay); } state.dataHeatBal->SurfWinQRadSWwinAbs(SurfNum, Lay) = SkySolarInc * (0.5 * ACosTlt * AbsDiffGlassLayGnd + (1.0 - 0.5 * ACosTlt) * AbsDiffGlassLaySky) + @@ -3275,7 +3260,7 @@ void InitSolarHeatGains(EnergyPlusData &state) state.dataHeatBal->SurfWinQRadSWwinAbsTot(SurfNum) * state.dataGlobal->TimeStepZoneSec; } else if (state.dataWindowManager->inExtWindowModel->isExternalLibraryModel()) { int SurfNum2 = SurfNum; - if (state.dataSurface->SurfWinOriginalClass(SurfNum) == DataSurfaces::SurfaceClass::TDD_Diffuser) { + if (state.dataSurface->Surface(SurfNum).OriginalClass == DataSurfaces::SurfaceClass::TDD_Diffuser) { SurfNum2 = state.dataDaylightingDevicesData->TDDPipe(state.dataSurface->SurfWinTDDPipeNum(SurfNum)).Dome; } @@ -3372,10 +3357,10 @@ void InitSolarHeatGains(EnergyPlusData &state) if (ShadeFlag == DataSurfaces::WinShadingType::SwitchableGlazing) { // Switchable glazing Real64 SwitchFac = state.dataSurface->SurfWinSwitchingFactor(SurfNum); int ConstrNumSh = Surface(SurfNum).activeShadedConstruction; - Real64 TransGlSh = - General::POLYF(CosInc, state.dataConstruction->Construct(ConstrNumSh).TransSolBeamCoef); + auto const &constructionSh = state.dataConstruction->Construct(ConstrNumSh); + Real64 TransGlSh = General::POLYF(CosInc, constructionSh.TransSolBeamCoef); TransGl = WindowManager::InterpSw(SwitchFac, TransGl, TransGlSh); - Real64 TransDiffGlSh = state.dataConstruction->Construct(ConstrNumSh).TransDiff; + Real64 TransDiffGlSh = constructionSh.TransDiff; TransDiffGl = WindowManager::InterpSw(SwitchFac, TransDiffGl, TransDiffGlSh); } // Beam solar on inside of frame @@ -3418,7 +3403,8 @@ void InitSolarHeatGains(EnergyPlusData &state) Real64 SwitchFac = state.dataSurface->SurfWinSwitchingFactor(SurfNum); int ConstrNumSh = Surface(SurfNum).activeShadedConstruction; if (ShadeFlag == DataSurfaces::WinShadingType::SwitchableGlazing) { // Switchable glazing - Real64 MatNumGlSh = state.dataConstruction->Construct(ConstrNumSh).LayerPoint(1); + auto const &constructionSh = state.dataConstruction->Construct(ConstrNumSh); + Real64 MatNumGlSh = constructionSh.LayerPoint(1); auto const *thisMaterialSh = dynamic_cast(state.dataMaterial->Material(MatNumGlSh)); assert(thisMaterialSh != nullptr); @@ -3464,11 +3450,12 @@ void InitSolarHeatGains(EnergyPlusData &state) if (ShadeFlag == DataSurfaces::WinShadingType::SwitchableGlazing) { // Switchable glazing Real64 SwitchFac = state.dataSurface->SurfWinSwitchingFactor(SurfNum); int ConstrNumSh = Surface(SurfNum).activeShadedConstruction; - Real64 TransGlSh = - General::POLYF(CosInc, state.dataConstruction->Construct(ConstrNumSh).TransSolBeamCoef); + auto const &constructionSh = state.dataConstruction->Construct(ConstrNumSh); + + Real64 TransGlSh = General::POLYF(CosInc, constructionSh.TransSolBeamCoef); // Outer glass solar trans, refl, absorptance if switched TransGl = WindowManager::InterpSw(SwitchFac, TransGl, TransGlSh); - Real64 TransDiffGlSh = state.dataConstruction->Construct(ConstrNumSh).TransDiff; + Real64 TransDiffGlSh = constructionSh.TransDiff; // Diffuse solar transmittance, switched construction TransDiffGl = WindowManager::InterpSw(SwitchFac, TransDiffGl, TransDiffGlSh); } @@ -3542,8 +3529,10 @@ void InitSolarHeatGains(EnergyPlusData &state) } else if (ShadeFlag == DataSurfaces::WinShadingType::ExtShade) { // Exterior shade int ConstrNumSh = Surface(SurfNum).activeShadedConstruction; - auto const *thisMaterial = dynamic_cast( - state.dataMaterial->Material(state.dataConstruction->Construct(ConstrNumSh).LayerPoint(1))); + auto const &constructionSh = state.dataConstruction->Construct(ConstrNumSh); + + auto const *thisMaterial = + dynamic_cast(state.dataMaterial->Material(constructionSh.LayerPoint(1))); assert(thisMaterial != nullptr); state.dataSurface->SurfWinDividerQRadOutAbs(SurfNum) = DividerAbs * thisMaterial->Trans * (DivIncSolarOutBm + DivIncSolarOutDif); @@ -3551,16 +3540,11 @@ void InitSolarHeatGains(EnergyPlusData &state) DividerAbs * thisMaterial->Trans * (DivIncSolarInBm + DivIncSolarInDif); } else if (ShadeFlag == DataSurfaces::WinShadingType::ExtScreen) { // Exterior screen + auto const &screen = state.dataMaterial->Screens(surfWin.screenNum); state.dataSurface->SurfWinDividerQRadOutAbs(SurfNum) = - DividerAbs * - (state.dataMaterial->Screens(state.dataSurface->SurfWinScreenNumber(SurfNum)).BmBmTrans + - state.dataMaterial->Screens(state.dataSurface->SurfWinScreenNumber(SurfNum)).BmDifTrans) * - (DivIncSolarOutBm + DivIncSolarOutDif); + DividerAbs * (screen.BmBmTrans + screen.BmDifTrans) * (DivIncSolarOutBm + DivIncSolarOutDif); state.dataSurface->SurfWinDividerQRadInAbs(SurfNum) = - DividerAbs * - (state.dataMaterial->Screens(state.dataSurface->SurfWinScreenNumber(SurfNum)).BmBmTrans + - state.dataMaterial->Screens(state.dataSurface->SurfWinScreenNumber(SurfNum)).BmDifTrans) * - (DivIncSolarInBm + DivIncSolarInDif); + DividerAbs * (screen.BmBmTrans + screen.BmDifTrans) * (DivIncSolarInBm + DivIncSolarInDif); } } } @@ -3818,6 +3802,7 @@ void InitIntSolarDistribution(EnergyPlusData &state) int const lastSurfWin = thisSpace.WindowSurfaceLast; for (int SurfNum = firstSurfWin; SurfNum <= lastSurfWin; ++SurfNum) { // Window auto const &surface = state.dataSurface->Surface(SurfNum); + auto const &surfWin = state.dataSurface->SurfaceWindow(SurfNum); int const radEnclosureNum = surface.RadEnclIndex; int const solEnclosureNum = surface.SolarEnclIndex; int const ConstrNum = state.dataSurface->SurfActiveConstruction(SurfNum); @@ -3856,23 +3841,21 @@ void InitIntSolarDistribution(EnergyPlusData &state) } } else if (ConstrNumSh != 0 && ShadeFlag != DataSurfaces::WinShadingType::SwitchableGlazing) { // Interior, exterior or between-glass shade, screen or blind in place - for (int IGlass = 1; IGlass <= state.dataConstruction->Construct(ConstrNumSh).TotGlassLayers; ++IGlass) { + auto const &constructionSh = state.dataConstruction->Construct(ConstrNumSh); + for (int IGlass = 1; IGlass <= constructionSh.TotGlassLayers; ++IGlass) { if (DataSurfaces::ANY_SHADE_SCREEN(ShadeFlag)) { state.dataHeatBal->SurfWinQRadSWwinAbs(SurfNum, IGlass) += - state.dataHeatBal->EnclSolQSWRad(solEnclosureNum) * - state.dataConstruction->Construct(ConstrNumSh).AbsDiffBack(IGlass); + state.dataHeatBal->EnclSolQSWRad(solEnclosureNum) * constructionSh.AbsDiffBack(IGlass); } else if (ShadeFlag == DataSurfaces::WinShadingType::IntBlind || ShadeFlag == DataSurfaces::WinShadingType::ExtBlind) { Real64 BlAbsDiffBk; // Glass layer back diffuse solar absorptance when blind in place if (state.dataSurface->SurfWinMovableSlats(SurfNum)) { BlAbsDiffBk = General::Interp( - state.dataConstruction->Construct(ConstrNumSh) - .BlAbsDiffBack(state.dataSurface->SurfWinSlatsAngIndex(SurfNum), IGlass), - state.dataConstruction->Construct(ConstrNumSh) - .BlAbsDiffBack(std::min(Material::MaxSlatAngs, state.dataSurface->SurfWinSlatsAngIndex(SurfNum) + 1), - IGlass), + constructionSh.BlAbsDiffBack(state.dataSurface->SurfWinSlatsAngIndex(SurfNum), IGlass), + constructionSh.BlAbsDiffBack( + std::min(Material::MaxSlatAngs, state.dataSurface->SurfWinSlatsAngIndex(SurfNum) + 1), IGlass), state.dataSurface->SurfWinSlatsAngInterpFac(SurfNum)); } else { - BlAbsDiffBk = state.dataConstruction->Construct(ConstrNumSh).BlAbsDiffBack(1, IGlass); + BlAbsDiffBk = constructionSh.BlAbsDiffBack(1, IGlass); } state.dataHeatBal->SurfWinQRadSWwinAbs(SurfNum, IGlass) += state.dataHeatBal->EnclSolQSWRad(solEnclosureNum) * BlAbsDiffBk; @@ -3880,18 +3863,18 @@ void InitIntSolarDistribution(EnergyPlusData &state) } if (ShadeFlag == DataSurfaces::WinShadingType::IntShade) { state.dataSurface->SurfWinIntLWAbsByShade(SurfNum) = state.dataViewFactor->EnclRadInfo(radEnclosureNum).radQThermalRad * - state.dataConstruction->Construct(ConstrNumSh).ShadeAbsorpThermal * + constructionSh.ShadeAbsorpThermal * state.dataViewFactor->EnclRadInfo(radEnclosureNum).radThermAbsMult; } else if (ShadeFlag == DataSurfaces::WinShadingType::IntBlind) { Real64 EffBlEmiss; // Blind emissivity (thermal absorptance) as part of glazing system if (state.dataSurface->SurfWinMovableSlats(SurfNum)) { EffBlEmiss = General::Interp( - state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss(state.dataSurface->SurfWinSlatsAngIndex(SurfNum)), - state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss( - std::min(Material::MaxSlatAngs, state.dataSurface->SurfWinSlatsAngIndex(SurfNum) + 1)), + state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss[state.dataSurface->SurfWinSlatsAngIndex(SurfNum)], + state.dataSurface->SurfaceWindow(SurfNum) + .EffShBlindEmiss[std::min(Material::MaxSlatAngs, state.dataSurface->SurfWinSlatsAngIndex(SurfNum) + 1)], state.dataSurface->SurfWinSlatsAngInterpFac(SurfNum)); } else { - EffBlEmiss = state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss(1); + EffBlEmiss = state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss[1]; } state.dataSurface->SurfWinIntLWAbsByShade(SurfNum) = state.dataViewFactor->EnclRadInfo(radEnclosureNum).radQThermalRad * EffBlEmiss * @@ -3899,33 +3882,33 @@ void InitIntSolarDistribution(EnergyPlusData &state) } if (DataSurfaces::ANY_SHADE_SCREEN(ShadeFlag)) { state.dataSurface->SurfWinIntSWAbsByShade(SurfNum) = - state.dataHeatBal->EnclSolQSWRad(solEnclosureNum) * state.dataConstruction->Construct(ConstrNumSh).AbsDiffBackShade; + state.dataHeatBal->EnclSolQSWRad(solEnclosureNum) * constructionSh.AbsDiffBackShade; } else if (DataSurfaces::ANY_BLIND(ShadeFlag)) { Real64 AbsDiffBkBl; if (state.dataSurface->SurfWinMovableSlats(SurfNum)) { - AbsDiffBkBl = General::Interp( - state.dataConstruction->Construct(ConstrNumSh).AbsDiffBackBlind(state.dataSurface->SurfWinSlatsAngIndex(SurfNum)), - state.dataConstruction->Construct(ConstrNumSh) - .AbsDiffBackBlind(std::min(Material::MaxSlatAngs, state.dataSurface->SurfWinSlatsAngIndex(SurfNum) + 1)), - state.dataSurface->SurfWinSlatsAngInterpFac(SurfNum)); + AbsDiffBkBl = General::Interp(constructionSh.AbsDiffBackBlind(state.dataSurface->SurfWinSlatsAngIndex(SurfNum)), + constructionSh.AbsDiffBackBlind(std::min( + Material::MaxSlatAngs, state.dataSurface->SurfWinSlatsAngIndex(SurfNum) + 1)), + state.dataSurface->SurfWinSlatsAngInterpFac(SurfNum)); } else { - AbsDiffBkBl = state.dataConstruction->Construct(ConstrNumSh).AbsDiffBackBlind(1); + AbsDiffBkBl = constructionSh.AbsDiffBackBlind(1); } state.dataSurface->SurfWinIntSWAbsByShade(SurfNum) = state.dataHeatBal->EnclSolQSWRad(solEnclosureNum) * AbsDiffBkBl; } // Correct for divider shadowing if (DataSurfaces::ANY_EXTERIOR_SHADE_BLIND_SCREEN(ShadeFlag)) { - state.dataSurface->SurfWinIntSWAbsByShade(SurfNum) *= state.dataSurface->SurfWinGlazedFrac(SurfNum); + state.dataSurface->SurfWinIntSWAbsByShade(SurfNum) *= surfWin.glazedFrac; } - } else if (ShadeFlag == DataSurfaces::WinShadingType::SwitchableGlazing) { // Switchable glazing + } else if (ShadeFlag == DataSurfaces::WinShadingType::SwitchableGlazing) { // Switchable glazing + auto const &constructionSh = state.dataConstruction->Construct(ConstrNumSh); // What was here before? for (int IGlass = 1; IGlass <= TotGlassLayers; ++IGlass) { state.dataHeatBal->SurfWinQRadSWwinAbs(SurfNum, IGlass) += state.dataHeatBal->EnclSolQSWRad(solEnclosureNum) * WindowManager::InterpSw(state.dataSurface->SurfWinSwitchingFactor(SurfNum), thisConstruct.AbsDiffBack(IGlass), - state.dataConstruction->Construct(ConstrNumSh).AbsDiffBack(IGlass)); + constructionSh.AbsDiffBack(IGlass)); } } // End of shading flag check @@ -3956,8 +3939,8 @@ void InitIntSolarDistribution(EnergyPlusData &state) } // Correct for interior shade transmittance if (ShadeFlag == DataSurfaces::WinShadingType::IntShade) { - int MatNumSh = state.dataConstruction->Construct(ConstrNumSh) - .LayerPoint(state.dataConstruction->Construct(ConstrNumSh).TotLayers); // Shade layer material number + auto const &constructionSh = state.dataConstruction->Construct(ConstrNumSh); + int MatNumSh = constructionSh.LayerPoint(constructionSh.TotLayers); // Shade layer material number auto const *thisMaterialSh = dynamic_cast(state.dataMaterial->Material(MatNumSh)); DividerSolAbs *= thisMaterialSh->Trans; DividerThermAbs *= thisMaterialSh->TransThermal; @@ -4061,8 +4044,9 @@ void InitIntSolarDistribution(EnergyPlusData &state) state.dataHeatBal->SurfWinQRadSWwinAbs(SurfNum, IGlass) += state.dataHeatBal->SurfWinInitialDifSolwinAbs(SurfNum, IGlass); } } else { + auto const &constructionSh = state.dataConstruction->Construct(ConstrNumSh); // Interior, exterior or between-glass shade, screen or blind in place - for (int IGlass = 1; IGlass <= state.dataConstruction->Construct(ConstrNumSh).TotGlassLayers; ++IGlass) { + for (int IGlass = 1; IGlass <= constructionSh.TotGlassLayers; ++IGlass) { state.dataHeatBal->SurfWinQRadSWwinAbs(SurfNum, IGlass) += state.dataHeatBal->SurfWinInitialDifSolwinAbs(SurfNum, IGlass); } if (DataSurfaces::ANY_SHADE_SCREEN(ShadeFlag) || DataSurfaces::ANY_BLIND(ShadeFlag)) { @@ -4118,8 +4102,8 @@ void ComputeIntThermalAbsorpFactors(EnergyPlusData &state) for (int SurfNum = firstSurfWin; SurfNum <= lastSurfWin; ++SurfNum) { DataSurfaces::WinShadingType ShadeFlag = state.dataSurface->SurfWinShadingFlag(SurfNum); if (DataSurfaces::ANY_INTERIOR_SHADE_BLIND(ShadeFlag)) { - Real64 BlindEmiss = state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss(1); - Real64 GlassEmiss = state.dataSurface->SurfaceWindow(SurfNum).EffGlassEmiss(1); + Real64 BlindEmiss = state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss[1]; + Real64 GlassEmiss = state.dataSurface->SurfaceWindow(SurfNum).EffGlassEmiss[1]; state.dataHeatBalSurf->SurfAbsThermalInt(SurfNum) = BlindEmiss + GlassEmiss; } else { int ConstrNum = state.dataSurface->SurfActiveConstruction(SurfNum); @@ -4139,12 +4123,12 @@ void ComputeIntThermalAbsorpFactors(EnergyPlusData &state) int SurfWinSlatsAngIndex = state.dataSurface->SurfWinSlatsAngIndex(SurfNum); Real64 SurfWinSlatsAngInterpFac = state.dataSurface->SurfWinSlatsAngInterpFac(SurfNum); BlindEmiss = General::Interp( - state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss(SurfWinSlatsAngIndex), - state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1)), + state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss[SurfWinSlatsAngIndex], + state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss[std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1)], SurfWinSlatsAngInterpFac); GlassEmiss = General::Interp( - state.dataSurface->SurfaceWindow(SurfNum).EffGlassEmiss(SurfWinSlatsAngIndex), - state.dataSurface->SurfaceWindow(SurfNum).EffGlassEmiss(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1)), + state.dataSurface->SurfaceWindow(SurfNum).EffGlassEmiss[SurfWinSlatsAngIndex], + state.dataSurface->SurfaceWindow(SurfNum).EffGlassEmiss[std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1)], SurfWinSlatsAngInterpFac); state.dataHeatBalSurf->SurfAbsThermalInt(SurfNum) = BlindEmiss + GlassEmiss; } @@ -4181,14 +4165,15 @@ void ComputeIntThermalAbsorpFactors(EnergyPlusData &state) if (DataSurfaces::ANY_INTERIOR_SHADE_BLIND(ShadeFlag)) { // Interior shade or blind in place int const ConstrNumSh = thisSurf.activeShadedConstruction; + auto const &constructionSh = state.dataConstruction->Construct(ConstrNumSh); + if (state.dataSurface->SurfWinHasShadeOrBlindLayer(SurfNum)) { // Shade layer material number - int MatNumSh = - state.dataConstruction->Construct(ConstrNumSh).LayerPoint(state.dataConstruction->Construct(ConstrNumSh).TotLayers); + int MatNumSh = constructionSh.LayerPoint(constructionSh.TotLayers); // Shade or blind IR transmittance Real64 TauShIR = dynamic_cast(state.dataMaterial->Material(MatNumSh))->TransThermal; // Effective emissivity of shade or blind - Real64 EffShDevEmiss = state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss(1); + Real64 EffShDevEmiss = state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss[1]; if (ShadeFlag == DataSurfaces::WinShadingType::IntBlind) { TauShIR = state.dataMaterial->Blind(state.dataSurface->SurfWinBlindNumber(SurfNum)).IRBackTrans(1); if (state.dataSurface->SurfWinMovableSlats(SurfNum)) { @@ -4199,9 +4184,9 @@ void ComputeIntThermalAbsorpFactors(EnergyPlusData &state) state.dataMaterial->Blind(state.dataSurface->SurfWinBlindNumber(SurfNum)) .IRBackTrans(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1)), SurfWinSlatsAngInterpFac); - EffShDevEmiss = General::Interp(state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss(SurfWinSlatsAngIndex), - state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss( - std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1)), + EffShDevEmiss = General::Interp(state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss[SurfWinSlatsAngIndex], + state.dataSurface->SurfaceWindow(SurfNum) + .EffShBlindEmiss[std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1)], SurfWinSlatsAngInterpFac); } } @@ -4282,28 +4267,28 @@ void ComputeIntSWAbsorpFactors(EnergyPlusData &state) // Window with shade, screen or blind if (ConstrNumSh != 0) { + auto const &constructionSh = state.dataConstruction->Construct(ConstrNumSh); if (DataSurfaces::ANY_SHADE_SCREEN(ShadeFlag)) { - AbsDiffLayWin = state.dataConstruction->Construct(ConstrNumSh).AbsDiffBack(Lay); + AbsDiffLayWin = constructionSh.AbsDiffBack(Lay); } else if (DataSurfaces::ANY_BLIND(ShadeFlag)) { if (state.dataSurface->SurfWinMovableSlats(SurfNum)) { AbsDiffLayWin = General::Interp( - state.dataConstruction->Construct(ConstrNumSh) - .BlAbsDiffBack(state.dataSurface->SurfWinSlatsAngIndex(SurfNum), Lay), - state.dataConstruction->Construct(ConstrNumSh) - .BlAbsDiffBack(std::min(Material::MaxSlatAngs, state.dataSurface->SurfWinSlatsAngIndex(SurfNum) + 1), - Lay), + constructionSh.BlAbsDiffBack(state.dataSurface->SurfWinSlatsAngIndex(SurfNum), Lay), + constructionSh.BlAbsDiffBack( + std::min(Material::MaxSlatAngs, state.dataSurface->SurfWinSlatsAngIndex(SurfNum) + 1), Lay), state.dataSurface->SurfWinSlatsAngInterpFac(SurfNum)); } else { - AbsDiffLayWin = state.dataConstruction->Construct(ConstrNumSh).BlAbsDiffBack(1, Lay); + AbsDiffLayWin = constructionSh.BlAbsDiffBack(1, Lay); } } } // Switchable glazing - if (ShadeFlag == DataSurfaces::WinShadingType::SwitchableGlazing) - AbsDiffLayWin = - WindowManager::InterpSw(SwitchFac, AbsDiffLayWin, state.dataConstruction->Construct(ConstrNumSh).AbsDiffBack(Lay)); - + if (ShadeFlag == DataSurfaces::WinShadingType::SwitchableGlazing) { + assert(ConstrNumSh > 0); // Should this be included in the if above + auto const &constructionSh = state.dataConstruction->Construct(ConstrNumSh); + AbsDiffLayWin = WindowManager::InterpSw(SwitchFac, AbsDiffLayWin, constructionSh.AbsDiffBack(Lay)); + } AbsDiffTotWin += AbsDiffLayWin; } @@ -4313,32 +4298,35 @@ void ComputeIntSWAbsorpFactors(EnergyPlusData &state) // Window with shade, screen or blind if (ConstrNumSh != 0) { + auto &constructionSh = state.dataConstruction->Construct(ConstrNumSh); if (ANY_SHADE_SCREEN(ShadeFlag)) { - TransDiffWin = state.dataConstruction->Construct(ConstrNumSh).TransDiff; - DiffAbsShade = state.dataConstruction->Construct(ConstrNumSh).AbsDiffBackShade; + TransDiffWin = constructionSh.TransDiff; + DiffAbsShade = constructionSh.AbsDiffBackShade; } else if (ANY_BLIND(ShadeFlag)) { if (state.dataSurface->SurfWinMovableSlats(SurfNum)) { int SurfWinSlatsAngIndex = state.dataSurface->SurfWinSlatsAngIndex(SurfNum); Real64 SurfWinSlatsAngInterpFac = state.dataSurface->SurfWinSlatsAngInterpFac(SurfNum); - TransDiffWin = General::Interp(state.dataConstruction->Construct(ConstrNumSh).BlTransDiff(SurfWinSlatsAngIndex), - state.dataConstruction->Construct(ConstrNumSh) - .BlTransDiff(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1)), - SurfWinSlatsAngInterpFac); - DiffAbsShade = General::Interp(state.dataConstruction->Construct(ConstrNumSh).AbsDiffBackBlind(SurfWinSlatsAngIndex), - state.dataConstruction->Construct(ConstrNumSh) - .AbsDiffBackBlind(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1)), + TransDiffWin = General::Interp(constructionSh.BlTransDiff(SurfWinSlatsAngIndex), + constructionSh.BlTransDiff(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1)), SurfWinSlatsAngInterpFac); + DiffAbsShade = + General::Interp(constructionSh.AbsDiffBackBlind(SurfWinSlatsAngIndex), + constructionSh.AbsDiffBackBlind(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1)), + SurfWinSlatsAngInterpFac); } else { - TransDiffWin = state.dataConstruction->Construct(ConstrNumSh).BlTransDiff(1); - DiffAbsShade = state.dataConstruction->Construct(ConstrNumSh).AbsDiffBackBlind(1); + TransDiffWin = constructionSh.BlTransDiff(1); + DiffAbsShade = constructionSh.AbsDiffBackBlind(1); } } } // Switchable glazing - if (ShadeFlag == DataSurfaces::WinShadingType::SwitchableGlazing) - TransDiffWin = WindowManager::InterpSw(SwitchFac, TransDiffWin, state.dataConstruction->Construct(ConstrNumSh).TransDiff); + if (ShadeFlag == DataSurfaces::WinShadingType::SwitchableGlazing) { + assert(ConstrNumSh > 0); + auto const &constructionSh = state.dataConstruction->Construct(ConstrNumSh); + TransDiffWin = WindowManager::InterpSw(SwitchFac, TransDiffWin, constructionSh.TransDiff); + } SUM1 += thisSurf.Area * (TransDiffWin + AbsDiffTotWin + DiffAbsShade); @@ -5575,23 +5563,23 @@ void CalcThermalResilience(EnergyPlusData &state) for (int ZoneNum = 1; ZoneNum <= state.dataGlobal->NumOfZones; ++ZoneNum) { SetupOutputVariable(state, "Zone Heat Index", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBal->Resilience(ZoneNum).ZoneHeatIndex, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataHeatBal->Zone(ZoneNum).Name); SetupOutputVariable(state, "Zone Humidity Index", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataHeatBal->Resilience(ZoneNum).ZoneHumidex, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataHeatBal->Zone(ZoneNum).Name); } - for (int Loop = 1; Loop <= state.dataOutputProcessor->NumOfReqVariables; ++Loop) { - if (state.dataOutputProcessor->ReqRepVars(Loop).VarName == "Zone Heat Index") { + for (auto const *reqVar : state.dataOutputProcessor->reqVars) { + if (reqVar->name == "Zone Heat Index") { state.dataHeatBalSurfMgr->reportVarHeatIndex = true; - } else if (state.dataOutputProcessor->ReqRepVars(Loop).VarName == "Zone Humidity Index") { + } else if (reqVar->name == "Zone Humidity Index") { state.dataHeatBalSurfMgr->reportVarHumidex = true; } } @@ -6322,7 +6310,7 @@ void ReportVisualResilience(EnergyPlusData &state) } } state.dataHeatBalSurfMgr->reportVisualResilienceFirstTime = false; - if ((int)state.dataDaylightingData->daylightControl.size() == 0) { + if ((int)state.dataDayltg->daylightControl.size() == 0) { if (state.dataOutRptTab->displayVisualResilienceSummaryExplicitly) { ShowWarningError(state, "Writing Annual Visual Resilience Summary - Lighting Level Hours reports: " @@ -6343,19 +6331,18 @@ void ReportVisualResilience(EnergyPlusData &state) } // Accumulate across daylighting controls first for (int ZoneNum = 1; ZoneNum <= state.dataGlobal->NumOfZones; ++ZoneNum) { - state.dataDaylightingData->ZoneDaylight(ZoneNum).zoneAvgIllumSum = 0.0; + state.dataDayltg->ZoneDaylight(ZoneNum).zoneAvgIllumSum = 0.0; } - for (int daylightCtrlNum = 1; daylightCtrlNum <= (int)state.dataDaylightingData->daylightControl.size(); ++daylightCtrlNum) { - auto &thisDaylightControl = state.dataDaylightingData->daylightControl(daylightCtrlNum); + for (int daylightCtrlNum = 1; daylightCtrlNum <= (int)state.dataDayltg->daylightControl.size(); ++daylightCtrlNum) { + auto &thisDaylightControl = state.dataDayltg->daylightControl(daylightCtrlNum); if (thisDaylightControl.PowerReductionFactor > 0) { for (int refPt = 1; refPt <= thisDaylightControl.TotalDaylRefPoints; ++refPt) { - state.dataDaylightingData->ZoneDaylight(thisDaylightControl.zoneIndex).zoneAvgIllumSum += - thisDaylightControl.IllumSetPoint(refPt); + state.dataDayltg->ZoneDaylight(thisDaylightControl.zoneIndex).zoneAvgIllumSum += thisDaylightControl.refPts(refPt).illumSetPoint; } } else { for (int refPt = 1; refPt <= thisDaylightControl.TotalDaylRefPoints; ++refPt) { - state.dataDaylightingData->ZoneDaylight(thisDaylightControl.zoneIndex).zoneAvgIllumSum += - thisDaylightControl.DaylIllumAtRefPt(refPt); + state.dataDayltg->ZoneDaylight(thisDaylightControl.zoneIndex).zoneAvgIllumSum += + thisDaylightControl.refPts(refPt).lums[(int)DataSurfaces::Lum::Illum]; } } } @@ -6376,10 +6363,9 @@ void ReportVisualResilience(EnergyPlusData &state) } for (int ZoneNum = 1; ZoneNum <= state.dataGlobal->NumOfZones; ++ZoneNum) { - if (state.dataDaylightingData->ZoneDaylight(ZoneNum).totRefPts == 0) continue; + if (state.dataDayltg->ZoneDaylight(ZoneNum).totRefPts == 0) continue; // Now divide by total reference points to get average - Real64 avgZoneIllum = - state.dataDaylightingData->ZoneDaylight(ZoneNum).zoneAvgIllumSum / state.dataDaylightingData->ZoneDaylight(ZoneNum).totRefPts; + Real64 avgZoneIllum = state.dataDayltg->ZoneDaylight(ZoneNum).zoneAvgIllumSum / state.dataDayltg->ZoneDaylight(ZoneNum).totRefPts; Real64 NumOcc = state.dataHeatBal->Resilience(ZoneNum).ZoneNumOcc; if (avgZoneIllum <= 100) { @@ -6559,7 +6545,7 @@ void ReportSurfaceHeatBalance(EnergyPlusData &state) } state.dataSurface->SurfWinHeatTransferRepEnergy(surfNum) = state.dataSurface->SurfWinHeatGain(surfNum) * state.dataGlobal->TimeStepZoneSec; - if (state.dataSurface->SurfWinOriginalClass(surfNum) == DataSurfaces::SurfaceClass::TDD_Diffuser) { // Tubular daylighting device + if (state.dataSurface->Surface(surfNum).OriginalClass == DataSurfaces::SurfaceClass::TDD_Diffuser) { // Tubular daylighting device int pipeNum = state.dataSurface->SurfWinTDDPipeNum(surfNum); state.dataDaylightingDevicesData->TDDPipe(pipeNum).HeatGain = state.dataSurface->SurfWinHeatGainRep(surfNum); state.dataDaylightingDevicesData->TDDPipe(pipeNum).HeatLoss = state.dataSurface->SurfWinHeatLossRep(surfNum); @@ -6876,6 +6862,11 @@ void CalcHeatBalanceOutsideSurf(EnergyPlusData &state, state, state.dataHeatBalSurf->SurfInsideTempHist(1), 0, state.dataHeatBalSurf->SurfQdotRadNetLWInPerArea, _, Outside); } + // Calculate heat extract due to additional heat flux source term as the surface boundary condition + for (int surfNum : state.dataSurface->allOutsideSourceSurfaceList) { + state.dataHeatBalSurf->SurfQAdditionalHeatSourceOutside(surfNum) = + EnergyPlus::ScheduleManager::GetCurrentScheduleValue(state, Surface(surfNum).OutsideHeatSourceTermSchedule); + } for (int zoneNum = 1; zoneNum <= state.dataGlobal->NumOfZones; ++zoneNum) { // Loop through all surfaces... for (int spaceNum : state.dataHeatBal->Zone(zoneNum).spaceIndexes) { auto &thisSpace = state.dataHeatBal->space(spaceNum); @@ -6903,13 +6894,6 @@ void CalcHeatBalanceOutsideSurf(EnergyPlusData &state, state.dataHeatBalSurf->SurfHGrdExt(SurfNum) = 0.0; state.dataHeatBalSurf->SurfQRadLWOutSrdSurfs(SurfNum) = 0.0; - // Calculate heat extract due to additional heat flux source term as the surface boundary condition - - if (Surface(SurfNum).OutsideHeatSourceTermSchedule) { - state.dataHeatBalSurf->SurfQAdditionalHeatSourceOutside(SurfNum) = - EnergyPlus::ScheduleManager::GetCurrentScheduleValue(state, Surface(SurfNum).OutsideHeatSourceTermSchedule); - } - // Calculate the current outside surface temperature TH(SurfNum,1,1) for the // various different boundary conditions switch (Surface(SurfNum).ExtBoundCond) { @@ -7531,7 +7515,7 @@ void CalcHeatBalanceInsideSurf(EnergyPlusData &state, if (state.dataGlobal->DisplayAdvancedReportVariables) { SetupOutputVariable(state, "Surface Inside Face Heat Balance Calculation Iteration Count", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataHeatBal->InsideSurfIterations, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -7571,11 +7555,12 @@ void CalcHeatBalanceInsideSurf(EnergyPlusData &state, state.dataHeatBalSurfMgr->calcHeatBalInsideSurEnvrnFlag = true; } + sumSurfQdotRadHVAC(state); + // Pass correct list of surfaces to CalcHeatBalanceInsideSurf2 bool const PartialResimulate(present(ZoneToResimulate)); if (!PartialResimulate) { - if (state.dataHeatBal->AllCTF) { CalcHeatBalanceInsideSurf2CTFOnly(state, 1, state.dataGlobal->NumOfZones, state.dataSurface->AllIZSurfaceList); } else { @@ -7679,13 +7664,9 @@ void CalcHeatBalanceInsideSurf2(EnergyPlusData &state, state.dataHeatBal->InsideSurfIterations = 0; // Calculate heat extract due to additional heat flux source term as the surface boundary condition - if (state.dataSurface->AnyHeatBalanceInsideSourceTerm) { - for (int SurfNum : HTSurfs) { - if (state.dataSurface->Surface(SurfNum).InsideHeatSourceTermSchedule) { - state.dataHeatBalSurf->SurfQAdditionalHeatSourceInside(SurfNum) = - EnergyPlus::ScheduleManager::GetCurrentScheduleValue(state, state.dataSurface->Surface(SurfNum).InsideHeatSourceTermSchedule); - } - } + for (int surfNum : state.dataSurface->allInsideSourceSurfaceList) { + state.dataHeatBalSurf->SurfQAdditionalHeatSourceInside(surfNum) = + EnergyPlus::ScheduleManager::GetCurrentScheduleValue(state, state.dataSurface->Surface(surfNum).InsideHeatSourceTermSchedule); } // Calculate Kiva instances @@ -7797,8 +7778,6 @@ void CalcHeatBalanceInsideSurf2(EnergyPlusData &state, state, SurfNum, state.dataHeatBalSurf->SurfTempInTmp(SurfNum), MAT_zone, SurfTempInSat); } // Pre-calculate a few terms - if (state.dataHeatBalSurf->AnyRadiantSystems(SurfNum)) - state.dataHeatBalSurf->SurfQdotRadHVACInPerArea(SurfNum) = GetSurfQdotRadHVACInPerArea(state, SurfNum); Real64 const TempTerm( state.dataHeatBalSurf->SurfCTFConstInPart(SurfNum) + state.dataHeatBal->SurfQdotRadIntGainsInPerArea(SurfNum) + state.dataHeatBalSurf->SurfOpaqQRadSWInAbs(SurfNum) + state.dataHeatBalSurf->SurfQAdditionalHeatSourceInside(SurfNum) + @@ -7907,8 +7886,6 @@ void CalcHeatBalanceInsideSurf2(EnergyPlusData &state, state, SurfNum, state.dataHeatBalSurf->SurfTempInTmp(SurfNum), MAT_zone, SurfTempInSat); } // Pre-calculate a few terms - if (state.dataHeatBalSurf->AnyRadiantSystems(SurfNum)) - state.dataHeatBalSurf->SurfQdotRadHVACInPerArea(SurfNum) = GetSurfQdotRadHVACInPerArea(state, SurfNum); Real64 const TempTerm( state.dataHeatBalSurf->SurfCTFConstInPart(SurfNum) + state.dataHeatBal->SurfQdotRadIntGainsInPerArea(SurfNum) + state.dataHeatBalSurf->SurfOpaqQRadSWInAbs(SurfNum) + state.dataHeatBalSurf->SurfQAdditionalHeatSourceInside(SurfNum) + @@ -8063,8 +8040,6 @@ void CalcHeatBalanceInsideSurf2(EnergyPlusData &state, Real64 F1 = HMovInsul / (HMovInsul + HConvIn_surf + DataHeatBalSurface::IterDampConst); - if (state.dataHeatBalSurf->AnyRadiantSystems(SurfNum)) - state.dataHeatBalSurf->SurfQdotRadHVACInPerArea(SurfNum) = GetSurfQdotRadHVACInPerArea(state, SurfNum); state.dataHeatBalSurf->SurfTempIn(SurfNum) = (state.dataHeatBalSurf->SurfCTFConstInPart(SurfNum) + state.dataHeatBalSurf->SurfOpaqQRadSWInAbs(SurfNum) + construct.CTFCross[0] * TH11 + @@ -8098,7 +8073,7 @@ void CalcHeatBalanceInsideSurf2(EnergyPlusData &state, Real64 &TH11 = state.dataHeatBalSurf->SurfOutsideTempHist(1)(SurfNum); int const ConstrNum = state.dataSurface->SurfActiveConstruction(SurfNum); // Not const, because storm window may change this auto const &construct = state.dataConstruction->Construct(ConstrNum); - if (state.dataSurface->SurfWinOriginalClass(SurfNum) == DataSurfaces::SurfaceClass::TDD_Diffuser) { // Tubular daylighting device + if (surface.OriginalClass == DataSurfaces::SurfaceClass::TDD_Diffuser) { // Tubular daylighting device // Lookup up the TDD:DOME object int const pipeNum = state.dataSurface->SurfWinTDDPipeNum(SurfNum); int const domeNum = state.dataDaylightingDevicesData->TDDPipe(pipeNum).Dome; @@ -8126,8 +8101,6 @@ void CalcHeatBalanceInsideSurf2(EnergyPlusData &state, Real64 const Sigma_Temp_4(Constant::StefanBoltzmann * pow_4(state.dataHeatBalSurf->SurfTempIn(SurfNum) + Constant::Kelvin)); // Calculate window heat gain for TDD:DIFFUSER since this calculation is usually done in WindowManager - if (state.dataHeatBalSurf->AnyRadiantSystems(SurfNum)) - state.dataHeatBalSurf->SurfQdotRadHVACInPerArea(SurfNum) = GetSurfQdotRadHVACInPerArea(state, SurfNum); state.dataSurface->SurfWinHeatGain(SurfNum) = state.dataSurface->SurfWinTransSolar(SurfNum) + HConvIn_surf * surface.Area * (state.dataHeatBalSurf->SurfTempIn(SurfNum) - state.dataHeatBalSurfMgr->RefAirTemp(SurfNum)) + @@ -8163,8 +8136,9 @@ void CalcHeatBalanceInsideSurf2(EnergyPlusData &state, // Exterior shade in place int const ConstrNumSh = surface.activeShadedConstruction; if (ConstrNumSh != 0) { - auto const *thisMaterial2 = dynamic_cast( - state.dataMaterial->Material(state.dataConstruction->Construct(ConstrNumSh).LayerPoint(1))); + auto const &constructionSh = state.dataConstruction->Construct(ConstrNumSh); + auto const *thisMaterial2 = + dynamic_cast(state.dataMaterial->Material(constructionSh.LayerPoint(1))); assert(thisMaterial2 != nullptr); RoughSurf = thisMaterial2->Roughness; EmisOut = thisMaterial2->AbsorpThermal; @@ -8242,8 +8216,8 @@ void CalcHeatBalanceInsideSurf2(EnergyPlusData &state, Real64 &TH12 = state.dataHeatBalSurf->SurfInsideTempHist(1)(SurfNum); TH12 = state.dataHeatBalSurf->SurfTempIn(SurfNum); state.dataHeatBalSurf->SurfTempOut(SurfNum) = TH11; // For reporting - if (state.dataSurface->SurfWinOriginalClass(SurfNum) == DataSurfaces::SurfaceClass::TDD_Dome) continue; - if (state.dataSurface->SurfWinOriginalClass(SurfNum) == DataSurfaces::SurfaceClass::TDD_Diffuser) { // Tubular daylighting device + if (state.dataSurface->Surface(SurfNum).OriginalClass == DataSurfaces::SurfaceClass::TDD_Dome) continue; + if (state.dataSurface->Surface(SurfNum).OriginalClass == DataSurfaces::SurfaceClass::TDD_Diffuser) { // Tubular daylighting device // Tubular daylighting devices are treated as one big object with an effective R value. // The outside face temperature of the TDD:DOME and the inside face temperature of the // TDD:DIFFUSER are calculated with the outside and inside heat balances respectively. @@ -8497,8 +8471,6 @@ void CalcHeatBalanceInsideSurf2CTFOnly(EnergyPlusData &state, state.dataHeatBalSurf->SurfQSourceSinkHist(surfNum) = state.dataHeatBalSurf->SurfQsrcHist(surfNum, 1); } - if (state.dataHeatBalSurf->AnyRadiantSystems(surfNum)) - state.dataHeatBalSurf->SurfQdotRadHVACInPerArea(surfNum) = GetSurfQdotRadHVACInPerArea(state, surfNum); // The special heat balance terms for pools are used only when the pool is operating, so IsPool can change if (state.dataSurface->SurfIsPool(surfNum)) { if ((std::abs(state.dataHeatBalFanSys->QPoolSurfNumerator(surfNum)) >= DataHeatBalSurface::PoolIsOperatingLimit) || @@ -8535,14 +8507,10 @@ void CalcHeatBalanceInsideSurf2CTFOnly(EnergyPlusData &state, state.dataSurface->SurfWinDividerQRadInAbs(surfNum) = 0.0; } - // Calculate heat extract due to additional heat flux source term as the surface boundary condition - all HT surfaces - if (state.dataSurface->AnyHeatBalanceInsideSourceTerm) { - for (int surfNum = firstSurf; surfNum <= lastSurf; ++surfNum) { - if (Surface(surfNum).InsideHeatSourceTermSchedule) { - state.dataHeatBalSurf->SurfQAdditionalHeatSourceInside(surfNum) = - EnergyPlus::ScheduleManager::GetCurrentScheduleValue(state, Surface(surfNum).InsideHeatSourceTermSchedule); - } - } + // Calculate heat extract due to additional heat flux source term as the surface boundary condition + for (int surfNum : state.dataSurface->allInsideSourceSurfaceList) { + state.dataHeatBalSurf->SurfQAdditionalHeatSourceInside(surfNum) = + EnergyPlus::ScheduleManager::GetCurrentScheduleValue(state, state.dataSurface->Surface(surfNum).InsideHeatSourceTermSchedule); } // Set up coefficient arrays prior to calculations and precalc terms that do no change during iteration - non-window surfaces @@ -8785,7 +8753,7 @@ void CalcHeatBalanceInsideSurf2CTFOnly(EnergyPlusData &state, int const firstWindowSurf = thisSpace.WindowSurfaceFirst; int const lastWindowSurf = thisSpace.WindowSurfaceLast; for (int surfNum = firstWindowSurf; surfNum <= lastWindowSurf; ++surfNum) { - auto &surface = Surface(surfNum); + auto &surface = state.dataSurface->Surface(surfNum); if (state.dataSurface->UseRepresentativeSurfaceCalculations) { int repSurfNum = surface.RepresentativeCalcSurfNum; if (surfNum != repSurfNum) continue; @@ -8793,7 +8761,7 @@ void CalcHeatBalanceInsideSurf2CTFOnly(EnergyPlusData &state, Real64 &TH11(state.dataHeatBalSurf->SurfOutsideTempHist(1)(surfNum)); int const ConstrNum = state.dataSurface->SurfActiveConstruction(surfNum); auto const &construct = state.dataConstruction->Construct(ConstrNum); - if (state.dataSurface->SurfWinOriginalClass(surfNum) == DataSurfaces::SurfaceClass::TDD_Diffuser) { // Tubular daylighting device + if (surface.OriginalClass == DataSurfaces::SurfaceClass::TDD_Diffuser) { // Tubular daylighting device // Lookup up the TDD:DOME object int const pipeNum = state.dataSurface->SurfWinTDDPipeNum(surfNum); int const domeNum = state.dataDaylightingDevicesData->TDDPipe(pipeNum).Dome; @@ -8821,8 +8789,6 @@ void CalcHeatBalanceInsideSurf2CTFOnly(EnergyPlusData &state, Real64 const Sigma_Temp_4(Constant::StefanBoltzmann * pow_4(state.dataHeatBalSurf->SurfTempIn(surfNum) + Constant::Kelvin)); // Calculate window heat gain for TDD:DIFFUSER since this calculation is usually done in WindowManager - if (state.dataHeatBalSurf->AnyRadiantSystems(surfNum)) - state.dataHeatBalSurf->SurfQdotRadHVACInPerArea(surfNum) = GetSurfQdotRadHVACInPerArea(state, surfNum); state.dataSurface->SurfWinHeatGain(surfNum) = state.dataSurface->SurfWinTransSolar(surfNum) + HConvIn_surf * surface.Area * @@ -8863,8 +8829,9 @@ void CalcHeatBalanceInsideSurf2CTFOnly(EnergyPlusData &state, // Exterior shade in place int const ConstrNumSh = Surface(surfNum).activeShadedConstruction; if (ConstrNumSh != 0) { - auto const *thisMaterial2 = dynamic_cast( - state.dataMaterial->Material(state.dataConstruction->Construct(ConstrNumSh).LayerPoint(1))); + auto const &constructionSh = state.dataConstruction->Construct(ConstrNumSh); + auto const *thisMaterial2 = + dynamic_cast(state.dataMaterial->Material(constructionSh.LayerPoint(1))); assert(thisMaterial2 != nullptr); RoughSurf = thisMaterial2->Roughness; EmisOut = thisMaterial2->AbsorpThermal; @@ -8944,8 +8911,8 @@ void CalcHeatBalanceInsideSurf2CTFOnly(EnergyPlusData &state, Real64 &TH11 = state.dataHeatBalSurf->SurfOutsideTempHist(1)(surfNum); Real64 &TH12 = state.dataHeatBalSurf->SurfInsideTempHist(1)(surfNum); TH12 = state.dataHeatBalSurf->SurfTempIn(surfNum); - state.dataHeatBalSurf->SurfTempOut(surfNum) = TH11; // For reporting - if (state.dataSurface->SurfWinOriginalClass(surfNum) == DataSurfaces::SurfaceClass::TDD_Diffuser) { // Tubular daylighting device + state.dataHeatBalSurf->SurfTempOut(surfNum) = TH11; // For reporting + if (state.dataSurface->Surface(surfNum).OriginalClass == DataSurfaces::SurfaceClass::TDD_Diffuser) { // Tubular daylighting device // Tubular daylighting devices are treated as one big object with an effective R value. // The outside face temperature of the TDD:DOME and the inside face temperature of the // TDD:DIFFUSER are calculated with the outside and inside heat balances respectively. @@ -9042,11 +9009,14 @@ void CalcHeatBalanceInsideSurf2CTFOnly(EnergyPlusData &state, } // ...end of main inside heat balance iteration loop (ends when Converged) } -Real64 GetSurfQdotRadHVACInPerArea(EnergyPlusData &state, int const SurfNum) +void sumSurfQdotRadHVAC(EnergyPlusData &state) { - return state.dataHeatBalFanSys->SurfQHTRadSys(SurfNum) + state.dataHeatBalFanSys->SurfQHWBaseboard(SurfNum) + - state.dataHeatBalFanSys->SurfQSteamBaseboard(SurfNum) + state.dataHeatBalFanSys->SurfQElecBaseboard(SurfNum) + - state.dataHeatBalFanSys->SurfQCoolingPanel(SurfNum); + for (int surfNum : state.dataSurface->allGetsRadiantHeatSurfaceList) { + auto &thisSurfQRadFromHVAC = state.dataHeatBalFanSys->surfQRadFromHVAC(surfNum); + state.dataHeatBalSurf->SurfQdotRadHVACInPerArea(surfNum) = thisSurfQRadFromHVAC.HTRadSys + thisSurfQRadFromHVAC.HWBaseboard + + thisSurfQRadFromHVAC.SteamBaseboard + thisSurfQRadFromHVAC.ElecBaseboard + + thisSurfQRadFromHVAC.CoolingPanel; + } } void TestSurfTempCalcHeatBalanceInsideSurf(EnergyPlusData &state, Real64 TH12, int const SurfNum, DataHeatBalance::ZoneData &zone, int WarmupSurfTemp) diff --git a/src/EnergyPlus/HeatBalanceSurfaceManager.hh b/src/EnergyPlus/HeatBalanceSurfaceManager.hh index e0d5827cf39..d0be8c355a5 100644 --- a/src/EnergyPlus/HeatBalanceSurfaceManager.hh +++ b/src/EnergyPlus/HeatBalanceSurfaceManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -168,7 +168,7 @@ namespace HeatBalanceSurfaceManager { CalcHeatBalanceOutsideSurf(EnergyPlusData &state, ObjexxFCL::Optional_int_const ZoneToResimulate = _); // if passed in, then only calculate surfaces that have this zone - Real64 GetSurfQdotRadHVACInPerArea(EnergyPlusData &state, int SurfNum); + void sumSurfQdotRadHVAC(EnergyPlusData &state); Real64 GetQdotConvOutPerArea(EnergyPlusData &state, const int SurfNum); diff --git a/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.cc b/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.cc index 8c499e3cd4c..b971e70dec8 100644 --- a/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.cc +++ b/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -370,34 +370,33 @@ void GetGshpInput(EnergyPlusData &state) auto &thisGSHP = state.dataHPWaterToWaterClg->GSHP(GSHPNum); SetupOutputVariable(state, "Heat Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisGSHP.Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisGSHP.Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisGSHP.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "Cooling", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Heat Pump Load Side Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisGSHP.QLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Load Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisGSHP.QLoadEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -405,14 +404,14 @@ void GetGshpInput(EnergyPlusData &state) SetupOutputVariable(state, "Heat Pump Source Side Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisGSHP.QSource, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Source Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisGSHP.QSourceEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -420,42 +419,42 @@ void GetGshpInput(EnergyPlusData &state) SetupOutputVariable(state, "Heat Pump Load Side Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisGSHP.LoadSideWaterOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Load Side Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisGSHP.LoadSideWaterInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Source Side Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisGSHP.SourceSideWaterOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Source Side Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisGSHP.SourceSideWaterInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Load Side Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisGSHP.LoadSideWaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Source Side Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisGSHP.SourceSideWaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.hh b/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.hh index d8f995a4f53..fb86c938ece 100644 --- a/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.hh +++ b/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatPumpWaterToWaterHEATING.cc b/src/EnergyPlus/HeatPumpWaterToWaterHEATING.cc index 8d1273879e3..620856fe5a8 100644 --- a/src/EnergyPlus/HeatPumpWaterToWaterHEATING.cc +++ b/src/EnergyPlus/HeatPumpWaterToWaterHEATING.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -359,34 +359,33 @@ void GetGshpInput(EnergyPlusData &state) auto &thisGSHP = state.dataHPWaterToWaterHtg->GSHP(GSHPNum); SetupOutputVariable(state, "Heat Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisGSHP.Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisGSHP.Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisGSHP.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "Heating", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Heat Pump Load Side Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisGSHP.QLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Load Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisGSHP.QLoadEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -394,14 +393,14 @@ void GetGshpInput(EnergyPlusData &state) SetupOutputVariable(state, "Heat Pump Source Side Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisGSHP.QSource, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Source Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisGSHP.QSourceEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -409,42 +408,42 @@ void GetGshpInput(EnergyPlusData &state) SetupOutputVariable(state, "Heat Pump Load Side Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisGSHP.LoadSideWaterOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Load Side Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisGSHP.LoadSideWaterInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Source Side Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisGSHP.SourceSideWaterOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Source Side Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisGSHP.SourceSideWaterInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Load Side Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisGSHP.LoadSideWaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Source Side Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisGSHP.SourceSideWaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/HeatPumpWaterToWaterHEATING.hh b/src/EnergyPlus/HeatPumpWaterToWaterHEATING.hh index 31362bb6868..ad4344e82a3 100644 --- a/src/EnergyPlus/HeatPumpWaterToWaterHEATING.hh +++ b/src/EnergyPlus/HeatPumpWaterToWaterHEATING.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatPumpWaterToWaterSimple.cc b/src/EnergyPlus/HeatPumpWaterToWaterSimple.cc index 4a2a2273fe0..d7e27075171 100644 --- a/src/EnergyPlus/HeatPumpWaterToWaterSimple.cc +++ b/src/EnergyPlus/HeatPumpWaterToWaterSimple.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -377,26 +377,25 @@ void GshpSpecs::GetWatertoWaterHPInput(EnergyPlusData &state) // CurrentModuleObject='HeatPump:WatertoWater:EquationFit:Cooling' SetupOutputVariable(state, "Heat Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisGSHP.reportEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisGSHP.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "Cooling", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Heat Pump Load Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisGSHP.reportQLoadEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Source Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisGSHP.reportQSourceEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -542,26 +541,25 @@ void GshpSpecs::GetWatertoWaterHPInput(EnergyPlusData &state) // CurrentModuleObject='HeatPump:WatertoWater:EquationFit:Heating' SetupOutputVariable(state, "Heat Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisGSHP.reportEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisGSHP.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "Heating", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Heat Pump Load Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisGSHP.reportQLoadEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Source Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisGSHP.reportQSourceEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -594,63 +592,63 @@ void GshpSpecs::GetWatertoWaterHPInput(EnergyPlusData &state) // setup output variables SetupOutputVariable(state, "Heat Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisGSHP.reportPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Load Side Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisGSHP.reportQLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Source Side Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisGSHP.reportQSource, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Load Side Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisGSHP.reportLoadSideOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Load Side Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisGSHP.reportLoadSideInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Source Side Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisGSHP.reportSourceSideOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Source Side Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisGSHP.reportSourceSideInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Load Side Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisGSHP.reportLoadSideMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisGSHP.Name); SetupOutputVariable(state, "Heat Pump Source Side Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisGSHP.reportSourceSideMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/HeatPumpWaterToWaterSimple.hh b/src/EnergyPlus/HeatPumpWaterToWaterSimple.hh index 3fb9424be01..6ab3ddd2646 100644 --- a/src/EnergyPlus/HeatPumpWaterToWaterSimple.hh +++ b/src/EnergyPlus/HeatPumpWaterToWaterSimple.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatRecovery.cc b/src/EnergyPlus/HeatRecovery.cc index b4bb39d5f68..6b1f3c8344b 100644 --- a/src/EnergyPlus/HeatRecovery.cc +++ b/src/EnergyPlus/HeatRecovery.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -56,6 +56,7 @@ #include #include #include +#include #include #include #include @@ -428,40 +429,8 @@ namespace HeatRecovery { thisExchanger.NomSupAirVolFlow = state.dataIPShortCut->rNumericArgs(1); thisExchanger.HeatEffectSensible100 = state.dataIPShortCut->rNumericArgs(2); thisExchanger.HeatEffectLatent100 = state.dataIPShortCut->rNumericArgs(3); - thisExchanger.HeatEffectSensible75 = state.dataIPShortCut->rNumericArgs(4); - thisExchanger.HeatEffectLatent75 = state.dataIPShortCut->rNumericArgs(5); - if (thisExchanger.HeatEffectSensible75 < thisExchanger.HeatEffectSensible100) { - ShowWarningError(state, - format("{} \"{}\" sensible heating effectiveness at 75% rated flow is less than at 100% rated flow.", - cCurrentModuleObject, - thisExchanger.Name)); - ShowContinueError(state, "Sensible heating effectiveness at 75% rated flow is usually greater than at 100% rated flow."); - } - if (thisExchanger.HeatEffectLatent75 < thisExchanger.HeatEffectLatent100) { - ShowWarningError(state, - format("{} \"{}\" latent heating effectiveness at 75% rated flow is less than at 100% rated flow.", - cCurrentModuleObject, - thisExchanger.Name)); - ShowContinueError(state, "Latent heating effectiveness at 75% rated flow is usually greater than at 100% rated flow."); - } - thisExchanger.CoolEffectSensible100 = state.dataIPShortCut->rNumericArgs(6); - thisExchanger.CoolEffectLatent100 = state.dataIPShortCut->rNumericArgs(7); - thisExchanger.CoolEffectSensible75 = state.dataIPShortCut->rNumericArgs(8); - thisExchanger.CoolEffectLatent75 = state.dataIPShortCut->rNumericArgs(9); - if (thisExchanger.CoolEffectSensible75 < thisExchanger.CoolEffectSensible100) { - ShowWarningError(state, - format("{} \"{}\" sensible cooling effectiveness at 75% rated flow is less than at 100% rated flow.", - cCurrentModuleObject, - thisExchanger.Name)); - ShowContinueError(state, "Sensible cooling effectiveness at 75% rated flow is usually greater than at 100% rated flow."); - } - if (thisExchanger.CoolEffectLatent75 < thisExchanger.CoolEffectLatent100) { - ShowWarningError(state, - format("{} \"{}\" latent cooling effectiveness at 75% rated flow is less than at 100% rated flow.", - cCurrentModuleObject, - thisExchanger.Name)); - ShowContinueError(state, "Latent cooling effectiveness at 75% rated flow is usually greater than at 100% rated flow."); - } + thisExchanger.CoolEffectSensible100 = state.dataIPShortCut->rNumericArgs(4); + thisExchanger.CoolEffectLatent100 = state.dataIPShortCut->rNumericArgs(5); thisExchanger.SupInletNode = GetOnlySingleNode(state, state.dataIPShortCut->cAlphaArgs(3), ErrorsFound, @@ -499,7 +468,7 @@ namespace HeatRecovery { NodeInputManager::CompFluidStream::Secondary, DataLoopNode::ObjectIsNotParent); - thisExchanger.NomElecPower = state.dataIPShortCut->rNumericArgs(10); + thisExchanger.NomElecPower = state.dataIPShortCut->rNumericArgs(6); if (Util::SameString(state.dataIPShortCut->cAlphaArgs(7), "Yes")) { thisExchanger.ControlToTemperatureSetPoint = true; @@ -529,9 +498,9 @@ namespace HeatRecovery { } if (!Util::SameString(state.dataIPShortCut->cAlphaArgs(9), "None")) { - thisExchanger.ThresholdTemperature = state.dataIPShortCut->rNumericArgs(11); - thisExchanger.InitialDefrostTime = state.dataIPShortCut->rNumericArgs(12); - thisExchanger.RateofDefrostTimeIncrease = state.dataIPShortCut->rNumericArgs(13); + thisExchanger.ThresholdTemperature = state.dataIPShortCut->rNumericArgs(7); + thisExchanger.InitialDefrostTime = state.dataIPShortCut->rNumericArgs(8); + thisExchanger.RateofDefrostTimeIncrease = state.dataIPShortCut->rNumericArgs(9); } if (state.dataIPShortCut->lAlphaFieldBlanks(10)) { @@ -544,6 +513,16 @@ namespace HeatRecovery { thisExchanger.EconoLockOut = static_cast(toggle); } + // yujie: read new curves here + thisExchanger.HeatEffectSensibleCurveIndex = + Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(11)); // convert curve name to number + thisExchanger.HeatEffectLatentCurveIndex = + Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(12)); // convert curve name to number + thisExchanger.CoolEffectSensibleCurveIndex = + Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(13)); // convert curve name to number + thisExchanger.CoolEffectLatentCurveIndex = + Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(14)); // convert curve name to number + BranchNodeConnections::TestCompSet(state, DataHVACGlobals::cHXTypes(thisExchanger.ExchType), thisExchanger.Name, @@ -1059,118 +1038,115 @@ namespace HeatRecovery { // CurrentModuleObject='HeatExchanger:AirToAir:FlatPlate/AirToAir:SensibleAndLatent/Desiccant:BalancedFlow') SetupOutputVariable(state, "Heat Exchanger Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisExchanger.SensHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisExchanger.Name); SetupOutputVariable(state, "Heat Exchanger Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisExchanger.SensHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisExchanger.Name); SetupOutputVariable(state, "Heat Exchanger Latent Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisExchanger.LatHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisExchanger.Name); SetupOutputVariable(state, "Heat Exchanger Latent Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisExchanger.LatHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisExchanger.Name); SetupOutputVariable(state, "Heat Exchanger Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisExchanger.TotHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisExchanger.Name); SetupOutputVariable(state, "Heat Exchanger Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisExchanger.TotHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisExchanger.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRecoveryForHeating, {}, - "ENERGYTRANSFER", - "HEAT RECOVERY FOR HEATING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heat Exchanger Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisExchanger.SensCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisExchanger.Name); SetupOutputVariable(state, "Heat Exchanger Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisExchanger.SensCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisExchanger.Name); SetupOutputVariable(state, "Heat Exchanger Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisExchanger.LatCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisExchanger.Name); SetupOutputVariable(state, "Heat Exchanger Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisExchanger.LatCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisExchanger.Name); SetupOutputVariable(state, "Heat Exchanger Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisExchanger.TotCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisExchanger.Name); SetupOutputVariable(state, "Heat Exchanger Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisExchanger.TotCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisExchanger.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRecoveryForCooling, {}, - "ENERGYTRANSFER", - "HEAT RECOVERY FOR COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heat Exchanger Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisExchanger.ElecUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisExchanger.Name); SetupOutputVariable(state, "Heat Exchanger Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisExchanger.ElecUseEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisExchanger.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::HeatRecovery, {}, - "ELECTRICITY", - "HEATRECOVERY", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } // setup additional report variables for generic heat exchangers @@ -1181,35 +1157,35 @@ namespace HeatRecovery { auto &thisExchanger = state.dataHeatRecovery->ExchCond(ExchNum); SetupOutputVariable(state, "Heat Exchanger Sensible Effectiveness", - OutputProcessor::Unit::None, + Constant::Units::None, thisExchanger.SensEffectiveness, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisExchanger.Name); SetupOutputVariable(state, "Heat Exchanger Latent Effectiveness", - OutputProcessor::Unit::None, + Constant::Units::None, thisExchanger.LatEffectiveness, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisExchanger.Name); SetupOutputVariable(state, "Heat Exchanger Supply Air Bypass Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisExchanger.SupBypassMassFlow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisExchanger.Name); SetupOutputVariable(state, "Heat Exchanger Exhaust Air Bypass Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisExchanger.SecBypassMassFlow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisExchanger.Name); SetupOutputVariable(state, "Heat Exchanger Defrost Time Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, thisExchanger.DefrostFraction, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -2097,16 +2073,24 @@ namespace HeatRecovery { if (this->SupInTemp < this->SecInTemp) { // Use heating effectiveness values - this->SensEffectiveness = this->HeatEffectSensible75 + - (this->HeatEffectSensible100 - this->HeatEffectSensible75) * (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); - this->LatEffectiveness = - this->HeatEffectLatent75 + (this->HeatEffectLatent100 - this->HeatEffectLatent75) * (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); + this->SensEffectiveness = this->HeatEffectSensible100; + if (this->HeatEffectSensibleCurveIndex > 0) { + this->SensEffectiveness *= Curve::CurveValue(state, this->HeatEffectSensibleCurveIndex, HXAirVolFlowRatio); + } + this->LatEffectiveness = this->HeatEffectLatent100; + if (this->HeatEffectLatentCurveIndex > 0) { + this->LatEffectiveness *= Curve::CurveValue(state, this->HeatEffectLatentCurveIndex, HXAirVolFlowRatio); + } } else { // Use cooling effectiveness values - this->SensEffectiveness = this->CoolEffectSensible75 + - (this->CoolEffectSensible100 - this->CoolEffectSensible75) * (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); - this->LatEffectiveness = - this->CoolEffectLatent75 + (this->CoolEffectLatent100 - this->CoolEffectLatent75) * (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); + this->SensEffectiveness = this->CoolEffectSensible100; + if (this->CoolEffectSensibleCurveIndex > 0) { + this->SensEffectiveness *= Curve::CurveValue(state, this->CoolEffectSensibleCurveIndex, HXAirVolFlowRatio); + } + this->LatEffectiveness = this->CoolEffectLatent100; + if (this->CoolEffectLatentCurveIndex > 0) { + this->LatEffectiveness *= Curve::CurveValue(state, this->CoolEffectLatentCurveIndex, HXAirVolFlowRatio); + } } // Keep effectiveness between 0 and 1.0 ?? @@ -2123,11 +2107,9 @@ namespace HeatRecovery { this->Name)); if (this->SupInTemp < this->SecInTemp) { ShowContinueError(state, format("...Sensible Effectiveness at 100% Heating Air Flow = {:.2R}", this->HeatEffectSensible100)); - ShowContinueError(state, format("...Sensible Effectiveness at 75% Heating Air Flow = {:.2R}", this->HeatEffectSensible75)); ShowContinueError(state, "...Sensible effectiveness reset to zero and the simulation continues."); } else { ShowContinueError(state, format("...Sensible Effectiveness at 100% Cooling Air Flow = {:.2R}", this->CoolEffectSensible100)); - ShowContinueError(state, format("...Sensible Effectiveness at 75% Cooling Air Flow = {:.2R}", this->CoolEffectSensible75)); ShowContinueError(state, "...Sensible effectiveness reset to zero and the simulation continues."); } ShowContinueError(state, format("...Heat Exchanger Air Volume Flow Ratio = {:.2R}", HXAirVolFlowRatio)); @@ -2144,11 +2126,9 @@ namespace HeatRecovery { this->Name)); if (this->SupInTemp < this->SecInTemp) { ShowContinueError(state, format("...Latent Effectiveness at 100% Heating Air Flow = {:.2R}", this->HeatEffectLatent100)); - ShowContinueError(state, format("...Latent Effectiveness at 75% Heating Air Flow = {:.2R}", this->HeatEffectLatent75)); ShowContinueError(state, "...Latent effectiveness reset to zero and the simulation continues."); } else { ShowContinueError(state, format("...Latent Effectiveness at 100% Cooling Air Flow = {:.2R}", this->CoolEffectLatent100)); - ShowContinueError(state, format("...Latent Effectiveness at 75% Cooling Air Flow = {:.2R}", this->CoolEffectLatent75)); ShowContinueError(state, "...Latent effectiveness reset to zero and the simulation continues."); } ShowContinueError(state, format("...Heat Exchanger Air Volume Flow Ratio = {:.2R}", HXAirVolFlowRatio)); @@ -2219,16 +2199,24 @@ namespace HeatRecovery { CMin = min(CSup, CSec); if (TempSupIn < TempSecIn) { // Use heating effectiveness values - this->SensEffectiveness = this->HeatEffectSensible75 + (this->HeatEffectSensible100 - this->HeatEffectSensible75) * - (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); - this->LatEffectiveness = this->HeatEffectLatent75 + (this->HeatEffectLatent100 - this->HeatEffectLatent75) * - (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); + this->SensEffectiveness = this->HeatEffectSensible100; + if (this->HeatEffectSensibleCurveIndex > 0) { + this->SensEffectiveness *= Curve::CurveValue(state, this->HeatEffectSensibleCurveIndex, HXAirVolFlowRatio); + } + this->LatEffectiveness = this->HeatEffectLatent100; + if (this->HeatEffectLatentCurveIndex > 0) { + this->LatEffectiveness *= Curve::CurveValue(state, this->HeatEffectLatentCurveIndex, HXAirVolFlowRatio); + } } else { // Use cooling effectiveness values - this->SensEffectiveness = this->CoolEffectSensible75 + (this->CoolEffectSensible100 - this->CoolEffectSensible75) * - (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); - this->LatEffectiveness = this->CoolEffectLatent75 + (this->CoolEffectLatent100 - this->CoolEffectLatent75) * - (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); + this->SensEffectiveness = this->CoolEffectSensible100; + if (this->CoolEffectSensibleCurveIndex > 0) { + this->SensEffectiveness *= Curve::CurveValue(state, this->CoolEffectSensibleCurveIndex, HXAirVolFlowRatio); + } + this->LatEffectiveness = this->CoolEffectLatent100; + if (this->CoolEffectLatentCurveIndex > 0) { + this->LatEffectiveness *= Curve::CurveValue(state, this->CoolEffectLatentCurveIndex, HXAirVolFlowRatio); + } } if (this->SensEffectiveness < 0.0) { @@ -2242,14 +2230,10 @@ namespace HeatRecovery { if (this->SupInTemp < this->SecInTemp) { ShowContinueError( state, format("...Sensible Effectiveness at 100% Heating Air Flow = {:.2R}", this->HeatEffectSensible100)); - ShowContinueError( - state, format("...Sensible Effectiveness at 75% Heating Air Flow = {:.2R}", this->HeatEffectSensible75)); ShowContinueError(state, "...Sensible effectiveness reset to zero and the simulation continues."); } else { ShowContinueError( state, format("...Sensible Effectiveness at 100% Cooling Air Flow = {:.2R}", this->CoolEffectSensible100)); - ShowContinueError( - state, format("...Sensible Effectiveness at 75% Cooling Air Flow = {:.2R}", this->CoolEffectSensible75)); ShowContinueError(state, "...Sensible effectiveness reset to zero and the simulation continues."); } ShowContinueError(state, format("...Heat Exchanger Air Volume Flow Ratio = {:.2R}", HXAirVolFlowRatio)); @@ -2267,14 +2251,10 @@ namespace HeatRecovery { if (this->SupInTemp < this->SecInTemp) { ShowContinueError(state, format("...Latent Effectiveness at 100% Heating Air Flow = {:.2R}", this->HeatEffectLatent100)); - ShowContinueError(state, - format("...Latent Effectiveness at 75% Heating Air Flow = {:.2R}", this->HeatEffectLatent75)); ShowContinueError(state, "...Latent effectiveness reset to zero and the simulation continues."); } else { ShowContinueError(state, format("...Latent Effectiveness at 100% Cooling Air Flow = {:.2R}", this->CoolEffectLatent100)); - ShowContinueError(state, - format("...Latent Effectiveness at 75% Cooling Air Flow = {:.2R}", this->CoolEffectLatent75)); ShowContinueError(state, "...Latent effectiveness reset to zero and the simulation continues."); } ShowContinueError(state, format("...Heat Exchanger Air Volume Flow Ratio = {:.2R}", HXAirVolFlowRatio)); @@ -2803,10 +2783,14 @@ namespace HeatRecovery { HXSecAirVolFlowRate = this->SecOutMassFlow / RhoSec; HXAvgAirVolFlowRate = (HXSecAirVolFlowRate + HXSupAirVolFlowRate) / 2.0; HXAirVolFlowRatio = HXAvgAirVolFlowRate / this->NomSupAirVolFlow; - this->SensEffectiveness = - this->HeatEffectSensible75 + (this->HeatEffectSensible100 - this->HeatEffectSensible75) * (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); - this->LatEffectiveness = - this->HeatEffectLatent75 + (this->HeatEffectLatent100 - this->HeatEffectLatent75) * (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); + this->SensEffectiveness = this->HeatEffectSensible100; + if (this->HeatEffectSensibleCurveIndex > 0) { + this->SensEffectiveness *= Curve::CurveValue(state, this->HeatEffectSensibleCurveIndex, HXAirVolFlowRatio); + } + this->LatEffectiveness = this->HeatEffectLatent100; + if (this->HeatEffectLatentCurveIndex > 0) { + this->LatEffectiveness *= Curve::CurveValue(state, this->HeatEffectLatentCurveIndex, HXAirVolFlowRatio); + } this->SupOutTemp = this->SupInTemp + this->SensEffectiveness * CMin / CSup * (this->SecInTemp - this->SupInTemp); this->SupOutHumRat = this->SupInHumRat + this->LatEffectiveness * CMin / CSup * (this->SecInHumRat - this->SupInHumRat); this->SupOutEnth = Psychrometrics::PsyHFnTdbW(this->SupOutTemp, this->SupOutHumRat); @@ -2859,16 +2843,24 @@ namespace HeatRecovery { CMin = min(CSup, CSec); if (TempSupIn < TempSecIn) { // Use heating effectiveness values - this->SensEffectiveness = this->HeatEffectSensible75 + (this->HeatEffectSensible100 - this->HeatEffectSensible75) * - (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); - this->LatEffectiveness = this->HeatEffectLatent75 + - (this->HeatEffectLatent100 - this->HeatEffectLatent75) * (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); + this->SensEffectiveness = this->HeatEffectSensible100; + if (this->HeatEffectSensibleCurveIndex > 0) { + this->SensEffectiveness *= Curve::CurveValue(state, this->HeatEffectSensibleCurveIndex, HXAirVolFlowRatio); + } + this->LatEffectiveness = this->HeatEffectLatent100; + if (this->HeatEffectLatentCurveIndex > 0) { + this->LatEffectiveness *= Curve::CurveValue(state, this->HeatEffectLatentCurveIndex, HXAirVolFlowRatio); + } } else { // Use cooling effectiveness values - this->SensEffectiveness = this->CoolEffectSensible75 + (this->CoolEffectSensible100 - this->CoolEffectSensible75) * - (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); - this->LatEffectiveness = this->CoolEffectLatent75 + - (this->CoolEffectLatent100 - this->CoolEffectLatent75) * (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); + this->SensEffectiveness = this->CoolEffectSensible100; + if (this->CoolEffectSensibleCurveIndex > 0) { + this->SensEffectiveness *= Curve::CurveValue(state, this->CoolEffectSensibleCurveIndex, HXAirVolFlowRatio); + } + this->LatEffectiveness = this->CoolEffectLatent100; + if (this->CoolEffectLatentCurveIndex > 0) { + this->LatEffectiveness *= Curve::CurveValue(state, this->CoolEffectLatentCurveIndex, HXAirVolFlowRatio); + } } // calculation of local variable Csup can be 0, gaurd against divide by 0. TempSupOut = TempSupIn + this->SensEffectiveness * SafeDiv(CMin, CSup) * (TempSecIn - TempSupIn); diff --git a/src/EnergyPlus/HeatRecovery.hh b/src/EnergyPlus/HeatRecovery.hh index 267b5a88d3a..9b75097563b 100644 --- a/src/EnergyPlus/HeatRecovery.hh +++ b/src/EnergyPlus/HeatRecovery.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -145,14 +145,14 @@ namespace HeatRecovery { int PerfDataIndex = 0; // Performance data index allocating performance data number to heat exchanger Real64 FaceArea = 0.0; // face area of balanced desiccant heat exchangers to determine face velocity [m2] // generic hx performance inputs - Real64 HeatEffectSensible100 = 0.0; // heating sensible effectiveness at 100% rated air flow - Real64 HeatEffectSensible75 = 0.0; // heating sensible effectiveness at 75% rated air flow - Real64 HeatEffectLatent100 = 0.0; // heating latent effectiveness at 100% rated air flow - Real64 HeatEffectLatent75 = 0.0; // heating latent effectiveness at 75% rated air flow - Real64 CoolEffectSensible100 = 0.0; // cooling sensible effectiveness at 100% rated air flow - Real64 CoolEffectSensible75 = 0.0; // cooling sensible effectiveness at 75% rated air flow - Real64 CoolEffectLatent100 = 0.0; // cooling latent effectiveness at 100% rated air flow - Real64 CoolEffectLatent75 = 0.0; // cooling latent effectiveness at 75% rated air flow + Real64 HeatEffectSensible100 = 0.0; // heating sensible effectiveness at 100% rated air flow + Real64 HeatEffectLatent100 = 0.0; // heating latent effectiveness at 100% rated air flow + Real64 CoolEffectSensible100 = 0.0; // cooling sensible effectiveness at 100% rated air flow + Real64 CoolEffectLatent100 = 0.0; // cooling latent effectiveness at 100% rated air flow + int HeatEffectSensibleCurveIndex = 0; // heating sensible effectiveness multiplier curve to HeatEffectSensible100 + int HeatEffectLatentCurveIndex = 0; // heating latent effectiveness multiplier curve to HeatEffectLatent100 + int CoolEffectSensibleCurveIndex = 0; // cooling sensible effectiveness multiplier curve to CoolEffectSensible100 + int CoolEffectLatentCurveIndex = 0; // cooling latent effectiveness multiplier curve to CoolEffectLatent100 // 1 = None, 2 = Bypass, 3 = Stop Rotary HX Rotation HXConfigurationType ExchConfig = HXConfigurationType::Invalid; // parameter equivalent of HX configuration, plate or rotary // frost control parameters diff --git a/src/EnergyPlus/HeatingCoils.cc b/src/EnergyPlus/HeatingCoils.cc index 086d4e05917..6c64f5c40ce 100644 --- a/src/EnergyPlus/HeatingCoils.cc +++ b/src/EnergyPlus/HeatingCoils.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -411,38 +411,36 @@ namespace HeatingCoils { // CurrentModuleObject = "Coil:Heating:Electric" SetupOutputVariable(state, "Heating Coil Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, heatingCoil.HeatingCoilLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, heatingCoil.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "ENERGYTRANSFER", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, heatingCoil.HeatingCoilRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatingCoil.Name); SetupOutputVariable(state, "Heating Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, heatingCoil.ElecUseLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, heatingCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "Heating", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, heatingCoil.ElecUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -553,38 +551,36 @@ namespace HeatingCoils { // CurrentModuleObject = "Coil:Heating:Electric:MultiStage" SetupOutputVariable(state, "Heating Coil Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, heatingCoil.HeatingCoilLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, heatingCoil.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "ENERGYTRANSFER", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, heatingCoil.HeatingCoilRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatingCoil.Name); SetupOutputVariable(state, "Heating Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, heatingCoil.ElecUseLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, heatingCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "Heating", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, heatingCoil.ElecUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -712,87 +708,83 @@ namespace HeatingCoils { SetupOutputVariable(state, "Heating Coil Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, heatingCoil.HeatingCoilLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, heatingCoil.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "ENERGYTRANSFER", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, heatingCoil.HeatingCoilRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatingCoil.Name); SetupOutputVariable(state, format("Heating Coil {} Energy", sFuelType), - OutputProcessor::Unit::J, + Constant::Units::J, heatingCoil.FuelUseLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, heatingCoil.Name, + Constant::eFuel2eResource[(int)heatingCoil.FuelType], + OutputProcessor::SOVEndUseCat::Heating, {}, - sFuelType, - "Heating", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, format("Heating Coil {} Rate", sFuelType), - OutputProcessor::Unit::W, + Constant::Units::W, heatingCoil.FuelUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatingCoil.Name); SetupOutputVariable(state, "Heating Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, heatingCoil.ElecUseLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, heatingCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "Heating", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, heatingCoil.ElecUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatingCoil.Name); SetupOutputVariable(state, "Heating Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, heatingCoil.RTF, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatingCoil.Name); SetupOutputVariable(state, "Heating Coil Ancillary " + sFuelType + " Rate", - OutputProcessor::Unit::W, + Constant::Units::W, heatingCoil.ParasiticFuelRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatingCoil.Name); SetupOutputVariable(state, "Heating Coil Ancillary " + sFuelType + " Energy", - OutputProcessor::Unit::J, + Constant::Units::J, heatingCoil.ParasiticFuelConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, heatingCoil.Name, + Constant::eFuel2eResource[(int)heatingCoil.FuelType], + OutputProcessor::SOVEndUseCat::Heating, {}, - sFuelType, - "Heating", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } // Get the data for for gas multistage heating coils @@ -910,87 +902,83 @@ namespace HeatingCoils { // CurrentModuleObject = "Coil:Heating:Gas:MultiStage" SetupOutputVariable(state, "Heating Coil Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, heatingCoil.HeatingCoilLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, heatingCoil.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "ENERGYTRANSFER", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, heatingCoil.HeatingCoilRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatingCoil.Name); SetupOutputVariable(state, "Heating Coil NaturalGas Energy", - OutputProcessor::Unit::J, + Constant::Units::J, heatingCoil.FuelUseLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, heatingCoil.Name, + Constant::eResource::NaturalGas, + OutputProcessor::SOVEndUseCat::Heating, {}, - "NaturalGas", - "Heating", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil NaturalGas Rate", - OutputProcessor::Unit::W, + Constant::Units::W, heatingCoil.FuelUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatingCoil.Name); SetupOutputVariable(state, "Heating Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, heatingCoil.ElecUseLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, heatingCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "Heating", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, heatingCoil.ElecUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatingCoil.Name); SetupOutputVariable(state, "Heating Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, heatingCoil.RTF, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatingCoil.Name); SetupOutputVariable(state, "Heating Coil Ancillary NaturalGas Rate", - OutputProcessor::Unit::W, + Constant::Units::W, heatingCoil.ParasiticFuelRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatingCoil.Name); SetupOutputVariable(state, "Heating Coil Ancillary NaturalGas Energy", - OutputProcessor::Unit::J, + Constant::Units::J, heatingCoil.ParasiticFuelConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, heatingCoil.Name, + Constant::eResource::NaturalGas, + OutputProcessor::SOVEndUseCat::Heating, {}, - "NaturalGas", - "Heating", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } // Get the data for for desuperheater heating coils @@ -1324,45 +1312,43 @@ namespace HeatingCoils { // CurrentModuleObject = "Coil:Heating:Desuperheater" SetupOutputVariable(state, "Heating Coil Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, heatingCoil.HeatingCoilLoad, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, heatingCoil.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "ENERGYTRANSFER", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, heatingCoil.HeatingCoilRate, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, heatingCoil.Name); SetupOutputVariable(state, "Heating Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, heatingCoil.ElecUseLoad, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, heatingCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "Heating", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, heatingCoil.ElecUseRate, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, heatingCoil.Name); SetupOutputVariable(state, "Heating Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, heatingCoil.RTF, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/HeatingCoils.hh b/src/EnergyPlus/HeatingCoils.hh index 85c230837d7..624c292f030 100644 --- a/src/EnergyPlus/HeatingCoils.hh +++ b/src/EnergyPlus/HeatingCoils.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HighTempRadiantSystem.cc b/src/EnergyPlus/HighTempRadiantSystem.cc index 4f3f1dd22de..d25e2ffba58 100644 --- a/src/EnergyPlus/HighTempRadiantSystem.cc +++ b/src/EnergyPlus/HighTempRadiantSystem.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -513,6 +513,7 @@ namespace HighTempRadiantSystem { if (highTempRadSys.SurfacePtr(SurfNum) != 0) { state.dataSurface->surfIntConv(highTempRadSys.SurfacePtr(SurfNum)).getsRadiantHeat = true; + state.dataSurface->allGetsRadiantHeatSurfaceList.emplace_back(highTempRadSys.SurfacePtr(SurfNum)); } AllFracsSummed += highTempRadSys.FracDistribToSurf(SurfNum); @@ -556,63 +557,60 @@ namespace HighTempRadiantSystem { auto &highTempRadSys = state.dataHighTempRadSys->HighTempRadSys(Item); SetupOutputVariable(state, "Zone Radiant HVAC Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, highTempRadSys.HeatPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, highTempRadSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, highTempRadSys.HeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, highTempRadSys.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "ENERGYTRANSFER", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); if (highTempRadSys.HeaterType == Constant::eResource::NaturalGas) { SetupOutputVariable(state, "Zone Radiant HVAC NaturalGas Rate", - OutputProcessor::Unit::W, + Constant::Units::W, highTempRadSys.GasPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, highTempRadSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC NaturalGas Energy", - OutputProcessor::Unit::J, + Constant::Units::J, highTempRadSys.GasEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, highTempRadSys.Name, + Constant::eResource::NaturalGas, + OutputProcessor::SOVEndUseCat::Heating, {}, - "NaturalGas", - "Heating", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } else if (highTempRadSys.HeaterType == Constant::eResource::Electricity) { SetupOutputVariable(state, "Zone Radiant HVAC Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, highTempRadSys.ElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, highTempRadSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, highTempRadSys.ElecEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, highTempRadSys.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "ELECTRICITY", - "Heating", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } } } @@ -1139,7 +1137,12 @@ namespace HighTempRadiantSystem { // Initialize arrays dataHBFS->SumConvHTRadSys = 0.0; dataHBFS->SumLatentHTRadSys = 0.0; - dataHBFS->SurfQHTRadSys = 0.0; + for (auto &thisHTR : state.dataHighTempRadSys->HighTempRadSys) { + for (int radSurfNum = 1; radSurfNum <= thisHTR.TotSurfToDistrib; ++radSurfNum) { + int surfNum = thisHTR.SurfacePtr(radSurfNum); + state.dataHeatBalFanSys->surfQRadFromHVAC(surfNum).HTRadSys = 0.0; + } + } dataHBFS->ZoneQHTRadSysToPerson = 0.0; for (auto &thisHTR : state.dataHighTempRadSys->HighTempRadSys) { @@ -1154,8 +1157,7 @@ namespace HighTempRadiantSystem { if (state.dataSurface->Surface(SurfNum).Area > SmallestArea) { ThisSurfIntensity = (thisHTR.QHTRRadSource * thisHTR.FracRadiant * thisHTR.FracDistribToSurf(RadSurfNum) / state.dataSurface->Surface(SurfNum).Area); - dataHBFS->SurfQHTRadSys(SurfNum) += ThisSurfIntensity; - state.dataHeatBalSurf->AnyRadiantSystems = true; + state.dataHeatBalFanSys->surfQRadFromHVAC(SurfNum).HTRadSys += ThisSurfIntensity; if (ThisSurfIntensity > DataHeatBalFanSys::MaxRadHeatFlux) { // CR 8074, trap excessive intensity (throws off surface balance ) ShowSevereError(state, "DistributeHTRadGains: excessive thermal radiation heat flux intensity detected"); diff --git a/src/EnergyPlus/HighTempRadiantSystem.hh b/src/EnergyPlus/HighTempRadiantSystem.hh index 01231985389..b5e33832b24 100644 --- a/src/EnergyPlus/HighTempRadiantSystem.hh +++ b/src/EnergyPlus/HighTempRadiantSystem.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Humidifiers.cc b/src/EnergyPlus/Humidifiers.cc index 2458fbc550c..ba044fc01ad 100644 --- a/src/EnergyPlus/Humidifiers.cc +++ b/src/EnergyPlus/Humidifiers.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -456,168 +456,160 @@ namespace Humidifiers { if (Humidifier(HumNum).SuppliedByWaterSystem) { SetupOutputVariable(state, "Humidifier Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, Humidifier(HumNum).WaterConsRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Humidifier(HumNum).Name); SetupOutputVariable(state, "Humidifier Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, Humidifier(HumNum).WaterCons, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Humidifier(HumNum).Name); SetupOutputVariable(state, "Humidifier Storage Tank Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, Humidifier(HumNum).TankSupplyVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Humidifier(HumNum).Name); SetupOutputVariable(state, "Humidifier Storage Tank Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, Humidifier(HumNum).TankSupplyVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Humidifier(HumNum).Name, + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::Humidification, {}, - "Water", - "HUMIDIFIER", - {}, - "SYSTEM"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Humidifier Starved Storage Tank Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, Humidifier(HumNum).StarvedSupplyVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Humidifier(HumNum).Name); SetupOutputVariable(state, "Humidifier Starved Storage Tank Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, Humidifier(HumNum).StarvedSupplyVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Humidifier(HumNum).Name, + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::Humidification, {}, - "Water", - "HUMIDIFIER", - {}, - "SYSTEM"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Humidifier Mains Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, Humidifier(HumNum).StarvedSupplyVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Humidifier(HumNum).Name, + Constant::eResource::MainsWater, + OutputProcessor::SOVEndUseCat::Humidification, {}, - "MainsWater", - "HUMIDIFIER", - {}, - "SYSTEM"); + OutputProcessor::SOVGroup::HVAC); } else { SetupOutputVariable(state, "Humidifier Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, Humidifier(HumNum).WaterConsRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Humidifier(HumNum).Name); SetupOutputVariable(state, "Humidifier Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, Humidifier(HumNum).WaterCons, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Humidifier(HumNum).Name, + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::Humidification, {}, - "WATER", - "HUMIDIFIER", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Humidifier Mains Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, Humidifier(HumNum).WaterCons, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Humidifier(HumNum).Name, + Constant::eResource::MainsWater, + OutputProcessor::SOVEndUseCat::Humidification, {}, - "MAINSWATER", - "HUMIDIFIER", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } if (Humidifier(HumNum).HumType == HumidType::Electric) { SetupOutputVariable(state, "Humidifier Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, Humidifier(HumNum).ElecUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Humidifier(HumNum).Name); SetupOutputVariable(state, "Humidifier Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, Humidifier(HumNum).ElecUseEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Humidifier(HumNum).Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Humidification, {}, - "ELECTRICITY", - "HUMIDIFIER", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } else if (Humidifier(HumNum).HumType == HumidType::Gas) { SetupOutputVariable(state, "Humidifier NaturalGas Use Thermal Efficiency", - OutputProcessor::Unit::None, + Constant::Units::None, Humidifier(HumNum).ThermalEff, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Humidifier(HumNum).Name); SetupOutputVariable(state, "Humidifier NaturalGas Rate", - OutputProcessor::Unit::W, + Constant::Units::W, Humidifier(HumNum).GasUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Humidifier(HumNum).Name); SetupOutputVariable(state, "Humidifier NaturalGas Energy", - OutputProcessor::Unit::J, + Constant::Units::J, Humidifier(HumNum).GasUseEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Humidifier(HumNum).Name, + Constant::eResource::NaturalGas, + OutputProcessor::SOVEndUseCat::Humidification, {}, - "NATURALGAS", - "HUMIDIFIER", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Humidifier Auxiliary Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, Humidifier(HumNum).AuxElecUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, Humidifier(HumNum).Name); SetupOutputVariable(state, "Humidifier Auxiliary Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, Humidifier(HumNum).AuxElecUseEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, Humidifier(HumNum).Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Humidification, {}, - "ELECTRICITY", - "HUMIDIFIER", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } } diff --git a/src/EnergyPlus/Humidifiers.hh b/src/EnergyPlus/Humidifiers.hh index 9148d325ea7..966b4791639 100644 --- a/src/EnergyPlus/Humidifiers.hh +++ b/src/EnergyPlus/Humidifiers.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HybridEvapCoolingModel.cc b/src/EnergyPlus/HybridEvapCoolingModel.cc index 87ecf9542aa..becc1fe2656 100644 --- a/src/EnergyPlus/HybridEvapCoolingModel.cc +++ b/src/EnergyPlus/HybridEvapCoolingModel.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HybridEvapCoolingModel.hh b/src/EnergyPlus/HybridEvapCoolingModel.hh index 8c5e65eeb1b..cd50bfed124 100644 --- a/src/EnergyPlus/HybridEvapCoolingModel.hh +++ b/src/EnergyPlus/HybridEvapCoolingModel.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -245,10 +245,10 @@ namespace HybridEvapCoolingModel { Real64 FanHeatInAirFrac; // the fraction of fan heat in air stream to calculate fan heat gain if not in lookup tables Real64 ScalingFactor; // taken from IDF N3, linear scaling factor. Real64 ScaledSystemMaximumSupplyAirMassFlowRate; // the scaled system max supply mass flow rate in m3/s. - Real64 ScaledSystemMaximumSupplyAirVolumeFlowRate; // the scaled system max supply volume flow rate in m3/s. - std::string FirstFuelType; // First fuel type, currently electricity is only option - std::string SecondFuelType; // Second fuel type - std::string ThirdFuelType; // Third fuel type + Real64 ScaledSystemMaximumSupplyAirVolumeFlowRate; // the scaled system max supply volume flow rate in m3/s. + Constant::eFuel firstFuel = Constant::eFuel::Invalid; // First fuel type, currently electricity is only option + Constant::eFuel secondFuel = Constant::eFuel::Invalid; // Second fuel type + Constant::eFuel thirdFuel = Constant::eFuel::Invalid; // Third fuel type int UnitOn; // feels like it should be a bool but its an output and I couldn't get it to work as a bool Real64 UnitTotalCoolingRate; // unit output to zone, total cooling rate [W] diff --git a/src/EnergyPlus/HybridModel.cc b/src/EnergyPlus/HybridModel.cc index 99d6566c3b2..7405125fc66 100644 --- a/src/EnergyPlus/HybridModel.cc +++ b/src/EnergyPlus/HybridModel.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -448,14 +448,14 @@ namespace HybridModel { state.dataHybridModel->HybridModelZone(ZonePtr).InfiltrationCalc_C) { SetupOutputVariable(state, "Zone Infiltration Hybrid Model Air Change Rate", - OutputProcessor::Unit::ach, + Constant::Units::ach, state.dataHeatBal->Zone(ZonePtr).InfilOAAirChangeRateHM, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(ZonePtr).Name); SetupOutputVariable(state, "Zone Infiltration Hybrid Model Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataHeatBal->Zone(ZonePtr).MCPIHM, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -466,7 +466,7 @@ namespace HybridModel { state.dataHybridModel->HybridModelZone(ZonePtr).PeopleCountCalc_C) { SetupOutputVariable(state, "Zone Hybrid Model People Count", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataHeatBal->Zone(ZonePtr).NumOccHM, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/HybridModel.hh b/src/EnergyPlus/HybridModel.hh index 53251fd1cf8..4bbe96b8e2a 100644 --- a/src/EnergyPlus/HybridModel.hh +++ b/src/EnergyPlus/HybridModel.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HybridUnitaryAirConditioners.cc b/src/EnergyPlus/HybridUnitaryAirConditioners.cc index 46c9298e27c..482cbab4719 100644 --- a/src/EnergyPlus/HybridUnitaryAirConditioners.cc +++ b/src/EnergyPlus/HybridUnitaryAirConditioners.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -470,7 +470,8 @@ void GetInputZoneHybridUnitaryAirConditioners(EnergyPlusData &state, bool &Error int UnitLoop; // SUBROUTINE PARAMETER DEFINITIONS: - static constexpr std::string_view RoutineName("GetInputZoneHybridUnitaryAirConditioners: "); + static constexpr std::string_view routineName = "GetInputZoneHybridUnitaryAirConditioners"; + cCurrentModuleObject = "ZoneHVAC:HybridUnitaryHVAC"; state.dataHybridUnitaryAC->NumZoneHybridEvap = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject); state.dataInputProcessing->inputProcessor->getObjectDefMaxArgs(state, cCurrentModuleObject, NumFields, NumAlphas, NumNumbers); @@ -513,15 +514,18 @@ void GetInputZoneHybridUnitaryAirConditioners(EnergyPlusData &state, bool &Error IsBlank, cCurrentModuleObject + " Name"); + ErrorObjectHeader eoh{routineName, cCurrentModuleObject, Alphas(1)}; + auto &hybridUnitaryAC = state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop); + // A1, \field Name - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name = Alphas(1); + hybridUnitaryAC.Name = Alphas(1); // A2, \field Availability Schedule Name - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Schedule = Alphas(2); + hybridUnitaryAC.Schedule = Alphas(2); if (lAlphaBlanks(2)) { - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SchedPtr = ScheduleManager::ScheduleAlwaysOn; + hybridUnitaryAC.SchedPtr = ScheduleManager::ScheduleAlwaysOn; } else { - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SchedPtr = GetScheduleIndex(state, Alphas(2)); - if (state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SchedPtr == 0) { + hybridUnitaryAC.SchedPtr = GetScheduleIndex(state, Alphas(2)); + if (hybridUnitaryAC.SchedPtr == 0) { ShowSevereError(state, format("Invalid {}={}", cAlphaFields(2), Alphas(2))); ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, Alphas(1))); ErrorsFound = true; @@ -529,13 +533,13 @@ void GetInputZoneHybridUnitaryAirConditioners(EnergyPlusData &state, bool &Error } // A3, \field Availability Manager List Name if (!lAlphaBlanks(3)) { - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).AvailManagerListName = Alphas(3); + hybridUnitaryAC.AvailManagerListName = Alphas(3); } // A4, \field Minimum Supply Air Temperature Schedule Named if (!lAlphaBlanks(4)) { - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).TsaMin_schedule_pointer = GetScheduleIndex(state, Alphas(4)); - if (state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).TsaMin_schedule_pointer == 0) { + hybridUnitaryAC.TsaMin_schedule_pointer = GetScheduleIndex(state, Alphas(4)); + if (hybridUnitaryAC.TsaMin_schedule_pointer == 0) { ShowSevereError(state, format("Invalid {}={}", cAlphaFields(4), Alphas(4))); ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, Alphas(1))); ErrorsFound = true; @@ -543,8 +547,8 @@ void GetInputZoneHybridUnitaryAirConditioners(EnergyPlusData &state, bool &Error } // A5, \field Maximum Supply Air Temperature Schedule Name if (!lAlphaBlanks(5)) { - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).TsaMax_schedule_pointer = GetScheduleIndex(state, Alphas(5)); - if (state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).TsaMax_schedule_pointer == 0) { + hybridUnitaryAC.TsaMax_schedule_pointer = GetScheduleIndex(state, Alphas(5)); + if (hybridUnitaryAC.TsaMax_schedule_pointer == 0) { ShowSevereError(state, format("Invalid {}={}", cAlphaFields(5), Alphas(5))); ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, Alphas(1))); ErrorsFound = true; @@ -552,8 +556,8 @@ void GetInputZoneHybridUnitaryAirConditioners(EnergyPlusData &state, bool &Error } // A6, \field Minimum Supply Air Humidity Ratio Schedule Name if (!lAlphaBlanks(6)) { - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).RHsaMin_schedule_pointer = GetScheduleIndex(state, Alphas(6)); - if (state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).RHsaMin_schedule_pointer == 0) { + hybridUnitaryAC.RHsaMin_schedule_pointer = GetScheduleIndex(state, Alphas(6)); + if (hybridUnitaryAC.RHsaMin_schedule_pointer == 0) { ShowSevereError(state, format("Invalid {}={}", cAlphaFields(6), Alphas(6))); ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, Alphas(1))); ErrorsFound = true; @@ -561,8 +565,8 @@ void GetInputZoneHybridUnitaryAirConditioners(EnergyPlusData &state, bool &Error } // A7, \field Maximum Supply Air Humidity Ratio Schedule Name if (!lAlphaBlanks(7)) { - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).RHsaMax_schedule_pointer = GetScheduleIndex(state, Alphas(7)); - if (state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).RHsaMax_schedule_pointer == 0) { + hybridUnitaryAC.RHsaMax_schedule_pointer = GetScheduleIndex(state, Alphas(7)); + if (hybridUnitaryAC.RHsaMax_schedule_pointer == 0) { ShowSevereError(state, format("Invalid {}={}", cAlphaFields(7), Alphas(7))); ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, Alphas(1))); ErrorsFound = true; @@ -575,109 +579,122 @@ void GetInputZoneHybridUnitaryAirConditioners(EnergyPlusData &state, bool &Error // A10, \field Outdoor Air Node Name // A11, \field Supply Air Node Name // A12, \field Relief Node Name - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).InletNode = - GetOnlySingleNode(state, - Alphas(9), - ErrorsFound, - DataLoopNode::ConnectionObjectType::ZoneHVACHybridUnitaryHVAC, - Alphas(1), - DataLoopNode::NodeFluidType::Air, - DataLoopNode::ConnectionType::Inlet, - NodeInputManager::CompFluidStream::Primary, - ObjectIsNotParent); - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SecondaryInletNode = - GetOnlySingleNode(state, - Alphas(10), - ErrorsFound, - DataLoopNode::ConnectionObjectType::ZoneHVACHybridUnitaryHVAC, - Alphas(1), - DataLoopNode::NodeFluidType::Air, - DataLoopNode::ConnectionType::OutsideAir, - NodeInputManager::CompFluidStream::Primary, - ObjectIsNotParent); - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).OutletNode = - GetOnlySingleNode(state, - Alphas(11), - ErrorsFound, - DataLoopNode::ConnectionObjectType::ZoneHVACHybridUnitaryHVAC, - Alphas(1), - DataLoopNode::NodeFluidType::Air, - DataLoopNode::ConnectionType::Outlet, - NodeInputManager::CompFluidStream::Primary, - ObjectIsNotParent); - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SecondaryOutletNode = - GetOnlySingleNode(state, - Alphas(12), - ErrorsFound, - DataLoopNode::ConnectionObjectType::ZoneHVACHybridUnitaryHVAC, - Alphas(1), - DataLoopNode::NodeFluidType::Air, - DataLoopNode::ConnectionType::ReliefAir, - NodeInputManager::CompFluidStream::Primary, - ObjectIsNotParent); + hybridUnitaryAC.InletNode = GetOnlySingleNode(state, + Alphas(9), + ErrorsFound, + DataLoopNode::ConnectionObjectType::ZoneHVACHybridUnitaryHVAC, + Alphas(1), + DataLoopNode::NodeFluidType::Air, + DataLoopNode::ConnectionType::Inlet, + NodeInputManager::CompFluidStream::Primary, + ObjectIsNotParent); + hybridUnitaryAC.SecondaryInletNode = GetOnlySingleNode(state, + Alphas(10), + ErrorsFound, + DataLoopNode::ConnectionObjectType::ZoneHVACHybridUnitaryHVAC, + Alphas(1), + DataLoopNode::NodeFluidType::Air, + DataLoopNode::ConnectionType::OutsideAir, + NodeInputManager::CompFluidStream::Primary, + ObjectIsNotParent); + hybridUnitaryAC.OutletNode = GetOnlySingleNode(state, + Alphas(11), + ErrorsFound, + DataLoopNode::ConnectionObjectType::ZoneHVACHybridUnitaryHVAC, + Alphas(1), + DataLoopNode::NodeFluidType::Air, + DataLoopNode::ConnectionType::Outlet, + NodeInputManager::CompFluidStream::Primary, + ObjectIsNotParent); + hybridUnitaryAC.SecondaryOutletNode = GetOnlySingleNode(state, + Alphas(12), + ErrorsFound, + DataLoopNode::ConnectionObjectType::ZoneHVACHybridUnitaryHVAC, + Alphas(1), + DataLoopNode::NodeFluidType::Air, + DataLoopNode::ConnectionType::ReliefAir, + NodeInputManager::CompFluidStream::Primary, + ObjectIsNotParent); TestCompSet(state, cCurrentModuleObject, Alphas(1), Alphas(9), Alphas(11), "Hybrid Evap Air Zone Nodes"); TestCompSet(state, cCurrentModuleObject, Alphas(1), Alphas(10), Alphas(12), "Hybrid Evap Air Zone Secondary Nodes"); // N1, \field System Maximum Supply AirFlow Rate - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SystemMaximumSupplyAirFlowRate = Numbers(1); + hybridUnitaryAC.SystemMaximumSupplyAirFlowRate = Numbers(1); // N2, \field External Static Pressure at System Maximum Supply Air Flow Rate // In each time step, the result for system power, fan power, gas use, water user, or supply airflow rate will be determined as : // TableValue * SysMaxSupply * ScalingFactor // A13, \field Fan Heat Included in Lookup Tables - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).FanHeatGain = false; + hybridUnitaryAC.FanHeatGain = false; if (!lAlphaBlanks(13)) { if (Util::SameString(Alphas(13), "Yes")) { - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).FanHeatGain = false; + hybridUnitaryAC.FanHeatGain = false; } else if (Util::SameString(Alphas(13), "No")) { - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).FanHeatGain = true; + hybridUnitaryAC.FanHeatGain = true; } else { - ShowSevereError( - state, format("{} = {}", cCurrentModuleObject, state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name)); + ShowSevereError(state, format("{} = {}", cCurrentModuleObject, hybridUnitaryAC.Name)); ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(13), Alphas(13))); ErrorsFound = true; } } // A14, \field Fan Heat Gain Location if (!lAlphaBlanks(14)) { - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).FanHeatGainLocation = Alphas(14); + hybridUnitaryAC.FanHeatGainLocation = Alphas(14); } // N3, \field Fan Heat in Air Stream Fraction - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).FanHeatInAirFrac = Numbers(3); + hybridUnitaryAC.FanHeatInAirFrac = Numbers(3); // N4, \field Scaling Factor - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).ScalingFactor = Numbers(4); + hybridUnitaryAC.ScalingFactor = Numbers(4); // the two numbers above are used to generate a overall scaling factor - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).ScaledSystemMaximumSupplyAirVolumeFlowRate = Numbers(1) * Numbers(4); + hybridUnitaryAC.ScaledSystemMaximumSupplyAirVolumeFlowRate = Numbers(1) * Numbers(4); if (state.dataEnvrn->StdRhoAir > 1) { // SystemMaximumSupplyAirFlowRate*ScalingFactor*AirDensity; - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).ScaledSystemMaximumSupplyAirMassFlowRate = - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).ScaledSystemMaximumSupplyAirVolumeFlowRate * - state.dataEnvrn->StdRhoAir; + hybridUnitaryAC.ScaledSystemMaximumSupplyAirMassFlowRate = + hybridUnitaryAC.ScaledSystemMaximumSupplyAirVolumeFlowRate * state.dataEnvrn->StdRhoAir; } else { - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).ScaledSystemMaximumSupplyAirMassFlowRate = - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).ScaledSystemMaximumSupplyAirVolumeFlowRate * 1.225; + hybridUnitaryAC.ScaledSystemMaximumSupplyAirMassFlowRate = hybridUnitaryAC.ScaledSystemMaximumSupplyAirVolumeFlowRate * 1.225; } // N5, \field Minimum Time Between Mode Change // A15, \field First fuel type - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).FirstFuelType = Alphas(15); + if (lAlphaBlanks(15)) { + // The original code never checks if this field is empty, but adding this check leads to a unit test failure. + // ShowSevereEmptyField(state, eoh, cAlphaFields(15)); + // ErrorsFound = true; + } else if ((hybridUnitaryAC.firstFuel = static_cast( + getEnumValue(Constant::eFuelNamesUC, Util::makeUPPER(Alphas(15))))) == Constant::eFuel::Invalid) { + ShowSevereInvalidKey(state, eoh, cAlphaFields(15), Alphas(15)); + ErrorsFound = true; + } + // A16, \field Second fuel type - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SecondFuelType = Alphas(16); + if (!lAlphaBlanks(16) && Alphas(16) != "NONE" && + (hybridUnitaryAC.secondFuel = static_cast(getEnumValue(Constant::eFuelNamesUC, Util::makeUPPER(Alphas(16))))) == + Constant::eFuel::Invalid) { + ShowSevereInvalidKey(state, eoh, cAlphaFields(16), Alphas(16)); + ErrorsFound = true; + } + // A17, \field Third fuel type - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).ThirdFuelType = Alphas(17); + if (!lAlphaBlanks(17) && Alphas(17) != "NONE" && + (hybridUnitaryAC.thirdFuel = static_cast(getEnumValue(Constant::eFuelNamesUC, Util::makeUPPER(Alphas(17))))) == + Constant::eFuel::Invalid) { + ShowSevereInvalidKey(state, eoh, cAlphaFields(17), Alphas(17)); + ErrorsFound = true; + } + // A18, \field Objective Function Minimizes // A19, \ OA requirement pointer if (!lAlphaBlanks(19)) { - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).OARequirementsPtr = - Util::FindItemInList(Alphas(19), state.dataSize->OARequirements); - if (state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).OARequirementsPtr == 0) { - ShowSevereError(state, format("{}{} = {} invalid data", RoutineName, cCurrentModuleObject, Alphas(1))); + hybridUnitaryAC.OARequirementsPtr = Util::FindItemInList(Alphas(19), state.dataSize->OARequirements); + if (hybridUnitaryAC.OARequirementsPtr == 0) { + ShowSevereError(state, format("{}: {} = {} invalid data", routineName, cCurrentModuleObject, Alphas(1))); ShowContinueError(state, format("Invalid-not found {}=\"{}\".", cAlphaFields(19), Alphas(19))); ErrorsFound = true; } else { - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).OutdoorAir = true; + hybridUnitaryAC.OutdoorAir = true; } } @@ -693,618 +710,611 @@ void GetInputZoneHybridUnitaryAirConditioners(EnergyPlusData &state, bool &Error } for (int modeIter = 0; modeIter <= Numberofoperatingmodes - 1; ++modeIter) { - ErrorsFound = state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).ParseMode( - state, Alphas, cAlphaFields, Numbers, cNumericFields, lAlphaBlanks, cCurrentModuleObject); + ErrorsFound = hybridUnitaryAC.ParseMode(state, Alphas, cAlphaFields, Numbers, cNumericFields, lAlphaBlanks, cCurrentModuleObject); if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found parsing modes", RoutineName)); + ShowFatalError(state, format("{}: Errors found parsing modes", routineName)); ShowContinueError(state, "... Preceding condition causes termination."); break; } } // add the ZoneHVAC:HybridUnitaryHVAC Scaled Maximum Supply Air Volume Flow Rate to the Component Sizing Report Summary - BaseSizer::reportSizerOutput( - state, - cCurrentModuleObject, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name, - "Scaled Maximum Supply Air Volume Flow Rate [m3/s]", - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).ScaledSystemMaximumSupplyAirVolumeFlowRate); + BaseSizer::reportSizerOutput(state, + cCurrentModuleObject, + hybridUnitaryAC.Name, + "Scaled Maximum Supply Air Volume Flow Rate [m3/s]", + hybridUnitaryAC.ScaledSystemMaximumSupplyAirVolumeFlowRate); } } // setup output variables for (UnitLoop = 1; UnitLoop <= state.dataHybridUnitaryAC->NumZoneHybridEvap; ++UnitLoop) { + auto &hybridUnitaryAC = state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop); + SetUpCompSets(state, cCurrentModuleObject, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name, + hybridUnitaryAC.Name, cCurrentModuleObject, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name, - state.dataLoopNodes->NodeID(state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).InletNode), - state.dataLoopNodes->NodeID(state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).OutletNode)); + hybridUnitaryAC.Name, + state.dataLoopNodes->NodeID(hybridUnitaryAC.InletNode), + state.dataLoopNodes->NodeID(hybridUnitaryAC.OutletNode)); SetUpCompSets(state, cCurrentModuleObject, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name, + hybridUnitaryAC.Name, cCurrentModuleObject, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name, - state.dataLoopNodes->NodeID(state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SecondaryInletNode), - state.dataLoopNodes->NodeID(state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SecondaryOutletNode)); + hybridUnitaryAC.Name, + state.dataLoopNodes->NodeID(hybridUnitaryAC.SecondaryInletNode), + state.dataLoopNodes->NodeID(hybridUnitaryAC.SecondaryOutletNode)); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC System Total Cooling Rate", - OutputProcessor::Unit::W, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SystemTotalCoolingRate, + Constant::Units::W, + hybridUnitaryAC.SystemTotalCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC System Total Cooling Energy", - OutputProcessor::Unit::J, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SystemTotalCoolingEnergy, + Constant::Units::J, + hybridUnitaryAC.SystemTotalCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name, + hybridUnitaryAC.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "ENERGYTRANSFER", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC System Sensible Cooling Rate", - OutputProcessor::Unit::W, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SystemSensibleCoolingRate, + Constant::Units::W, + hybridUnitaryAC.SystemSensibleCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC System Sensible Cooling Energy", - OutputProcessor::Unit::J, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SystemSensibleCoolingEnergy, + Constant::Units::J, + hybridUnitaryAC.SystemSensibleCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC System Latent Cooling Rate", - OutputProcessor::Unit::W, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SystemLatentCoolingRate, + Constant::Units::W, + hybridUnitaryAC.SystemLatentCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC System Latent Cooling Energy", - OutputProcessor::Unit::J, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SystemLatentCoolingEnergy, + Constant::Units::J, + hybridUnitaryAC.SystemLatentCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Zone Total Cooling Rate", - OutputProcessor::Unit::W, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).UnitTotalCoolingRate, + Constant::Units::W, + hybridUnitaryAC.UnitTotalCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Zone Total Cooling Energy", - OutputProcessor::Unit::J, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).UnitTotalCoolingEnergy, + Constant::Units::J, + hybridUnitaryAC.UnitTotalCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Zone Sensible Cooling Rate", - OutputProcessor::Unit::W, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).UnitSensibleCoolingRate, + Constant::Units::W, + hybridUnitaryAC.UnitSensibleCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Zone Sensible Cooling Energy", - OutputProcessor::Unit::J, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).UnitSensibleCoolingEnergy, + Constant::Units::J, + hybridUnitaryAC.UnitSensibleCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Zone Latent Cooling Rate", - OutputProcessor::Unit::W, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).UnitLatentCoolingRate, + Constant::Units::W, + hybridUnitaryAC.UnitLatentCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Zone Latent Cooling Energy", - OutputProcessor::Unit::J, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).UnitLatentCoolingEnergy, + Constant::Units::J, + hybridUnitaryAC.UnitLatentCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC System Total Heating Rate", - OutputProcessor::Unit::W, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SystemTotalHeatingRate, + Constant::Units::W, + hybridUnitaryAC.SystemTotalHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC System Total Heating Energy", - OutputProcessor::Unit::J, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SystemTotalHeatingEnergy, + Constant::Units::J, + hybridUnitaryAC.SystemTotalHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name, - {}, - "ENERGYTRANSFER", - "HeatingCOILS", + hybridUnitaryAC.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC System Sensible Heating Rate", - OutputProcessor::Unit::W, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SystemSensibleHeatingRate, + Constant::Units::W, + hybridUnitaryAC.SystemSensibleHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC System Sensible Heating Energy", - OutputProcessor::Unit::J, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SystemSensibleHeatingEnergy, + Constant::Units::J, + hybridUnitaryAC.SystemSensibleHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC System Latent Heating Rate", - OutputProcessor::Unit::W, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SystemLatentHeatingRate, + Constant::Units::W, + hybridUnitaryAC.SystemLatentHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC System Latent Heating Energy", - OutputProcessor::Unit::J, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SystemLatentHeatingEnergy, + Constant::Units::J, + hybridUnitaryAC.SystemLatentHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Zone Total Heating Rate", - OutputProcessor::Unit::W, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).UnitTotalHeatingRate, + Constant::Units::W, + hybridUnitaryAC.UnitTotalHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Zone Total Heating Energy", - OutputProcessor::Unit::J, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).UnitTotalHeatingEnergy, + Constant::Units::J, + hybridUnitaryAC.UnitTotalHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Zone Sensible Heating Rate", - OutputProcessor::Unit::W, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).UnitSensibleHeatingRate, + Constant::Units::W, + hybridUnitaryAC.UnitSensibleHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Zone Sensible Heating Energy", - OutputProcessor::Unit::J, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).UnitSensibleHeatingEnergy, + Constant::Units::J, + hybridUnitaryAC.UnitSensibleHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Zone Latent Heating Rate", - OutputProcessor::Unit::W, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).UnitLatentHeatingRate, + Constant::Units::W, + hybridUnitaryAC.UnitLatentHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Zone Latent Heating Energy", - OutputProcessor::Unit::J, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).UnitLatentHeatingEnergy, + Constant::Units::J, + hybridUnitaryAC.UnitLatentHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Predicted Sensible Load to Setpoint Heat Transfer Rate", - OutputProcessor::Unit::W, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).RequestedLoadToCoolingSetpoint, + Constant::Units::W, + hybridUnitaryAC.RequestedLoadToCoolingSetpoint, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Error Code", - OutputProcessor::Unit::None, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).ErrorCode, + Constant::Units::None, + hybridUnitaryAC.ErrorCode, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Supply Air Temperature", - OutputProcessor::Unit::C, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).OutletTemp, + Constant::Units::C, + hybridUnitaryAC.OutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Return Air Temperature", - OutputProcessor::Unit::C, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).InletTemp, + Constant::Units::C, + hybridUnitaryAC.InletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Outdoor Air Temperature", - OutputProcessor::Unit::C, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SecInletTemp, + Constant::Units::C, + hybridUnitaryAC.SecInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Relief Air Temperature", - OutputProcessor::Unit::C, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SecOutletTemp, + Constant::Units::C, + hybridUnitaryAC.SecOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Supply Air Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).OutletHumRat, + Constant::Units::kgWater_kgDryAir, + hybridUnitaryAC.OutletHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Return Air Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).InletHumRat, + Constant::Units::kgWater_kgDryAir, + hybridUnitaryAC.InletHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Outdoor Air Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SecInletHumRat, + Constant::Units::kgWater_kgDryAir, + hybridUnitaryAC.SecInletHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Relief Air Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SecOutletHumRat, + Constant::Units::kgWater_kgDryAir, + hybridUnitaryAC.SecOutletHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Supply Air Relative Humidity", - OutputProcessor::Unit::Perc, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).OutletRH, + Constant::Units::Perc, + hybridUnitaryAC.OutletRH, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Return Air Relative Humidity", - OutputProcessor::Unit::Perc, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).InletRH, + Constant::Units::Perc, + hybridUnitaryAC.InletRH, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Outdoor Air Relative Humidity", - OutputProcessor::Unit::Perc, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SecInletRH, + Constant::Units::Perc, + hybridUnitaryAC.SecInletRH, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Relief Air Relative Humidity", - OutputProcessor::Unit::Perc, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SecOutletRH, + Constant::Units::Perc, + hybridUnitaryAC.SecOutletRH, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Supply Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).OutletMassFlowRate, + Constant::Units::kg_s, + hybridUnitaryAC.OutletMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Supply Air Standard Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).OutletVolumetricFlowRate, + Constant::Units::m3_s, + hybridUnitaryAC.OutletVolumetricFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Return Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).InletMassFlowRate, + Constant::Units::kg_s, + hybridUnitaryAC.InletMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Return Air Standard Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).InletVolumetricFlowRate, + Constant::Units::m3_s, + hybridUnitaryAC.InletVolumetricFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Relief Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SecOutletMassFlowRate, + Constant::Units::kg_s, + hybridUnitaryAC.SecOutletMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Relief Air Standard Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SecOutletVolumetricFlowRate, + Constant::Units::m3_s, + hybridUnitaryAC.SecOutletVolumetricFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Ventilation Air Standard Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SupplyVentilationVolume, + Constant::Units::m3_s, + hybridUnitaryAC.SupplyVentilationVolume, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Electricity Rate", - OutputProcessor::Unit::W, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).FinalElectricalPower, + Constant::Units::W, + hybridUnitaryAC.FinalElectricalPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Electricity Energy", - OutputProcessor::Unit::J, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).FinalElectricalEnergy, + Constant::Units::J, + hybridUnitaryAC.FinalElectricalEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name, - {}, - "Electricity", - "Cooling", + hybridUnitaryAC.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, "Hybrid HVAC Cooling", - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Requested Outdoor Air Ventilation Mass Flow Rate", - OutputProcessor::Unit::kg_s, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).MinOA_Msa, + Constant::Units::kg_s, + hybridUnitaryAC.MinOA_Msa, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Ventilation Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SupplyVentilationAir, + Constant::Units::kg_s, + hybridUnitaryAC.SupplyVentilationAir, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Availability Status", - OutputProcessor::Unit::None, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).UnitOn, + Constant::Units::None, + hybridUnitaryAC.UnitOn, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Outdoor Air Fraction", - OutputProcessor::Unit::None, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).averageOSAF, + Constant::Units::None, + hybridUnitaryAC.averageOSAF, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Dehumidification Load to Humidistat Setpoint Moisture Transfer Rate", - OutputProcessor::Unit::kg_s, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).RequestedDeHumdificationMass, + Constant::Units::kg_s, + hybridUnitaryAC.RequestedDeHumdificationMass, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Dehumidification Load to Humidistat Setpoint Heat Transfer Rate", - OutputProcessor::Unit::W, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).RequestedDeHumdificationLoad, + Constant::Units::W, + hybridUnitaryAC.RequestedDeHumdificationLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC DehumidificationLoad to Humidistat Setpoint Heat Tansfer Energy", - OutputProcessor::Unit::J, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).RequestedDeHumdificationEnergy, + Constant::Units::J, + hybridUnitaryAC.RequestedDeHumdificationEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Humidification Load to Humidistat Setpoint Moisture Transfer Rate", - OutputProcessor::Unit::kg_s, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).RequestedHumdificationMass, + Constant::Units::kg_s, + hybridUnitaryAC.RequestedHumdificationMass, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Humidification Load to Humidistat Setpoint Heat Transfer Rate", - OutputProcessor::Unit::W, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).RequestedHumdificationLoad, + Constant::Units::W, + hybridUnitaryAC.RequestedHumdificationLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Humidification Load to Humidistat Setpoint Heat Tansfer Energy", - OutputProcessor::Unit::J, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).RequestedHumdificationEnergy, + Constant::Units::J, + hybridUnitaryAC.RequestedHumdificationEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Supply Fan Electricity Rate", - OutputProcessor::Unit::W, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SupplyFanElectricPower, + Constant::Units::W, + hybridUnitaryAC.SupplyFanElectricPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Supply Fan Electricity Energy", - OutputProcessor::Unit::J, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SupplyFanElectricEnergy, + Constant::Units::J, + hybridUnitaryAC.SupplyFanElectricEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name, - {}, - "Electricity", - "Fans", + hybridUnitaryAC.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Fans, "Hybrid HVAC Fans", - "System"); - if (state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SecondFuelType != "NONE") { + OutputProcessor::SOVGroup::HVAC); + if (hybridUnitaryAC.secondFuel != Constant::eFuel::Invalid) { SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Secondary Fuel Consumption Rate", - OutputProcessor::Unit::W, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SecondaryFuelConsumptionRate, + Constant::Units::W, + hybridUnitaryAC.SecondaryFuelConsumptionRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Secondary Fuel Consumption", - OutputProcessor::Unit::J, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SecondaryFuelConsumption, + Constant::Units::J, + hybridUnitaryAC.SecondaryFuelConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name, - {}, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).SecondFuelType, - "Cooling", + hybridUnitaryAC.Name, + Constant::eFuel2eResource[(int)hybridUnitaryAC.secondFuel], + OutputProcessor::SOVEndUseCat::Cooling, "Hybrid HVAC Cooling", - "System"); + OutputProcessor::SOVGroup::HVAC); } - if (state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).ThirdFuelType != "NONE") { + if (hybridUnitaryAC.thirdFuel != Constant::eFuel::Invalid) { SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Third Fuel Consumption Rate", - OutputProcessor::Unit::W, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).ThirdFuelConsumptionRate, + Constant::Units::W, + hybridUnitaryAC.ThirdFuelConsumptionRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Third Fuel Consumption", - OutputProcessor::Unit::J, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).ThirdFuelConsumption, + Constant::Units::J, + hybridUnitaryAC.ThirdFuelConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name, - {}, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).ThirdFuelType, - "Cooling", + hybridUnitaryAC.Name, + Constant::eFuel2eResource[(int)hybridUnitaryAC.thirdFuel], + OutputProcessor::SOVEndUseCat::Cooling, "Hybrid HVAC Cooling", - "System"); + OutputProcessor::SOVGroup::HVAC); } SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Water Consumption Rate", - OutputProcessor::Unit::kgWater_s, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).WaterConsumptionRate, + Constant::Units::kgWater_s, + hybridUnitaryAC.WaterConsumptionRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Water Consumption", - OutputProcessor::Unit::m3, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).WaterConsumption, + Constant::Units::m3, + hybridUnitaryAC.WaterConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name, - {}, - "Water", - "Cooling", + hybridUnitaryAC.Name, + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::Cooling, "Hybrid HVAC Cooling", - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC External Static Pressure", - OutputProcessor::Unit::Pa, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).ExternalStaticPressure, + Constant::Units::Pa, + hybridUnitaryAC.ExternalStaticPressure, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); - if (state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).FanHeatGain) { + if (hybridUnitaryAC.FanHeatGain) { SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Fan Rise in Air Temperature", - OutputProcessor::Unit::deltaC, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).FanHeatTemp, + Constant::Units::deltaC, + hybridUnitaryAC.FanHeatTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, "Zone Hybrid Unitary HVAC Fan Heat Gain to Air", - OutputProcessor::Unit::W, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).PowerLossToAir, + Constant::Units::W, + hybridUnitaryAC.PowerLossToAir, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); } int index = 0; - for (auto &thisSetting : state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).CurrentOperatingSettings) { + for (auto &thisSetting : hybridUnitaryAC.CurrentOperatingSettings) { SetupOutputVariable(state, format("Zone Hybrid Unitary HVAC Runtime Fraction in Setting {}", index), - OutputProcessor::Unit::None, + Constant::Units::None, thisSetting.Runtime_Fraction, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, format("Zone Hybrid Unitary HVAC Mode in Setting {}", index), - OutputProcessor::Unit::None, + Constant::Units::None, thisSetting.Mode, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, format("Zone Hybrid Unitary HVAC Outdoor Air Fraction in Setting {}", index), - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisSetting.Outdoor_Air_Fraction, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, format("Zone Hybrid Unitary HVAC Supply Air Mass Flow Rate in Setting {}", index), - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisSetting.Unscaled_Supply_Air_Mass_Flow_Rate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); SetupOutputVariable(state, format("Zone Hybrid Unitary HVAC Supply Air Mass Flow Rate Ratio in Setting {}", index), - OutputProcessor::Unit::None, + Constant::Units::None, thisSetting.Supply_Air_Mass_Flow_Rate_Ratio, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop).Name); + hybridUnitaryAC.Name); index++; } } Errors = ErrorsFound; if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in getting input.", RoutineName)); + ShowFatalError(state, format("{}: Errors found in getting input.", routineName)); ShowContinueError(state, "... Preceding condition causes termination."); } } diff --git a/src/EnergyPlus/HybridUnitaryAirConditioners.hh b/src/EnergyPlus/HybridUnitaryAirConditioners.hh index 372cee4f8d9..64f0a152e76 100644 --- a/src/EnergyPlus/HybridUnitaryAirConditioners.hh +++ b/src/EnergyPlus/HybridUnitaryAirConditioners.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ICEngineElectricGenerator.cc b/src/EnergyPlus/ICEngineElectricGenerator.cc index d531fd6d2b6..5d505c2125e 100644 --- a/src/EnergyPlus/ICEngineElectricGenerator.cc +++ b/src/EnergyPlus/ICEngineElectricGenerator.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -312,7 +312,7 @@ namespace ICEngineElectricGenerator { std::string_view const sFuelType = Constant::eFuelNames[static_cast(this->FuelType)]; SetupOutputVariable(state, "Generator Produced AC Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->ElecPowerGenerated, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -320,20 +320,19 @@ namespace ICEngineElectricGenerator { SetupOutputVariable(state, "Generator Produced AC Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->ElecEnergyGenerated, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::ElectricityProduced, + OutputProcessor::SOVEndUseCat::Cogeneration, {}, - "ElectricityProduced", - "COGENERATION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, format("Generator {} Rate", sFuelType), - OutputProcessor::Unit::W, + Constant::Units::W, this->FuelEnergyUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -341,21 +340,20 @@ namespace ICEngineElectricGenerator { SetupOutputVariable(state, format("Generator {} Energy", sFuelType), - OutputProcessor::Unit::J, + Constant::Units::J, this->FuelEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eFuel2eResource[(int)this->FuelType], + OutputProcessor::SOVEndUseCat::Cogeneration, {}, - sFuelType, - "COGENERATION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); // general fuel use report to match other generators. SetupOutputVariable(state, "Generator Fuel HHV Basis Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->FuelEnergyUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -363,7 +361,7 @@ namespace ICEngineElectricGenerator { SetupOutputVariable(state, "Generator Fuel HHV Basis Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->FuelEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -371,7 +369,7 @@ namespace ICEngineElectricGenerator { SetupOutputVariable(state, format("Generator {} Mass Flow Rate", sFuelType), - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->FuelMdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -379,7 +377,7 @@ namespace ICEngineElectricGenerator { SetupOutputVariable(state, "Generator Exhaust Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->ExhaustStackTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -388,7 +386,7 @@ namespace ICEngineElectricGenerator { if (this->HeatRecActive) { SetupOutputVariable(state, "Generator Heat Recovery Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->HeatRecMdotActual, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -396,7 +394,7 @@ namespace ICEngineElectricGenerator { SetupOutputVariable(state, "Generator Jacket Heat Recovery Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QJacketRecovered, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -404,20 +402,19 @@ namespace ICEngineElectricGenerator { SetupOutputVariable(state, "Generator Jacket Heat Recovery Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->JacketEnergyRec, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRecovery, {}, - "ENERGYTRANSFER", - "HEATRECOVERY", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Generator Lube Heat Recovery Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QLubeOilRecovered, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -425,20 +422,19 @@ namespace ICEngineElectricGenerator { SetupOutputVariable(state, "Generator Lube Heat Recovery Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->LubeOilEnergyRec, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRecovery, {}, - "ENERGYTRANSFER", - "HEATRECOVERY", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Generator Exhaust Heat Recovery Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QExhaustRecovered, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -446,20 +442,19 @@ namespace ICEngineElectricGenerator { SetupOutputVariable(state, "Generator Exhaust Heat Recovery Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->ExhaustEnergyRec, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRecovery, {}, - "ENERGYTRANSFER", - "HEATRECOVERY", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Generator Produced Thermal Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QTotalHeatRecovered, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -467,7 +462,7 @@ namespace ICEngineElectricGenerator { SetupOutputVariable(state, "Generator Produced Thermal Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->TotalHeatEnergyRec, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -475,7 +470,7 @@ namespace ICEngineElectricGenerator { SetupOutputVariable(state, "Generator Heat Recovery Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->HeatRecInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -483,7 +478,7 @@ namespace ICEngineElectricGenerator { SetupOutputVariable(state, "Generator Heat Recovery Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->HeatRecOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/ICEngineElectricGenerator.hh b/src/EnergyPlus/ICEngineElectricGenerator.hh index 3cff088e8eb..fa80f2c548d 100644 --- a/src/EnergyPlus/ICEngineElectricGenerator.hh +++ b/src/EnergyPlus/ICEngineElectricGenerator.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/IOFiles.cc b/src/EnergyPlus/IOFiles.cc index 9e6a5d1b478..5cb4a6c0d8b 100644 --- a/src/EnergyPlus/IOFiles.cc +++ b/src/EnergyPlus/IOFiles.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -319,6 +319,14 @@ std::vector InputOutputFile::getLines() return std::vector(); } +bool IOFiles::OutputControl::writeTabular(EnergyPlusData &state) +{ + bool const htmlTabular = state.files.outputControl.tabular; + bool const jsonTabular = state.files.outputControl.json && state.dataResultsFramework->resultsFramework->timeSeriesAndTabularEnabled(); + bool const sqliteTabular = state.files.outputControl.sqlite; // && @JasonGlazer thinks something else maybe? + return (htmlTabular || jsonTabular || sqliteTabular); +} + void IOFiles::OutputControl::getInput(EnergyPlusData &state) { auto &ip = state.dataInputProcessing->inputProcessor; diff --git a/src/EnergyPlus/IOFiles.hh b/src/EnergyPlus/IOFiles.hh index e9552f6015d..194ceaee9e5 100644 --- a/src/EnergyPlus/IOFiles.hh +++ b/src/EnergyPlus/IOFiles.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -673,6 +673,7 @@ public: OutputControl() = default; void getInput(EnergyPlusData &state); + bool writeTabular(EnergyPlusData &state); bool csv = false; bool mtr = true; diff --git a/src/EnergyPlus/IceThermalStorage.cc b/src/EnergyPlus/IceThermalStorage.cc index f42e43cc7ff..5f9a806b6b2 100644 --- a/src/EnergyPlus/IceThermalStorage.cc +++ b/src/EnergyPlus/IceThermalStorage.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -1081,7 +1081,7 @@ namespace IceThermalStorage { { SetupOutputVariable(state, "Ice Thermal Storage Requested Load", - OutputProcessor::Unit::W, + Constant::Units::W, this->MyLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1089,7 +1089,7 @@ namespace IceThermalStorage { SetupOutputVariable(state, "Ice Thermal Storage End Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, this->IceFracRemain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -1097,7 +1097,7 @@ namespace IceThermalStorage { SetupOutputVariable(state, "Ice Thermal Storage Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->ITSmdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1105,7 +1105,7 @@ namespace IceThermalStorage { SetupOutputVariable(state, "Ice Thermal Storage Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->ITSInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1113,7 +1113,7 @@ namespace IceThermalStorage { SetupOutputVariable(state, "Ice Thermal Storage Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->ITSOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1121,7 +1121,7 @@ namespace IceThermalStorage { SetupOutputVariable(state, "Ice Thermal Storage Cooling Discharge Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->ITSCoolingRate_rep, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1129,7 +1129,7 @@ namespace IceThermalStorage { SetupOutputVariable(state, "Ice Thermal Storage Cooling Discharge Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->ITSCoolingEnergy_rep, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1137,7 +1137,7 @@ namespace IceThermalStorage { SetupOutputVariable(state, "Ice Thermal Storage Cooling Charge Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->ITSChargingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1145,7 +1145,7 @@ namespace IceThermalStorage { SetupOutputVariable(state, "Ice Thermal Storage Cooling Charge Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->ITSChargingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1156,7 +1156,7 @@ namespace IceThermalStorage { { SetupOutputVariable(state, "Ice Thermal Storage Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->CompLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1164,7 +1164,7 @@ namespace IceThermalStorage { SetupOutputVariable(state, "Ice Thermal Storage Change Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, this->IceFracChange, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1172,7 +1172,7 @@ namespace IceThermalStorage { SetupOutputVariable(state, "Ice Thermal Storage End Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, this->IceFracRemaining, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1180,7 +1180,7 @@ namespace IceThermalStorage { SetupOutputVariable(state, "Ice Thermal Storage On Coil Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, this->IceFracOnCoil, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1188,7 +1188,7 @@ namespace IceThermalStorage { SetupOutputVariable(state, "Ice Thermal Storage Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->MassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1196,7 +1196,7 @@ namespace IceThermalStorage { SetupOutputVariable(state, "Ice Thermal Storage Bypass Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->BypassMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1204,7 +1204,7 @@ namespace IceThermalStorage { SetupOutputVariable(state, "Ice Thermal Storage Tank Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->TankMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1212,7 +1212,7 @@ namespace IceThermalStorage { SetupOutputVariable(state, "Ice Thermal Storage Fluid Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->InletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1220,7 +1220,7 @@ namespace IceThermalStorage { SetupOutputVariable(state, "Ice Thermal Storage Blended Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->OutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1228,7 +1228,7 @@ namespace IceThermalStorage { SetupOutputVariable(state, "Ice Thermal Storage Tank Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->TankOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1236,7 +1236,7 @@ namespace IceThermalStorage { SetupOutputVariable(state, "Ice Thermal Storage Cooling Discharge Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->DischargingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1244,7 +1244,7 @@ namespace IceThermalStorage { SetupOutputVariable(state, "Ice Thermal Storage Cooling Discharge Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->DischargingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1252,7 +1252,7 @@ namespace IceThermalStorage { SetupOutputVariable(state, "Ice Thermal Storage Cooling Charge Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->ChargingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1260,7 +1260,7 @@ namespace IceThermalStorage { SetupOutputVariable(state, "Ice Thermal Storage Cooling Charge Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->ChargingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1268,7 +1268,7 @@ namespace IceThermalStorage { SetupOutputVariable(state, "Ice Thermal Storage Ancillary Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->ParasiticElecRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1276,16 +1276,15 @@ namespace IceThermalStorage { SetupOutputVariable(state, "Ice Thermal Storage Ancillary Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->ParasiticElecEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Invalid, {}, - "ELECTRICITY", - {}, - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } void DetailedIceStorageData::oneTimeInit(EnergyPlusData &state) diff --git a/src/EnergyPlus/IceThermalStorage.hh b/src/EnergyPlus/IceThermalStorage.hh index 641e6d32cf9..e08eb9fbc60 100644 --- a/src/EnergyPlus/IceThermalStorage.hh +++ b/src/EnergyPlus/IceThermalStorage.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/IndoorGreen.cc b/src/EnergyPlus/IndoorGreen.cc new file mode 100644 index 00000000000..7c798d56e97 --- /dev/null +++ b/src/EnergyPlus/IndoorGreen.cc @@ -0,0 +1,623 @@ +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, +// The Regents of the University of California, through Lawrence Berkeley National Laboratory +// (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge +// National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other +// contributors. All rights reserved. +// +// NOTICE: This Software was developed under funding from the U.S. Department of Energy and the +// U.S. Government consequently retains certain rights. As such, the U.S. Government has been +// granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, +// worldwide license in the Software to reproduce, distribute copies to the public, prepare +// derivative works, and perform publicly and display publicly, and to permit others to do so. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted +// provided that the following conditions are met: +// +// (1) Redistributions of source code must retain the above copyright notice, this list of +// conditions and the following disclaimer. +// +// (2) Redistributions in binary form must reproduce the above copyright notice, this list of +// conditions and the following disclaimer in the documentation and/or other materials +// provided with the distribution. +// +// (3) Neither the name of the University of California, Lawrence Berkeley National Laboratory, +// the University of Illinois, U.S. Dept. of Energy nor the names of its contributors may be +// used to endorse or promote products derived from this software without specific prior +// written permission. +// +// (4) Use of EnergyPlus(TM) Name. If Licensee (i) distributes the software in stand-alone form +// without changes from the version obtained under this License, or (ii) Licensee makes a +// reference solely to the software portion of its product, Licensee must refer to the +// software as "EnergyPlus version X" software, where "X" is the version number Licensee +// obtained under this License and may not use a different name for the software. Except as +// specifically required in this Section (4), Licensee shall not use in a company name, a +// product name, in advertising, publicity, or other promotional activities any name, trade +// name, trademark, logo, or other designation of "EnergyPlus", "E+", "e+" or confusingly +// similar designation, without the U.S. Department of Energy's prior written consent. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY +// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +// C++ Headers + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace EnergyPlus { + +namespace IndoorGreen { + // Module containing the routines dealing with the Indoor Living Walls + static constexpr std::array(ETCalculationMethod::Num)> etCalculationMethodsUC = {"PENMAN-MONTEITH", + "STANGHELLINI"}; + static constexpr std::array(LightingMethod::Num)> lightingMethodsUC = {"LED", "DAYLIGHT", "LED-DAYLIGHT"}; + + void SimIndoorGreen(EnergyPlusData &state) + { + // PURPOSE OF THIS SUBROUTINE: + // This subroutine simulates the thermal performance of indoor living walls including the grow lights. + // This subroutine interacts with inside surface heat balance, zone air heat balance and zone air moisture balance in EnergyPlus. + auto &lw = state.dataIndoorGreen; + if (lw->getInputFlag) { + bool ErrorsFound(false); + const char *RoutineName("IndoorLivingWall: "); // include trailing blank space + GetIndoorGreenInput(state, ErrorsFound); + if (ErrorsFound) { + ShowFatalError(state, format("{}Errors found in input. Program terminates.", RoutineName)); + } + SetIndoorGreenOutput(state); + lw->getInputFlag = false; + } + if (lw->NumIndoorGreen > 0) { + InitIndoorGreen(state); + // Simulate evapotranspiration from indoor living walls + ETModel(state); + } + } + + void GetIndoorGreenInput(EnergyPlusData &state, bool &ErrorsFound) + { + // PURPOSE OF THIS SUBROUTINE: + // Get the input for the indoor living wall objects and store the input data in the indoorGreens array. + + auto &lw = state.dataIndoorGreen; + auto &ip = state.dataInputProcessing->inputProcessor; + static constexpr std::string_view RoutineName("GetIndoorLivingWallInput: "); + std::string_view cCurrentModuleObject = "IndoorLivingWall"; // match the idd + int NumNums; // Number of real numbers returned by GetObjectItem + int NumAlphas; // Number of alphanumerics returned by GetObjectItem + int IOStat; // Status flag from GetObjectItem + Real64 SchMin; + Real64 SchMax; + + lw->NumIndoorGreen = ip->getNumObjectsFound(state, cCurrentModuleObject); + if (lw->NumIndoorGreen > 0) lw->indoorGreens.allocate(lw->NumIndoorGreen); // Allocate the IndoorGreen input data array + for (int IndoorGreenNum = 1; IndoorGreenNum <= lw->NumIndoorGreen; ++IndoorGreenNum) { + auto &ig = lw->indoorGreens(IndoorGreenNum); + ip->getObjectItem(state, + cCurrentModuleObject, + IndoorGreenNum, + state.dataIPShortCut->cAlphaArgs, + NumAlphas, + state.dataIPShortCut->rNumericArgs, + NumNums, + IOStat, + state.dataIPShortCut->lNumericFieldBlanks, + state.dataIPShortCut->lAlphaFieldBlanks, + state.dataIPShortCut->cAlphaFieldNames, + state.dataIPShortCut->cNumericFieldNames); + ErrorObjectHeader eoh{RoutineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1)}; + Util::IsNameEmpty(state, state.dataIPShortCut->cAlphaArgs(1), cCurrentModuleObject, ErrorsFound); + ig.Name = state.dataIPShortCut->cAlphaArgs(1); + ig.SurfName = state.dataIPShortCut->cAlphaArgs(2); + ig.SurfPtr = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(2), state.dataSurface->Surface); + if (ig.SurfPtr <= 0) { + ShowSevereItemNotFound(state, eoh, state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2)); + ErrorsFound = true; + } else { + if (state.dataSurface->Surface(ig.SurfPtr).InsideHeatSourceTermSchedule > 0) { + ShowSevereError(state, + format("The indoor green surface {} has an Inside Face Heat Source Term Schedule defined. This surface cannot " + "also be used for indoor green.", + state.dataIPShortCut->cAlphaArgs(2))); + ErrorsFound = true; + } + ig.ZonePtr = state.dataSurface->Surface(ig.SurfPtr).Zone; + ig.SpacePtr = state.dataSurface->Surface(ig.SurfPtr).spaceNum; + + if (ig.ZonePtr <= 0 || ig.SpacePtr <= 0) { + ShowSevereError(state, + format("{}=\"{}\", invalid {} entered={}, {} is not assoicated with a thermal zone or space", + RoutineName, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(2), + state.dataIPShortCut->cAlphaArgs(2), + state.dataIPShortCut->cAlphaArgs(2))); + ErrorsFound = true; + } else if (state.dataSurface->Surface(ig.SurfPtr).ExtBoundCond < 0 || + state.dataSurface->Surface(ig.SurfPtr).HeatTransferAlgorithm != DataSurfaces::HeatTransferModel::CTF) { + ShowSevereError(state, + format("{}=\"{}\", invalid {} entered={}, not a valid surface for indoor green module", + RoutineName, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(2), + state.dataIPShortCut->cAlphaArgs(2))); + ErrorsFound = true; + } + } + ig.SchedPtr = ScheduleManager::GetScheduleIndex(state, state.dataIPShortCut->cAlphaArgs(3)); + if (ig.SchedPtr == 0) { + ShowSevereItemNotFound(state, eoh, state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3)); + ErrorsFound = true; + } else { // check min/max on schedule + SchMin = ScheduleManager::GetScheduleMinValue(state, ig.SchedPtr); + SchMax = ScheduleManager::GetScheduleMaxValue(state, ig.SchedPtr); + if (SchMin < 0.0 || SchMax < 0.0) { + if (SchMin < 0.0) { + ShowSevereError(state, + format("{}=\"{}\", {}, minimum is < 0.0", + RoutineName, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(3))); + ShowContinueError( + state, + format("Schedule=\"{}\". Minimum is [{:.1R}]. Values must be >= 0.0.", state.dataIPShortCut->cAlphaArgs(3), SchMin)); + ErrorsFound = true; + } + if (SchMax < 0.0) { + ShowSevereError(state, + format("{}=\"{}\", {}, maximum is < 0.0", + RoutineName, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(3))); + ShowContinueError( + state, + format("Schedule=\"{}\". Maximum is [{:.1R}]. Values must be >= 0.0.", state.dataIPShortCut->cAlphaArgs(3), SchMin)); + ErrorsFound = true; + } + } + } + + ig.etCalculationMethod = ETCalculationMethod::PenmanMonteith; // default + ig.etCalculationMethod = static_cast(getEnumValue(etCalculationMethodsUC, state.dataIPShortCut->cAlphaArgs(4))); + ig.lightingMethod = LightingMethod::LED; // default + ig.lightingMethod = static_cast(getEnumValue(lightingMethodsUC, state.dataIPShortCut->cAlphaArgs(5))); + switch (ig.lightingMethod) { + case LightingMethod::LED: { + ig.SchedLEDPtr = ScheduleManager::GetScheduleIndex(state, state.dataIPShortCut->cAlphaArgs(6)); + if (ig.SchedLEDPtr == 0) { + ShowSevereItemNotFound(state, eoh, state.dataIPShortCut->cAlphaFieldNames(6), state.dataIPShortCut->cAlphaArgs(6)); + ErrorsFound = true; + } else { // check min/max on schedule + SchMin = ScheduleManager::GetScheduleMinValue(state, ig.SchedLEDPtr); + SchMax = ScheduleManager::GetScheduleMaxValue(state, ig.SchedLEDPtr); + if (SchMin < 0.0 || SchMax < 0.0) { + if (SchMin < 0.0) { + ShowSevereError(state, + format("{}=\"{}\", {}, minimum is < 0.0", + RoutineName, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(6))); + ShowContinueError( + state, + format("Schedule=\"{}\". Minimum is [{:.1R}]. Values must be >= 0.0.", state.dataIPShortCut->cAlphaArgs(6), SchMin)); + ErrorsFound = true; + } + if (SchMax < 0.0) { + ShowSevereError(state, + format("{}=\"{}\", {}, maximum is < 0.0", + RoutineName, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(6))); + ShowContinueError( + state, + format("Schedule=\"{}\". Maximum is [{:.1R}]. Values must be >= 0.0.", state.dataIPShortCut->cAlphaArgs(6), SchMin)); + ErrorsFound = true; + } + } + } + } break; + case LightingMethod::Daylighting: { + ig.LightRefPtr = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(7), + state.dataDayltg->DaylRefPt, + &EnergyPlus::Dayltg::RefPointData::Name); // Field: Daylighting Reference Point Name + ig.LightControlPtr = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(7), + state.dataDayltg->daylightControl, + &EnergyPlus::Dayltg::DaylightingControl::Name); // Field: Daylighting Control Name + if (ig.LightControlPtr == 0) { + ShowSevereItemNotFound(state, eoh, state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7)); + ErrorsFound = true; + continue; + } + } break; + case LightingMethod::LEDDaylighting: { + ig.LightRefPtr = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(7), + state.dataDayltg->DaylRefPt, + &EnergyPlus::Dayltg::RefPointData::Name); // Field: Daylighting Reference Point Name + ig.LightControlPtr = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(7), + state.dataDayltg->daylightControl, + &EnergyPlus::Dayltg::DaylightingControl::Name); // Field: Daylighting Control Name + if (ig.LightControlPtr == 0) { + ShowSevereItemNotFound(state, eoh, state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7)); + ErrorsFound = true; + continue; + } + ig.SchedLEDDaylightTargetPtr = ScheduleManager::GetScheduleIndex(state, state.dataIPShortCut->cAlphaArgs(8)); + if (ig.SchedLEDDaylightTargetPtr == 0) { + ShowSevereItemNotFound(state, eoh, state.dataIPShortCut->cAlphaFieldNames(8), state.dataIPShortCut->cAlphaArgs(8)); + ErrorsFound = true; + } else { // check min/max on schedule + SchMin = ScheduleManager::GetScheduleMinValue(state, ig.SchedLEDDaylightTargetPtr); + SchMax = ScheduleManager::GetScheduleMaxValue(state, ig.SchedLEDDaylightTargetPtr); + if (SchMin < 0.0 || SchMax < 0.0) { + if (SchMin < 0.0) { + ShowSevereError(state, + format("{}=\"{}\", {}, minimum is < 0.0", + RoutineName, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(8))); + ShowContinueError( + state, + format("Schedule=\"{}\". Minimum is [{:.1R}]. Values must be >= 0.0.", state.dataIPShortCut->cAlphaArgs(8), SchMin)); + ErrorsFound = true; + } + if (SchMax < 0.0) { + ShowSevereError(state, + format("{}=\"{}\", {}, maximum is < 0.0", + RoutineName, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(8))); + ShowContinueError( + state, + format("Schedule=\"{}\". Maximum is [{:.1R}]. Values must be >= 0.0.", state.dataIPShortCut->cAlphaArgs(8), SchMin)); + ErrorsFound = true; + } + } + } + } break; + default: + break; + } + + ig.LeafArea = state.dataIPShortCut->rNumericArgs(1); + if (ig.LeafArea < 0) { + ShowSevereError(state, + format("{}=\"{}\", invalid {} entered={}", + RoutineName, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(1), + state.dataIPShortCut->rNumericArgs(1))); + ErrorsFound = true; + } + ig.LEDNominalPPFD = state.dataIPShortCut->rNumericArgs(2); + if (ig.LEDNominalPPFD < 0) { + ShowSevereError(state, + format("{}=\"{}\", invalid {} entered={}", + RoutineName, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(2), + state.dataIPShortCut->rNumericArgs(2))); + ErrorsFound = true; + } + ig.LEDNominalEleP = state.dataIPShortCut->rNumericArgs(3); + if (ig.LEDNominalEleP < 0) { + ShowSevereError(state, + format("{}=\"{}\", invalid {} entered={}", + RoutineName, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(3), + state.dataIPShortCut->rNumericArgs(3))); + ErrorsFound = true; + } + ig.LEDRadFraction = state.dataIPShortCut->rNumericArgs(4); + if (ig.LEDRadFraction < 0 || ig.LEDRadFraction > 1.0) { + ShowSevereError(state, + format("{}=\"{}\", invalid {} entered={}", + RoutineName, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(4), + state.dataIPShortCut->rNumericArgs(4))); + ErrorsFound = true; + } + if (state.dataGlobal->AnyEnergyManagementSystemInModel) { + SetupEMSActuator(state, "IndoorLivingWall", ig.Name, "Evapotranspiration Rate", "[kg_m2s]", ig.EMSETCalOverrideOn, ig.EMSET); + } // EMS and API + } + } + + void SetIndoorGreenOutput(EnergyPlusData &state) + { + // Set up output variables + auto &lw = state.dataIndoorGreen; + for (int IndoorGreenNum = 1; IndoorGreenNum <= lw->NumIndoorGreen; ++IndoorGreenNum) { + auto &ig = lw->indoorGreens(IndoorGreenNum); + SetupZoneInternalGain(state, + ig.ZonePtr, + ig.Name, + DataHeatBalance::IntGainType::IndoorGreen, + &ig.SensibleRate, + nullptr, + &ig.LatentRate, + nullptr, + nullptr, + nullptr); + + SetupOutputVariable(state, + "Indoor Living Wall Plant Surface Temperature", + Constant::Units::C, + state.dataHeatBalSurf->SurfTempIn(ig.SurfPtr), + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Average, + ig.Name); + SetupOutputVariable( + state, + "Indoor Living Wall Sensible Heat Gain Rate", + Constant::Units::W, + state.dataHeatBalSurf->SurfQConvInRep(ig.SurfPtr), // positive sign: heat loss from plants; negative sign: heat gain from plants + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Average, + ig.Name); + SetupOutputVariable(state, + "Indoor Living Wall Latent Heat Gain Rate", + Constant::Units::W, + ig.LatentRate, + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Average, + ig.Name); + SetupOutputVariable(state, + "Indoor Living Wall Evapotranspiration Rate", + Constant::Units::kg_m2s, + ig.ETRate, + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Average, + ig.Name); + SetupOutputVariable(state, + "Indoor Living Wall Energy Required For Evapotranspiration Per Unit Area", + Constant::Units::W_m2, + ig.LambdaET, + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Average, + ig.Name); + SetupOutputVariable(state, + "Indoor Living Wall LED Operational PPFD", + Constant::Units::umol_m2s, + ig.LEDActualPPFD, + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Average, + ig.Name); + SetupOutputVariable(state, + "Indoor Living Wall PPFD", + Constant::Units::umol_m2s, + ig.ZPPFD, + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Average, + ig.Name); + SetupOutputVariable(state, + "Indoor Living Wall Vapor Pressure Deficit", + Constant::Units::Pa, + ig.ZVPD, + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Average, + ig.Name); + SetupOutputVariable(state, + "Indoor Living Wall LED Sensible Heat Gain Rate", + Constant::Units::W, + ig.SensibleRate, + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Average, + ig.Name); + SetupOutputVariable(state, + "Indoor Living Wall LED Operational Power", + Constant::Units::W, + ig.LEDActualEleP, + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Average, + ig.Name); + SetupOutputVariable(state, + "Indoor Living Wall LED Electricity Energy", + Constant::Units::J, + ig.LEDActualEleCon, + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Summed, + ig.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::InteriorLights, + "IndoorLivingWall", // End Use subcategory + OutputProcessor::SOVGroup::Building, + state.dataHeatBal->Zone(ig.ZonePtr).Name, + state.dataHeatBal->Zone(ig.ZonePtr).Multiplier, + state.dataHeatBal->Zone(ig.ZonePtr).ListMultiplier, + {}, + {}, + state.dataHeatBal->space(ig.SpacePtr).spaceType); + } + } + + void InitIndoorGreen(EnergyPlusData &state) + { + // Set the reporting variables to zero at each timestep. + for (auto &ig : state.dataIndoorGreen->indoorGreens) { + ig.SensibleRate = 0.0; + ig.LatentRate = 0.0; + ig.ZCO2 = 400; + ig.ZPPFD = 0; + } + } + + void ETModel(EnergyPlusData &state) + { + // PURPOSE OF THIS SUBROUTINE: + // This subroutine is for the calculation of evapotranspiration effects from the Indoor Greenery System objects. + // SUBROUTINE PARAMETER DEFINITIONS: + static constexpr std::string_view RoutineName("ETModel: "); + auto &lw = state.dataIndoorGreen; + Real64 ZonePreTemp; // Indoor air temprature (C) + Real64 ZonePreHum; // Indoor humidity ratio (kg moisture / kg dry air) + Real64 ZoneNewTemp; // Indoor air temprature (C) after ET + Real64 ZoneNewHum; // Indoor humidity ratio (kg moisture / kg dry air) after ET + Real64 ZoneSatHum; // Saturated humidity ratio + Real64 ZoneCO2; // Indoor zone co2 concentration (ppm) + Real64 ZonePPFD; // Indoor net radiation (PPFD) + Real64 ZoneVPD; // vapor pressure deficit (kpa); local variable + Real64 Timestep; // s + Real64 ETTotal; // kg + Real64 rhoair; // kg/m3 + Real64 Tdp; // dew point temperature + Real64 Twb; // wet bulb temperature + Real64 HCons; // enthalpy (J/kg) + Real64 HMid; // enthalpy 3rd point (J/kg) + Real64 ZoneAirVol; // zone air volume (m3) + Real64 LAI; // leaf area index, the ratio of one-side leaf area per unit plant growing area, maximum LAI =2 if LAI_cal>2.0 + Real64 LAI_Cal; // calculated leaf area index based on users's input on total leaf area + Real64 OutPb; // outdoor pressure (kPa) + Real64 vp; // actual vapor pressure of the air (kpa) + Real64 vpSat; // saturated vapor pressure at air temperature (kpa) + std::string_view cCurrentModuleObject = "IndoorLivingWall"; + Timestep = state.dataHVACGlobal->TimeStepSysSec; // unit s + for (int IndoorGreenNum = 1; IndoorGreenNum <= lw->NumIndoorGreen; ++IndoorGreenNum) { + auto &ig = lw->indoorGreens(IndoorGreenNum); + ZonePreTemp = state.dataZoneTempPredictorCorrector->zoneHeatBalance(ig.ZonePtr).ZT; + ZonePreHum = state.dataZoneTempPredictorCorrector->zoneHeatBalance(ig.ZonePtr).airHumRat; + ZoneCO2 = 400; + OutPb = state.dataEnvrn->OutBaroPress / 1000; + Tdp = Psychrometrics::PsyTdpFnWPb(state, ZonePreHum, OutPb * 1000); + vp = Psychrometrics::PsyPsatFnTemp(state, Tdp, RoutineName) / 1000; + vpSat = Psychrometrics::PsyPsatFnTemp(state, ZonePreTemp, RoutineName) / 1000; + ig.ZVPD = (vpSat - vp) * 1000; // Pa + LAI_Cal = ig.LeafArea / state.dataSurface->Surface(ig.SurfPtr).Area; + LAI = LAI_Cal; + if (LAI_Cal > 2.0) { + LAI = 2.0; // maximum LAI=2.0 in the surface heat balance + ShowSevereError(state, format("Maximum indoor living wall leaf area index (LAI) =2.0 is used,calculated LAI is {}", LAI_Cal)); + } + switch (ig.lightingMethod) { + case LightingMethod::LED: { + ig.ZPPFD = ScheduleManager::GetCurrentScheduleValue(state, ig.SchedLEDPtr) * ig.LEDNominalPPFD; // PPFD + ig.LEDActualPPFD = ig.LEDNominalPPFD; + ig.LEDActualEleP = ig.LEDNominalEleP; + ig.LEDActualEleCon = ig.LEDNominalEleP * Timestep; + } break; + case LightingMethod::Daylighting: { + ig.ZPPFD = 0; + ig.LEDActualPPFD = 0; + ig.LEDActualEleP = 0; + ig.LEDActualEleCon = 0; + if (!state.dataDayltg->CalcDayltghCoefficients_firstTime && state.dataEnvrn->SunIsUp) { + ig.ZPPFD = state.dataDayltg->daylightControl(ig.LightControlPtr).refPts(1).lums[DataSurfaces::iLum_Illum] / + 77; // To be updated currently only take one reference point; 77 conversion factor from Lux to PPFD + } + } break; + case LightingMethod::LEDDaylighting: { + Real64 a = ScheduleManager::GetCurrentScheduleValue(state, ig.SchedLEDDaylightTargetPtr); + Real64 b = 0; + if (!state.dataDayltg->CalcDayltghCoefficients_firstTime && state.dataEnvrn->SunIsUp) { + b = state.dataDayltg->daylightControl(ig.LightControlPtr).refPts(1).lums[DataSurfaces::iLum_Illum] / + 77; // To be updated currently only take one reference point; 77 conversion factor from Lux to PPFD + } + ig.LEDActualPPFD = max((a - b), 0.0); + if (ig.LEDActualPPFD >= ig.LEDNominalPPFD) { + ig.ZPPFD = ig.LEDNominalPPFD + b; // LED Nominal + Daylight + ig.LEDActualEleP = ig.LEDNominalEleP; + ig.LEDActualEleCon = ig.LEDNominalEleP * Timestep; + } else { + ig.ZPPFD = a; // Targeted PPFD + ig.LEDActualEleP = ig.LEDNominalEleP * ig.LEDActualPPFD / ig.LEDNominalPPFD; + ig.LEDActualEleCon = ig.LEDActualEleP * Timestep; + } + } break; + default: + break; + } + ZonePPFD = ig.ZPPFD; + ZoneVPD = ig.ZVPD / 1000; // kPa + // ET Calculation + if (ig.EMSETCalOverrideOn) { + ig.ETRate = ig.EMSET; + } else { + Real64 SwitchF = ig.etCalculationMethod == ETCalculationMethod::PenmanMonteith ? 1.0 : 2 * LAI; + ig.ETRate = ETBaseFunction(state, ZonePreTemp, ZonePreHum, ZonePPFD, ZoneVPD, LAI, SwitchF); + } + Real64 effectivearea = std::min(ig.LeafArea, LAI * state.dataSurface->Surface(ig.SurfPtr).Area); + ETTotal = + ig.ETRate * Timestep * effectivearea * + ScheduleManager::GetCurrentScheduleValue(state, ig.SchedPtr); // kg; this unit area should be surface area instead of total leaf area + Real64 hfg = Psychrometrics::PsyHfgAirFnWTdb(ZonePreHum, ZonePreTemp) / std::pow(10, 6); // Latent heat of vaporization (MJ/kg) + ig.LambdaET = ETTotal * hfg * std::pow(10, 6) / state.dataSurface->Surface(ig.SurfPtr).Area / Timestep; // (W/m2)) + rhoair = Psychrometrics::PsyRhoAirFnPbTdbW(state, state.dataEnvrn->OutBaroPress, ZonePreTemp, ZonePreHum); + ZoneAirVol = state.dataHeatBal->Zone(ig.ZonePtr).Volume; + ZoneNewHum = ZonePreHum + ETTotal / (rhoair * ZoneAirVol); + Twb = Psychrometrics::PsyTwbFnTdbWPb(state, ZonePreTemp, ZonePreHum, state.dataEnvrn->OutBaroPress); + ZoneSatHum = Psychrometrics::PsyWFnTdpPb(state, ZonePreTemp, state.dataEnvrn->OutBaroPress); // saturated humidity ratio + HCons = Psychrometrics::PsyHFnTdbW(ZonePreTemp, ZonePreHum); + if (ZoneNewHum <= ZoneSatHum) { + ZoneNewTemp = Psychrometrics::PsyTdbFnHW(HCons, ZoneNewHum); + } else { + ZoneNewTemp = Twb; + ZoneNewHum = ZoneSatHum; + } + HMid = Psychrometrics::PsyHFnTdbW(ZoneNewTemp, ZoneNewHum); + ig.SensibleRate = (1 - ig.LEDRadFraction) * ig.LEDActualEleP; // convective heat gain from LED lights when LED is on; heat convection from + // plants was considered and counted from plant surface heat balance. + ig.LatentRate = ZoneAirVol * rhoair * (HCons - HMid) / Timestep; // unit W + state.dataHeatBalSurf->SurfQAdditionalHeatSourceInside(ig.SurfPtr) = -1.0 * ig.LambdaET; + } + } + + Real64 ETBaseFunction(EnergyPlusData &state, Real64 ZonePreTemp, Real64 ZonePreHum, Real64 ZonePPFD, Real64 ZoneVPD, Real64 LAI, Real64 SwitchF) + { + // This subroutine provides calculation for Penman-Monteith model and Stanghellini models to predict evapotranspiration rates of plants. + // Reference: Monteith, J.L. Evaporation and environment. in Symposia of the society for experimental biology. 1965. Cambridge University + // Press (CUP) Cambridge + // Reference: Stanghellini, C., Transpiration of greenhouse crops: an aid to climate management, 1987, Institute of Agricultural Engineering, + // Wageningen, The Netherlands + + static constexpr std::string_view RoutineName("ETBaseFunction: "); + Real64 hfg = Psychrometrics::PsyHfgAirFnWTdb(ZonePreHum, ZonePreTemp) / std::pow(10, 6); // Latent heat of vaporization (MJ/kg) + Real64 slopepat = + 0.200 * std::pow((0.00738 * ZonePreTemp + 0.8072), 7) - 0.000116; // Slope of the saturation vapor pressure-temperature curve (kPa/°C) + Real64 CpAir = Psychrometrics::PsyCpAirFnW(ZonePreHum) / std::pow(10, 6); // specific heat of air at constant pressure (MJ kg−1 °C−1) + Real64 OutPb = state.dataEnvrn->OutBaroPress / 1000; // outdoor pressure (kPa) + Real64 constexpr mw(0.622); // ratio molecular weight of water vapor / dry air = 0.622. + Real64 psyconst = CpAir * OutPb / (hfg * mw); // Psychrometric constant (kPa/°C) + Real64 In = ZonePPFD * 0.327 / std::pow(10, 6); // net radiation MW/m2 + Real64 G = 0.0; // soil heat flux (MJ/(m2s)) + Real64 rhoair = Psychrometrics::PsyRhoAirFnPbTdbW(state, OutPb * 1000, ZonePreTemp, ZonePreHum); // kg/m3 + Real64 ETRate; // mm/s; kg/(m2s) + Real64 rs = 60 * (1500 + ZonePPFD) / (200 + ZonePPFD); // stomatal resistance s/m + Real64 ra = 350 * std::pow((0.1 / 0.1), 0.5) * (1 / (LAI + 1e-10)); // aerodynamic resistance s/m + ETRate = (1 / hfg) * (slopepat * (In - G) + (SwitchF * rhoair * CpAir * ZoneVPD) / ra) / + (slopepat + psyconst * (1 + rs / ra)); // Penman-Monteith ET model + return ETRate; // mm/s; kg/(m2s) + } + +} // namespace IndoorGreen + +} // namespace EnergyPlus diff --git a/src/EnergyPlus/SortAndStringUtilities.hh b/src/EnergyPlus/IndoorGreen.hh similarity index 51% rename from src/EnergyPlus/SortAndStringUtilities.hh rename to src/EnergyPlus/IndoorGreen.hh index 7e8e79cd825..cb81537dda8 100644 --- a/src/EnergyPlus/SortAndStringUtilities.hh +++ b/src/EnergyPlus/IndoorGreen.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -45,46 +45,93 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#ifndef SortAndStringUtilities_hh_INCLUDED -#define SortAndStringUtilities_hh_INCLUDED - +#ifndef IndoorGreen_hh_INCLUDED +#define IndoorGreen_hh_INCLUDED // ObjexxFCL Headers -#include - +#include // EnergyPlus Headers +#include +#include +#include #include namespace EnergyPlus { -namespace SortAndStringUtilities { - - // Data - // MODULE PARAMETER DEFINITIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // MODULE VARIABLE DECLARATIONS: - // na - - // SUBROUTINE SPECIFICATIONS FOR MODULE SortUtilities - - // Functions - - void SetupAndSort(Array1D_string &Alphas, // Alphas to be sorted - Array1D_int &iAlphas // Indexes of sorted array - ); - - void QsortC(Array1S_string Alphas, // Alphas to be sorted - Array1S_int iAlphas // Indexes of sorted array - ); - - void QsortPartition(Array1S_string Alphas, // Alphas to be sorted - Array1S_int iAlphas, // Indexes of sorted array - int &marker); - -} // namespace SortAndStringUtilities +struct EnergyPlusData; + +namespace IndoorGreen { + + enum class ETCalculationMethod + { + Invalid = -1, + PenmanMonteith, + Stanghellini, + Num + }; + enum class LightingMethod + { + Invalid = -1, + LED, + Daylighting, + LEDDaylighting, + Num + }; + struct IndoorGreenParams + { + std::string Name; + std::string ZoneName; + std::string SurfName; + std::string Schedule; + int SchedPtr = 0; + int SchedLEDPtr = 0; + int LightRefPtr = 0; // daylight reference point number; + int LightControlPtr = 0; // daylight control point number; + int SchedLEDDaylightTargetPtr = 0; // LED-Daylight PPFD setpoint schedule pointer + Real64 LeafArea = 0.0; // one-sided leaf area + Real64 LEDNominalPPFD = 0.0; // nominal PPFD for LED grow light (PPFD) + Real64 LEDNominalEleP = 0.0; // nominal power for total LED grow light (W) + Real64 LEDRadFraction = 0.0; // radiant fraction of LED grow light (0-1) + Real64 ZCO2 = 400; + Real64 ZVPD = 0.0; // vapor pressure deficit (pa) + Real64 ZPPFD = 0; // PPFD + Real64 SensibleRate = 0.0; // w + Real64 LatentRate = 0.0; // w + Real64 ETRate = 0.0; // kg/(m2s) + Real64 LambdaET = 0.0; // J/(kg m2) + Real64 LEDActualPPFD = 0.0; // LED operational PPFD + Real64 LEDActualEleP = 0.0; // LED operational power (W) + Real64 LEDActualEleCon = 0.0; // LED operational electricity consumption (J) + int SurfPtr = 0; + int ZoneListPtr = 0; + int ZonePtr = 0; // point to the zone where the indoor greenery system is located + int SpacePtr = 0; // point to the space where the indoor greenery system is located + ETCalculationMethod etCalculationMethod; // Enum for ETCalculationMethod + LightingMethod lightingMethod; // Enum for LightingMethod + bool CheckIndoorGreenName = true; + Real64 EMSET = 0.0; + bool EMSETCalOverrideOn = false; + Array1D_string FieldNames; + }; + + void SimIndoorGreen(EnergyPlusData &state); + void GetIndoorGreenInput(EnergyPlusData &state, bool &ErrorsFound); + void SetIndoorGreenOutput(EnergyPlusData &state); + void InitIndoorGreen(EnergyPlusData &state); + void ETModel(EnergyPlusData &state); + Real64 ETBaseFunction(EnergyPlusData &state, Real64 ZonePreTemp, Real64 ZonePreHum, Real64 ZonePPFD, Real64 VPD, Real64 LAI, Real64 SwitchF); + +} // namespace IndoorGreen + +struct IndoorGreenData : BaseGlobalStruct +{ + int NumIndoorGreen = 0; // Number of Indoor Greenery Systems found in input + bool getInputFlag = true; + Array1D indoorGreens; + void clear_state() override + { + new (this) IndoorGreenData(); + } +}; } // namespace EnergyPlus diff --git a/src/EnergyPlus/InputProcessing/CsvParser.cc b/src/EnergyPlus/InputProcessing/CsvParser.cc index ca9d092bcf6..f0483ffb601 100644 --- a/src/EnergyPlus/InputProcessing/CsvParser.cc +++ b/src/EnergyPlus/InputProcessing/CsvParser.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/InputProcessing/CsvParser.hh b/src/EnergyPlus/InputProcessing/CsvParser.hh index 995496f9e56..317cacc7272 100644 --- a/src/EnergyPlus/InputProcessing/CsvParser.hh +++ b/src/EnergyPlus/InputProcessing/CsvParser.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/InputProcessing/DataStorage.hh b/src/EnergyPlus/InputProcessing/DataStorage.hh index 7821b7e9443..e1f58fac48c 100644 --- a/src/EnergyPlus/InputProcessing/DataStorage.hh +++ b/src/EnergyPlus/InputProcessing/DataStorage.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/InputProcessing/IdfParser.cc b/src/EnergyPlus/InputProcessing/IdfParser.cc index c209044d213..23f3da8994d 100644 --- a/src/EnergyPlus/InputProcessing/IdfParser.cc +++ b/src/EnergyPlus/InputProcessing/IdfParser.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/InputProcessing/IdfParser.hh b/src/EnergyPlus/InputProcessing/IdfParser.hh index dd309237c23..7ca3a26c229 100644 --- a/src/EnergyPlus/InputProcessing/IdfParser.hh +++ b/src/EnergyPlus/InputProcessing/IdfParser.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/InputProcessing/InputProcessor.cc b/src/EnergyPlus/InputProcessing/InputProcessor.cc index 10ce662ca4c..534284c1579 100644 --- a/src/EnergyPlus/InputProcessing/InputProcessor.cc +++ b/src/EnergyPlus/InputProcessing/InputProcessor.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -69,7 +69,6 @@ #include #include #include -#include #include #include @@ -863,16 +862,12 @@ void InputProcessor::setObjectItemValue(EnergyPlusData &state, } } else { if (field_type == "a") { - if (!(within_max_fields && findDefault(Alphas(alpha_index), schema_field_obj))) { + if (!(findDefault(Alphas(alpha_index), schema_field_obj))) { Alphas(alpha_index) = ""; } if (is_AlphaBlank) AlphaBlank()(alpha_index) = true; } else if (field_type == "n") { - if (within_max_fields) { - findDefault(Numbers(numeric_index), schema_field_obj); - } else { - Numbers(numeric_index) = 0; - } + findDefault(Numbers(numeric_index), schema_field_obj); if (is_NumBlank) NumBlank()(numeric_index) = true; } } diff --git a/src/EnergyPlus/InputProcessing/InputProcessor.hh b/src/EnergyPlus/InputProcessing/InputProcessor.hh index 99f53699927..131ba38163b 100644 --- a/src/EnergyPlus/InputProcessing/InputProcessor.hh +++ b/src/EnergyPlus/InputProcessing/InputProcessor.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/InputProcessing/InputValidation.cc b/src/EnergyPlus/InputProcessing/InputValidation.cc index 99e0964ef42..859ca3444dc 100644 --- a/src/EnergyPlus/InputProcessing/InputValidation.cc +++ b/src/EnergyPlus/InputProcessing/InputValidation.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/InputProcessing/InputValidation.hh b/src/EnergyPlus/InputProcessing/InputValidation.hh index 60b8b218b32..7eb19b102ed 100644 --- a/src/EnergyPlus/InputProcessing/InputValidation.hh +++ b/src/EnergyPlus/InputProcessing/InputValidation.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/IntegratedHeatPump.cc b/src/EnergyPlus/IntegratedHeatPump.cc index 01cd803d7fd..e95fadc1392 100644 --- a/src/EnergyPlus/IntegratedHeatPump.cc +++ b/src/EnergyPlus/IntegratedHeatPump.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -1086,105 +1086,105 @@ void GetIHPInput(EnergyPlusData &state) // set up output variables, not reported in the individual coil models SetupOutputVariable(state, "Integrated Heat Pump Air Loop Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, ihp.AirLoopFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ihp.Name); SetupOutputVariable(state, "Integrated Heat Pump Condenser Water Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, ihp.TankSourceWaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ihp.Name); SetupOutputVariable(state, "Integrated Heat Pump Air Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, ihp.TotalCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ihp.Name); SetupOutputVariable(state, "Integrated Heat Pump Air Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, ihp.TotalSpaceHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ihp.Name); SetupOutputVariable(state, "Integrated Heat Pump Water Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, ihp.TotalWaterHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ihp.Name); SetupOutputVariable(state, "Integrated Heat Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, ihp.TotalPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ihp.Name); SetupOutputVariable(state, "Integrated Heat Pump Air Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, ihp.TotalLatentLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ihp.Name); SetupOutputVariable(state, "Integrated Heat Pump Source Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, ihp.Qsource, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ihp.Name); SetupOutputVariable(state, "Integrated Heat Pump COP", - OutputProcessor::Unit::None, + Constant::Units::None, ihp.TotalCOP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ihp.Name); SetupOutputVariable(state, "Integrated Heat Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, ihp.Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, ihp.Name); SetupOutputVariable(state, "Integrated Heat Pump Air Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, ihp.EnergyLoadTotalCooling, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, ihp.Name); SetupOutputVariable(state, "Integrated Heat Pump Air Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, ihp.EnergyLoadTotalHeating, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, ihp.Name); SetupOutputVariable(state, "Integrated Heat Pump Water Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, ihp.EnergyLoadTotalWaterHeating, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, ihp.Name); SetupOutputVariable(state, "Integrated Heat Pump Air Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, ihp.EnergyLatent, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, ihp.Name); SetupOutputVariable(state, "Integrated Heat Pump Source Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, ihp.EnergySource, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, diff --git a/src/EnergyPlus/IntegratedHeatPump.hh b/src/EnergyPlus/IntegratedHeatPump.hh index 253f3cb8795..5bbb0ff6862 100644 --- a/src/EnergyPlus/IntegratedHeatPump.hh +++ b/src/EnergyPlus/IntegratedHeatPump.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/InternalHeatGains.cc b/src/EnergyPlus/InternalHeatGains.cc index c0223fc9820..46d29f18df9 100644 --- a/src/EnergyPlus/InternalHeatGains.cc +++ b/src/EnergyPlus/InternalHeatGains.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -59,7 +59,6 @@ #include #include #include -#include #include #include #include @@ -72,9 +71,9 @@ #include #include #include +#include #include #include -#include #include #include #include @@ -2658,13 +2657,10 @@ namespace InternalHeatGains { thisZoneOthEq.spaceIndex = spaceNum; thisZoneOthEq.ZonePtr = zoneNum; - std::string FuelTypeString(""); if (IHGAlphas(2) == "NONE") { thisZoneOthEq.OtherEquipFuelType = Constant::eFuel::None; - FuelTypeString = IHGAlphas(2); } else { thisZoneOthEq.OtherEquipFuelType = static_cast(getEnumValue(Constant::eFuelNamesUC, IHGAlphas(2))); - FuelTypeString = Constant::eFuelNames[static_cast(thisZoneOthEq.OtherEquipFuelType)]; if (thisZoneOthEq.OtherEquipFuelType == Constant::eFuel::Invalid || thisZoneOthEq.OtherEquipFuelType == Constant::eFuel::Water) { ShowSevereError(state, @@ -2677,8 +2673,9 @@ namespace InternalHeatGains { thisOthEqInput.Name)); ErrorsFound = true; } - thisZoneOthEq.otherEquipFuelTypeString = FuelTypeString; // Save for output variable setup later + // Build list of fuel types used in each zone and space (excluding Water) + bool found = false; for (Constant::eFuel fuelType : state.dataHeatBal->Zone(zoneNum).otherEquipFuelTypeNums) { if (thisZoneOthEq.OtherEquipFuelType == fuelType) { @@ -2688,7 +2685,7 @@ namespace InternalHeatGains { } if (!found) { state.dataHeatBal->Zone(zoneNum).otherEquipFuelTypeNums.emplace_back(thisZoneOthEq.OtherEquipFuelType); - state.dataHeatBal->Zone(zoneNum).otherEquipFuelTypeNames.emplace_back(FuelTypeString); + // state.dataHeatBal->Zone(zoneNum).otherEquipFuelTypeNames.emplace_back(FuelTypeString); } found = false; for (Constant::eFuel fuelType : state.dataHeatBal->space(spaceNum).otherEquipFuelTypeNums) { @@ -2699,7 +2696,7 @@ namespace InternalHeatGains { } if (!found) { state.dataHeatBal->space(spaceNum).otherEquipFuelTypeNums.emplace_back(thisZoneOthEq.OtherEquipFuelType); - state.dataHeatBal->space(spaceNum).otherEquipFuelTypeNames.emplace_back(FuelTypeString); + // state.dataHeatBal->space(spaceNum).otherEquipFuelTypeNames.emplace_back(FuelTypeString); } } @@ -2825,7 +2822,8 @@ namespace InternalHeatGains { othEqModuleObject, thisOthEqInput.Name, IHGNumericFieldNames(DesignLevelFieldNumber))); - ShowContinueError(state, format("... when a fuel type of {} is specified.", FuelTypeString)); + ShowContinueError( + state, format("... when a fuel type of {} is specified.", Constant::eFuelNames[(int)thisZoneOthEq.OtherEquipFuelType])); ErrorsFound = true; } @@ -3605,7 +3603,7 @@ namespace InternalHeatGains { // Object report variables SetupOutputVariable(state, "Contaminant Source or Sink CO2 Gain Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZoneCO2Gen(Loop).CO2GainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -3617,7 +3615,7 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Zone Contaminant Source or Sink CO2 Gain Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZoneRpt(state.dataHeatBal->ZoneCO2Gen(Loop).ZonePtr).CO2Rate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -4279,70 +4277,70 @@ namespace InternalHeatGains { // Overall Zone Variables SetupOutputVariable(state, "Zone Total Internal Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).TotRadiantGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Total Internal Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).TotRadiantGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Total Internal Visible Radiation Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).TotVisHeatGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Total Internal Visible Radiation Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).TotVisHeatGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Total Internal Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).TotConvectiveGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Total Internal Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).TotConvectiveGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Total Internal Latent Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).TotLatentGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Total Internal Latent Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).TotLatentGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Total Internal Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).TotTotalHeatGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Total Internal Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).TotTotalHeatGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -4353,70 +4351,70 @@ namespace InternalHeatGains { // Overall Space Variables SetupOutputVariable(state, "Space Total Internal Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).TotRadiantGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Total Internal Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).TotRadiantGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Total Internal Visible Radiation Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).TotVisHeatGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Total Internal Visible Radiation Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).TotVisHeatGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Total Internal Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).TotConvectiveGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Total Internal Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).TotConvectiveGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Total Internal Latent Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).TotLatentGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Total Internal Latent Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).TotLatentGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Total Internal Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).TotTotalHeatGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Total Internal Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).TotTotalHeatGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -4436,91 +4434,91 @@ namespace InternalHeatGains { // Object report variables SetupOutputVariable(state, "People Occupant Count", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataHeatBal->People(peopleNum).NumOcc, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->People(peopleNum).Name); SetupOutputVariable(state, "People Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->People(peopleNum).RadGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->People(peopleNum).Name); SetupOutputVariable(state, "People Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->People(peopleNum).RadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->People(peopleNum).Name); SetupOutputVariable(state, "People Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->People(peopleNum).ConGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->People(peopleNum).Name); SetupOutputVariable(state, "People Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->People(peopleNum).ConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->People(peopleNum).Name); SetupOutputVariable(state, "People Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->People(peopleNum).SenGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->People(peopleNum).Name); SetupOutputVariable(state, "People Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->People(peopleNum).SenGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->People(peopleNum).Name); SetupOutputVariable(state, "People Latent Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->People(peopleNum).LatGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->People(peopleNum).Name); SetupOutputVariable(state, "People Latent Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->People(peopleNum).LatGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->People(peopleNum).Name); SetupOutputVariable(state, "People Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->People(peopleNum).TotGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->People(peopleNum).Name); SetupOutputVariable(state, "People Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->People(peopleNum).TotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->People(peopleNum).Name); SetupOutputVariable(state, "People Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBal->People(peopleNum).TemperatureInZone, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->People(peopleNum).Name); SetupOutputVariable(state, "People Air Relative Humidity", - OutputProcessor::Unit::Perc, + Constant::Units::Perc, state.dataHeatBal->People(peopleNum).RelativeHumidityInZone, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -4532,77 +4530,77 @@ namespace InternalHeatGains { // Zone total report variables SetupOutputVariable(state, "Zone People Occupant Count", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataHeatBal->ZoneRpt(zoneNum).PeopleNumOcc, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone People Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).PeopleRadGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone People Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).PeopleRadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone People Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).PeopleConGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone People Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).PeopleConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone People Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).PeopleSenGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone People Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).PeopleSenGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone People Latent Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).PeopleLatGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone People Latent Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).PeopleLatGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone People Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).PeopleTotGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone People Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).PeopleTotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -4617,77 +4615,77 @@ namespace InternalHeatGains { if (addSpaceOutputs(spaceNum)) { SetupOutputVariable(state, "Space People Occupant Count", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataHeatBal->spaceRpt(spaceNum).PeopleNumOcc, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space People Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).PeopleRadGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space People Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).PeopleRadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space People Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).PeopleConGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space People Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).PeopleConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space People Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).PeopleSenGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space People Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).PeopleSenGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space People Latent Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).PeopleLatGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space People Latent Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).PeopleLatGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space People Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).PeopleTotGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space People Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).PeopleTotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -4704,7 +4702,7 @@ namespace InternalHeatGains { // Object report variables SetupOutputVariable(state, "Lights Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->Lights(lightsNum).Power, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -4712,21 +4710,21 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Lights Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->Lights(lightsNum).RadGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Lights(lightsNum).Name); SetupOutputVariable(state, "Lights Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->Lights(lightsNum).RadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Lights(lightsNum).Name); SetupOutputVariable(state, "Lights Visible Radiation Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->Lights(lightsNum).VisGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -4734,65 +4732,64 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Lights Visible Radiation Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->Lights(lightsNum).VisGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Lights(lightsNum).Name); SetupOutputVariable(state, "Lights Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->Lights(lightsNum).ConGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Lights(lightsNum).Name); SetupOutputVariable(state, "Lights Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->Lights(lightsNum).ConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Lights(lightsNum).Name); SetupOutputVariable(state, "Lights Return Air Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->Lights(lightsNum).RetAirGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Lights(lightsNum).Name); SetupOutputVariable(state, "Lights Return Air Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->Lights(lightsNum).RetAirGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Lights(lightsNum).Name); SetupOutputVariable(state, "Lights Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->Lights(lightsNum).TotGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Lights(lightsNum).Name); SetupOutputVariable(state, "Lights Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->Lights(lightsNum).TotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Lights(lightsNum).Name); SetupOutputVariable(state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->Lights(lightsNum).Consumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Lights(lightsNum).Name, - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::InteriorLights, state.dataHeatBal->Lights(lightsNum).EndUseSubcategory, - "Building", + OutputProcessor::SOVGroup::Building, state.dataHeatBal->Zone(state.dataHeatBal->Lights(lightsNum).ZonePtr).Name, state.dataHeatBal->Zone(state.dataHeatBal->Lights(lightsNum).ZonePtr).Multiplier, state.dataHeatBal->Zone(state.dataHeatBal->Lights(lightsNum).ZonePtr).ListMultiplier, @@ -4806,84 +4803,84 @@ namespace InternalHeatGains { if (addZoneOutputs(zoneNum)) { SetupOutputVariable(state, "Zone Lights Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).LtsPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).LtsElecConsump, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Lights Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).LtsRadGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Lights Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).LtsRadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Lights Visible Radiation Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).LtsVisGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Lights Visible Radiation Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).LtsVisGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Lights Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).LtsConGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Lights Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).LtsConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Lights Return Air Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).LtsRetAirGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Lights Return Air Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).LtsRetAirGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Lights Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).LtsTotGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Lights Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).LtsTotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -4898,84 +4895,84 @@ namespace InternalHeatGains { if (addSpaceOutputs(spaceNum)) { SetupOutputVariable(state, "Space Lights Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).LtsPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).LtsElecConsump, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Lights Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).LtsRadGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Lights Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).LtsRadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Lights Visible Radiation Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).LtsVisGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Lights Visible Radiation Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).LtsVisGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Lights Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).LtsConGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Lights Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).LtsConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Lights Return Air Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).LtsRetAirGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Lights Return Air Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).LtsRetAirGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Lights Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).LtsTotGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Lights Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).LtsTotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -4991,23 +4988,22 @@ namespace InternalHeatGains { // Object report variables SetupOutputVariable(state, "Electric Equipment Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneElectric(elecEqNum).Power, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneElectric(elecEqNum).Name); SetupOutputVariable(state, "Electric Equipment Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneElectric(elecEqNum).Consumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneElectric(elecEqNum).Name, - {}, - "Electricity", - "InteriorEquipment", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::InteriorEquipment, state.dataHeatBal->ZoneElectric(elecEqNum).EndUseSubcategory, - "Building", + OutputProcessor::SOVGroup::Building, state.dataHeatBal->Zone(state.dataHeatBal->ZoneElectric(elecEqNum).ZonePtr).Name, state.dataHeatBal->Zone(state.dataHeatBal->ZoneElectric(elecEqNum).ZonePtr).Multiplier, state.dataHeatBal->Zone(state.dataHeatBal->ZoneElectric(elecEqNum).ZonePtr).ListMultiplier, @@ -5017,70 +5013,70 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Electric Equipment Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneElectric(elecEqNum).RadGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneElectric(elecEqNum).Name); SetupOutputVariable(state, "Electric Equipment Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneElectric(elecEqNum).RadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneElectric(elecEqNum).Name); SetupOutputVariable(state, "Electric Equipment Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneElectric(elecEqNum).ConGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneElectric(elecEqNum).Name); SetupOutputVariable(state, "Electric Equipment Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneElectric(elecEqNum).ConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneElectric(elecEqNum).Name); SetupOutputVariable(state, "Electric Equipment Latent Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneElectric(elecEqNum).LatGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneElectric(elecEqNum).Name); SetupOutputVariable(state, "Electric Equipment Latent Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneElectric(elecEqNum).LatGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneElectric(elecEqNum).Name); SetupOutputVariable(state, "Electric Equipment Lost Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneElectric(elecEqNum).LostEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneElectric(elecEqNum).Name); SetupOutputVariable(state, "Electric Equipment Lost Heat Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneElectric(elecEqNum).LostRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneElectric(elecEqNum).Name); SetupOutputVariable(state, "Electric Equipment Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneElectric(elecEqNum).TotGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneElectric(elecEqNum).Name); SetupOutputVariable(state, "Electric Equipment Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneElectric(elecEqNum).TotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -5092,14 +5088,14 @@ namespace InternalHeatGains { if (addZoneOutputs(zoneNum)) { SetupOutputVariable(state, "Zone Electric Equipment Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).ElecPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Electric Equipment Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).ElecConsump, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -5107,70 +5103,70 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Zone Electric Equipment Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).ElecRadGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Electric Equipment Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).ElecRadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Electric Equipment Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).ElecConGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Electric Equipment Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).ElecConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Electric Equipment Latent Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).ElecLatGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Electric Equipment Latent Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).ElecLatGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Electric Equipment Lost Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).ElecLost, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Electric Equipment Lost Heat Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).ElecLostRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Electric Equipment Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).ElecTotGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Electric Equipment Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).ElecTotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -5185,14 +5181,14 @@ namespace InternalHeatGains { if (addSpaceOutputs(spaceNum)) { SetupOutputVariable(state, "Space Electric Equipment Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).ElecPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Electric Equipment Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).ElecConsump, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -5200,70 +5196,70 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Space Electric Equipment Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).ElecRadGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Electric Equipment Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).ElecRadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Electric Equipment Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).ElecConGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Electric Equipment Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).ElecConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Electric Equipment Latent Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).ElecLatGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Electric Equipment Latent Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).ElecLatGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Electric Equipment Lost Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).ElecLost, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Electric Equipment Lost Heat Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).ElecLostRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Electric Equipment Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).ElecTotGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Electric Equipment Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).ElecTotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -5279,23 +5275,22 @@ namespace InternalHeatGains { addSpaceOutputs(state.dataHeatBal->ZoneGas(gasEqNum).spaceIndex) = true; SetupOutputVariable(state, "Gas Equipment NaturalGas Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneGas(gasEqNum).Power, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneGas(gasEqNum).Name); SetupOutputVariable(state, "Gas Equipment NaturalGas Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneGas(gasEqNum).Consumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneGas(gasEqNum).Name, - {}, - "NaturalGas", - "InteriorEquipment", + Constant::eResource::NaturalGas, + OutputProcessor::SOVEndUseCat::InteriorEquipment, state.dataHeatBal->ZoneGas(gasEqNum).EndUseSubcategory, - "Building", + OutputProcessor::SOVGroup::Building, state.dataHeatBal->Zone(state.dataHeatBal->ZoneGas(gasEqNum).ZonePtr).Name, state.dataHeatBal->Zone(state.dataHeatBal->ZoneGas(gasEqNum).ZonePtr).Multiplier, state.dataHeatBal->Zone(state.dataHeatBal->ZoneGas(gasEqNum).ZonePtr).ListMultiplier, @@ -5305,70 +5300,70 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Gas Equipment Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneGas(gasEqNum).RadGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneGas(gasEqNum).Name); SetupOutputVariable(state, "Gas Equipment Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneGas(gasEqNum).ConGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneGas(gasEqNum).Name); SetupOutputVariable(state, "Gas Equipment Latent Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneGas(gasEqNum).LatGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneGas(gasEqNum).Name); SetupOutputVariable(state, "Gas Equipment Lost Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneGas(gasEqNum).LostEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneGas(gasEqNum).Name); SetupOutputVariable(state, "Gas Equipment Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneGas(gasEqNum).TotGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneGas(gasEqNum).Name); SetupOutputVariable(state, "Gas Equipment Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneGas(gasEqNum).RadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneGas(gasEqNum).Name); SetupOutputVariable(state, "Gas Equipment Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneGas(gasEqNum).ConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneGas(gasEqNum).Name); SetupOutputVariable(state, "Gas Equipment Latent Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneGas(gasEqNum).LatGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneGas(gasEqNum).Name); SetupOutputVariable(state, "Gas Equipment Lost Heat Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneGas(gasEqNum).LostRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneGas(gasEqNum).Name); SetupOutputVariable(state, "Gas Equipment Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneGas(gasEqNum).TotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -5381,14 +5376,14 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Zone Gas Equipment NaturalGas Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).GasPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Gas Equipment NaturalGas Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).GasConsump, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -5396,70 +5391,70 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Zone Gas Equipment Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).GasRadGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Gas Equipment Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).GasRadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Gas Equipment Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).GasConGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Gas Equipment Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).GasConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Gas Equipment Latent Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).GasLatGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Gas Equipment Latent Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).GasLatGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Gas Equipment Lost Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).GasLost, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Gas Equipment Lost Heat Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).GasLostRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Gas Equipment Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).GasTotGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Gas Equipment Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).GasTotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -5475,14 +5470,14 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Space Gas Equipment NaturalGas Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).GasPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Gas Equipment NaturalGas Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).GasConsump, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -5490,70 +5485,70 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Space Gas Equipment Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).GasRadGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Gas Equipment Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).GasRadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Gas Equipment Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).GasConGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Gas Equipment Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).GasConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Gas Equipment Latent Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).GasLatGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Gas Equipment Latent Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).GasLatGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Gas Equipment Lost Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).GasLost, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Gas Equipment Lost Heat Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).GasLostRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Gas Equipment Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).GasTotGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Gas Equipment Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).GasTotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -5570,23 +5565,22 @@ namespace InternalHeatGains { addSpaceOutputs(state.dataHeatBal->ZoneHWEq(hwEqNum).spaceIndex) = true; SetupOutputVariable(state, "Hot Water Equipment District Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneHWEq(hwEqNum).Power, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneHWEq(hwEqNum).Name); SetupOutputVariable(state, "Hot Water Equipment District Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneHWEq(hwEqNum).Consumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneHWEq(hwEqNum).Name, - {}, - "DistrictHeatingWater", - "InteriorEquipment", + Constant::eResource::DistrictHeatingWater, + OutputProcessor::SOVEndUseCat::InteriorEquipment, state.dataHeatBal->ZoneHWEq(hwEqNum).EndUseSubcategory, - "Building", + OutputProcessor::SOVGroup::Building, state.dataHeatBal->Zone(state.dataHeatBal->ZoneHWEq(hwEqNum).ZonePtr).Name, state.dataHeatBal->Zone(state.dataHeatBal->ZoneHWEq(hwEqNum).ZonePtr).Multiplier, state.dataHeatBal->Zone(state.dataHeatBal->ZoneHWEq(hwEqNum).ZonePtr).ListMultiplier, @@ -5596,70 +5590,70 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Hot Water Equipment Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneHWEq(hwEqNum).RadGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneHWEq(hwEqNum).Name); SetupOutputVariable(state, "Hot Water Equipment Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneHWEq(hwEqNum).RadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneHWEq(hwEqNum).Name); SetupOutputVariable(state, "Hot Water Equipment Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneHWEq(hwEqNum).ConGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneHWEq(hwEqNum).Name); SetupOutputVariable(state, "Hot Water Equipment Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneHWEq(hwEqNum).ConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneHWEq(hwEqNum).Name); SetupOutputVariable(state, "Hot Water Equipment Latent Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneHWEq(hwEqNum).LatGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneHWEq(hwEqNum).Name); SetupOutputVariable(state, "Hot Water Equipment Latent Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneHWEq(hwEqNum).LatGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneHWEq(hwEqNum).Name); SetupOutputVariable(state, "Hot Water Equipment Lost Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneHWEq(hwEqNum).LostEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneHWEq(hwEqNum).Name); SetupOutputVariable(state, "Hot Water Equipment Lost Heat Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneHWEq(hwEqNum).LostRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneHWEq(hwEqNum).Name); SetupOutputVariable(state, "Hot Water Equipment Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneHWEq(hwEqNum).TotGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneHWEq(hwEqNum).Name); SetupOutputVariable(state, "Hot Water Equipment Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneHWEq(hwEqNum).TotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -5671,14 +5665,14 @@ namespace InternalHeatGains { if (addZoneOutputs(zoneNum)) { SetupOutputVariable(state, "Zone Hot Water Equipment District Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).HWPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Hot Water Equipment District Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).HWConsump, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -5686,70 +5680,70 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Zone Hot Water Equipment Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).HWRadGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Hot Water Equipment Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).HWRadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Hot Water Equipment Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).HWConGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Hot Water Equipment Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).HWConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Hot Water Equipment Latent Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).HWLatGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Hot Water Equipment Latent Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).HWLatGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Hot Water Equipment Lost Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).HWLost, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Hot Water Equipment Lost Heat Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).HWLostRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Hot Water Equipment Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).HWTotGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Hot Water Equipment Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).HWTotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -5764,14 +5758,14 @@ namespace InternalHeatGains { if (addSpaceOutputs(spaceNum)) { SetupOutputVariable(state, "Space Hot Water Equipment District Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).HWPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Hot Water Equipment District Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).HWConsump, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -5779,70 +5773,70 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Space Hot Water Equipment Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).HWRadGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Hot Water Equipment Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).HWRadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Hot Water Equipment Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).HWConGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Hot Water Equipment Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).HWConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Hot Water Equipment Latent Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).HWLatGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Hot Water Equipment Latent Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).HWLatGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Hot Water Equipment Lost Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).HWLost, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Hot Water Equipment Lost Heat Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).HWLostRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Hot Water Equipment Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).HWTotGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Hot Water Equipment Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).HWTotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -5859,23 +5853,22 @@ namespace InternalHeatGains { addSpaceOutputs(state.dataHeatBal->ZoneSteamEq(stmEqNum).spaceIndex) = true; SetupOutputVariable(state, "Steam Equipment District Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneSteamEq(stmEqNum).Power, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneSteamEq(stmEqNum).Name); SetupOutputVariable(state, "Steam Equipment District Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneSteamEq(stmEqNum).Consumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneSteamEq(stmEqNum).Name, - {}, - "DistrictHeatingSteam", - "InteriorEquipment", + Constant::eResource::DistrictHeatingSteam, + OutputProcessor::SOVEndUseCat::InteriorEquipment, state.dataHeatBal->ZoneSteamEq(stmEqNum).EndUseSubcategory, - "Building", + OutputProcessor::SOVGroup::Building, state.dataHeatBal->Zone(state.dataHeatBal->ZoneSteamEq(stmEqNum).ZonePtr).Name, state.dataHeatBal->Zone(state.dataHeatBal->ZoneSteamEq(stmEqNum).ZonePtr).Multiplier, state.dataHeatBal->Zone(state.dataHeatBal->ZoneSteamEq(stmEqNum).ZonePtr).ListMultiplier, @@ -5885,70 +5878,70 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Steam Equipment Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneSteamEq(stmEqNum).RadGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneSteamEq(stmEqNum).Name); SetupOutputVariable(state, "Steam Equipment Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneSteamEq(stmEqNum).RadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneSteamEq(stmEqNum).Name); SetupOutputVariable(state, "Steam Equipment Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneSteamEq(stmEqNum).ConGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneSteamEq(stmEqNum).Name); SetupOutputVariable(state, "Steam Equipment Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneSteamEq(stmEqNum).ConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneSteamEq(stmEqNum).Name); SetupOutputVariable(state, "Steam Equipment Latent Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneSteamEq(stmEqNum).LatGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneSteamEq(stmEqNum).Name); SetupOutputVariable(state, "Steam Equipment Latent Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneSteamEq(stmEqNum).LatGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneSteamEq(stmEqNum).Name); SetupOutputVariable(state, "Steam Equipment Lost Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneSteamEq(stmEqNum).LostEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneSteamEq(stmEqNum).Name); SetupOutputVariable(state, "Steam Equipment Lost Heat Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneSteamEq(stmEqNum).LostRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneSteamEq(stmEqNum).Name); SetupOutputVariable(state, "Steam Equipment Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneSteamEq(stmEqNum).TotGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneSteamEq(stmEqNum).Name); SetupOutputVariable(state, "Steam Equipment Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneSteamEq(stmEqNum).TotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -5960,14 +5953,14 @@ namespace InternalHeatGains { if (addZoneOutputs(zoneNum)) { SetupOutputVariable(state, "Zone Steam Equipment District Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).SteamPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Steam Equipment District Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).SteamConsump, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -5975,70 +5968,70 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Zone Steam Equipment Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).SteamRadGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Steam Equipment Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).SteamRadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Steam Equipment Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).SteamConGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Steam Equipment Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).SteamConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Steam Equipment Latent Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).SteamLatGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Steam Equipment Latent Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).SteamLatGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Steam Equipment Lost Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).SteamLost, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Steam Equipment Lost Heat Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).SteamLostRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Steam Equipment Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).SteamTotGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Steam Equipment Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).SteamTotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -6053,14 +6046,14 @@ namespace InternalHeatGains { if (addSpaceOutputs(spaceNum)) { SetupOutputVariable(state, "Space Steam Equipment District Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).SteamPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Steam Equipment District Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).SteamConsump, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -6068,70 +6061,70 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Space Steam Equipment Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).SteamRadGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Steam Equipment Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).SteamRadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Steam Equipment Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).SteamConGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Steam Equipment Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).SteamConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Steam Equipment Latent Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).SteamLatGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Steam Equipment Latent Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).SteamLatGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Steam Equipment Lost Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).SteamLost, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Steam Equipment Lost Heat Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).SteamLostRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Steam Equipment Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).SteamTotGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Steam Equipment Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).SteamTotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -6144,108 +6137,107 @@ namespace InternalHeatGains { // Object report variables for (int othEqNum = 1; othEqNum <= state.dataHeatBal->TotOthEquip; ++othEqNum) { // Set flags for zone and space total report variables - addZoneOutputs(state.dataHeatBal->ZoneOtherEq(othEqNum).ZonePtr) = true; - addSpaceOutputs(state.dataHeatBal->ZoneOtherEq(othEqNum).spaceIndex) = true; - if (state.dataHeatBal->ZoneOtherEq(othEqNum).OtherEquipFuelType != Constant::eFuel::Invalid && - state.dataHeatBal->ZoneOtherEq(othEqNum).OtherEquipFuelType != Constant::eFuel::None) { - std::string fuelTypeString = state.dataHeatBal->ZoneOtherEq(othEqNum).otherEquipFuelTypeString; + auto &zoneOtherEq = state.dataHeatBal->ZoneOtherEq(othEqNum); + + addZoneOutputs(zoneOtherEq.ZonePtr) = true; + addSpaceOutputs(zoneOtherEq.spaceIndex) = true; + if (zoneOtherEq.OtherEquipFuelType != Constant::eFuel::Invalid && zoneOtherEq.OtherEquipFuelType != Constant::eFuel::None) { SetupOutputVariable(state, - "Other Equipment " + fuelTypeString + " Rate", - OutputProcessor::Unit::W, - state.dataHeatBal->ZoneOtherEq(othEqNum).Power, + format("Other Equipment {} Rate", Constant::eFuelNames[(int)zoneOtherEq.OtherEquipFuelType]), + Constant::Units::W, + zoneOtherEq.Power, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataHeatBal->ZoneOtherEq(othEqNum).Name); + zoneOtherEq.Name); SetupOutputVariable(state, - "Other Equipment " + fuelTypeString + " Energy", - OutputProcessor::Unit::J, - state.dataHeatBal->ZoneOtherEq(othEqNum).Consumption, + format("Other Equipment {} Energy", Constant::eFuelNames[(int)zoneOtherEq.OtherEquipFuelType]), + Constant::Units::J, + zoneOtherEq.Consumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataHeatBal->ZoneOtherEq(othEqNum).Name, - {}, - fuelTypeString, - "InteriorEquipment", - state.dataHeatBal->ZoneOtherEq(othEqNum).EndUseSubcategory, - "Building", - state.dataHeatBal->Zone(state.dataHeatBal->ZoneOtherEq(othEqNum).ZonePtr).Name, - state.dataHeatBal->Zone(state.dataHeatBal->ZoneOtherEq(othEqNum).ZonePtr).Multiplier, - state.dataHeatBal->Zone(state.dataHeatBal->ZoneOtherEq(othEqNum).ZonePtr).ListMultiplier, + zoneOtherEq.Name, + Constant::eFuel2eResource[(int)zoneOtherEq.OtherEquipFuelType], + OutputProcessor::SOVEndUseCat::InteriorEquipment, + zoneOtherEq.EndUseSubcategory, + OutputProcessor::SOVGroup::Building, + state.dataHeatBal->Zone(zoneOtherEq.ZonePtr).Name, + state.dataHeatBal->Zone(zoneOtherEq.ZonePtr).Multiplier, + state.dataHeatBal->Zone(zoneOtherEq.ZonePtr).ListMultiplier, -999, {}, - state.dataHeatBal->space(state.dataHeatBal->ZoneOtherEq(othEqNum).spaceIndex).spaceType); + state.dataHeatBal->space(zoneOtherEq.spaceIndex).spaceType); } SetupOutputVariable(state, "Other Equipment Radiant Heating Energy", - OutputProcessor::Unit::J, - state.dataHeatBal->ZoneOtherEq(othEqNum).RadGainEnergy, + Constant::Units::J, + zoneOtherEq.RadGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataHeatBal->ZoneOtherEq(othEqNum).Name); + zoneOtherEq.Name); SetupOutputVariable(state, "Other Equipment Radiant Heating Rate", - OutputProcessor::Unit::W, - state.dataHeatBal->ZoneOtherEq(othEqNum).RadGainRate, + Constant::Units::W, + zoneOtherEq.RadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataHeatBal->ZoneOtherEq(othEqNum).Name); + zoneOtherEq.Name); SetupOutputVariable(state, "Other Equipment Convective Heating Energy", - OutputProcessor::Unit::J, - state.dataHeatBal->ZoneOtherEq(othEqNum).ConGainEnergy, + Constant::Units::J, + zoneOtherEq.ConGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataHeatBal->ZoneOtherEq(othEqNum).Name); + zoneOtherEq.Name); SetupOutputVariable(state, "Other Equipment Convective Heating Rate", - OutputProcessor::Unit::W, - state.dataHeatBal->ZoneOtherEq(othEqNum).ConGainRate, + Constant::Units::W, + zoneOtherEq.ConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataHeatBal->ZoneOtherEq(othEqNum).Name); + zoneOtherEq.Name); SetupOutputVariable(state, "Other Equipment Latent Gain Energy", - OutputProcessor::Unit::J, - state.dataHeatBal->ZoneOtherEq(othEqNum).LatGainEnergy, + Constant::Units::J, + zoneOtherEq.LatGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataHeatBal->ZoneOtherEq(othEqNum).Name); + zoneOtherEq.Name); SetupOutputVariable(state, "Other Equipment Latent Gain Rate", - OutputProcessor::Unit::W, - state.dataHeatBal->ZoneOtherEq(othEqNum).LatGainRate, + Constant::Units::W, + zoneOtherEq.LatGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataHeatBal->ZoneOtherEq(othEqNum).Name); + zoneOtherEq.Name); SetupOutputVariable(state, "Other Equipment Lost Heat Energy", - OutputProcessor::Unit::J, - state.dataHeatBal->ZoneOtherEq(othEqNum).LostEnergy, + Constant::Units::J, + zoneOtherEq.LostEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataHeatBal->ZoneOtherEq(othEqNum).Name); + zoneOtherEq.Name); SetupOutputVariable(state, "Other Equipment Lost Heat Rate", - OutputProcessor::Unit::W, - state.dataHeatBal->ZoneOtherEq(othEqNum).LostRate, + Constant::Units::W, + zoneOtherEq.LostRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataHeatBal->ZoneOtherEq(othEqNum).Name); + zoneOtherEq.Name); SetupOutputVariable(state, "Other Equipment Total Heating Energy", - OutputProcessor::Unit::J, - state.dataHeatBal->ZoneOtherEq(othEqNum).TotGainEnergy, + Constant::Units::J, + zoneOtherEq.TotGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataHeatBal->ZoneOtherEq(othEqNum).Name); + zoneOtherEq.Name); SetupOutputVariable(state, "Other Equipment Total Heating Rate", - OutputProcessor::Unit::W, - state.dataHeatBal->ZoneOtherEq(othEqNum).TotGainRate, + Constant::Units::W, + zoneOtherEq.TotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataHeatBal->ZoneOtherEq(othEqNum).Name); + zoneOtherEq.Name); } // Zone total report variables @@ -6255,16 +6247,18 @@ namespace InternalHeatGains { Constant::eFuel fuelType = state.dataHeatBal->Zone(zoneNum).otherEquipFuelTypeNums[i]; if (fuelType == Constant::eFuel::Invalid || fuelType == Constant::eFuel::None) continue; + std::string_view fuelName = Constant::eFuelNames[(int)state.dataHeatBal->Zone(zoneNum).otherEquipFuelTypeNums[i]]; + SetupOutputVariable(state, - "Zone Other Equipment " + state.dataHeatBal->Zone(zoneNum).otherEquipFuelTypeNames[i] + " Rate", - OutputProcessor::Unit::W, + format("Zone Other Equipment {} Rate", fuelName), + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).OtherPower[(int)fuelType], OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, - "Zone Other Equipment " + state.dataHeatBal->Zone(zoneNum).otherEquipFuelTypeNames[i] + " Energy", - OutputProcessor::Unit::J, + format("Zone Other Equipment {} Energy", fuelName), + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).OtherConsump[(int)fuelType], OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -6273,70 +6267,70 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Zone Other Equipment Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).OtherRadGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Other Equipment Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).OtherRadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Other Equipment Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).OtherConGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Other Equipment Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).OtherConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Other Equipment Latent Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).OtherLatGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Other Equipment Latent Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).OtherLatGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Other Equipment Lost Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).OtherLost, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Other Equipment Lost Heat Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).OtherLostRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Other Equipment Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).OtherTotGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Other Equipment Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).OtherTotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -6354,15 +6348,15 @@ namespace InternalHeatGains { if (fuelType == Constant::eFuel::Invalid || fuelType == Constant::eFuel::None) continue; SetupOutputVariable(state, - "Space Other Equipment " + state.dataHeatBal->space(spaceNum).otherEquipFuelTypeNames[i] + " Rate", - OutputProcessor::Unit::W, + format("Space Other Equipment {} Rate", Constant::eFuelNames[(int)fuelType]), + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).OtherPower[(int)fuelType], OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, - "Space Other Equipment " + state.dataHeatBal->space(spaceNum).otherEquipFuelTypeNames[i] + " Energy", - OutputProcessor::Unit::J, + format("Space Other Equipment {} Energy", Constant::eFuelNames[(int)fuelType]), + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).OtherConsump[(int)fuelType], OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -6371,70 +6365,70 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Space Other Equipment Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).OtherRadGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Other Equipment Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).OtherRadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Other Equipment Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).OtherConGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Other Equipment Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).OtherConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Other Equipment Latent Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).OtherLatGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Other Equipment Latent Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).OtherLatGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Other Equipment Lost Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).OtherLost, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Other Equipment Lost Heat Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).OtherLostRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Other Equipment Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).OtherTotGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Other Equipment Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).OtherTotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -6461,7 +6455,7 @@ namespace InternalHeatGains { for (int i = 0; i < (int)PERptVars::Num; ++i) { SetupOutputVariable(state, PowerOutputVariableStrings[i], - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneITEq(itEqNum).PowerRpt[i], OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -6470,16 +6464,15 @@ namespace InternalHeatGains { SetupOutputVariable(state, "ITE CPU Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneITEq(itEqNum).EnergyRpt[(int)PERptVars::CPU], OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneITEq(itEqNum).Name, - {}, - "Electricity", - "InteriorEquipment", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::InteriorEquipment, state.dataHeatBal->ZoneITEq(itEqNum).EndUseSubcategoryCPU, - "Building", + OutputProcessor::SOVGroup::Building, state.dataHeatBal->Zone(state.dataHeatBal->ZoneITEq(itEqNum).ZonePtr).Name, state.dataHeatBal->Zone(state.dataHeatBal->ZoneITEq(itEqNum).ZonePtr).Multiplier, state.dataHeatBal->Zone(state.dataHeatBal->ZoneITEq(itEqNum).ZonePtr).ListMultiplier, @@ -6489,16 +6482,15 @@ namespace InternalHeatGains { SetupOutputVariable(state, "ITE Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneITEq(itEqNum).EnergyRpt[(int)PERptVars::Fan], OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneITEq(itEqNum).Name, - {}, - "Electricity", - "InteriorEquipment", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::InteriorEquipment, state.dataHeatBal->ZoneITEq(itEqNum).EndUseSubcategoryFan, - "Building", + OutputProcessor::SOVGroup::Building, state.dataHeatBal->Zone(state.dataHeatBal->ZoneITEq(itEqNum).ZonePtr).Name, state.dataHeatBal->Zone(state.dataHeatBal->ZoneITEq(itEqNum).ZonePtr).Multiplier, state.dataHeatBal->Zone(state.dataHeatBal->ZoneITEq(itEqNum).ZonePtr).ListMultiplier, @@ -6507,16 +6499,15 @@ namespace InternalHeatGains { state.dataHeatBal->space(state.dataHeatBal->ZoneITEq(itEqNum).spaceIndex).spaceType); SetupOutputVariable(state, "ITE UPS Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneITEq(itEqNum).EnergyRpt[(int)PERptVars::UPS], OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneITEq(itEqNum).Name, - {}, - "Electricity", - "InteriorEquipment", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::InteriorEquipment, state.dataHeatBal->ZoneITEq(itEqNum).EndUseSubcategoryUPS, - "Building", + OutputProcessor::SOVGroup::Building, state.dataHeatBal->Zone(state.dataHeatBal->ZoneITEq(itEqNum).ZonePtr).Name, state.dataHeatBal->Zone(state.dataHeatBal->ZoneITEq(itEqNum).ZonePtr).Multiplier, state.dataHeatBal->Zone(state.dataHeatBal->ZoneITEq(itEqNum).ZonePtr).ListMultiplier, @@ -6525,28 +6516,28 @@ namespace InternalHeatGains { state.dataHeatBal->space(state.dataHeatBal->ZoneITEq(itEqNum).spaceIndex).spaceType); SetupOutputVariable(state, "ITE CPU Electricity Energy at Design Inlet Conditions", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneITEq(itEqNum).EnergyRpt[(int)PERptVars::CPUAtDesign], OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneITEq(itEqNum).Name); SetupOutputVariable(state, "ITE Fan Electricity Energy at Design Inlet Conditions", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneITEq(itEqNum).EnergyRpt[(int)PERptVars::FanAtDesign], OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneITEq(itEqNum).Name); SetupOutputVariable(state, "ITE UPS Heat Gain to Zone Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneITEq(itEqNum).EnergyRpt[(int)PERptVars::UPSGainToZone], OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneITEq(itEqNum).Name); SetupOutputVariable(state, "ITE Total Heat Gain to Zone Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneITEq(itEqNum).EnergyRpt[(int)PERptVars::ConGainToZone], OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -6554,49 +6545,49 @@ namespace InternalHeatGains { SetupOutputVariable(state, "ITE Standard Density Air Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZoneITEq(itEqNum).AirVolFlowStdDensity, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneITEq(itEqNum).Name); SetupOutputVariable(state, "ITE Current Density Air Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZoneITEq(itEqNum).AirVolFlowCurDensity, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneITEq(itEqNum).Name); SetupOutputVariable(state, "ITE Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataHeatBal->ZoneITEq(itEqNum).AirMassFlow, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneITEq(itEqNum).Name); SetupOutputVariable(state, "ITE Air Inlet Dry-Bulb Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBal->ZoneITEq(itEqNum).AirInletDryBulbT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneITEq(itEqNum).Name); SetupOutputVariable(state, "ITE Air Inlet Dewpoint Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBal->ZoneITEq(itEqNum).AirInletDewpointT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneITEq(itEqNum).Name); SetupOutputVariable(state, "ITE Air Inlet Relative Humidity", - OutputProcessor::Unit::Perc, + Constant::Units::Perc, state.dataHeatBal->ZoneITEq(itEqNum).AirInletRelHum, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneITEq(itEqNum).Name); SetupOutputVariable(state, "ITE Air Outlet Dry-Bulb Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBal->ZoneITEq(itEqNum).AirOutletDryBulbT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -6604,7 +6595,7 @@ namespace InternalHeatGains { if (state.dataHeatBal->ZoneITEq(itEqNum).SupplyAirNodeNum != 0) { SetupOutputVariable(state, "ITE Supply Heat Index", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataHeatBal->ZoneITEq(itEqNum).SHI, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -6612,91 +6603,91 @@ namespace InternalHeatGains { } SetupOutputVariable(state, "ITE Air Inlet Operating Range Exceeded Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataHeatBal->ZoneITEq(itEqNum).TimeOutOfOperRange, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneITEq(itEqNum).Name); SetupOutputVariable(state, "ITE Air Inlet Dry-Bulb Temperature Above Operating Range Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataHeatBal->ZoneITEq(itEqNum).TimeAboveDryBulbT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneITEq(itEqNum).Name); SetupOutputVariable(state, "ITE Air Inlet Dry-Bulb Temperature Below Operating Range Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataHeatBal->ZoneITEq(itEqNum).TimeBelowDryBulbT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneITEq(itEqNum).Name); SetupOutputVariable(state, "ITE Air Inlet Dewpoint Temperature Above Operating Range Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataHeatBal->ZoneITEq(itEqNum).TimeAboveDewpointT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneITEq(itEqNum).Name); SetupOutputVariable(state, "ITE Air Inlet Dewpoint Temperature Below Operating Range Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataHeatBal->ZoneITEq(itEqNum).TimeBelowDewpointT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneITEq(itEqNum).Name); SetupOutputVariable(state, "ITE Air Inlet Relative Humidity Above Operating Range Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataHeatBal->ZoneITEq(itEqNum).TimeAboveRH, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneITEq(itEqNum).Name); SetupOutputVariable(state, "ITE Air Inlet Relative Humidity Below Operating Range Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataHeatBal->ZoneITEq(itEqNum).TimeBelowRH, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneITEq(itEqNum).Name); SetupOutputVariable(state, "ITE Air Inlet Dry-Bulb Temperature Difference Above Operating Range", - OutputProcessor::Unit::deltaC, + Constant::Units::deltaC, state.dataHeatBal->ZoneITEq(itEqNum).DryBulbTAboveDeltaT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneITEq(itEqNum).Name); SetupOutputVariable(state, "ITE Air Inlet Dry-Bulb Temperature Difference Below Operating Range", - OutputProcessor::Unit::deltaC, + Constant::Units::deltaC, state.dataHeatBal->ZoneITEq(itEqNum).DryBulbTBelowDeltaT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneITEq(itEqNum).Name); SetupOutputVariable(state, "ITE Air Inlet Dewpoint Temperature Difference Above Operating Range", - OutputProcessor::Unit::deltaC, + Constant::Units::deltaC, state.dataHeatBal->ZoneITEq(itEqNum).DewpointTAboveDeltaT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneITEq(itEqNum).Name); SetupOutputVariable(state, "ITE Air Inlet Dewpoint Temperature Difference Below Operating Range", - OutputProcessor::Unit::deltaC, + Constant::Units::deltaC, state.dataHeatBal->ZoneITEq(itEqNum).DewpointTBelowDeltaT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneITEq(itEqNum).Name); SetupOutputVariable(state, "ITE Air Inlet Relative Humidity Difference Above Operating Range", - OutputProcessor::Unit::Perc, + Constant::Units::Perc, state.dataHeatBal->ZoneITEq(itEqNum).RHAboveDeltaRH, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneITEq(itEqNum).Name); SetupOutputVariable(state, "ITE Air Inlet Relative Humidity Difference Below Operating Range", - OutputProcessor::Unit::Perc, + Constant::Units::Perc, state.dataHeatBal->ZoneITEq(itEqNum).RHBelowDeltaRH, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -6719,7 +6710,7 @@ namespace InternalHeatGains { for (int i = 0; i < (int)PERptVars::Num; ++i) { SetupOutputVariable(state, PowerOutputVariableStrings[i], - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).PowerRpt[i], OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -6728,7 +6719,7 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Zone ITE Adjusted Return Air Temperature", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).ITEAdjReturnTemp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -6746,7 +6737,7 @@ namespace InternalHeatGains { for (int i = 0; i < (int)PERptVars::Num; ++i) { SetupOutputVariable(state, EnergyOutputVariableStrings[i], - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).EnergyRpt[i], OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -6755,70 +6746,70 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Zone ITE Standard Density Air Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZoneRpt(zoneNum).ITEqAirVolFlowStdDensity, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone ITE Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataHeatBal->ZoneRpt(zoneNum).ITEqAirMassFlow, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone ITE Average Supply Heat Index", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataHeatBal->ZoneRpt(zoneNum).ITEqSHI, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone ITE Any Air Inlet Operating Range Exceeded Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataHeatBal->ZoneRpt(zoneNum).ITEqTimeOutOfOperRange, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone ITE Any Air Inlet Dry-Bulb Temperature Above Operating Range Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataHeatBal->ZoneRpt(zoneNum).ITEqTimeAboveDryBulbT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone ITE Any Air Inlet Dry-Bulb Temperature Below Operating Range Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataHeatBal->ZoneRpt(zoneNum).ITEqTimeBelowDryBulbT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone ITE Any Air Inlet Dewpoint Temperature Above Operating Range Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataHeatBal->ZoneRpt(zoneNum).ITEqTimeAboveDewpointT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone ITE Any Air Inlet Dewpoint Temperature Below Operating Range Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataHeatBal->ZoneRpt(zoneNum).ITEqTimeBelowDewpointT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone ITE Any Air Inlet Relative Humidity Above Operating Range Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataHeatBal->ZoneRpt(zoneNum).ITEqTimeAboveRH, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone ITE Any Air Inlet Relative Humidity Below Operating Range Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataHeatBal->ZoneRpt(zoneNum).ITEqTimeBelowRH, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -6843,7 +6834,7 @@ namespace InternalHeatGains { for (int i = 0; i < (int)PERptVars::Num; ++i) { SetupOutputVariable(state, PowerOutputVariableStrings[i], - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).PowerRpt[i], OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -6853,7 +6844,7 @@ namespace InternalHeatGains { // Not applicable for space until space has it's own air temeratures // Setup Output Variable(state, // "Space ITE Adjusted Return Air Temperature", - // OutputProcessor::Unit::W, + // Constant::Units::W, // state.dataHeatBal->spaceRpt(spaceNum).ITEAdjReturnTemp, // OutputProcessor::SOVTimeStepType::Zone, // OutputProcessor::SOVStoreType::Average, @@ -6871,7 +6862,7 @@ namespace InternalHeatGains { for (int i = 0; i < (int)PERptVars::Num; ++i) { SetupOutputVariable(state, EnergyOutputVariableStrings[i], - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).EnergyRpt[i], OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -6880,70 +6871,70 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Space ITE Standard Density Air Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->spaceRpt(spaceNum).ITEqAirVolFlowStdDensity, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space ITE Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataHeatBal->spaceRpt(spaceNum).ITEqAirMassFlow, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space ITE Average Supply Heat Index", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataHeatBal->spaceRpt(spaceNum).ITEqSHI, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space ITE Any Air Inlet Operating Range Exceeded Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeOutOfOperRange, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space ITE Any Air Inlet Dry-Bulb Temperature Above Operating Range Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeAboveDryBulbT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space ITE Any Air Inlet Dry-Bulb Temperature Below Operating Range Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeBelowDryBulbT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space ITE Any Air Inlet Dewpoint Temperature Above Operating Range Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeAboveDewpointT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space ITE Any Air Inlet Dewpoint Temperature Below Operating Range Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeBelowDewpointT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space ITE Any Air Inlet Relative Humidity Above Operating Range Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeAboveRH, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space ITE Any Air Inlet Relative Humidity Below Operating Range Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataHeatBal->spaceRpt(spaceNum).ITEqTimeBelowRH, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -6960,23 +6951,22 @@ namespace InternalHeatGains { addSpaceOutputs(state.dataHeatBal->ZoneBBHeat(bbHeatNum).spaceIndex) = true; SetupOutputVariable(state, "Baseboard Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneBBHeat(bbHeatNum).Power, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneBBHeat(bbHeatNum).Name); SetupOutputVariable(state, "Baseboard Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneBBHeat(bbHeatNum).Consumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneBBHeat(bbHeatNum).Name, - {}, - "Electricity", - "InteriorEquipment", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::InteriorEquipment, state.dataHeatBal->ZoneBBHeat(bbHeatNum).EndUseSubcategory, - "Building", + OutputProcessor::SOVGroup::Building, state.dataHeatBal->Zone(state.dataHeatBal->ZoneBBHeat(bbHeatNum).ZonePtr).Name, state.dataHeatBal->Zone(state.dataHeatBal->ZoneBBHeat(bbHeatNum).ZonePtr).Multiplier, state.dataHeatBal->Zone(state.dataHeatBal->ZoneBBHeat(bbHeatNum).ZonePtr).ListMultiplier, @@ -6986,42 +6976,42 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Baseboard Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneBBHeat(bbHeatNum).RadGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneBBHeat(bbHeatNum).Name); SetupOutputVariable(state, "Baseboard Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneBBHeat(bbHeatNum).RadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneBBHeat(bbHeatNum).Name); SetupOutputVariable(state, "Baseboard Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneBBHeat(bbHeatNum).ConGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneBBHeat(bbHeatNum).Name); SetupOutputVariable(state, "Baseboard Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneBBHeat(bbHeatNum).ConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneBBHeat(bbHeatNum).Name); SetupOutputVariable(state, "Baseboard Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneBBHeat(bbHeatNum).TotGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneBBHeat(bbHeatNum).Name); SetupOutputVariable(state, "Baseboard Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneBBHeat(bbHeatNum).TotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -7033,14 +7023,14 @@ namespace InternalHeatGains { if (addZoneOutputs(zoneNum)) { SetupOutputVariable(state, "Zone Baseboard Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).BaseHeatPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Baseboard Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).BaseHeatElecCons, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -7048,42 +7038,42 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Zone Baseboard Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).BaseHeatRadGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Baseboard Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).BaseHeatRadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Baseboard Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).BaseHeatConGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Baseboard Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).BaseHeatConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Baseboard Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).BaseHeatTotGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, "Zone Baseboard Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).BaseHeatTotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -7098,14 +7088,14 @@ namespace InternalHeatGains { if (addSpaceOutputs(spaceNum)) { SetupOutputVariable(state, "Space Baseboard Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).BaseHeatPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Baseboard Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).BaseHeatElecCons, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -7113,42 +7103,42 @@ namespace InternalHeatGains { SetupOutputVariable(state, "Space Baseboard Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).BaseHeatRadGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Baseboard Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).BaseHeatRadGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Baseboard Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).BaseHeatConGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Baseboard Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).BaseHeatConGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Baseboard Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).BaseHeatTotGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, "Space Baseboard Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).BaseHeatTotGainRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -7421,9 +7411,9 @@ namespace InternalHeatGains { int spaceNum = thisLights.spaceIndex; Q = thisLights.DesignLevel * GetCurrentScheduleValue(state, thisLights.SchedPtr); - if (state.dataDaylightingData->ZoneDaylight(NZ).totRefPts > 0) { + if (state.dataDayltg->ZoneDaylight(NZ).totRefPts > 0) { if (thisLights.FractionReplaceable > 0.0) { // FractionReplaceable can only be 0 or 1 for these models - Q *= state.dataDaylightingData->spacePowerReductionFactor(spaceNum); + Q *= state.dataDayltg->spacePowerReductionFactor(spaceNum); } } @@ -8737,7 +8727,7 @@ namespace InternalHeatGains { LightsRepMin = min(LightsRepMin, state.dataHeatBal->Lights(Loop).FractionReplaceable); LightsRepMax = max(LightsRepMax, state.dataHeatBal->Lights(Loop).FractionReplaceable); ++NumLights; - if ((state.dataDaylightingData->ZoneDaylight(WhichZone).totRefPts > 0) && + if ((state.dataDayltg->ZoneDaylight(WhichZone).totRefPts > 0) && (state.dataHeatBal->Lights(Loop).FractionReplaceable > 0.0 && state.dataHeatBal->Lights(Loop).FractionReplaceable < 1.0)) { ShowWarningError(state, "CheckLightsReplaceableMinMaxForZone: Fraction Replaceable must be 0.0 or 1.0 if used with daylighting."); ShowContinueError(state, @@ -8748,7 +8738,7 @@ namespace InternalHeatGains { } } - if (state.dataDaylightingData->ZoneDaylight(WhichZone).totRefPts > 0) { + if (state.dataDayltg->ZoneDaylight(WhichZone).totRefPts > 0) { if (LightsRepMax == 0.0) { ShowWarningError(state, format("CheckLightsReplaceable: Zone \"{}\" has Daylighting:Controls.", state.dataHeatBal->Zone(WhichZone).Name)); @@ -8854,7 +8844,6 @@ namespace InternalHeatGains { if (state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices == 0) { continue; } - for (int DeviceNum = 1; DeviceNum <= state.dataHeatBal->spaceIntGainDevices(spaceNum).numberOfDevices; ++DeviceNum) { if (state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).CompObjectType != str_people) { SumConvGainRateExceptPeople += state.dataHeatBal->spaceIntGainDevices(spaceNum).device(DeviceNum).ConvectGainRate; @@ -9328,12 +9317,13 @@ namespace InternalHeatGains { // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static constexpr std::array IntGainTypesPeople = {DataHeatBalance::IntGainType::People}; static constexpr std::array IntGainTypesLight = {DataHeatBalance::IntGainType::Lights}; - static constexpr std::array IntGainTypesEquip = {DataHeatBalance::IntGainType::ElectricEquipment, + static constexpr std::array IntGainTypesEquip = {DataHeatBalance::IntGainType::ElectricEquipment, DataHeatBalance::IntGainType::ElectricEquipmentITEAirCooled, DataHeatBalance::IntGainType::GasEquipment, DataHeatBalance::IntGainType::HotWaterEquipment, DataHeatBalance::IntGainType::SteamEquipment, - DataHeatBalance::IntGainType::OtherEquipment}; + DataHeatBalance::IntGainType::OtherEquipment, + DataHeatBalance::IntGainType::IndoorGreen}; static constexpr std::array IntGainTypesRefrig = { DataHeatBalance::IntGainType::RefrigerationCase, DataHeatBalance::IntGainType::RefrigerationCompressorRack, diff --git a/src/EnergyPlus/InternalHeatGains.hh b/src/EnergyPlus/InternalHeatGains.hh index 3ce1c389072..7468da0d835 100644 --- a/src/EnergyPlus/InternalHeatGains.hh +++ b/src/EnergyPlus/InternalHeatGains.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/LowTempRadiantSystem.cc b/src/EnergyPlus/LowTempRadiantSystem.cc index 984b7d75bb1..ca6b2314b26 100644 --- a/src/EnergyPlus/LowTempRadiantSystem.cc +++ b/src/EnergyPlus/LowTempRadiantSystem.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -1433,38 +1433,36 @@ namespace LowTempRadiantSystem { SetupOutputVariable(state, "Zone Radiant HVAC Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisHydrSys.HeatPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisHydrSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisHydrSys.HeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisHydrSys.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "ENERGYTRANSFER", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Zone Radiant HVAC Heating Fluid Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisHydrSys.HeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisHydrSys.Name, + Constant::eResource::PlantLoopHeatingDemand, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "PLANTLOOPHEATINGDEMAND", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Zone Radiant HVAC Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisHydrSys.CoolPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1472,59 +1470,57 @@ namespace LowTempRadiantSystem { SetupOutputVariable(state, "Zone Radiant HVAC Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisHydrSys.CoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisHydrSys.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "ENERGYTRANSFER", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Zone Radiant HVAC Cooling Fluid Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisHydrSys.CoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisHydrSys.Name, + Constant::eResource::PlantLoopCoolingDemand, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "PLANTLOOPCOOLINGDEMAND", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Zone Radiant HVAC Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisHydrSys.WaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisHydrSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisHydrSys.WaterInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisHydrSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisHydrSys.WaterOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisHydrSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Moisture Condensation Time", - OutputProcessor::Unit::s, + Constant::Units::s, thisHydrSys.CondCausedTimeOff, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisHydrSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Operation Mode", - OutputProcessor::Unit::None, + Constant::Units::None, thisHydrSys.OperatingMode, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1558,158 +1554,153 @@ namespace LowTempRadiantSystem { SetupOutputVariable(state, "Zone Radiant HVAC Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCFloSys.HeatPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCFloSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCFloSys.HeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisCFloSys.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "ENERGYTRANSFER", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Zone Radiant HVAC Heating Fluid Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCFloSys.HeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisCFloSys.Name, + Constant::eResource::PlantLoopHeatingDemand, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "PLANTLOOPHEATINGDEMAND", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Zone Radiant HVAC Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCFloSys.CoolPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCFloSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCFloSys.CoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisCFloSys.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "ENERGYTRANSFER", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Zone Radiant HVAC Cooling Fluid Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCFloSys.CoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisCFloSys.Name, + Constant::eResource::PlantLoopCoolingDemand, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "PLANTLOOPCOOLINGDEMAND", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Zone Radiant HVAC Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisCFloSys.WaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCFloSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Injection Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisCFloSys.WaterInjectionRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCFloSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Recirculation Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisCFloSys.WaterRecircRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCFloSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisCFloSys.WaterInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCFloSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisCFloSys.WaterOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCFloSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Pump Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisCFloSys.PumpInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCFloSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCFloSys.PumpPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCFloSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCFloSys.PumpEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisCFloSys.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Pumps, {}, - "Electricity", - "Pumps", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Zone Radiant HVAC Pump Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisCFloSys.PumpMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCFloSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Pump Fluid Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCFloSys.PumpHeattoFluid, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCFloSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Pump Fluid Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCFloSys.PumpHeattoFluidEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisCFloSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Moisture Condensation Time", - OutputProcessor::Unit::s, + Constant::Units::s, thisCFloSys.CondCausedTimeOff, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisCFloSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Operation Mode", - OutputProcessor::Unit::None, + Constant::Units::None, thisCFloSys.OperatingMode, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1717,21 +1708,21 @@ namespace LowTempRadiantSystem { if (state.dataLowTempRadSys->anyRadiantSystemUsingRunningMeanAverage) { SetupOutputVariable(state, "Zone Radiant HVAC Running Mean Outdoor Dry-Bulb Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisCFloSys.todayRunningMeanOutdoorDryBulbTemperature, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCFloSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Previous Day Running Mean Outdoor Dry-Bulb Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisCFloSys.yesterdayRunningMeanOutdoorDryBulbTemperature, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisCFloSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Previous Day Average Outdoor Dry-Bulb Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisCFloSys.yesterdayAverageOutdoorDryBulbTemperature, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1758,42 +1749,40 @@ namespace LowTempRadiantSystem { SetupOutputVariable(state, "Zone Radiant HVAC Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisElecSys.ElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisElecSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisElecSys.ElecEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisElecSys.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "ELECTRICITY", - "Heating", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Zone Radiant HVAC Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisElecSys.HeatPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisElecSys.Name); SetupOutputVariable(state, "Zone Radiant HVAC Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisElecSys.HeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisElecSys.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "ENERGYTRANSFER", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } } diff --git a/src/EnergyPlus/LowTempRadiantSystem.hh b/src/EnergyPlus/LowTempRadiantSystem.hh index 461649e8d27..6bc6e5926dc 100644 --- a/src/EnergyPlus/LowTempRadiantSystem.hh +++ b/src/EnergyPlus/LowTempRadiantSystem.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Material.cc b/src/EnergyPlus/Material.cc index b2319e921b9..a14b75c3520 100644 --- a/src/EnergyPlus/Material.cc +++ b/src/EnergyPlus/Material.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Material.hh b/src/EnergyPlus/Material.hh index f9bc7dcdb23..f4096d4b910 100644 --- a/src/EnergyPlus/Material.hh +++ b/src/EnergyPlus/Material.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -201,9 +201,8 @@ namespace Material { Real64 SpecHeat = 0.0; // Layer specific heat (J/kgK) Real64 Thickness = 0.0; // Layer thickness (m) - virtual bool dummy() + virtual ~MaterialBase() { - return true; } }; @@ -388,10 +387,7 @@ namespace Material { // material int GlassSpecAngBRefleDataPtr = 0; // Data set index of back reflectance as a function of spectral and angle associated with a window glass // material - virtual bool dummy() - { - return true; - } + virtual ~MaterialChild(){}; }; struct WindowBlindProperties diff --git a/src/EnergyPlus/MatrixDataManager.cc b/src/EnergyPlus/MatrixDataManager.cc index 53658c6cf1a..bc43562ef61 100644 --- a/src/EnergyPlus/MatrixDataManager.cc +++ b/src/EnergyPlus/MatrixDataManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/MatrixDataManager.hh b/src/EnergyPlus/MatrixDataManager.hh index 4e23bb18dcd..75ca96f50e3 100644 --- a/src/EnergyPlus/MatrixDataManager.hh +++ b/src/EnergyPlus/MatrixDataManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/MicroCHPElectricGenerator.cc b/src/EnergyPlus/MicroCHPElectricGenerator.cc index 1cb517cd539..78b3cf8a363 100644 --- a/src/EnergyPlus/MicroCHPElectricGenerator.cc +++ b/src/EnergyPlus/MicroCHPElectricGenerator.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -401,7 +401,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) { SetupOutputVariable(state, "Generator Off Mode Time", - OutputProcessor::Unit::s, + Constant::Units::s, this->A42Model.OffModeTime, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -409,7 +409,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Standby Mode Time", - OutputProcessor::Unit::s, + Constant::Units::s, this->A42Model.StandyByModeTime, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -417,7 +417,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Warm Up Mode Time", - OutputProcessor::Unit::s, + Constant::Units::s, this->A42Model.WarmUpModeTime, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -425,7 +425,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Normal Operating Mode Time", - OutputProcessor::Unit::s, + Constant::Units::s, this->A42Model.NormalModeTime, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -433,7 +433,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Cool Down Mode Time", - OutputProcessor::Unit::s, + Constant::Units::s, this->A42Model.CoolDownModeTime, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -441,7 +441,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Produced AC Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->A42Model.ACPowerGen, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -449,20 +449,19 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Produced AC Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->A42Model.ACEnergyGen, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::ElectricityProduced, + OutputProcessor::SOVEndUseCat::Cogeneration, {}, - "ElectricityProduced", - "COGENERATION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Generator Produced Thermal Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->A42Model.QdotHR, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -470,20 +469,19 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Produced Thermal Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->A42Model.TotalHeatEnergyRec, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Cogeneration, {}, - "ENERGYTRANSFER", - "COGENERATION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Generator Electric Efficiency", - OutputProcessor::Unit::None, + Constant::Units::None, this->A42Model.ElecEff, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -491,7 +489,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Thermal Efficiency", - OutputProcessor::Unit::None, + Constant::Units::None, this->A42Model.ThermEff, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -499,7 +497,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Gross Input Heat Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->A42Model.Qgross, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -507,7 +505,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Steady State Engine Heat Generation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->A42Model.Qgenss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -515,7 +513,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Engine Heat Exchange Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->A42Model.QdotHX, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -523,7 +521,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->A42Model.MdotAir, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -531,7 +529,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Fuel Molar Flow Rate", - OutputProcessor::Unit::kmol_s, + Constant::Units::kmol_s, this->A42Model.NdotFuel, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -539,7 +537,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Fuel Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->A42Model.MdotFuel, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -547,7 +545,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Engine Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->A42Model.Teng, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -555,7 +553,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Coolant Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->A42Model.HeatRecInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -563,7 +561,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Coolant Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->A42Model.HeatRecOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -573,20 +571,19 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) // need custom resourceTypeKey or something for user defined fuel compositions. SetupOutputVariable(state, "Generator Fuel HHV Basis Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->A42Model.FuelEnergyHHV, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::NaturalGas, + OutputProcessor::SOVEndUseCat::Cogeneration, {}, - "NaturalGas", - "COGENERATION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Generator Fuel HHV Basis Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->A42Model.FuelEnergyUseRateHHV, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -594,7 +591,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Fuel LHV Basis Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->A42Model.FuelEnergyLHV, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -602,7 +599,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Fuel LHV Basis Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->A42Model.FuelEnergyUseRateLHV, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -610,7 +607,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Fuel Compressor Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->A42Model.FuelCompressPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -618,7 +615,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Fuel Compressor Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->A42Model.FuelCompressEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -626,7 +623,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Fuel Compressor Skin Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->A42Model.FuelCompressSkinLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -634,7 +631,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Zone Sensible Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->A42Model.SkinLossPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -642,7 +639,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Zone Sensible Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->A42Model.SkinLossEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -650,7 +647,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Zone Convection Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->A42Model.SkinLossConvect, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -658,7 +655,7 @@ void MicroCHPDataStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Zone Radiation Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->A42Model.SkinLossRadiat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/MicroCHPElectricGenerator.hh b/src/EnergyPlus/MicroCHPElectricGenerator.hh index bff765e04fc..7f51d496d0a 100644 --- a/src/EnergyPlus/MicroCHPElectricGenerator.hh +++ b/src/EnergyPlus/MicroCHPElectricGenerator.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/MicroturbineElectricGenerator.cc b/src/EnergyPlus/MicroturbineElectricGenerator.cc index 553c4b54929..e82701f498b 100644 --- a/src/EnergyPlus/MicroturbineElectricGenerator.cc +++ b/src/EnergyPlus/MicroturbineElectricGenerator.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -902,7 +902,7 @@ void MTGeneratorSpecs::setupOutputVars(EnergyPlusData &state) std::string_view const sFuelType = Constant::eFuelNames[static_cast(this->FuelType)]; SetupOutputVariable(state, "Generator Produced AC Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->ElecPowerGenerated, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -910,20 +910,19 @@ void MTGeneratorSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Produced AC Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->EnergyGen, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::ElectricityProduced, + OutputProcessor::SOVEndUseCat::Cogeneration, {}, - "ElectricityProduced", - "COGENERATION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Generator LHV Basis Electric Efficiency", - OutputProcessor::Unit::None, + Constant::Units::None, this->ElectricEfficiencyLHV, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -932,7 +931,7 @@ void MTGeneratorSpecs::setupOutputVars(EnergyPlusData &state) // Fuel specific report variables SetupOutputVariable(state, format("Generator {} HHV Basis Rate", sFuelType), - OutputProcessor::Unit::W, + Constant::Units::W, this->FuelEnergyUseRateHHV, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -940,20 +939,19 @@ void MTGeneratorSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Generator {} HHV Basis Energy", sFuelType), - OutputProcessor::Unit::J, + Constant::Units::J, this->FuelEnergyHHV, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eFuel2eResource[(int)this->FuelType], + OutputProcessor::SOVEndUseCat::Cogeneration, {}, - sFuelType, - "COGENERATION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, format("Generator {} Mass Flow Rate", sFuelType), - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->FuelMdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -962,7 +960,7 @@ void MTGeneratorSpecs::setupOutputVars(EnergyPlusData &state) // general fuel use report (to match other generators) SetupOutputVariable(state, "Generator Fuel HHV Basis Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->FuelEnergyUseRateHHV, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -970,7 +968,7 @@ void MTGeneratorSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Fuel HHV Basis Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->FuelEnergyHHV, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -981,7 +979,7 @@ void MTGeneratorSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Produced Thermal Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QHeatRecovered, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -989,20 +987,19 @@ void MTGeneratorSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Produced Thermal Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->ExhaustEnergyRec, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRecovery, {}, - "ENERGYTRANSFER", - "HEATRECOVERY", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Generator Thermal Efficiency LHV Basis", - OutputProcessor::Unit::None, + Constant::Units::None, this->ThermalEfficiencyLHV, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1010,7 +1007,7 @@ void MTGeneratorSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Heat Recovery Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->HeatRecInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1018,7 +1015,7 @@ void MTGeneratorSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Heat Recovery Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->HeatRecOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1026,7 +1023,7 @@ void MTGeneratorSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Heat Recovery Water Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->HeatRecMdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1036,7 +1033,7 @@ void MTGeneratorSpecs::setupOutputVars(EnergyPlusData &state) if (this->StandbyPower > 0.0) { // Report Standby Power if entered by user SetupOutputVariable(state, "Generator Standby Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->StandbyPowerRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1044,22 +1041,21 @@ void MTGeneratorSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Standby Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->StandbyEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cogeneration, {}, - "Electricity", - "Cogeneration", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } if (this->AncillaryPower > 0.0) { // Report Ancillary Power if entered by user SetupOutputVariable(state, "Generator Ancillary Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->AncillaryPowerRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1067,7 +1063,7 @@ void MTGeneratorSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Ancillary Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->AncillaryEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1078,7 +1074,7 @@ void MTGeneratorSpecs::setupOutputVars(EnergyPlusData &state) if (this->ExhAirCalcsActive) { SetupOutputVariable(state, "Generator Exhaust Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->ExhaustAirMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1086,7 +1082,7 @@ void MTGeneratorSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Generator Exhaust Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->ExhaustAirTemperature, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/MicroturbineElectricGenerator.hh b/src/EnergyPlus/MicroturbineElectricGenerator.hh index 1f4a6c7e8ed..34dc293abb6 100644 --- a/src/EnergyPlus/MicroturbineElectricGenerator.hh +++ b/src/EnergyPlus/MicroturbineElectricGenerator.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/MixedAir.cc b/src/EnergyPlus/MixedAir.cc index c94a29885ca..2d2e4035d60 100644 --- a/src/EnergyPlus/MixedAir.cc +++ b/src/EnergyPlus/MixedAir.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -2971,7 +2971,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con // CurrentModuleObject='AirLoopHVAC' SetupOutputVariable(state, "Air System Outdoor Air Economizer Status", - OutputProcessor::Unit::None, + Constant::Units::None, loopOAController.EconomizerStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -2979,7 +2979,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con SetupOutputVariable(state, "Air System Outdoor Air Heat Recovery Bypass Status", - OutputProcessor::Unit::None, + Constant::Units::None, loopOAController.HeatRecoveryBypassStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -2987,14 +2987,14 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con SetupOutputVariable(state, "Air System Outdoor Air Heat Recovery Bypass Heating Coil Activity Status", - OutputProcessor::Unit::None, + Constant::Units::None, loopOAController.HRHeatingCoilActive, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, airloopName); SetupOutputVariable(state, "Air System Outdoor Air Heat Recovery Bypass Minimum Outdoor Air Mixed Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, loopOAController.MixedAirTempAtMinOAFlow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3002,7 +3002,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con SetupOutputVariable(state, "Air System Outdoor Air High Humidity Control Status", - OutputProcessor::Unit::None, + Constant::Units::None, loopOAController.HighHumCtrlStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3010,7 +3010,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con SetupOutputVariable(state, "Air System Outdoor Air Limiting Factor", - OutputProcessor::Unit::None, + Constant::Units::None, loopOAController.OALimitingFactorReport, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3018,7 +3018,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con SetupOutputVariable(state, "Air System Outdoor Air Flow Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, loopOAController.OAFractionRpt, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3026,7 +3026,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con SetupOutputVariable(state, "Air System Outdoor Air Minimum Flow Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, loopOAController.MinOAFracLimit, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3034,7 +3034,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con SetupOutputVariable(state, "Air System Outdoor Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, loopOAController.OAMassFlow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3042,7 +3042,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con SetupOutputVariable(state, "Air System Mixed Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, loopOAController.MixMassFlow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3050,7 +3050,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con SetupOutputVariable(state, "Air System Relief Air Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, loopOAController.RelTotalLossRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3058,7 +3058,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con SetupOutputVariable(state, "Air System Relief Air Sensible Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, loopOAController.RelSensiLossRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3066,7 +3066,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con SetupOutputVariable(state, "Air System Relief Air Latent Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, loopOAController.RelLatentLossRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3075,7 +3075,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con if (loopOAController.MixedAirSPMNum > 0) { SetupOutputVariable(state, "Air System Outdoor Air Maximum Flow Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, loopOAController.MaxOAFracBySetPoint, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3099,7 +3099,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con if (loopOAController.VentMechObjectNum > 0 && airLoopNum > 0) { SetupOutputVariable(state, "Air System Outdoor Air Mechanical Ventilation Requested Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, loopOAController.MechVentOAMassFlowRequest, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/MixedAir.hh b/src/EnergyPlus/MixedAir.hh index 34a73059bd9..fd27ff74055 100644 --- a/src/EnergyPlus/MixedAir.hh +++ b/src/EnergyPlus/MixedAir.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/MixerComponent.cc b/src/EnergyPlus/MixerComponent.cc index bda19a41c27..e01258b3fef 100644 --- a/src/EnergyPlus/MixerComponent.cc +++ b/src/EnergyPlus/MixerComponent.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/MixerComponent.hh b/src/EnergyPlus/MixerComponent.hh index b6da2fbd319..0f30de9e494 100644 --- a/src/EnergyPlus/MixerComponent.hh +++ b/src/EnergyPlus/MixerComponent.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/MoistureBalanceEMPDManager.cc b/src/EnergyPlus/MoistureBalanceEMPDManager.cc index 50352e726b0..1a423807fa5 100644 --- a/src/EnergyPlus/MoistureBalanceEMPDManager.cc +++ b/src/EnergyPlus/MoistureBalanceEMPDManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -394,63 +394,63 @@ void InitMoistureBalanceEMPD(EnergyPlusData &state) const std::string surf_name = state.dataSurface->Surface(SurfNum).Name; SetupOutputVariable(state, "EMPD Surface Inside Face Water Vapor Density", - OutputProcessor::Unit::kg_m3, + Constant::Units::kg_m3, rvd.rv_surface, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surf_name); SetupOutputVariable(state, "EMPD Surface Layer Moisture Content", - OutputProcessor::Unit::kg_m3, + Constant::Units::kg_m3, rvd.u_surface_layer, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surf_name); SetupOutputVariable(state, "EMPD Deep Layer Moisture Content", - OutputProcessor::Unit::kg_m3, + Constant::Units::kg_m3, rvd.u_deep_layer, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surf_name); SetupOutputVariable(state, "EMPD Surface Layer Equivalent Relative Humidity", - OutputProcessor::Unit::Perc, + Constant::Units::Perc, rvd.RH_surface_layer, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surf_name); SetupOutputVariable(state, "EMPD Deep Layer Equivalent Relative Humidity", - OutputProcessor::Unit::Perc, + Constant::Units::Perc, rvd.RH_deep_layer, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surf_name); SetupOutputVariable(state, "EMPD Surface Layer Equivalent Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, rvd.w_surface_layer, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surf_name); SetupOutputVariable(state, "EMPD Deep Layer Equivalent Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, rvd.w_deep_layer, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surf_name); SetupOutputVariable(state, "EMPD Surface Moisture Flux to Zone", - OutputProcessor::Unit::kg_m2s, + Constant::Units::kg_m2s, rvd.mass_flux_zone, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, surf_name); SetupOutputVariable(state, "EMPD Deep Layer Moisture Flux", - OutputProcessor::Unit::kg_m2s, + Constant::Units::kg_m2s, rvd.mass_flux_deep, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, diff --git a/src/EnergyPlus/MoistureBalanceEMPDManager.hh b/src/EnergyPlus/MoistureBalanceEMPDManager.hh index 096e0628836..b5b12d27f9d 100644 --- a/src/EnergyPlus/MoistureBalanceEMPDManager.hh +++ b/src/EnergyPlus/MoistureBalanceEMPDManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/MundtSimMgr.cc b/src/EnergyPlus/MundtSimMgr.cc index 15c7e67d71d..6e88647be84 100644 --- a/src/EnergyPlus/MundtSimMgr.cc +++ b/src/EnergyPlus/MundtSimMgr.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -269,7 +269,7 @@ namespace RoomAir { state.dataMundtSimMgr->LineNode(NodeNum, MundtZoneIndex).SurfMask = state.dataRoomAir->AirNode(AirNodeNum).SurfMask; SetupOutputVariable(state, "Room Air Node Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataMundtSimMgr->LineNode(NodeNum, MundtZoneIndex).Temp, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/MundtSimMgr.hh b/src/EnergyPlus/MundtSimMgr.hh index d8c8007de31..38742d40ce0 100644 --- a/src/EnergyPlus/MundtSimMgr.hh +++ b/src/EnergyPlus/MundtSimMgr.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/NodeInputManager.cc b/src/EnergyPlus/NodeInputManager.cc index 1d39e72cb06..630e0b1c9d8 100644 --- a/src/EnergyPlus/NodeInputManager.cc +++ b/src/EnergyPlus/NodeInputManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -213,84 +213,84 @@ void SetupNodeVarsForReporting(EnergyPlusData &state) // Setup Report variables for the Nodes for HVAC Reporting, CurrentModuleObject='Node Name' SetupOutputVariable(state, "System Node Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataLoopNodes->Node(NumNode).Temp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, Node(NumNode).MassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, Node(NumNode).HumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Setpoint Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, Node(NumNode).TempSetPoint, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Setpoint High Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, Node(NumNode).TempSetPointHi, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Setpoint Low Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, Node(NumNode).TempSetPointLo, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Setpoint Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, Node(NumNode).HumRatSetPoint, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Setpoint Minimum Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, Node(NumNode).HumRatMin, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Setpoint Maximum Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, Node(NumNode).HumRatMax, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Relative Humidity", - OutputProcessor::Unit::Perc, + Constant::Units::Perc, state.dataLoopNodes->MoreNodeInfo(NumNode).RelHumidity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Pressure", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, Node(NumNode).Press, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Standard Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataLoopNodes->MoreNodeInfo(NumNode).VolFlowRateStdRho, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -299,21 +299,21 @@ void SetupNodeVarsForReporting(EnergyPlusData &state) Node(NumNode).FluidType == DataLoopNode::NodeFluidType::Water) { // setup volume flow rate report for actual/current density SetupOutputVariable(state, "System Node Current Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataLoopNodes->MoreNodeInfo(NumNode).VolFlowRateCrntRho, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Current Density", - OutputProcessor::Unit::kg_m3, + Constant::Units::kg_m3, state.dataLoopNodes->MoreNodeInfo(NumNode).Density, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Specific Heat", - OutputProcessor::Unit::J_kgK, + Constant::Units::J_kgK, state.dataLoopNodes->MoreNodeInfo(NumNode).SpecificHeat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -322,49 +322,49 @@ void SetupNodeVarsForReporting(EnergyPlusData &state) SetupOutputVariable(state, "System Node Enthalpy", - OutputProcessor::Unit::J_kg, + Constant::Units::J_kg, state.dataLoopNodes->MoreNodeInfo(NumNode).ReportEnthalpy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Wetbulb Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataLoopNodes->MoreNodeInfo(NumNode).WetBulbTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Dewpoint Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataLoopNodes->MoreNodeInfo(NumNode).AirDewPointTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Wind Speed", - OutputProcessor::Unit::m_s, + Constant::Units::m_s, Node(NumNode).OutAirWindSpeed, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Wind Direction", - OutputProcessor::Unit::deg, + Constant::Units::deg, Node(NumNode).OutAirWindDir, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Quality", - OutputProcessor::Unit::None, + Constant::Units::None, Node(NumNode).Quality, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Height", - OutputProcessor::Unit::m, + Constant::Units::m, Node(NumNode).Height, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -372,70 +372,70 @@ void SetupNodeVarsForReporting(EnergyPlusData &state) if (state.dataGlobal->DisplayAdvancedReportVariables) { SetupOutputVariable(state, "System Node Minimum Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, Node(NumNode).TempMin, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Maximum Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, Node(NumNode).TempMax, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Minimum Limit Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, Node(NumNode).MassFlowRateMin, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Maximum Limit Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, Node(NumNode).MassFlowRateMax, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Minimum Available Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, Node(NumNode).MassFlowRateMinAvail, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Maximum Available Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, Node(NumNode).MassFlowRateMaxAvail, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Setpoint Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, Node(NumNode).MassFlowRateSetPoint, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Requested Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, Node(NumNode).MassFlowRateRequest, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Last Timestep Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, Node(NumNode).TempLastTimestep, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, NodeID(NumNode)); SetupOutputVariable(state, "System Node Last Timestep Enthalpy", - OutputProcessor::Unit::J_kg, + Constant::Units::J_kg, Node(NumNode).EnthalpyLastTimestep, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -444,7 +444,7 @@ void SetupNodeVarsForReporting(EnergyPlusData &state) if (state.dataContaminantBalance->Contaminant.CO2Simulation) { SetupOutputVariable(state, "System Node CO2 Concentration", - OutputProcessor::Unit::ppm, + Constant::Units::ppm, Node(NumNode).CO2, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -453,7 +453,7 @@ void SetupNodeVarsForReporting(EnergyPlusData &state) if (state.dataContaminantBalance->Contaminant.GenericContamSimulation) { SetupOutputVariable(state, "System Node Generic Air Contaminant Concentration", - OutputProcessor::Unit::ppm, + Constant::Units::ppm, Node(NumNode).GenContam, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -971,7 +971,6 @@ void CalcMoreNodeInfo(EnergyPlusData &state) using FluidProperties::GetSatDensityRefrig; using FluidProperties::GetSatEnthalpyRefrig; using FluidProperties::GetSpecificHeatGlycol; - using OutputProcessor::ReqReportVariables; using Psychrometrics::CPCW; using Psychrometrics::PsyCpAirFnW; using Psychrometrics::PsyHFnTdbW; @@ -1033,21 +1032,21 @@ void CalcMoreNodeInfo(EnergyPlusData &state) for (int iNode = 1; iNode <= state.dataLoopNodes->NumOfNodes; ++iNode) { nodeReportingStrings.push_back(std::string(NodeReportingCalc + state.dataLoopNodes->NodeID(iNode))); nodeFluidNames.push_back(FluidProperties::GetGlycolNameByIndex(state, state.dataLoopNodes->Node(iNode).FluidIndex)); - for (int iReq = 1; iReq <= state.dataOutputProcessor->NumOfReqVariables; ++iReq) { - if (Util::SameString(state.dataOutputProcessor->ReqRepVars(iReq).Key, state.dataLoopNodes->NodeID(iNode)) || - state.dataOutputProcessor->ReqRepVars(iReq).Key.empty()) { - if (Util::SameString(state.dataOutputProcessor->ReqRepVars(iReq).VarName, "System Node Wetbulb Temperature")) { + + for (auto const *reqVar : state.dataOutputProcessor->reqVars) { + if (Util::SameString(reqVar->key, state.dataLoopNodes->NodeID(iNode)) || reqVar->key.empty()) { + if (Util::SameString(reqVar->name, "System Node Wetbulb Temperature")) { state.dataNodeInputMgr->NodeWetBulbRepReq(iNode) = true; - NodeWetBulbSchedPtr(iNode) = state.dataOutputProcessor->ReqRepVars(iReq).SchedPtr; - } else if (Util::SameString(state.dataOutputProcessor->ReqRepVars(iReq).VarName, "System Node Relative Humidity")) { + NodeWetBulbSchedPtr(iNode) = reqVar->SchedPtr; + } else if (Util::SameString(reqVar->name, "System Node Relative Humidity")) { NodeRelHumidityRepReq(iNode) = true; - NodeRelHumiditySchedPtr(iNode) = state.dataOutputProcessor->ReqRepVars(iReq).SchedPtr; - } else if (Util::SameString(state.dataOutputProcessor->ReqRepVars(iReq).VarName, "System Node Dewpoint Temperature")) { + NodeRelHumiditySchedPtr(iNode) = reqVar->SchedPtr; + } else if (Util::SameString(reqVar->name, "System Node Dewpoint Temperature")) { NodeDewPointRepReq(iNode) = true; - NodeDewPointSchedPtr(iNode) = state.dataOutputProcessor->ReqRepVars(iReq).SchedPtr; - } else if (Util::SameString(state.dataOutputProcessor->ReqRepVars(iReq).VarName, "System Node Specific Heat")) { + NodeDewPointSchedPtr(iNode) = reqVar->SchedPtr; + } else if (Util::SameString(reqVar->name, "System Node Specific Heat")) { NodeSpecificHeatRepReq(iNode) = true; - NodeSpecificHeatSchedPtr(iNode) = state.dataOutputProcessor->ReqRepVars(iReq).SchedPtr; + NodeSpecificHeatSchedPtr(iNode) = reqVar->SchedPtr; } } } diff --git a/src/EnergyPlus/NodeInputManager.hh b/src/EnergyPlus/NodeInputManager.hh index 7ed1d2b28cc..1c72f2b0436 100644 --- a/src/EnergyPlus/NodeInputManager.hh +++ b/src/EnergyPlus/NodeInputManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/NonZoneEquipmentManager.cc b/src/EnergyPlus/NonZoneEquipmentManager.cc index e006e2e1a08..a8f71fb168c 100644 --- a/src/EnergyPlus/NonZoneEquipmentManager.cc +++ b/src/EnergyPlus/NonZoneEquipmentManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/NonZoneEquipmentManager.hh b/src/EnergyPlus/NonZoneEquipmentManager.hh index 89195043e1d..bc66f5cf7ce 100644 --- a/src/EnergyPlus/NonZoneEquipmentManager.hh +++ b/src/EnergyPlus/NonZoneEquipmentManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutAirNodeManager.cc b/src/EnergyPlus/OutAirNodeManager.cc index f0ca81d03cb..379a7765189 100644 --- a/src/EnergyPlus/OutAirNodeManager.cc +++ b/src/EnergyPlus/OutAirNodeManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutAirNodeManager.hh b/src/EnergyPlus/OutAirNodeManager.hh index aa423a026e5..c6f867d114a 100644 --- a/src/EnergyPlus/OutAirNodeManager.hh +++ b/src/EnergyPlus/OutAirNodeManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutdoorAirUnit.cc b/src/EnergyPlus/OutdoorAirUnit.cc index b3a1883129a..1e8f92fa00f 100644 --- a/src/EnergyPlus/OutdoorAirUnit.cc +++ b/src/EnergyPlus/OutdoorAirUnit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -1015,112 +1015,112 @@ namespace OutdoorAirUnit { SetupOutputVariable(state, "Zone Outdoor Air Unit Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisOutAirUnit.TotHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisOutAirUnit.Name); SetupOutputVariable(state, "Zone Outdoor Air Unit Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisOutAirUnit.TotHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisOutAirUnit.Name); SetupOutputVariable(state, "Zone Outdoor Air Unit Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisOutAirUnit.SensHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisOutAirUnit.Name); SetupOutputVariable(state, "Zone Outdoor Air Unit Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisOutAirUnit.SensHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisOutAirUnit.Name); SetupOutputVariable(state, "Zone Outdoor Air Unit Latent Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisOutAirUnit.LatHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisOutAirUnit.Name); SetupOutputVariable(state, "Zone Outdoor Air Unit Latent Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisOutAirUnit.LatHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisOutAirUnit.Name); SetupOutputVariable(state, "Zone Outdoor Air Unit Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisOutAirUnit.TotCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisOutAirUnit.Name); SetupOutputVariable(state, "Zone Outdoor Air Unit Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisOutAirUnit.TotCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisOutAirUnit.Name); SetupOutputVariable(state, "Zone Outdoor Air Unit Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisOutAirUnit.SensCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisOutAirUnit.Name); SetupOutputVariable(state, "Zone Outdoor Air Unit Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisOutAirUnit.SensCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisOutAirUnit.Name); SetupOutputVariable(state, "Zone Outdoor Air Unit Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisOutAirUnit.LatCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisOutAirUnit.Name); SetupOutputVariable(state, "Zone Outdoor Air Unit Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisOutAirUnit.LatCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisOutAirUnit.Name); SetupOutputVariable(state, "Zone Outdoor Air Unit Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisOutAirUnit.AirMassFlow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisOutAirUnit.Name); SetupOutputVariable(state, "Zone Outdoor Air Unit Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisOutAirUnit.ElecFanRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisOutAirUnit.Name); SetupOutputVariable(state, "Zone Outdoor Air Unit Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisOutAirUnit.ElecFanEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisOutAirUnit.Name); SetupOutputVariable(state, "Zone Outdoor Air Unit Fan Availability Status", - OutputProcessor::Unit::None, + Constant::Units::None, thisOutAirUnit.AvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/OutdoorAirUnit.hh b/src/EnergyPlus/OutdoorAirUnit.hh index 0afd4616ca5..38be7b5861f 100644 --- a/src/EnergyPlus/OutdoorAirUnit.hh +++ b/src/EnergyPlus/OutdoorAirUnit.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutputProcessor.cc b/src/EnergyPlus/OutputProcessor.cc index 9a1c9b25c4b..d87d4a7556e 100644 --- a/src/EnergyPlus/OutputProcessor.cc +++ b/src/EnergyPlus/OutputProcessor.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -48,9 +48,6 @@ // C++ Headers #include #include -#include -#include -#include #include #include #include @@ -71,19 +68,16 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include -#include namespace EnergyPlus { @@ -101,11 +95,10 @@ namespace OutputProcessor { // without using the OutputProcessor Module // METHODOLOGY EMPLOYED: - // Lots of pointers and other fancy data stuff. + // Lots of pointers and other fancy data stuff. (I didn't see a single pointer here) // Routines tagged on the end of this module: - // AddToOutputVariableList - // AssignReportNumber + // AddDDOutVar // GenOutputVariablesAuditReport // GetCurrentMeterValue // GetInstantMeterValue @@ -127,16 +120,6 @@ namespace OutputProcessor { // Functions - inline void ReallocateRVar(EnergyPlusData &state) - { - state.dataOutputProcessor->RVariableTypes.redimension(state.dataOutputProcessor->MaxRVariable += RVarAllocInc); - } - - inline void ReallocateIVar(EnergyPlusData &state) - { - state.dataOutputProcessor->IVariableTypes.redimension(state.dataOutputProcessor->MaxIVariable += IVarAllocInc); - } - int DetermineMinuteForReporting(EnergyPlusData &state) { @@ -155,88 +138,121 @@ namespace OutputProcessor { void InitializeOutput(EnergyPlusData &state) { - // SUBROUTINE INFORMATION: // AUTHOR Linda K. Lawrie // DATE WRITTEN December 1998 - // MODIFIED na - // RE-ENGINEERED na // PURPOSE OF THIS SUBROUTINE: // This subroutine initializes the OutputProcessor data structures. auto &op = state.dataOutputProcessor; - op->RVariableTypes.allocate(RVarAllocInc); - op->MaxRVariable = RVarAllocInc; - - op->IVariableTypes.allocate(IVarAllocInc); - op->MaxIVariable = IVarAllocInc; - - // First index is the frequency designation (-1 = each call, etc) - // Second index is the variable type (1=Average, 2=Sum) - // Note, Meters always report like Average (with min/max, etc) for hourly and above - // FreqNotice( 1, -1 ) = " !Each Call"; - // FreqNotice( 1, 0 ) = " !TimeStep"; - // FreqNotice( 1, 1 ) = " !Hourly"; - // FreqNotice( 1, 2 ) = " !Daily [Value,Min,Hour,Minute,Max,Hour,Minute]"; - // FreqNotice( 1, 3 ) = " !Monthly [Value,Min,Day,Hour,Minute,Max,Day,Hour,Minute]"; - // FreqNotice( 1, 4 ) = " !RunPeriod [Value,Min,Month,Day,Hour,Minute,Max,Month,Day,Hour,Minute]"; - // FreqNotice( 2, -1 ) = " !Each Call"; - // FreqNotice( 2, 0 ) = " !TimeStep"; - // FreqNotice( 2, 1 ) = " !Hourly"; - // FreqNotice( 2, 2 ) = " !Daily [Value,Min,Hour,Minute,Max,Hour,Minute]"; - // FreqNotice( 2, 3 ) = " !Monthly [Value,Min,Day,Hour,Minute,Max,Day,Hour,Minute]"; - // FreqNotice( 2, 4 ) = " !RunPeriod [Value,Min,Month,Day,Hour,Minute,Max,Month,Day,Hour,Minute]"; - - op->ReportList.allocate(500); - op->NumReportList = 500; - op->ReportList = 0; - op->NumExtraVars = 0; - // Initialize end use category names - the indices must match up with endUseNames in OutputReportTabular - op->EndUseCategory.allocate(static_cast(Constant::EndUse::Num)); - op->EndUseCategory(static_cast(Constant::EndUse::Heating) + 1).Name = "Heating"; - op->EndUseCategory(static_cast(Constant::EndUse::Cooling) + 1).Name = "Cooling"; - op->EndUseCategory(static_cast(Constant::EndUse::InteriorLights) + 1).Name = "InteriorLights"; - op->EndUseCategory(static_cast(Constant::EndUse::ExteriorLights) + 1).Name = "ExteriorLights"; - op->EndUseCategory(static_cast(Constant::EndUse::InteriorEquipment) + 1).Name = "InteriorEquipment"; - op->EndUseCategory(static_cast(Constant::EndUse::ExteriorEquipment) + 1).Name = "ExteriorEquipment"; - op->EndUseCategory(static_cast(Constant::EndUse::Fans) + 1).Name = "Fans"; - op->EndUseCategory(static_cast(Constant::EndUse::Pumps) + 1).Name = "Pumps"; - op->EndUseCategory(static_cast(Constant::EndUse::HeatRejection) + 1).Name = "HeatRejection"; - op->EndUseCategory(static_cast(Constant::EndUse::Humidification) + 1).Name = "Humidifier"; - op->EndUseCategory(static_cast(Constant::EndUse::HeatRecovery) + 1).Name = "HeatRecovery"; - op->EndUseCategory(static_cast(Constant::EndUse::WaterSystem) + 1).Name = "WaterSystems"; - op->EndUseCategory(static_cast(Constant::EndUse::Refrigeration) + 1).Name = "Refrigeration"; - op->EndUseCategory(static_cast(Constant::EndUse::Cogeneration) + 1).Name = "Cogeneration"; + op->EndUseCategory.allocate((int)Constant::EndUse::Num); + op->EndUseCategory((int)Constant::EndUse::Heating + 1).Name = "Heating"; + op->EndUseCategory((int)Constant::EndUse::Cooling + 1).Name = "Cooling"; + op->EndUseCategory((int)Constant::EndUse::InteriorLights + 1).Name = "InteriorLights"; + op->EndUseCategory((int)Constant::EndUse::ExteriorLights + 1).Name = "ExteriorLights"; + op->EndUseCategory((int)Constant::EndUse::InteriorEquipment + 1).Name = "InteriorEquipment"; + op->EndUseCategory((int)Constant::EndUse::ExteriorEquipment + 1).Name = "ExteriorEquipment"; + op->EndUseCategory((int)Constant::EndUse::Fans + 1).Name = "Fans"; + op->EndUseCategory((int)Constant::EndUse::Pumps + 1).Name = "Pumps"; + op->EndUseCategory((int)Constant::EndUse::HeatRejection + 1).Name = "HeatRejection"; + op->EndUseCategory((int)Constant::EndUse::Humidification + 1).Name = "Humidifier"; + op->EndUseCategory((int)Constant::EndUse::HeatRecovery + 1).Name = "HeatRecovery"; + op->EndUseCategory((int)Constant::EndUse::WaterSystem + 1).Name = "WaterSystems"; + op->EndUseCategory((int)Constant::EndUse::Refrigeration + 1).Name = "Refrigeration"; + op->EndUseCategory((int)Constant::EndUse::Cogeneration + 1).Name = "Cogeneration"; // Initialize display names for output table - this could go away if end use key names are changed to match - op->EndUseCategory(static_cast(Constant::EndUse::Heating) + 1).DisplayName = "Heating"; - op->EndUseCategory(static_cast(Constant::EndUse::Cooling) + 1).DisplayName = "Cooling"; - op->EndUseCategory(static_cast(Constant::EndUse::InteriorLights) + 1).DisplayName = "Interior Lighting"; - op->EndUseCategory(static_cast(Constant::EndUse::ExteriorLights) + 1).DisplayName = "Exterior Lighting"; - op->EndUseCategory(static_cast(Constant::EndUse::InteriorEquipment) + 1).DisplayName = "Interior Equipment"; - op->EndUseCategory(static_cast(Constant::EndUse::ExteriorEquipment) + 1).DisplayName = "Exterior Equipment"; - op->EndUseCategory(static_cast(Constant::EndUse::Fans) + 1).DisplayName = "Fans"; - op->EndUseCategory(static_cast(Constant::EndUse::Pumps) + 1).DisplayName = "Pumps"; - op->EndUseCategory(static_cast(Constant::EndUse::HeatRejection) + 1).DisplayName = "Heat Rejection"; - op->EndUseCategory(static_cast(Constant::EndUse::Humidification) + 1).DisplayName = "Humidification"; - op->EndUseCategory(static_cast(Constant::EndUse::HeatRecovery) + 1).DisplayName = "Heat Recovery"; - op->EndUseCategory(static_cast(Constant::EndUse::WaterSystem) + 1).DisplayName = "Water Systems"; - op->EndUseCategory(static_cast(Constant::EndUse::Refrigeration) + 1).DisplayName = "Refrigeration"; - op->EndUseCategory(static_cast(Constant::EndUse::Cogeneration) + 1).DisplayName = "Generators"; + op->EndUseCategory((int)Constant::EndUse::Heating + 1).DisplayName = "Heating"; + op->EndUseCategory((int)Constant::EndUse::Cooling + 1).DisplayName = "Cooling"; + op->EndUseCategory((int)Constant::EndUse::InteriorLights + 1).DisplayName = "Interior Lighting"; + op->EndUseCategory((int)Constant::EndUse::ExteriorLights + 1).DisplayName = "Exterior Lighting"; + op->EndUseCategory((int)Constant::EndUse::InteriorEquipment + 1).DisplayName = "Interior Equipment"; + op->EndUseCategory((int)Constant::EndUse::ExteriorEquipment + 1).DisplayName = "Exterior Equipment"; + op->EndUseCategory((int)Constant::EndUse::Fans + 1).DisplayName = "Fans"; + op->EndUseCategory((int)Constant::EndUse::Pumps + 1).DisplayName = "Pumps"; + op->EndUseCategory((int)Constant::EndUse::HeatRejection + 1).DisplayName = "Heat Rejection"; + op->EndUseCategory((int)Constant::EndUse::Humidification + 1).DisplayName = "Humidification"; + op->EndUseCategory((int)Constant::EndUse::HeatRecovery + 1).DisplayName = "Heat Recovery"; + op->EndUseCategory((int)Constant::EndUse::WaterSystem + 1).DisplayName = "Water Systems"; + op->EndUseCategory((int)Constant::EndUse::Refrigeration + 1).DisplayName = "Refrigeration"; + op->EndUseCategory((int)Constant::EndUse::Cogeneration + 1).DisplayName = "Generators"; op->OutputInitialized = true; op->TimeStepZoneSec = double(state.dataGlobal->MinutesPerTimeStep) * 60.0; state.files.mtd.ensure_open(state, "InitializeMeters", state.files.outputControl.mtd); - } + } // InitializeOutput() + + void addEndUseSubcategory(EnergyPlusData &state, SOVEndUseCat sovEndUseCat, std::string_view const endUseSubName) + { + // SUBROUTINE INFORMATION: + // AUTHOR Peter Graham Ellis + // DATE WRITTEN February 2006 + + // PURPOSE OF THIS SUBROUTINE: + // This subroutine manages the list of subcategories for each end-use category. + + // SUBROUTINE LOCAL VARIABLE DECLARATIONS: + auto &op = state.dataOutputProcessor; + + Constant::EndUse endUse = sovEndUseCat2endUse[(int)sovEndUseCat]; + if (endUse == Constant::EndUse::Invalid) { + ShowSevereError(state, format("Nonexistent end use passed to addEndUseSpaceType={}", sovEndUseCatNames[(int)sovEndUseCat])); + return; + } + + auto &endUseCat = op->EndUseCategory((int)endUse + 1); + + for (int EndUseSubNum = 1; EndUseSubNum <= endUseCat.NumSubcategories; ++EndUseSubNum) { + if (Util::SameString(endUseCat.SubcategoryName(EndUseSubNum), endUseSubName)) { + return; // Subcategory already exists, no further action required + } + } + + // Add the subcategory by reallocating the array + endUseCat.SubcategoryName.redimension(++endUseCat.NumSubcategories); + endUseCat.SubcategoryName(endUseCat.NumSubcategories) = endUseSubName; + + if (endUseCat.NumSubcategories > op->MaxNumSubcategories) { + op->MaxNumSubcategories = endUseCat.NumSubcategories; + } + } // addEndUseSubcategory() + + void addEndUseSpaceType(EnergyPlusData &state, OutputProcessor::SOVEndUseCat sovEndUseCat, std::string_view const EndUseSpaceTypeName) + { + auto &op = state.dataOutputProcessor; + + Constant::EndUse endUse = sovEndUseCat2endUse[(int)sovEndUseCat]; + + if (endUse == Constant::EndUse::Invalid) { + ShowSevereError(state, format("Nonexistent end use passed to addEndUseSpaceType={}", sovEndUseCatNames[(int)sovEndUseCat])); + return; + } + + auto &endUseCat = op->EndUseCategory((int)endUse + 1); + + for (int endUseSpTypeNum = 1; endUseSpTypeNum <= endUseCat.numSpaceTypes; ++endUseSpTypeNum) { + if (Util::SameString(endUseCat.spaceTypeName(endUseSpTypeNum), EndUseSpaceTypeName)) { + return; // SpaceType already exists, no further action required + } + } + + // Add the space type by reallocating the array + endUseCat.spaceTypeName.redimension(++endUseCat.numSpaceTypes); + endUseCat.spaceTypeName(endUseCat.numSpaceTypes) = EndUseSpaceTypeName; + + if (endUseCat.numSpaceTypes > op->maxNumEndUseSpaceTypes) { + op->maxNumEndUseSpaceTypes = endUseCat.numSpaceTypes; + } + } // addEndUseSpaceType() void SetupTimePointers(EnergyPlusData &state, - OutputProcessor::SOVTimeStepType const TimeStepTypeKey, // Which timestep is being set up, 'Zone'=1, 'HVAC'=2 - Real64 &TimeStep // The timestep variable. Used to get the address + SOVTimeStepType const sovTimeStep, // Which timestep is being set up, 'Zone'=1, 'HVAC'=2 + Real64 &TimeStep // The timestep variable. Used to get the address ) { @@ -256,24 +272,20 @@ namespace OutputProcessor { // SUBROUTINE LOCAL VARIABLE DECLARATIONS: // ValidateTimeStepType will throw a Fatal if not valid - TimeStepType timeStepType = ValidateTimeStepType(state, TimeStepTypeKey); + TimeStepType timeStep = sovTimeStep2TimeStep[(int)sovTimeStep]; - TimeSteps tPtr; - tPtr.TimeStep = &TimeStep; - if (!state.dataOutputProcessor->TimeValue.insert(std::make_pair(timeStepType, tPtr)).second) { - // The element was already present... shouldn't happen - ShowFatalError(state, format("SetupTimePointers was already called for {}", sovTimeStepTypeStrings[(int)TimeStepTypeKey])); + if (state.dataOutputProcessor->TimeValue[(int)timeStep].TimeStep != nullptr) { + ShowFatalError(state, format("SetupTimePointers was already called for {}", sovTimeStepTypeStrings[(int)sovTimeStep])); } + state.dataOutputProcessor->TimeValue[(int)timeStep].TimeStep = &TimeStep; } - void CheckReportVariable(EnergyPlusData &state, std::string_view const KeyedValue, std::string_view const VarName) + void CheckReportVariable(EnergyPlusData &state, std::string_view const Name, std::string const &Key, std::vector &reqVarList) { // SUBROUTINE INFORMATION: // AUTHOR Linda K. Lawrie // DATE WRITTEN December 1998 - // MODIFIED na - // RE-ENGINEERED na // PURPOSE OF THIS SUBROUTINE: // This subroutine will get the report variable information from input and @@ -302,117 +314,52 @@ namespace OutputProcessor { auto &op = state.dataOutputProcessor; - // Zero out the array / counter we use to determine if there are duplicates - op->NumExtraVars = 0; - op->ReportList = 0; + for (int iReqVar = 0; iReqVar < (int)op->reqVars.size(); ++iReqVar) { + auto *reqVar = op->reqVars[iReqVar]; - for (int i = 1; i <= op->NumOfReqVariables; ++i) { - auto &reqRepVar = op->ReqRepVars(i); - - if (!Util::SameString(reqRepVar.VarName, VarName)) { + if (!Util::SameString(reqVar->name, Name)) { continue; } - if (!reqRepVar.Key.empty() && !(reqRepVar.is_simple_string && Util::SameString(reqRepVar.Key, KeyedValue)) && - !(!reqRepVar.is_simple_string && RE2::FullMatch(std::string{KeyedValue}, *(reqRepVar.case_insensitive_pattern)))) { + if (!reqVar->key.empty() && !(reqVar->is_simple_string && Util::SameString(reqVar->key, Key)) && + !(!reqVar->is_simple_string && RE2::FullMatch(std::string{Key}, *(reqVar->case_insensitive_pattern)))) { continue; } // A match. Make sure doesn't duplicate - reqRepVar.Used = true; + reqVar->Used = true; bool Dup = false; - // op->ReportList is allocated to a large value, so we can't use a std::find_if on it - for (int Loop1 = 1; Loop1 <= op->NumExtraVars; ++Loop1) { - if (op->ReqRepVars(op->ReportList(Loop1)).frequency == reqRepVar.frequency && - op->ReqRepVars(op->ReportList(Loop1)).SchedPtr == reqRepVar.SchedPtr) { + // op->ReportList is allocated to a large value, so we can't use a std::find_if on it (why not?) + for (int iReqVar2 : reqVarList) { + if (op->reqVars[iReqVar2]->freq == reqVar->freq && op->reqVars[iReqVar2]->SchedPtr == reqVar->SchedPtr) { Dup = true; break; } } if (!Dup) { - ++op->NumExtraVars; - if (op->NumExtraVars == op->NumReportList) { - op->ReportList.redimension(op->NumReportList += 100, 0); - } - op->ReportList(op->NumExtraVars) = i; + reqVarList.push_back(iReqVar); } } } - static std::string frequencyNotice([[maybe_unused]] StoreType storeType, ReportingFrequency reportingInterval) - { - switch (reportingInterval) { - case ReportingFrequency::EachCall: - return " !Each Call"; - break; - case ReportingFrequency::TimeStep: - return " !TimeStep"; - break; - case ReportingFrequency::Hourly: - return " !Hourly"; - break; - case ReportingFrequency::Daily: - return " !Daily [Value,Min,Hour,Minute,Max,Hour,Minute]"; - break; - case ReportingFrequency::Monthly: - return " !Monthly [Value,Min,Day,Hour,Minute,Max,Day,Hour,Minute]"; - break; - case ReportingFrequency::Yearly: - return " !Annual [Value,Min,Month,Day,Hour,Minute,Max,Month,Day,Hour,Minute]"; - break; - case ReportingFrequency::Simulation: - return " !RunPeriod [Value,Min,Month,Day,Hour,Minute,Max,Month,Day,Hour,Minute]"; - break; - default: - return " !Hourly"; - } - } - - std::string reportingFrequency(ReportingFrequency reportingInterval) - { - switch (reportingInterval) { - case ReportingFrequency::EachCall: - return "Each Call"; - break; - case ReportingFrequency::TimeStep: - return "TimeStep"; - break; - case ReportingFrequency::Hourly: - return "Hourly"; - break; - case ReportingFrequency::Daily: - return "Daily"; - break; - case ReportingFrequency::Monthly: - return "Monthly"; - break; - case ReportingFrequency::Yearly: - return "Annual"; - break; - case ReportingFrequency::Simulation: - return "RunPeriod"; - break; - default: - return "Hourly"; - } - } + constexpr std::array reportingFrequencyNoticeStrings = { + " !Each Call", // EachCall + " !TimeStep", // TimeStep + " !Hourly", // Hourly + " !Daily [Value,Min,Hour,Minute,Max,Hour,Minute]", // Daily + " !Monthly [Value,Min,Day,Hour,Minute,Max,Day,Hour,Minute]", // Monthly + " !RunPeriod [Value,Min,Month,Day,Hour,Minute,Max,Month,Day,Hour,Minute]", // Simulation + " !Annual [Value,Min,Month,Day,Hour,Minute,Max,Month,Day,Hour,Minute]" // Yearly + }; - ReportingFrequency determineFrequency(EnergyPlusData &state, const std::string_view FreqString) + ReportFreq determineFrequency(EnergyPlusData &state, const std::string_view FreqString) { // SUBROUTINE INFORMATION: // AUTHOR Linda K. Lawrie // DATE WRITTEN December 1998 // MODIFIED December 2017; Jason DeGraw - // RE-ENGINEERED na - - // PURPOSE OF THIS SUBROUTINE: - // This subroutine looks at the passed in report frequency string and - // determines the reporting frequency. - - // METHODOLOGY EMPLOYED: - // na // REFERENCES: // \field Reporting Frequency @@ -431,56 +378,45 @@ namespace OutputProcessor { // \default Hourly // \note RunPeriod and Environment are synonymous - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - // SUBROUTINE PARAMETER DEFINITIONS: - static std::vector const PossibleFreqs({"DETA", "TIME", "HOUR", "DAIL", "MONT", "RUNP", "ENVI", "ANNU"}); + static constexpr std::array PossibleFreqs = { + "DETA", "TIME", "HOUR", "DAIL", "MONT", "RUNP", "ENVI", "ANNU"}; //=(/'detail','Timestep','Hourly','Daily','Monthly','RunPeriod','Environment','Annual'/) - static std::vector const ExactFreqStrings( - {"Detailed", "Timestep", "Hourly", "Daily", "Monthly", "RunPeriod", "Environment", "Annual"}); - static std::vector const ExactFreqStringsUpper( - {"DETAILED", "TIMESTEP", "HOURLY", "DAILY", "MONTHLY", "RUNPERIOD", "ENVIRONMENT", "ANNUAL"}); + static constexpr std::array ExactFreqStrings = { + "Detailed", "Timestep", "Hourly", "Daily", "Monthly", "RunPeriod", "Environment", "Annual"}; + static constexpr std::array ExactFreqStringsUC = { + "DETAILED", "TIMESTEP", "HOURLY", "DAILY", "MONTHLY", "RUNPERIOD", "ENVIRONMENT", "ANNUAL"}; // Vector of the result, was { -1, 0, 1, 2, 3, 4, 4, 4 } before the addition of Yearly; - static std::vector const FreqValues({ReportingFrequency::EachCall, - ReportingFrequency::TimeStep, - ReportingFrequency::Hourly, - ReportingFrequency::Daily, - ReportingFrequency::Monthly, - ReportingFrequency::Simulation, - ReportingFrequency::Simulation, - ReportingFrequency::Yearly}); - // note: runperiod and environment are synonomous - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - - ReportingFrequency ReportFreq(ReportingFrequency::Hourly); // Default + static constexpr std::array FreqValues = {ReportFreq::EachCall, + ReportFreq::TimeStep, + ReportFreq::Hour, + ReportFreq::Day, + ReportFreq::Month, + ReportFreq::Simulation, + ReportFreq::Simulation, + ReportFreq::Year}; + + ReportFreq freq = ReportFreq::Hour; // Default // TODO: I think it's supposed to be upper case already, but tests aren't doing that at least... const std::string FreqStringUpper = Util::makeUPPER(FreqString); std::string::size_type const LenString = min(len(FreqString), static_cast(4u)); if (LenString < 4u) { - return ReportFreq; + return freq; } std::string const FreqStringTrim(FreqStringUpper.substr(0, LenString)); for (unsigned Loop = 0; Loop < FreqValues.size(); ++Loop) { if (FreqStringTrim == PossibleFreqs[Loop]) { - if (FreqStringUpper != ExactFreqStringsUpper[Loop]) { + if (FreqStringUpper != ExactFreqStringsUC[Loop]) { ShowWarningError(state, format("DetermineFrequency: Entered frequency=\"{}\" is not an exact match to key strings.", FreqString)); ShowContinueError(state, format("Frequency={} will be used.", ExactFreqStrings[Loop])); } - ReportFreq = std::max(FreqValues[Loop], state.dataOutputProcessor->minimumReportFrequency); + freq = std::max(FreqValues[Loop], state.dataOutputProcessor->minimumReportFreq); break; } } - return ReportFreq; + return freq; } void GetReportVariableInput(EnergyPlusData &state) @@ -490,7 +426,6 @@ namespace OutputProcessor { // AUTHOR Linda K. Lawrie // DATE WRITTEN December 1998 // MODIFIED December 2017; Jason DeGraw - // RE-ENGINEERED na // PURPOSE OF THIS SUBROUTINE: // This subroutine gets the requested report variables from @@ -513,11 +448,11 @@ namespace OutputProcessor { // \type object-list // \object-list ScheduleNames + constexpr std::string_view routineName = "GetReportVariableInput"; // Using/Aliasing using ScheduleManager::GetScheduleIndex; // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int Loop; int NumAlpha; int NumNumbers; int IOStat; @@ -525,10 +460,10 @@ namespace OutputProcessor { std::string cCurrentModuleObject; Array1D_string cAlphaArgs(4); Array1D_string cAlphaFieldNames(4); - Array1D_bool lAlphaFieldBlanks(4); + Array1D_bool lAlphaBlanks(4); Array1D rNumericArgs(1); Array1D_string cNumericFieldNames(1); - Array1D_bool lNumericFieldBlanks(1); + Array1D_bool lNumericBlanks(1); auto &op = state.dataOutputProcessor; // Bail out if the input has already been read in @@ -542,17 +477,15 @@ namespace OutputProcessor { // Formats static constexpr std::string_view Format_800("! , Value, Input Value\n"); static constexpr std::string_view Format_801(" Minimum Reporting Frequency, {},{}\n"); - op->minimumReportFrequency = determineFrequency(state, state.dataSysVars->MinReportFrequency); + op->minimumReportFreq = determineFrequency(state, state.dataSysVars->MinReportFrequency); print(state.files.eio, Format_800); - print( - state.files.eio, Format_801, frequencyNotice(StoreType::Averaged, op->minimumReportFrequency), state.dataSysVars->MinReportFrequency); + print(state.files.eio, Format_801, reportingFrequencyNoticeStrings[(int)op->minimumReportFreq], state.dataSysVars->MinReportFrequency); } cCurrentModuleObject = "Output:Variable"; - op->NumOfReqVariables = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject); - op->ReqRepVars.allocate(op->NumOfReqVariables); + int numReqVariables = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject); - for (Loop = 1; Loop <= op->NumOfReqVariables; ++Loop) { + for (int Loop = 1; Loop <= numReqVariables; ++Loop) { state.dataInputProcessing->inputProcessor->getObjectItem(state, cCurrentModuleObject, @@ -562,22 +495,26 @@ namespace OutputProcessor { rNumericArgs, NumNumbers, IOStat, - lNumericFieldBlanks, - lAlphaFieldBlanks, + lNumericBlanks, + lAlphaBlanks, cAlphaFieldNames, cNumericFieldNames); + ErrorObjectHeader eoh{routineName, cCurrentModuleObject, cAlphaArgs(1)}; + // Check for duplicates? - auto &reqRepVar = op->ReqRepVars(Loop); - reqRepVar.Key = cAlphaArgs(1); - if (reqRepVar.Key == "*") { - reqRepVar.Key = std::string(); + ReqVar *reqVar = new ReqVar(); + op->reqVars.push_back(reqVar); + + reqVar->key = cAlphaArgs(1); + if (reqVar->key == "*") { + reqVar->key = std::string(); } - bool is_simple_string = !DataOutputs::isKeyRegexLike(reqRepVar.Key); - reqRepVar.is_simple_string = is_simple_string; + bool is_simple_string = !DataOutputs::isKeyRegexLike(reqVar->key); + reqVar->is_simple_string = is_simple_string; if (!is_simple_string) { - reqRepVar.case_insensitive_pattern = std::make_shared("(?i)" + reqRepVar.Key); + reqVar->case_insensitive_pattern = std::make_shared("(?i)" + reqVar->key); } std::string::size_type const lbpos = index(cAlphaArgs(2), '['); // Remove Units designation if user put it in @@ -586,29 +523,23 @@ namespace OutputProcessor { // right trim cAlphaArgs(2) = cAlphaArgs(2).substr(0, std::min(cAlphaArgs(2).find_last_not_of(" \f\n\r\t\v") + 1, cAlphaArgs(2).size())); } - reqRepVar.VarName = cAlphaArgs(2); + reqVar->name = cAlphaArgs(2); - reqRepVar.frequency = determineFrequency(state, cAlphaArgs(3)); + reqVar->freq = determineFrequency(state, Util::makeUPPER(cAlphaArgs(3))); + if (reqVar->freq == ReportFreq::Invalid) { + ShowSevereInvalidKey(state, eoh, cAlphaFieldNames(3), cAlphaArgs(3)); + ErrorsFound = true; + } // Schedule information - reqRepVar.SchedName = cAlphaArgs(4); - if (not_blank(reqRepVar.SchedName)) { - reqRepVar.SchedPtr = GetScheduleIndex(state, reqRepVar.SchedName); - if (reqRepVar.SchedPtr == 0) { - ShowSevereError(state, - format("GetReportVariableInput: {}=\"{}:{}\" invalid {}=\"{}\" - not found.", - cCurrentModuleObject, - cAlphaArgs(1), - reqRepVar.VarName, - cAlphaFieldNames(4), - reqRepVar.SchedName)); - ErrorsFound = true; - } - } else { - reqRepVar.SchedPtr = 0; + if (lAlphaBlanks(4)) { + reqVar->SchedPtr = 0; + } else if ((reqVar->SchedPtr = GetScheduleIndex(state, Util::makeUPPER(cAlphaArgs(4)))) == 0) { + ShowSevereItemNotFound(state, eoh, cAlphaFieldNames(4), cAlphaArgs(4)); + ErrorsFound = true; } - reqRepVar.Used = false; + reqVar->Used = false; } if (ErrorsFound) { @@ -616,17 +547,15 @@ namespace OutputProcessor { } } - void ProduceMinMaxString(std::string &String, // Current value - int const DateValue, // Date of min/max - ReportingFrequency const ReportFreq // Reporting Frequency + void ProduceMinMaxString(std::string &String, // Current value + int const DateValue, // Date of min/max + ReportFreq const ReportFreq // Reporting Frequency ) { // SUBROUTINE INFORMATION: // AUTHOR Linda K. Lawrie // DATE WRITTEN December 1998 - // MODIFIED na - // RE-ENGINEERED na // PURPOSE OF THIS SUBROUTINE: // This subroutine produces the appropriate min/max string depending @@ -649,14 +578,14 @@ namespace OutputProcessor { General::DecodeMonDayHrMin(DateValue, Mon, Day, Hour, Minute); switch (ReportFreq) { - case ReportingFrequency::Daily: + case ReportFreq::Day: String = format(DayFormat, strip(String), Hour, Minute); return; - case ReportingFrequency::Monthly: + case ReportFreq::Month: String = format(MonthFormat, strip(String), Day, Hour, Minute); return; - case ReportingFrequency::Yearly: - case ReportingFrequency::Simulation: + case ReportFreq::Year: + case ReportFreq::Simulation: String = format(EnvrnFormat, strip(String), Mon, Day, Hour, Minute); return; default: // Each, TimeStep, Hourly dont have this @@ -665,116 +594,6 @@ namespace OutputProcessor { } } - TimeStepType ValidateTimeStepType(EnergyPlusData &state, - OutputProcessor::SOVTimeStepType const TimeStepTypeKey) // Index type (Zone, HVAC) for variables - { - - // FUNCTION INFORMATION: - // AUTHOR Linda K. Lawrie - // DATE WRITTEN December 1998 - // MODIFIED na - // RE-ENGINEERED na - - // PURPOSE OF THIS FUNCTION: - // This function validates the requested "index" type and returns - // the proper value for use inside the OutputProcessor. - - // METHODOLOGY EMPLOYED: - // Look it up in a list of valid index types. - switch (TimeStepTypeKey) { - case OutputProcessor::SOVTimeStepType::Zone: - return TimeStepType::Zone; - case OutputProcessor::SOVTimeStepType::HVAC: - case OutputProcessor::SOVTimeStepType::System: - case OutputProcessor::SOVTimeStepType::Plant: - return TimeStepType::System; - case OutputProcessor::SOVTimeStepType::Invalid: - case OutputProcessor::SOVTimeStepType::Num: - ShowFatalError(state, "Bad SOVTimeStepType passed to ValidateTimeStepType"); - } - return TimeStepType::System; // compiler doesn't understand that ShowFatalError aborts - } - - std::string StandardTimeStepTypeKey(TimeStepType const timeStepType) - { - - // FUNCTION INFORMATION: - // AUTHOR Linda K. Lawrie - // DATE WRITTEN December 1998 - // MODIFIED na - // RE-ENGINEERED na - - // PURPOSE OF THIS FUNCTION: - // This function gives the standard string for the index type - // given. - - // METHODOLOGY EMPLOYED: - // Look it up in a list of valid index types. - - if (timeStepType == TimeStepType::Zone) { - return "Zone"; - } else if (timeStepType == TimeStepType::System) { - return "HVAC"; - } else { - return "UNKW"; - } - } - - StoreType validateVariableType(EnergyPlusData &state, OutputProcessor::SOVStoreType const VariableTypeKey) - { - - // FUNCTION INFORMATION: - // AUTHOR Linda K. Lawrie - // DATE WRITTEN December 1998 - // MODIFIED December 2017; Jason DeGraw - // RE-ENGINEERED na - - // PURPOSE OF THIS FUNCTION: - // This function validates the VariableTypeKey passed to the SetupVariable - // routine and assigns it the value used in the OutputProcessor. - - // FUNCTION LOCAL VARIABLE DECLARATIONS: - switch (VariableTypeKey) { - case OutputProcessor::SOVStoreType::State: - case OutputProcessor::SOVStoreType::Average: - return StoreType::Averaged; - case OutputProcessor::SOVStoreType::NonState: - case OutputProcessor::SOVStoreType::Summed: - return StoreType::Summed; - case OutputProcessor::SOVStoreType::Invalid: - case OutputProcessor::SOVStoreType::Num: - ShowFatalError(state, "Bad SOVStoreType passed to validateVariableType"); - } - return StoreType::Summed; // compiler doesn't understand that ShowFatalError aborts - } - - std::string standardVariableTypeKey(StoreType const VariableType) - { - - // FUNCTION INFORMATION: - // AUTHOR Linda K. Lawrie - // DATE WRITTEN July 1999 - // MODIFIED December 2017; Jason DeGraw - // RE-ENGINEERED na - - // PURPOSE OF THIS FUNCTION: - // This function gives the standard string for the variable type - // given. - - // METHODOLOGY EMPLOYED: - // From variable type value, produce proper string. - - // TODO: Use a constexpr std::array + constexpr std::string_view routineName = "GetCustomMeterInput"; + // SUBROUTINE LOCAL VARIABLE DECLARATIONS: auto &op = state.dataOutputProcessor; + auto &ip = state.dataInputProcessing->inputProcessor; + auto &ipsc = state.dataIPShortCut; + int NumAlpha; int NumNumbers; - int Loop; int IOStat; - int NumCustomMeters; - int NumCustomDecMeters; - int fldIndex; - bool KeyIsStar; - Array1D_string NamesOfKeys; // Specific key name - Array1D_int IndexesForKeyVar; // Array index - OutputProcessor::Unit UnitsVar(OutputProcessor::Unit::None); // Units enumeration - OutputProcessor::Unit MeterUnits(OutputProcessor::Unit::None); // Units enumeration - int KeyCount; - VariableType TypeVar; - OutputProcessor::StoreType AvgSumVar; - OutputProcessor::TimeStepType StepTypeVar; - int iKey; - int iKey1; - bool MeterCreated; - Array1D_int VarsOnCustomMeter; - int MaxVarsOnCustomMeter; - int NumVarsOnCustomMeter; + Array1D_string NamesOfKeys; // Specific key name + Array1D_int IndexesForKeyVar; // Array index + + std::vector onCustomMeterVarNums; Array1D_int VarsOnSourceMeter; - int MaxVarsOnSourceMeter; - int NumVarsOnSourceMeter; - int iOnMeter; - int WhichMeter; - bool errFlag; bool BigErrorsFound; - bool testa; - bool testb; - bool Tagged; // variable is appropriate to put on meter - std::string::size_type lbrackPos; BigErrorsFound = false; - auto &cCurrentModuleObject = state.dataIPShortCut->cCurrentModuleObject; - - cCurrentModuleObject = "Meter:Custom"; - NumCustomMeters = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject); - - // make list of names for all Meter:Custom since they cannot refer to other Meter:Custom's - std::unordered_set namesOfMeterCustom; - namesOfMeterCustom.reserve(NumCustomMeters); - for (Loop = 1; Loop <= NumCustomMeters; ++Loop) { - state.dataInputProcessing->inputProcessor->getObjectItem(state, - cCurrentModuleObject, - Loop, - state.dataIPShortCut->cAlphaArgs, - NumAlpha, - state.dataIPShortCut->rNumericArgs, - NumNumbers, - IOStat, - state.dataIPShortCut->lNumericFieldBlanks, - state.dataIPShortCut->lAlphaFieldBlanks, - state.dataIPShortCut->cAlphaFieldNames, - state.dataIPShortCut->cNumericFieldNames); - namesOfMeterCustom.emplace(Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(1))); - } - - for (Loop = 1; Loop <= NumCustomMeters; ++Loop) { - state.dataInputProcessing->inputProcessor->getObjectItem(state, - cCurrentModuleObject, - Loop, - state.dataIPShortCut->cAlphaArgs, - NumAlpha, - state.dataIPShortCut->rNumericArgs, - NumNumbers, - IOStat, - state.dataIPShortCut->lNumericFieldBlanks, - state.dataIPShortCut->lAlphaFieldBlanks, - state.dataIPShortCut->cAlphaFieldNames, - state.dataIPShortCut->cNumericFieldNames); - lbrackPos = index(state.dataIPShortCut->cAlphaArgs(1), '['); - if (lbrackPos != std::string::npos) state.dataIPShortCut->cAlphaArgs(1).erase(lbrackPos); - MeterCreated = false; - if (GlobalNames::VerifyUniqueInterObjectName(state, - op->UniqueMeterNames, - state.dataIPShortCut->cAlphaArgs(1), - cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(1), - ErrorsFound)) { + int numCustomMeters = 0, numCustomDecMeters = 0; + std::vector customMeterNames; + std::vector customDecMeterNames; + if (auto const found = ip->epJSON.find("Meter:Custom"); found != ip->epJSON.end()) { + for (auto meterInstance = found.value().begin(); meterInstance != found.value().end(); ++meterInstance, ++numCustomMeters) + customMeterNames.push_back(Util::makeUPPER(meterInstance.key())); + } + + if (auto const found = ip->epJSON.find("Meter:CustomDecrement"); found != ip->epJSON.end()) { + for (auto meterInstance = found.value().begin(); meterInstance != found.value().end(); ++meterInstance, ++numCustomDecMeters) + customDecMeterNames.push_back(Util::makeUPPER(meterInstance.key())); + } + + ipsc->cCurrentModuleObject = "Meter:Custom"; + for (int Loop = 1; Loop <= numCustomMeters; ++Loop) { + ip->getObjectItem(state, + ipsc->cCurrentModuleObject, + Loop, + ipsc->cAlphaArgs, + NumAlpha, + ipsc->rNumericArgs, + NumNumbers, + IOStat, + ipsc->lNumericFieldBlanks, + ipsc->lAlphaFieldBlanks, + ipsc->cAlphaFieldNames, + ipsc->cNumericFieldNames); + + ErrorObjectHeader eoh{routineName, ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1)}; + + std::string meterName = ipsc->cAlphaArgs(1); + std::string::size_type lbrackPos = index(meterName, '['); + if (lbrackPos != std::string::npos) meterName.erase(lbrackPos); + + std::string meterNameUC = Util::makeUPPER(meterName); + + // Check for duplicate name + if (op->meterMap.find(meterNameUC) != op->meterMap.end()) { + ShowSevereDuplicateName(state, eoh); + ErrorsFound = true; continue; } - if (allocated(VarsOnCustomMeter)) VarsOnCustomMeter.deallocate(); - VarsOnCustomMeter.allocate(1000); - VarsOnCustomMeter = 0; - MaxVarsOnCustomMeter = 1000; - NumVarsOnCustomMeter = 0; - // check if any fields reference another Meter:Custom - int found = 0; - for (fldIndex = 4; fldIndex <= NumAlpha; fldIndex += 2) { - if (namesOfMeterCustom.find(Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(fldIndex))) != namesOfMeterCustom.end()) { - found = fldIndex; - break; - } - } - if (found != 0) { - ShowWarningError(state, - format("{}=\"{}\", contains a reference to another {} in field: {}=\"{}\".", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(found), - state.dataIPShortCut->cAlphaArgs(found))); + + // Check for invalid resource + Constant::eResource resource = + static_cast(getEnumValue(Constant::eResourceNamesUC, Util::makeUPPER(ipsc->cAlphaArgs(2)))); + if (resource == Constant::eResource::Invalid) { + ShowSevereInvalidKey(state, eoh, ipsc->cAlphaFieldNames(2), ipsc->cAlphaArgs(2)); + ErrorsFound = true; continue; } - for (fldIndex = 3; fldIndex <= NumAlpha; fldIndex += 2) { - if (state.dataIPShortCut->cAlphaArgs(fldIndex) == "*" || state.dataIPShortCut->lAlphaFieldBlanks(fldIndex)) { - KeyIsStar = true; - state.dataIPShortCut->cAlphaArgs(fldIndex) = "*"; - } else { - KeyIsStar = false; + Constant::Units units = Constant::Units::Invalid; + + // We essentially have to do this loop twice, once to + // check for errors and once to construct the meter. The + // reason is that meters are cross-linked with source + // meters and variables and those back-links will be + // tricky to undo later. + bool foundBadSrc = false; + bool itemsAssigned = false; + + for (int fldIndex = 3; fldIndex <= NumAlpha; fldIndex += 2) { + if (ipsc->lAlphaFieldBlanks(fldIndex + 1)) { + ShowSevereEmptyField(state, eoh, ipsc->cAlphaFieldNames(fldIndex + 1)); + foundBadSrc = true; + break; } - if (state.dataIPShortCut->lAlphaFieldBlanks(fldIndex + 1)) { - ShowSevereError(state, - format("{}=\"{}\", blank {}.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(fldIndex + 1))); - ShowContinueError(state, "...cannot create custom meter."); - BigErrorsFound = true; - continue; + + std::string meterOrVarNameUC = Util::makeUPPER(ipsc->cAlphaArgs(fldIndex + 1)); + std::string::size_type lbrackPos = index(meterOrVarNameUC, '['); + if (lbrackPos != std::string::npos) meterOrVarNameUC.erase(lbrackPos); + + // A custom meter cannot reference another custom meter + if (std::find(customMeterNames.begin(), customMeterNames.end(), meterOrVarNameUC) != customMeterNames.end()) { + ShowWarningError(state, + format(R"(Meter:Custom="{}", contains a reference to another Meter:Custom in field: {}="{}".)", + ipsc->cAlphaArgs(1), + ipsc->cAlphaFieldNames(fldIndex + 1), + ipsc->cAlphaArgs(fldIndex + 1))); + foundBadSrc = true; + break; } - if (BigErrorsFound) continue; - // Don't build/check things out if there were errors anywhere. Use "GetVariableKeys" to map to actual variables... - lbrackPos = index(state.dataIPShortCut->cAlphaArgs(fldIndex + 1), '['); - if (lbrackPos != std::string::npos) state.dataIPShortCut->cAlphaArgs(fldIndex + 1).erase(lbrackPos); - Tagged = false; - GetVariableKeyCountandType( - state, state.dataIPShortCut->cAlphaArgs(fldIndex + 1), KeyCount, TypeVar, AvgSumVar, StepTypeVar, UnitsVar); - if (TypeVar == VariableType::NotFound) { + + // A custom meter cannot reference another customDec meter + if (std::find(customDecMeterNames.begin(), customDecMeterNames.end(), meterOrVarNameUC) != customDecMeterNames.end()) { ShowWarningError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(fldIndex + 1), - state.dataIPShortCut->cAlphaArgs(fldIndex + 1))); - ShowContinueError(state, "...will not be shown with the Meter results."); - continue; + format(R"(Meter:Custom="{}", contains a reference to another Meter:CustomDecrement in field: {}="{}".)", + ipsc->cAlphaArgs(1), + ipsc->cAlphaFieldNames(fldIndex + 1), + ipsc->cAlphaArgs(fldIndex + 1))); + foundBadSrc = true; + break; } - if (!MeterCreated) { - MeterUnits = UnitsVar; // meter units are same as first variable on custom meter - AddMeter(state, state.dataIPShortCut->cAlphaArgs(1), UnitsVar, std::string(), std::string(), std::string(), std::string()); - op->EnergyMeters(op->NumEnergyMeters).TypeOfMeter = MtrType::Custom; - // Can't use resource type in AddMeter cause it will confuse it with other meters. So, now: - GetStandardMeterResourceType( - state, op->EnergyMeters(op->NumEnergyMeters).ResourceType, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(2)), errFlag); - if (errFlag) { - ShowContinueError(state, format("..on {}=\"{}\".", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - BigErrorsFound = true; + + if (auto foundSrcMeter = op->meterMap.find(meterOrVarNameUC); foundSrcMeter != op->meterMap.end()) { + int srcMeterNum = foundSrcMeter->second; + auto *srcMeter = op->meters[srcMeterNum]; + assert(srcMeter->type == MeterType::Normal); + + // If it's the first meter, it gets to set the units + if (units == Constant::Units::Invalid) { + units = srcMeter->units; + itemsAssigned = true; + } else if (units != srcMeter->units) { + ShowWarningCustomMessage(state, + eoh, + format(R"(Meter:Custom="{}", differing units in {}="{}".)", + ipsc->cAlphaArgs(1), + ipsc->cAlphaFieldNames(fldIndex + 1), + meterOrVarNameUC)); + ShowContinueError(state, + format("...will not be shown with the Meter results; units for meter={}, units for this variable={}.", + Constant::unitNames[(int)units], + Constant::unitNames[(int)srcMeter->units])); + foundBadSrc = true; + break; + } + + // It's a variable + } else if (auto foundSrcDDVar = op->ddOutVarMap.find(meterOrVarNameUC); foundSrcDDVar != op->ddOutVarMap.end()) { + int srcDDVarNum = foundSrcDDVar->second; + auto *srcDDVar = op->ddOutVars[srcDDVarNum]; + + // Has to be a summed variable + if (srcDDVar->storeType != StoreType::Summed) { + ShowWarningCustomMessage(state, + eoh, + format(R"(Meter:Custom="{}", variable not summed variable {}="{}".)", + ipsc->cAlphaArgs(1), + ipsc->cAlphaFieldNames(fldIndex + 1), + meterOrVarNameUC)); + ShowContinueError(state, + format("...will not be shown with the Meter results; units for meter={}, units for this variable={}.", + Constant::unitNames[(int)units], + Constant::unitNames[(int)srcDDVar->units])); + foundBadSrc = true; + break; } - DetermineMeterIPUnits(state, - op->EnergyMeters(op->NumEnergyMeters).RT_forIPUnits, - op->EnergyMeters(op->NumEnergyMeters).ResourceType, - UnitsVar, - errFlag); - if (errFlag) { - ShowContinueError(state, format("..on {}=\"{}\".", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, "..requests for IP units from this meter will be ignored."); + + // If it's the first variable, it gets to set the units + if (units == Constant::Units::Invalid) { + units = srcDDVar->units; + // Otherwise it has to match the existing units + } else if (units != srcDDVar->units) { + ShowWarningCustomMessage( + state, eoh, format("differing units in {}=\"{}\".", ipsc->cAlphaFieldNames(fldIndex + 1), meterOrVarNameUC)); + ShowContinueError(state, + format("...will not be shown with the Meter results; units for meter={}, units for this variable={}.", + Constant::unitNames[(int)units], + Constant::unitNames[(int)srcDDVar->units])); + foundBadSrc = true; + break; } - // EnergyMeters(NumEnergyMeters)%RT_forIPUnits=DetermineMeterIPUnits(EnergyMeters(NumEnergyMeters)%ResourceType,UnitsVar) - MeterCreated = true; - } - if (UnitsVar != MeterUnits) { - ShowWarningError(state, - format("{}=\"{}\", differing units in {}=\"{}\".", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(fldIndex + 1), - state.dataIPShortCut->cAlphaArgs(fldIndex + 1))); - ShowContinueError(state, - format("...will not be shown with the Meter results; units for meter={}, units for this variable={}.", - unitEnumToString(MeterUnits), - unitEnumToString(UnitsVar))); - continue; - } - if ((TypeVar == VariableType::Real || TypeVar == VariableType::Integer) && AvgSumVar == StoreType::Summed) { - Tagged = true; - NamesOfKeys.allocate(KeyCount); - IndexesForKeyVar.allocate(KeyCount); - GetVariableKeys(state, state.dataIPShortCut->cAlphaArgs(fldIndex + 1), TypeVar, NamesOfKeys, IndexesForKeyVar); - iOnMeter = 0; + + bool KeyIsStar = (ipsc->cAlphaArgs(fldIndex) == "*" || ipsc->lAlphaFieldBlanks(fldIndex)); + // Have already checked for mismatching units between meter and source variable and assigned units if (KeyIsStar) { - for (iKey = 1; iKey <= KeyCount; ++iKey) { - ++NumVarsOnCustomMeter; - if (NumVarsOnCustomMeter > MaxVarsOnCustomMeter) { - VarsOnCustomMeter.redimension(MaxVarsOnCustomMeter += 100, 0); - } - VarsOnCustomMeter(NumVarsOnCustomMeter) = IndexesForKeyVar(iKey); - iOnMeter = 1; - } - if (iOnMeter == 0) { - ShowSevereError(state, - format("{}=\"{}\", invalid (all keys) {}=\"{}\".", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(fldIndex + 1), - state.dataIPShortCut->cAlphaArgs(fldIndex + 1))); - ErrorsFound = true; + if (srcDDVar->keyOutVarNums.empty()) { + ShowSevereInvalidKey(state, eoh, ipsc->cAlphaFieldNames(fldIndex + 1), meterOrVarNameUC); + foundBadSrc = true; + break; } + + itemsAssigned = true; } else { // Key is not "*" - for (iKey = 1; iKey <= KeyCount; ++iKey) { - if (NamesOfKeys(iKey) != state.dataIPShortCut->cAlphaArgs(fldIndex)) continue; - ++NumVarsOnCustomMeter; - if (NumVarsOnCustomMeter > MaxVarsOnCustomMeter) { - VarsOnCustomMeter.redimension(MaxVarsOnCustomMeter += 100, 0); + bool foundKey = false; + for (int keyOutVarNum : srcDDVar->keyOutVarNums) { + if (op->outVars[keyOutVarNum]->keyUC == ipsc->cAlphaArgs(fldIndex)) { + foundKey = true; + itemsAssigned = true; + break; } - VarsOnCustomMeter(NumVarsOnCustomMeter) = IndexesForKeyVar(iKey); - iOnMeter = 1; } - if (iOnMeter == 0) { - ShowSevereError(state, - format("{}=\"{}\", invalid {}:{}", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(fldIndex), - state.dataIPShortCut->cAlphaArgs(fldIndex + 1))); - ErrorsFound = true; + if (!foundKey) { + ShowSevereInvalidKey(state, eoh, ipsc->cAlphaFieldNames(fldIndex + 1), meterOrVarNameUC); + foundBadSrc = true; + break; } - } - NamesOfKeys.deallocate(); - IndexesForKeyVar.deallocate(); - } - if (TypeVar == VariableType::Meter && AvgSumVar == StoreType::Summed) { - Tagged = true; - NamesOfKeys.allocate(KeyCount); - IndexesForKeyVar.allocate(KeyCount); - GetVariableKeys(state, state.dataIPShortCut->cAlphaArgs(fldIndex + 1), TypeVar, NamesOfKeys, IndexesForKeyVar); - WhichMeter = IndexesForKeyVar(1); - NamesOfKeys.deallocate(); - IndexesForKeyVar.deallocate(); - // for meters there will only be one key... but it has variables associated... - for (iOnMeter = 1; iOnMeter <= op->NumVarMeterArrays; ++iOnMeter) { - if (!any_eq(op->VarMeterArrays(iOnMeter).OnMeters, WhichMeter)) continue; - ++NumVarsOnCustomMeter; - if (NumVarsOnCustomMeter > MaxVarsOnCustomMeter) { - VarsOnCustomMeter.redimension(MaxVarsOnCustomMeter += 100, 0); - } - VarsOnCustomMeter(NumVarsOnCustomMeter) = op->VarMeterArrays(iOnMeter).RepVariable; - } - } - if (!Tagged) { // couldn't find place for this item on a meter - if (AvgSumVar != StoreType::Summed) { - ShowWarningError(state, - format("{}=\"{}\", variable not summed variable {}=\"{}\".", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(fldIndex + 1), - state.dataIPShortCut->cAlphaArgs(fldIndex + 1))); - ShowContinueError(state, - format("...will not be shown with the Meter results; units for meter={}, units for this variable={}.", - unitEnumToString(MeterUnits), - unitEnumToString(UnitsVar))); - } - } - } - // Check for duplicates - for (iKey = 1; iKey <= NumVarsOnCustomMeter; ++iKey) { - if (VarsOnCustomMeter(iKey) == 0) continue; - for (iKey1 = iKey + 1; iKey1 <= NumVarsOnCustomMeter; ++iKey1) { - if (iKey == iKey1) continue; - if (VarsOnCustomMeter(iKey) != VarsOnCustomMeter(iKey1)) continue; + } // if (keyIsStar) + + // Not a meter or a variable + } else { + // Cannot use ShowWarningItemNotFound because this string appears in a unit test ShowWarningError(state, - format("{}=\"{}\", duplicate name=\"{}\".", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - op->RVariableTypes(VarsOnCustomMeter(iKey1)).VarName)); - ShowContinueError(state, "...only one value with this name will be shown with the Meter results."); - VarsOnCustomMeter(iKey1) = 0; + format(R"(Meter:Custom="{}", invalid {}="{}".)", + ipsc->cAlphaArgs(1), + ipsc->cAlphaFieldNames(fldIndex + 1), + ipsc->cAlphaArgs(fldIndex + 1))); + ShowContinueError(state, "...will not be shown with the Meter results."); + foundBadSrc = true; + break; } - } - for (iKey = 1; iKey <= NumVarsOnCustomMeter; ++iKey) { - if (VarsOnCustomMeter(iKey) == 0) continue; - auto &tmpVar = op->RVariableTypes(VarsOnCustomMeter(iKey)).VarPtr; - AttachCustomMeters(state, VarsOnCustomMeter(iKey), tmpVar.MeterArrayPtr, op->NumEnergyMeters); - } - if (NumVarsOnCustomMeter == 0) { - ShowWarningError(state, format("{}=\"{}\", no items assigned ", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + + } // for (fldIndex) + + // Somehow, this meter is not linked to any variables either directly or via another meter + if (!itemsAssigned) { + ShowWarningError(state, format("Meter:Custom=\"{}\", no items assigned ", ipsc->cAlphaArgs(1))); ShowContinueError( state, "...will not be shown with the Meter results. This may be caused by a Meter:Custom be assigned to another Meter:Custom."); + continue; } - } - cCurrentModuleObject = "Meter:CustomDecrement"; - NumCustomDecMeters = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject); - - for (Loop = 1; Loop <= NumCustomDecMeters; ++Loop) { - state.dataInputProcessing->inputProcessor->getObjectItem(state, - cCurrentModuleObject, - Loop, - state.dataIPShortCut->cAlphaArgs, - NumAlpha, - state.dataIPShortCut->rNumericArgs, - NumNumbers, - IOStat, - state.dataIPShortCut->lNumericFieldBlanks, - state.dataIPShortCut->lAlphaFieldBlanks, - state.dataIPShortCut->cAlphaFieldNames, - state.dataIPShortCut->cNumericFieldNames); - lbrackPos = index(state.dataIPShortCut->cAlphaArgs(1), '['); - if (lbrackPos != std::string::npos) state.dataIPShortCut->cAlphaArgs(1).erase(lbrackPos); - MeterCreated = false; - if (GlobalNames::VerifyUniqueInterObjectName(state, - op->UniqueMeterNames, - state.dataIPShortCut->cAlphaArgs(1), - cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(1), - ErrorsFound)) { + // One of the sources is bad + if (foundBadSrc) { continue; } - if (allocated(VarsOnCustomMeter)) VarsOnCustomMeter.deallocate(); - VarsOnCustomMeter.allocate(1000); - VarsOnCustomMeter = 0; - MaxVarsOnCustomMeter = 1000; - NumVarsOnCustomMeter = 0; - - lbrackPos = index(state.dataIPShortCut->cAlphaArgs(3), '['); - if (lbrackPos != std::string::npos) state.dataIPShortCut->cAlphaArgs(1).erase(lbrackPos); - WhichMeter = Util::FindItem(state.dataIPShortCut->cAlphaArgs(3), op->EnergyMeters); - if (WhichMeter == 0) { - ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(3), - state.dataIPShortCut->cAlphaArgs(3))); - ErrorsFound = true; - continue; + + auto *meter = new Meter(meterName); + meter->type = MeterType::Custom; + meter->resource = resource; + meter->units = units; + bool errFlag = false; + meter->RT_forIPUnits = GetResourceIPUnits(state, meter->resource, meter->units, errFlag); + if (errFlag) { + ShowContinueError(state, format("..on {}=\"{}\".", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError(state, "..requests for IP units from this meter will be ignored."); } - // Set up array of Vars that are on the source meter (for later validation). - if (allocated(VarsOnSourceMeter)) VarsOnSourceMeter.deallocate(); - VarsOnSourceMeter.allocate(1000); - VarsOnSourceMeter = 0; - MaxVarsOnSourceMeter = 1000; - NumVarsOnSourceMeter = 0; - for (iKey = 1; iKey <= op->NumVarMeterArrays; ++iKey) { - if (op->VarMeterArrays(iKey).NumOnMeters == 0 && op->VarMeterArrays(iKey).NumOnCustomMeters == 0) continue; - // On a meter - if (any_eq(op->VarMeterArrays(iKey).OnMeters, WhichMeter)) { - ++NumVarsOnSourceMeter; - if (NumVarsOnSourceMeter > MaxVarsOnSourceMeter) { - VarsOnSourceMeter.redimension(MaxVarsOnSourceMeter += 100, 0); - } - VarsOnSourceMeter(NumVarsOnSourceMeter) = op->VarMeterArrays(iKey).RepVariable; - continue; - } - if (op->VarMeterArrays(iKey).NumOnCustomMeters == 0) continue; - if (any_eq(op->VarMeterArrays(iKey).OnCustomMeters, WhichMeter)) { - ++NumVarsOnSourceMeter; - if (NumVarsOnSourceMeter > MaxVarsOnSourceMeter) { - VarsOnSourceMeter.redimension(MaxVarsOnSourceMeter += 100, 0); - } - VarsOnSourceMeter(NumVarsOnSourceMeter) = op->VarMeterArrays(iKey).RepVariable; - continue; - } + + // This meter is good + int meterNum = op->meters.size(); + op->meters.push_back(meter); + op->meterMap.insert_or_assign(meterNameUC, meterNum); + + for (ReportFreq reportFreq : + {ReportFreq::TimeStep, ReportFreq::Hour, ReportFreq::Day, ReportFreq::Month, ReportFreq::Year, ReportFreq::Simulation}) { + meter->periods[(int)reportFreq].RptNum = ++op->ReportNumberCounter; } - for (fldIndex = 4; fldIndex <= NumAlpha; fldIndex += 2) { - if (state.dataIPShortCut->cAlphaArgs(fldIndex) == "*" || state.dataIPShortCut->lAlphaFieldBlanks(fldIndex)) { - KeyIsStar = true; - state.dataIPShortCut->cAlphaArgs(fldIndex) = "*"; - } else { - KeyIsStar = false; - } - if (state.dataIPShortCut->lAlphaFieldBlanks(fldIndex + 1)) { - ShowSevereError(state, - format("{}=\"{}\", blank {}.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(fldIndex + 1))); - ShowContinueError(state, "...cannot create custom meter."); - BigErrorsFound = true; - continue; - } - if (BigErrorsFound) continue; - Tagged = false; - lbrackPos = index(state.dataIPShortCut->cAlphaArgs(fldIndex + 1), '['); - if (lbrackPos != std::string::npos) state.dataIPShortCut->cAlphaArgs(fldIndex + 1).erase(lbrackPos); - // Don't build/check things out if there were errors anywhere. Use "GetVariableKeys" to map to actual variables... - GetVariableKeyCountandType( - state, state.dataIPShortCut->cAlphaArgs(fldIndex + 1), KeyCount, TypeVar, AvgSumVar, StepTypeVar, UnitsVar); - if (TypeVar == VariableType::NotFound) { - ShowWarningError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(fldIndex + 1), - state.dataIPShortCut->cAlphaArgs(fldIndex + 1))); - ShowContinueError(state, "...will not be shown with the Meter results."); - continue; - } - if (!MeterCreated) { - MeterUnits = UnitsVar; - AddMeter(state, state.dataIPShortCut->cAlphaArgs(1), UnitsVar, std::string(), std::string(), std::string(), std::string()); - op->EnergyMeters(op->NumEnergyMeters).TypeOfMeter = MtrType::CustomDec; - op->EnergyMeters(op->NumEnergyMeters).SourceMeter = WhichMeter; - - // Can't use resource type in AddMeter cause it will confuse it with other meters. So, now: - GetStandardMeterResourceType( - state, op->EnergyMeters(op->NumEnergyMeters).ResourceType, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(2)), errFlag); - if (errFlag) { - ShowContinueError(state, format("..on {}=\"{}\".", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - BigErrorsFound = true; + for (ReportFreq reportFreq : + {ReportFreq::TimeStep, ReportFreq::Hour, ReportFreq::Day, ReportFreq::Month, ReportFreq::Year, ReportFreq::Simulation}) { + meter->periods[(int)reportFreq].accRptNum = ++op->ReportNumberCounter; + } + + // Do the loop again, this time without error checking + for (int fldIndex = 3; fldIndex <= NumAlpha; fldIndex += 2) { + // No need to check for empty fields + std::string meterOrVarNameUC = Util::makeUPPER(ipsc->cAlphaArgs(fldIndex + 1)); + std::string::size_type lbrackPos = index(meterOrVarNameUC, '['); + if (lbrackPos != std::string::npos) meterOrVarNameUC.erase(lbrackPos); + + // No need to check for custom source meters + if (auto foundSrcMeter = op->meterMap.find(meterOrVarNameUC); foundSrcMeter != op->meterMap.end()) { + int srcMeterNum = foundSrcMeter->second; + auto *srcMeter = op->meters[srcMeterNum]; + assert(srcMeter->type == MeterType::Normal); + + // No need to check for units + // No need to check for duplicates + + // Check for duplicates + if (std::find(meter->srcMeterNums.begin(), meter->srcMeterNums.end(), srcMeterNum) != meter->srcMeterNums.end()) { + ShowWarningCustomMessage(state, + eoh, + format("{}=\"{}\" referenced multiple times, only first instance will be used", + ipsc->cAlphaFieldNames(fldIndex + 1), + meterOrVarNameUC)); + continue; } - DetermineMeterIPUnits(state, - op->EnergyMeters(op->NumEnergyMeters).RT_forIPUnits, - op->EnergyMeters(op->NumEnergyMeters).ResourceType, - UnitsVar, - errFlag); - if (errFlag) { - ShowContinueError(state, format("..on {}=\"{}\".", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, "..requests for IP units from this meter will be ignored."); + + // Link meter to src meter and var and vice versa + meter->srcMeterNums.push_back(srcMeterNum); + srcMeter->dstMeterNums.push_back(meterNum); + + for (int srcVarNum : srcMeter->srcVarNums) { + if (std::find(meter->srcVarNums.begin(), meter->srcVarNums.end(), srcVarNum) == meter->srcVarNums.end()) { + meter->srcVarNums.push_back(srcVarNum); + op->outVars[srcVarNum]->meterNums.push_back(meterNum); + } } - // EnergyMeters(NumEnergyMeters)%RT_forIPUnits=DetermineMeterIPUnits(EnergyMeters(NumEnergyMeters)%ResourceType,UnitsVar) - MeterCreated = true; - } - if (UnitsVar != MeterUnits) { - ShowWarningError(state, - format("{}=\"{}\", differing units in {}=\"{}\".", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(fldIndex + 1), - state.dataIPShortCut->cAlphaArgs(fldIndex + 1))); - ShowContinueError(state, - format("...will not be shown with the Meter results; units for meter={}, units for this variable={}.", - unitEnumToString(MeterUnits), - unitEnumToString(UnitsVar))); - continue; - } - if ((TypeVar == VariableType::Real || TypeVar == VariableType::Integer) && AvgSumVar == StoreType::Summed) { - Tagged = true; - NamesOfKeys.allocate(KeyCount); - IndexesForKeyVar.allocate(KeyCount); - GetVariableKeys(state, state.dataIPShortCut->cAlphaArgs(fldIndex + 1), TypeVar, NamesOfKeys, IndexesForKeyVar); - iOnMeter = 0; + + // It's a variable + } else if (auto foundSrcDDVar = op->ddOutVarMap.find(meterOrVarNameUC); foundSrcDDVar != op->ddOutVarMap.end()) { + int srcDDVarNum = foundSrcDDVar->second; + auto *srcDDVar = op->ddOutVars[srcDDVarNum]; + + // No need to check for a summed variable + // No need to check for units match or to assign units + + bool KeyIsStar = (ipsc->cAlphaArgs(fldIndex) == "*" || ipsc->lAlphaFieldBlanks(fldIndex)); + // Have already checked for mismatching units between meter and source variable and assigned units if (KeyIsStar) { - for (iKey = 1; iKey <= KeyCount; ++iKey) { - ++NumVarsOnCustomMeter; - if (NumVarsOnCustomMeter > MaxVarsOnCustomMeter) { - VarsOnCustomMeter.redimension(MaxVarsOnCustomMeter += 100, 0); + // No need to check for empty keys + for (int keyOutVarNum : srcDDVar->keyOutVarNums) { + if (std::find(meter->srcVarNums.begin(), meter->srcVarNums.end(), keyOutVarNum) != meter->srcVarNums.end()) { + ShowWarningCustomMessage(state, + eoh, + format("Output variable \"{}\" referenced multiple times (directly or via meter)", + op->outVars[keyOutVarNum]->keyColonNameUC)); + + } else { + meter->srcVarNums.push_back(keyOutVarNum); + op->outVars[keyOutVarNum]->meterNums.push_back(meterNum); } - VarsOnCustomMeter(NumVarsOnCustomMeter) = IndexesForKeyVar(iKey); - iOnMeter = 1; - } - if (iOnMeter == 0) { - ShowSevereError(state, - format("{}=\"{}\", invalid (all keys) {}=\"{}\".", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(fldIndex + 1), - state.dataIPShortCut->cAlphaArgs(fldIndex + 1))); - ErrorsFound = true; } - } else { - for (iKey = 1; iKey <= KeyCount; ++iKey) { - if (NamesOfKeys(iKey) != state.dataIPShortCut->cAlphaArgs(fldIndex)) continue; - ++NumVarsOnCustomMeter; - if (NumVarsOnCustomMeter > MaxVarsOnCustomMeter) { - VarsOnCustomMeter.redimension(MaxVarsOnCustomMeter += 100, 0); + } else { // Key is not "*" + for (int keyOutVarNum : srcDDVar->keyOutVarNums) { + if (op->outVars[keyOutVarNum]->keyUC == ipsc->cAlphaArgs(fldIndex)) { + if (std::find(meter->srcVarNums.begin(), meter->srcVarNums.end(), keyOutVarNum) != meter->srcVarNums.end()) { + ShowWarningCustomMessage(state, + eoh, + format("Output variable \"{}\" referenced multiple times (directly or via meter)", + op->outVars[keyOutVarNum]->keyColonNameUC)); + } else { + meter->srcVarNums.push_back(keyOutVarNum); + op->outVars[keyOutVarNum]->meterNums.push_back(meterNum); + } + break; } - VarsOnCustomMeter(NumVarsOnCustomMeter) = IndexesForKeyVar(iKey); - iOnMeter = 1; - } - if (iOnMeter == 0) { - ShowSevereError(state, - format("{}=\"{}\", invalid {}:{}", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(fldIndex), - state.dataIPShortCut->cAlphaArgs(fldIndex + 1))); - ErrorsFound = true; - } - } - NamesOfKeys.deallocate(); - IndexesForKeyVar.deallocate(); - } - if (TypeVar == VariableType::Meter && AvgSumVar == StoreType::Summed) { - Tagged = true; - NamesOfKeys.allocate(KeyCount); - IndexesForKeyVar.allocate(KeyCount); - GetVariableKeys(state, state.dataIPShortCut->cAlphaArgs(fldIndex + 1), TypeVar, NamesOfKeys, IndexesForKeyVar); - WhichMeter = IndexesForKeyVar(1); - NamesOfKeys.deallocate(); - IndexesForKeyVar.deallocate(); - // for meters there will only be one key... but it has variables associated... - for (iOnMeter = 1; iOnMeter <= op->NumVarMeterArrays; ++iOnMeter) { - testa = any_eq(op->VarMeterArrays(iOnMeter).OnMeters, WhichMeter); - testb = false; - if (op->VarMeterArrays(iOnMeter).NumOnCustomMeters > 0) { - testb = any_eq(op->VarMeterArrays(iOnMeter).OnCustomMeters, WhichMeter); - } - if (!(testa || testb)) continue; - ++NumVarsOnCustomMeter; - if (NumVarsOnCustomMeter > MaxVarsOnCustomMeter) { - VarsOnCustomMeter.redimension(MaxVarsOnCustomMeter += 100, 0); } - VarsOnCustomMeter(NumVarsOnCustomMeter) = op->VarMeterArrays(iOnMeter).RepVariable; - } - } - if (!Tagged) { // couldn't find place for this item on a meter - if (AvgSumVar != StoreType::Summed) { - ShowWarningError(state, - format("{}=\"{}\", variable not summed variable {}=\"{}\".", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(fldIndex + 1), - state.dataIPShortCut->cAlphaArgs(fldIndex + 1))); - ShowContinueError(state, - format("...will not be shown with the Meter results; units for meter={}, units for this variable={}.", - unitEnumToString(MeterUnits), - unitEnumToString(UnitsVar))); - } - } - } - // Check for duplicates - for (iKey = 1; iKey <= NumVarsOnCustomMeter; ++iKey) { - if (VarsOnCustomMeter(iKey) == 0) continue; - for (iKey1 = iKey + 1; iKey1 <= NumVarsOnCustomMeter; ++iKey1) { - if (iKey == iKey1) continue; - if (VarsOnCustomMeter(iKey) != VarsOnCustomMeter(iKey1)) continue; - ShowWarningError(state, - format("{}=\"{}\", duplicate name=\"{}\".", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - op->RVariableTypes(VarsOnCustomMeter(iKey1)).VarName)); - ShowContinueError(state, "...only one value with this name will be shown with the Meter results."); - VarsOnCustomMeter(iKey1) = 0; - } + } // if (keyIsStar) + } // if (meter or variable) + + } // for (fldIndex) + } // for (Loop) + + ipsc->cCurrentModuleObject = "Meter:CustomDecrement"; + for (int Loop = 1; Loop <= numCustomDecMeters; ++Loop) { + ip->getObjectItem(state, + ipsc->cCurrentModuleObject, + Loop, + ipsc->cAlphaArgs, + NumAlpha, + ipsc->rNumericArgs, + NumNumbers, + IOStat, + ipsc->lNumericFieldBlanks, + ipsc->lAlphaFieldBlanks, + ipsc->cAlphaFieldNames, + ipsc->cNumericFieldNames); + + ErrorObjectHeader eoh{routineName, ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1)}; + + std::string meterName = ipsc->cAlphaArgs(1); + std::string::size_type lbrackPos = index(meterName, '['); + if (lbrackPos != std::string::npos) meterName.erase(lbrackPos); + std::string meterNameUC = Util::makeUPPER(meterName); + + // Search for duplicate name + if (op->meterMap.find(meterNameUC) != op->meterMap.end()) { + ShowSevereDuplicateName(state, eoh); + ErrorsFound = true; + continue; } - for (iKey = 1; iKey <= NumVarsOnCustomMeter; ++iKey) { - if (VarsOnCustomMeter(iKey) == 0) continue; - auto &tmpVar = op->RVariableTypes(VarsOnCustomMeter(iKey)).VarPtr; - AttachCustomMeters(state, VarsOnCustomMeter(iKey), tmpVar.MeterArrayPtr, op->NumEnergyMeters); + + // Can't use resource type in AddMeter cause it will confuse it with other meters. So, now: + Constant::eResource resource = + static_cast(getEnumValue(Constant::eResourceNamesUC, Util::makeUPPER(ipsc->cAlphaArgs(2)))); + if (resource == Constant::eResource::Invalid) { + ShowSevereInvalidKey(state, eoh, ipsc->cAlphaFieldNames(2), ipsc->cAlphaArgs(2)); + ErrorsFound = true; + continue; } - errFlag = false; - for (iKey = 1; iKey <= NumVarsOnCustomMeter; ++iKey) { - for (iKey1 = 1; iKey1 <= NumVarsOnSourceMeter; ++iKey1) { - if (any_eq(VarsOnSourceMeter, VarsOnCustomMeter(iKey))) break; - if (!errFlag) { - ShowSevereError(state, - format("{}=\"{}\", invalid specification to {}=\"{}\".", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(3), - state.dataIPShortCut->cAlphaArgs(3))); - errFlag = true; - } - ShowContinueError(state, format("..Variable={}", op->RVariableTypes(VarsOnCustomMeter(iKey)).VarName)); - ErrorsFound = true; - break; - } + bool itemsAssigned = false; + + std::string decMeterName = ipsc->cAlphaArgs(3); + lbrackPos = index(decMeterName, '['); + if (lbrackPos != std::string::npos) decMeterName.erase(lbrackPos); + std::string decMeterNameUC = Util::makeUPPER(decMeterName); + + // DecMeter cannot be a Meter:Custom + if (std::find(customDecMeterNames.begin(), customDecMeterNames.end(), decMeterNameUC) != customDecMeterNames.end()) { + ShowWarningError(state, + format(R"(Meter:CustomDec="{}", contains a reference to another Meter:CustomDecrement in field: {}="{}".)", + ipsc->cAlphaArgs(1), + ipsc->cAlphaFieldNames(3), + ipsc->cAlphaArgs(3))); + ErrorsFound = true; + continue; } - if (NumVarsOnCustomMeter == 0) { - ShowWarningError(state, format("{}=\"{}\", no items assigned ", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, "...will not be shown with the Meter results"); + + auto foundDecMeter = op->meterMap.find(decMeterName); + if (foundDecMeter == op->meterMap.end()) { + ShowSevereItemNotFound(state, eoh, ipsc->cAlphaFieldNames(3), decMeterName); + ErrorsFound = true; + continue; } - VarsOnCustomMeter.deallocate(); - VarsOnSourceMeter.deallocate(); - } + int decMeterNum = foundDecMeter->second; + auto *decMeter = op->meters[decMeterNum]; + assert(decMeter->type == MeterType::Normal); - if (BigErrorsFound) ErrorsFound = true; - } + Constant::Units units = decMeter->units; - void GetStandardMeterResourceType(EnergyPlusData &state, - std::string &OutResourceType, - std::string const &UserInputResourceType, // Passed uppercase - bool &ErrorsFound) - { + itemsAssigned = true; - // SUBROUTINE INFORMATION: - // AUTHOR Linda Lawrie - // DATE WRITTEN April 2006 - // MODIFIED Dareum Nam, April 2023, revised the function by using enumaration value - // RE-ENGINEERED na + // We essentially have to do this loop twice, once to + // check for errors and once to construct the meter. The + // reason is that meters are cross-linked with source + // meters and variables and those back-links will be + // tricky to undo later. + bool foundBadSrc = false; - // PURPOSE OF THIS SUBROUTINE: - // This routine compares the user input resource type with valid ones and returns - // the standard resource type. + for (int fldIndex = 4; fldIndex <= NumAlpha; fldIndex += 2) { + if (ipsc->lAlphaFieldBlanks(fldIndex + 1)) { + ShowSevereEmptyField(state, eoh, ipsc->cAlphaFieldNames(fldIndex + 1)); + foundBadSrc = true; + break; + } - ErrorsFound = false; - std::string const meterType = Util::makeUPPER(UserInputResourceType); + std::string meterOrVarNameUC = Util::makeUPPER(ipsc->cAlphaArgs(fldIndex + 1)); + std::string::size_type lbrackPos = index(meterOrVarNameUC, '['); + if (lbrackPos != std::string::npos) meterOrVarNameUC.erase(lbrackPos); - int eMeterResource = getEnumValue(Constant::eResourceNamesUC, meterType); + // A custom meter cannot reference another custom meter + if (std::find(customDecMeterNames.begin(), customDecMeterNames.end(), meterOrVarNameUC) != customDecMeterNames.end()) { + ShowWarningError(state, + format(R"(Meter:Custom="{}", contains a reference to another Meter:CustomDecrement in field: {}="{}".)", + ipsc->cAlphaArgs(1), + ipsc->cAlphaFieldNames(fldIndex + 1), + ipsc->cAlphaArgs(fldIndex + 1))); + foundBadSrc = true; + break; + } - if (eMeterResource == static_cast(Constant::eResource::Invalid)) { - ShowSevereError(state, format("GetStandardMeterResourceType: Illegal OutResourceType (for Meters) Entered={}", UserInputResourceType)); - ErrorsFound = true; - return; - } + if (auto foundSrcMeter = op->meterMap.find(meterOrVarNameUC); foundSrcMeter != op->meterMap.end()) { + int srcMeterNum = foundSrcMeter->second; + auto *srcMeter = op->meters[srcMeterNum]; + assert(srcMeter->type == MeterType::Normal || srcMeter->type == MeterType::Custom); + + // If it's the first meter, it gets to set the units + if (units == Constant::Units::Invalid) { + units = srcMeter->units; + itemsAssigned = true; + } else if (units != srcMeter->units) { + ShowWarningCustomMessage(state, + eoh, + format(R"(Meter:Custom="{}", differing units in {}="{}".)", + ipsc->cAlphaArgs(1), + ipsc->cAlphaFieldNames(fldIndex + 1), + meterOrVarNameUC)); + ShowContinueError(state, + format("...will not be shown with the Meter results; units for meter={}, units for this variable={}.", + Constant::unitNames[(int)units], + Constant::unitNames[(int)srcMeter->units])); + foundBadSrc = true; + break; + } - OutResourceType = Constant::eResourceNames[eMeterResource]; - } + // It's a variable + } else if (auto foundSrcDDVar = op->ddOutVarMap.find(meterOrVarNameUC); foundSrcDDVar != op->ddOutVarMap.end()) { + int srcDDVarNum = foundSrcDDVar->second; + auto *srcDDVar = op->ddOutVars[srcDDVarNum]; + + // Has to be a summed variable + if (srcDDVar->storeType != StoreType::Summed) { + ShowWarningCustomMessage(state, + eoh, + format(R"(Meter:Custom="{}", variable not summed variable {}="{}".)", + ipsc->cAlphaArgs(1), + ipsc->cAlphaFieldNames(fldIndex + 1), + meterOrVarNameUC)); + ShowContinueError(state, + format("...will not be shown with the Meter results; units for meter={}, units for this variable={}.", + Constant::unitNames[(int)units], + Constant::unitNames[(int)srcDDVar->units])); + foundBadSrc = true; + break; + } - void AddMeter(EnergyPlusData &state, - std::string const &Name, // Name for the meter - OutputProcessor::Unit const MtrUnits, // Units for the meter - std::string const &ResourceType, // ResourceType for the meter - std::string const &EndUse, // EndUse for the meter - std::string const &EndUseSub, // EndUse subcategory for the meter - std::string const &Group // Group for the meter - ) - { + // If it's the first variable, it gets to set the units + if (units == Constant::Units::Invalid) { + units = srcDDVar->units; + // Otherwise it has to match the existing units + } else if (units != srcDDVar->units) { + ShowWarningCustomMessage( + state, eoh, format("differing units in {}=\"{}\".", ipsc->cAlphaFieldNames(fldIndex + 1), meterOrVarNameUC)); + ShowContinueError(state, + format("...will not be shown with the Meter results; units for meter={}, units for this variable={}.", + Constant::unitNames[(int)units], + Constant::unitNames[(int)srcDDVar->units])); + foundBadSrc = true; + break; + } - // SUBROUTINE INFORMATION: - // AUTHOR Linda Lawrie - // DATE WRITTEN January 2001 - // MODIFIED na - // RE-ENGINEERED na + bool KeyIsStar = (ipsc->cAlphaArgs(fldIndex) == "*" || ipsc->lAlphaFieldBlanks(fldIndex)); + // Have already checked for mismatching units between meter and source variable and assigned units + if (KeyIsStar) { + if (srcDDVar->keyOutVarNums.empty()) { + ShowSevereInvalidKey(state, eoh, ipsc->cAlphaFieldNames(fldIndex + 1), meterOrVarNameUC); + foundBadSrc = true; + break; + } - // PURPOSE OF THIS SUBROUTINE: - // This subroutine adds a meter to the current definition set of meters. If the maximum has - // already been reached, a reallocation procedure begins. This action needs to be done at the - // start of the simulation, primarily before any output is stored. + itemsAssigned = true; + } else { // Key is not "*" + bool foundKey = false; + for (int keyOutVarNum : srcDDVar->keyOutVarNums) { + if (op->outVars[keyOutVarNum]->keyUC == ipsc->cAlphaArgs(fldIndex)) { + foundKey = true; + itemsAssigned = true; + break; + } + } + if (!foundKey) { + ShowSevereInvalidKey(state, eoh, ipsc->cAlphaFieldNames(fldIndex + 1), meterOrVarNameUC); + foundBadSrc = true; + break; + } + } // if (keyIsStar) - // Make sure this isn't already in the list of meter names - auto &op = state.dataOutputProcessor; - int Found; + // Not a meter or a variable + } else { + // Cannot use ShowWarningItemNotFound because this string appears in a unit test + ShowWarningError(state, + format(R"(Meter:Custom="{}", invalid {}="{}".)", + ipsc->cAlphaArgs(1), + ipsc->cAlphaFieldNames(fldIndex + 1), + ipsc->cAlphaArgs(fldIndex + 1))); + ShowContinueError(state, "...will not be shown with the Meter results."); + foundBadSrc = true; + break; + } - if (op->NumEnergyMeters > 0) { - Found = Util::FindItemInList(Name, op->EnergyMeters); - } else { - Found = 0; - } + } // for (fldIndex) - if (Found == 0) { - op->EnergyMeters.redimension(++op->NumEnergyMeters); - op->EnergyMeters(op->NumEnergyMeters).Name = Name; - op->EnergyMeters(op->NumEnergyMeters).ResourceType = ResourceType; - op->EnergyMeters(op->NumEnergyMeters).EndUse = EndUse; - op->EnergyMeters(op->NumEnergyMeters).EndUseSub = EndUseSub; - op->EnergyMeters(op->NumEnergyMeters).Group = Group; - op->EnergyMeters(op->NumEnergyMeters).Units = MtrUnits; - op->EnergyMeters(op->NumEnergyMeters).TSValue = 0.0; - op->EnergyMeters(op->NumEnergyMeters).CurTSValue = 0.0; - op->EnergyMeters(op->NumEnergyMeters).RptTS = false; - op->EnergyMeters(op->NumEnergyMeters).RptTSFO = false; - AssignReportNumber(state, op->EnergyMeters(op->NumEnergyMeters).TSRptNum); - op->EnergyMeters(op->NumEnergyMeters).TSRptNumChr = fmt::to_string(op->EnergyMeters(op->NumEnergyMeters).TSRptNum); - op->EnergyMeters(op->NumEnergyMeters).HRValue = 0.0; - op->EnergyMeters(op->NumEnergyMeters).RptHR = false; - op->EnergyMeters(op->NumEnergyMeters).RptHRFO = false; - AssignReportNumber(state, op->EnergyMeters(op->NumEnergyMeters).HRRptNum); - op->EnergyMeters(op->NumEnergyMeters).HRRptNumChr = fmt::to_string(op->EnergyMeters(op->NumEnergyMeters).HRRptNum); - op->EnergyMeters(op->NumEnergyMeters).DYValue = 0.0; - op->EnergyMeters(op->NumEnergyMeters).DYMaxVal = MaxSetValue; - op->EnergyMeters(op->NumEnergyMeters).DYMaxValDate = 0; - op->EnergyMeters(op->NumEnergyMeters).DYMinVal = MinSetValue; - op->EnergyMeters(op->NumEnergyMeters).DYMinValDate = 0; - op->EnergyMeters(op->NumEnergyMeters).RptDY = false; - op->EnergyMeters(op->NumEnergyMeters).RptDYFO = false; - AssignReportNumber(state, op->EnergyMeters(op->NumEnergyMeters).DYRptNum); - op->EnergyMeters(op->NumEnergyMeters).DYRptNumChr = fmt::to_string(op->EnergyMeters(op->NumEnergyMeters).DYRptNum); - op->EnergyMeters(op->NumEnergyMeters).MNValue = 0.0; - op->EnergyMeters(op->NumEnergyMeters).MNMaxVal = MaxSetValue; - op->EnergyMeters(op->NumEnergyMeters).MNMaxValDate = 0; - op->EnergyMeters(op->NumEnergyMeters).MNMinVal = MinSetValue; - op->EnergyMeters(op->NumEnergyMeters).MNMinValDate = 0; - op->EnergyMeters(op->NumEnergyMeters).RptMN = false; - op->EnergyMeters(op->NumEnergyMeters).RptMNFO = false; - AssignReportNumber(state, op->EnergyMeters(op->NumEnergyMeters).MNRptNum); - op->EnergyMeters(op->NumEnergyMeters).MNRptNumChr = fmt::to_string(op->EnergyMeters(op->NumEnergyMeters).MNRptNum); - op->EnergyMeters(op->NumEnergyMeters).YRValue = 0.0; - op->EnergyMeters(op->NumEnergyMeters).YRMaxVal = MaxSetValue; - op->EnergyMeters(op->NumEnergyMeters).YRMaxValDate = 0; - op->EnergyMeters(op->NumEnergyMeters).YRMinVal = MinSetValue; - op->EnergyMeters(op->NumEnergyMeters).YRMinValDate = 0; - op->EnergyMeters(op->NumEnergyMeters).RptYR = false; - op->EnergyMeters(op->NumEnergyMeters).RptYRFO = false; - AssignReportNumber(state, op->EnergyMeters(op->NumEnergyMeters).YRRptNum); - op->EnergyMeters(op->NumEnergyMeters).YRRptNumChr = fmt::to_string(op->EnergyMeters(op->NumEnergyMeters).YRRptNum); - op->EnergyMeters(op->NumEnergyMeters).SMValue = 0.0; - op->EnergyMeters(op->NumEnergyMeters).SMMaxVal = MaxSetValue; - op->EnergyMeters(op->NumEnergyMeters).SMMaxValDate = 0; - op->EnergyMeters(op->NumEnergyMeters).SMMinVal = MinSetValue; - op->EnergyMeters(op->NumEnergyMeters).SMMinValDate = 0; - op->EnergyMeters(op->NumEnergyMeters).RptSM = false; - op->EnergyMeters(op->NumEnergyMeters).RptSMFO = false; - AssignReportNumber(state, op->EnergyMeters(op->NumEnergyMeters).SMRptNum); - op->EnergyMeters(op->NumEnergyMeters).SMRptNumChr = fmt::to_string(op->EnergyMeters(op->NumEnergyMeters).SMRptNum); - AssignReportNumber(state, op->EnergyMeters(op->NumEnergyMeters).TSAccRptNum); - AssignReportNumber(state, op->EnergyMeters(op->NumEnergyMeters).HRAccRptNum); - AssignReportNumber(state, op->EnergyMeters(op->NumEnergyMeters).DYAccRptNum); - AssignReportNumber(state, op->EnergyMeters(op->NumEnergyMeters).MNAccRptNum); - AssignReportNumber(state, op->EnergyMeters(op->NumEnergyMeters).YRAccRptNum); - AssignReportNumber(state, op->EnergyMeters(op->NumEnergyMeters).SMAccRptNum); - op->EnergyMeters(op->NumEnergyMeters).FinYrSMValue = 0.0; - op->EnergyMeters(op->NumEnergyMeters).FinYrSMMaxVal = MaxSetValue; - op->EnergyMeters(op->NumEnergyMeters).FinYrSMMaxValDate = 0; - op->EnergyMeters(op->NumEnergyMeters).FinYrSMMinVal = MinSetValue; - op->EnergyMeters(op->NumEnergyMeters).FinYrSMMinValDate = 0; - } else { - ShowFatalError(state, format("Requested to Add Meter which was already present={}", Name)); - } - if (!ResourceType.empty()) { - bool errFlag; - DetermineMeterIPUnits(state, op->EnergyMeters(op->NumEnergyMeters).RT_forIPUnits, ResourceType, MtrUnits, errFlag); - if (errFlag) { - ShowContinueError(state, format("..on Meter=\"{}\".", Name)); - ShowContinueError(state, "..requests for IP units from this meter will be ignored."); + // Somehow, this meter is not linked to any variables either directly or via another meter + if (!itemsAssigned) { + ShowWarningError(state, format("Meter:Custom=\"{}\", no items assigned ", ipsc->cAlphaArgs(1))); + ShowContinueError( + state, "...will not be shown with the Meter results. This may be caused by a Meter:Custom be assigned to another Meter:Custom."); + continue; } - } - } - void AttachMeters(EnergyPlusData &state, - OutputProcessor::Unit const MtrUnits, // Units for this meter - std::string &ResourceType, // Electricity, Gas, etc. - std::string &EndUse, // End-use category (Lights, Heating, etc.) - std::string &EndUseSub, // End-use subcategory (user-defined, e.g., General Lights, Task Lights, etc.) - std::string &Group, // Group key (Facility, Zone, Building, etc.) - std::string const &ZoneName, // Zone key only applicable for Building group - std::string const &SpaceType, // Space Type key only applicable for Building group - int const RepVarNum, // Number of this report variable - int &MeterArrayPtr, // Output set of Pointers to Meters - bool &ErrorsFound // True if errors in this call - ) - { + // One of the sources is bad + if (foundBadSrc) { + continue; + } - // SUBROUTINE INFORMATION: - // AUTHOR Linda Lawrie - // DATE WRITTEN January 2001 - // MODIFIED na - // RE-ENGINEERED na + auto *meter = new Meter(meterName); + meter->type = MeterType::CustomDec; + meter->resource = resource; + meter->units = units; + bool errFlag = false; + meter->RT_forIPUnits = GetResourceIPUnits(state, meter->resource, meter->units, errFlag); + if (errFlag) { + ShowContinueError(state, format("..on {}=\"{}\".", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError(state, "..requests for IP units from this meter will be ignored."); + } - // PURPOSE OF THIS SUBROUTINE: - // This subroutine determines which meters this variable will be on (if any), - // sets up the meter pointer arrays, and returns a index value to this array which - // is stored with the variable. + meter->decMeterNum = decMeterNum; - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - auto &op = state.dataOutputProcessor; + // This meter is good + int meterNum = op->meters.size(); + op->meters.push_back(meter); + op->meterMap.insert_or_assign(meterNameUC, meterNum); - ValidateNStandardizeMeterTitles(state, MtrUnits, ResourceType, EndUse, EndUseSub, Group, ErrorsFound, ZoneName, SpaceType); - - op->VarMeterArrays.redimension(++op->NumVarMeterArrays); - MeterArrayPtr = op->NumVarMeterArrays; - op->VarMeterArrays(op->NumVarMeterArrays).NumOnMeters = 0; - op->VarMeterArrays(op->NumVarMeterArrays).RepVariable = RepVarNum; - op->VarMeterArrays(op->NumVarMeterArrays).OnMeters = 0; - int Found = Util::FindItem(ResourceType + ":Facility", op->EnergyMeters); - if (Found != 0) { - ++op->VarMeterArrays(op->NumVarMeterArrays).NumOnMeters; - op->VarMeterArrays(op->NumVarMeterArrays).OnMeters(op->VarMeterArrays(op->NumVarMeterArrays).NumOnMeters) = Found; - } - if (!Group.empty()) { - Found = Util::FindItem(ResourceType + ':' + Group, op->EnergyMeters); - if (Found != 0) { - ++op->VarMeterArrays(op->NumVarMeterArrays).NumOnMeters; - op->VarMeterArrays(op->NumVarMeterArrays).OnMeters(op->VarMeterArrays(op->NumVarMeterArrays).NumOnMeters) = Found; - } - if (Util::SameString(Group, "Building")) { // Match to Zone and Space Type - if (!ZoneName.empty()) { - Found = Util::FindItem(ResourceType + ":Zone:" + ZoneName, op->EnergyMeters); - if (Found != 0) { - ++op->VarMeterArrays(op->NumVarMeterArrays).NumOnMeters; - op->VarMeterArrays(op->NumVarMeterArrays).OnMeters(op->VarMeterArrays(op->NumVarMeterArrays).NumOnMeters) = Found; - } - } - if (!SpaceType.empty()) { - Found = Util::FindItem(ResourceType + ":SpaceType:" + SpaceType, op->EnergyMeters); - if (Found != 0) { - ++op->VarMeterArrays(op->NumVarMeterArrays).NumOnMeters; - op->VarMeterArrays(op->NumVarMeterArrays).OnMeters(op->VarMeterArrays(op->NumVarMeterArrays).NumOnMeters) = Found; - } - } + for (ReportFreq reportFreq : + {ReportFreq::TimeStep, ReportFreq::Hour, ReportFreq::Day, ReportFreq::Month, ReportFreq::Year, ReportFreq::Simulation}) { + meter->periods[(int)reportFreq].RptNum = ++op->ReportNumberCounter; } - } - //!! Following if EndUse is by ResourceType - if (!EndUse.empty()) { - Found = Util::FindItem(EndUse + ':' + ResourceType, op->EnergyMeters); - if (Found != 0) { - ++op->VarMeterArrays(op->NumVarMeterArrays).NumOnMeters; - op->VarMeterArrays(op->NumVarMeterArrays).OnMeters(op->VarMeterArrays(op->NumVarMeterArrays).NumOnMeters) = Found; + for (ReportFreq reportFreq : + {ReportFreq::TimeStep, ReportFreq::Hour, ReportFreq::Day, ReportFreq::Month, ReportFreq::Year, ReportFreq::Simulation}) { + meter->periods[(int)reportFreq].accRptNum = ++op->ReportNumberCounter; } - if (Util::SameString(Group, "Building")) { // Match to Zone - if (!ZoneName.empty()) { - Found = Util::FindItem(EndUse + ':' + ResourceType + ":Zone:" + ZoneName, op->EnergyMeters); - if (Found != 0) { - ++op->VarMeterArrays(op->NumVarMeterArrays).NumOnMeters; - op->VarMeterArrays(op->NumVarMeterArrays).OnMeters(op->VarMeterArrays(op->NumVarMeterArrays).NumOnMeters) = Found; - } - } - if (!SpaceType.empty()) { - Found = Util::FindItem(EndUse + ':' + ResourceType + ":SpaceType:" + SpaceType, op->EnergyMeters); - if (Found != 0) { - ++op->VarMeterArrays(op->NumVarMeterArrays).NumOnMeters; - op->VarMeterArrays(op->NumVarMeterArrays).OnMeters(op->VarMeterArrays(op->NumVarMeterArrays).NumOnMeters) = Found; - addEndUseSpaceType(state, EndUse, SpaceType); - } - } - } + // Links meter to dec meter and its output variable and vice versa + meter->srcMeterNums.push_back(meter->decMeterNum); + decMeter->dstMeterNums.push_back(meterNum); - // End use subcategory - if (!EndUseSub.empty()) { - Found = Util::FindItem(EndUseSub + ':' + EndUse + ':' + ResourceType, op->EnergyMeters); - if (Found != 0) { - ++op->VarMeterArrays(op->NumVarMeterArrays).NumOnMeters; - op->VarMeterArrays(op->NumVarMeterArrays).OnMeters(op->VarMeterArrays(op->NumVarMeterArrays).NumOnMeters) = Found; + // Not linking decMeter vars to this meter and vice versa + // for (int srcVarNum : decMeter->srcVarNums) { + // if (std::find(meter->srcVarNums.begin(), meter->srcVarNums.end(), srcVarNum) != meter->srcVarNums.end()) continue; // Already linked + // meter->srcVarNums.push_back(srcVarNum); + // op->outVars[srcVarNum]->meterNums.push_back(meterNum); + // } - addEndUseSubcategory(state, EndUse, EndUseSub); - } - if (Util::SameString(Group, "Building")) { // Match to Zone - if (!ZoneName.empty()) { - Found = Util::FindItem(EndUseSub + ':' + EndUse + ':' + ResourceType + ":Zone:" + ZoneName, op->EnergyMeters); - if (Found != 0) { - ++op->VarMeterArrays(op->NumVarMeterArrays).NumOnMeters; - op->VarMeterArrays(op->NumVarMeterArrays).OnMeters(op->VarMeterArrays(op->NumVarMeterArrays).NumOnMeters) = Found; - } + // Do the loop again, this time without error checking + for (int fldIndex = 4; fldIndex <= NumAlpha; fldIndex += 2) { + // No need to check for empty fields + std::string meterOrVarNameUC = Util::makeUPPER(ipsc->cAlphaArgs(fldIndex + 1)); + std::string::size_type lbrackPos = index(meterOrVarNameUC, '['); + if (lbrackPos != std::string::npos) meterOrVarNameUC.erase(lbrackPos); + + // No need to check for custom source meters + if (auto foundSrcMeter = op->meterMap.find(meterOrVarNameUC); foundSrcMeter != op->meterMap.end()) { + int srcMeterNum = foundSrcMeter->second; + auto *srcMeter = op->meters[srcMeterNum]; + assert(srcMeter->type == MeterType::Normal || srcMeter->type == MeterType::Custom); + + // No need to check for units + // No need to check for duplicates + + // Check for duplicates + if (std::find(meter->srcMeterNums.begin(), meter->srcMeterNums.end(), srcMeterNum) != meter->srcMeterNums.end()) { + ShowWarningCustomMessage(state, + eoh, + format("{}=\"{}\" referenced multiple times, only first instance will be used", + ipsc->cAlphaFieldNames(fldIndex + 1), + meterOrVarNameUC)); + continue; } - if (!SpaceType.empty()) { - Found = Util::FindItem(EndUseSub + ':' + EndUse + ':' + ResourceType + ":SpaceType:" + SpaceType, op->EnergyMeters); - if (Found != 0) { - ++op->VarMeterArrays(op->NumVarMeterArrays).NumOnMeters; - op->VarMeterArrays(op->NumVarMeterArrays).OnMeters(op->VarMeterArrays(op->NumVarMeterArrays).NumOnMeters) = Found; + + // Link meter to src meter and var and vice versa + meter->srcMeterNums.push_back(srcMeterNum); + srcMeter->dstMeterNums.push_back(meterNum); + + for (int srcVarNum : srcMeter->srcVarNums) { + if (std::find(meter->srcVarNums.begin(), meter->srcVarNums.end(), srcVarNum) == meter->srcVarNums.end()) { + meter->srcVarNums.push_back(srcVarNum); + op->outVars[srcVarNum]->meterNums.push_back(meterNum); } } - } - } - } - } - void AttachCustomMeters(EnergyPlusData &state, - int const RepVarNum, // Number of this report variable - int &MeterArrayPtr, // Input/Output set of Pointers to Meters - int const MeterIndex // Which meter this is - ) - { + // It's a variable + } else if (auto foundSrcDDVar = op->ddOutVarMap.find(meterOrVarNameUC); foundSrcDDVar != op->ddOutVarMap.end()) { + int srcDDVarNum = foundSrcDDVar->second; + auto *srcDDVar = op->ddOutVars[srcDDVarNum]; - // SUBROUTINE INFORMATION: - // AUTHOR Linda Lawrie - // DATE WRITTEN January 2006 - // MODIFIED na - // RE-ENGINEERED na + // No need to check for a summed variable + // No need to check for units match or to assign units - // PURPOSE OF THIS SUBROUTINE: - // This subroutine determines which meters this variable will be on (if any), - // sets up the meter pointer arrays, and returns a index value to this array which - // is stored with the variable. - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - auto &op = state.dataOutputProcessor; + bool KeyIsStar = (ipsc->cAlphaArgs(fldIndex) == "*" || ipsc->lAlphaFieldBlanks(fldIndex)); + // Have already checked for mismatching units between meter and source variable and assigned units + if (KeyIsStar) { + // No need to check for empty keys + for (int keyOutVarNum : srcDDVar->keyOutVarNums) { + if (std::find(meter->srcVarNums.begin(), meter->srcVarNums.end(), keyOutVarNum) != meter->srcVarNums.end()) { + ShowWarningCustomMessage(state, + eoh, + format("Output variable \"{}\" referenced multiple times (directly or via meter)", + op->outVars[keyOutVarNum]->keyColonNameUC)); + + } else { + meter->srcVarNums.push_back(keyOutVarNum); + op->outVars[keyOutVarNum]->meterNums.push_back(meterNum); + } + } + } else { // Key is not "*" + for (int keyOutVarNum : srcDDVar->keyOutVarNums) { + if (op->outVars[keyOutVarNum]->keyUC == ipsc->cAlphaArgs(fldIndex)) { + if (std::find(meter->srcVarNums.begin(), meter->srcVarNums.end(), keyOutVarNum) != meter->srcVarNums.end()) { + ShowWarningCustomMessage(state, + eoh, + format("Output variable \"{}\" referenced multiple times (directly or via meter)", + op->outVars[keyOutVarNum]->keyColonNameUC)); + } else { + meter->srcVarNums.push_back(keyOutVarNum); + op->outVars[keyOutVarNum]->meterNums.push_back(meterNum); + } + break; + } + } + } // if (keyIsStar) + } // if (meter or variable) - if (MeterArrayPtr == 0) { - op->VarMeterArrays.redimension(++op->NumVarMeterArrays); - MeterArrayPtr = op->NumVarMeterArrays; - op->VarMeterArrays(op->NumVarMeterArrays).NumOnMeters = 0; - op->VarMeterArrays(op->NumVarMeterArrays).RepVariable = RepVarNum; - op->VarMeterArrays(op->NumVarMeterArrays).OnMeters = 0; - op->VarMeterArrays(op->NumVarMeterArrays).OnCustomMeters.allocate(1); - op->VarMeterArrays(op->NumVarMeterArrays).NumOnCustomMeters = 1; - } else { // MeterArrayPtr set - op->VarMeterArrays(MeterArrayPtr).OnCustomMeters.redimension(++op->VarMeterArrays(MeterArrayPtr).NumOnCustomMeters); + } // for (fldIndex) } - op->VarMeterArrays(MeterArrayPtr).OnCustomMeters(op->VarMeterArrays(MeterArrayPtr).NumOnCustomMeters) = MeterIndex; + + if (BigErrorsFound) ErrorsFound = true; } - void ValidateNStandardizeMeterTitles(EnergyPlusData &state, - OutputProcessor::Unit const MtrUnits, // Units for the meter - std::string &ResourceType, // Electricity, Gas, etc. - std::string &EndUse, // End Use Type (Lights, Heating, etc.) - std::string &EndUseSub, // End Use Sub Type (General Lights, Task Lights, etc.) - std::string &Group, // Group key (Facility, Zone, Building, etc.) - bool &ErrorsFound, // True if errors in this call - const std::string &ZoneName, // Zone Name when Group=Building - const std::string &SpaceType // Space Type when Group=Building - ) + int AddMeter(EnergyPlusData &state, + std::string const &Name, // Name for the meter + Constant::Units const units, // Units for the meter + Constant::eResource resource, // ResourceType for the meter + SOVEndUseCat sovEndUseCat, // EndUse for the meter + std::string_view const EndUseSub, // EndUse subcategory for the meter + SOVGroup sovGroup, + int outVarNum) // Variable index { // SUBROUTINE INFORMATION: // AUTHOR Linda Lawrie // DATE WRITTEN January 2001 - // MODIFIED na - // RE-ENGINEERED na // PURPOSE OF THIS SUBROUTINE: - // This subroutine uses the keys for the Energy Meters given to the SetupOutputVariable routines - // and makes sure they are "standard" as well as creating meters which need to be added as this - // is the first use of that kind of meter designation. + // This subroutine adds a meter to the current definition set of meters. If the maximum has + // already been reached, a reallocation procedure begins. This action needs to be done at the + // start of the simulation, primarily before any output is stored. - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int Found; // For checking whether meter is already defined - bool LocalErrorsFound = false; - std::string MeterName; + // Make sure this isn't already in the list of meter names auto &op = state.dataOutputProcessor; - // Basic ResourceType Meters - GetStandardMeterResourceType(state, ResourceType, Util::makeUPPER(ResourceType), LocalErrorsFound); - - if (!LocalErrorsFound) { - if (op->NumEnergyMeters > 0) { - Found = Util::FindItem(ResourceType + ":Facility", op->EnergyMeters); - } else { - Found = 0; - } - if (Found == 0) AddMeter(state, ResourceType + ":Facility", MtrUnits, ResourceType, "", "", ""); - } + int meterNum = -1; + Meter *meter = nullptr; - //! Group Meters - { - std::string const groupMeter = uppercased(Group); + std::string nameUC = Util::makeUPPER(Name); - if (groupMeter.empty()) { + if (auto found = op->meterMap.find(nameUC); found != op->meterMap.end()) { + meterNum = found->second; + meter = op->meters[meterNum]; + } else { - } else if (groupMeter == "BUILDING") { - Group = "Building"; + meterNum = op->meters.size(); + meter = new Meter(Name); + op->meters.push_back(meter); + op->meterMap.insert_or_assign(nameUC, meterNum); - } else if (groupMeter == "HVAC" || groupMeter == "SYSTEM") { - Group = "HVAC"; + meter->type = MeterType::Normal; + meter->resource = resource; + meter->sovEndUseCat = sovEndUseCat; + meter->EndUseSub = EndUseSub; + meter->sovGroup = sovGroup; + meter->units = units; + meter->CurTSValue = 0.0; - } else if (groupMeter == "PLANT") { - Group = "Plant"; + for (ReportFreq reportFreq : + {ReportFreq::TimeStep, ReportFreq::Hour, ReportFreq::Day, ReportFreq::Month, ReportFreq::Year, ReportFreq::Simulation}) { + meter->periods[(int)reportFreq].RptNum = ++op->ReportNumberCounter; + } - } else { - ShowSevereError(state, format("Illegal Group (for Meters) Entered={}", Group)); - LocalErrorsFound = true; + for (ReportFreq reportFreq : + {ReportFreq::TimeStep, ReportFreq::Hour, ReportFreq::Day, ReportFreq::Month, ReportFreq::Year, ReportFreq::Simulation}) { + meter->periods[(int)reportFreq].accRptNum = ++op->ReportNumberCounter; } - } - if (!LocalErrorsFound && !Group.empty()) { - Found = Util::FindItem(ResourceType + ':' + Group, op->EnergyMeters); - if (Found == 0) AddMeter(state, ResourceType + ':' + Group, MtrUnits, ResourceType, "", "", Group); - if (Group == "Building") { - if (!ZoneName.empty()) { - Found = Util::FindItem(ResourceType + ":Zone:" + ZoneName, op->EnergyMeters); - if (Found == 0) { - AddMeter(state, ResourceType + ":Zone:" + ZoneName, MtrUnits, ResourceType, "", "", "Zone"); - } - } - if (!SpaceType.empty()) { - Found = Util::FindItem(ResourceType + ":SpaceType:" + SpaceType, op->EnergyMeters); - if (Found == 0) { - AddMeter(state, ResourceType + ":SpaceType:" + SpaceType, MtrUnits, ResourceType, "", "", "SpaceType"); - } + if (meter->resource != Constant::eResource::Invalid) { + bool errFlag = false; + meter->RT_forIPUnits = GetResourceIPUnits(state, meter->resource, units, errFlag); + if (errFlag) { + ShowContinueError(state, format("..on Meter=\"{}\".", Name)); + ShowContinueError(state, "..requests for IP units from this meter will be ignored."); } } } - //!!! EndUse Meters - { - std::string const endUseMeter = uppercased(EndUse); - - if (endUseMeter.empty()) { - - } else if (endUseMeter == "INTERIOR LIGHTS" || endUseMeter == "INTERIORLIGHTS") { - EndUse = "InteriorLights"; - - } else if (endUseMeter == "EXTERIOR LIGHTS" || endUseMeter == "EXTERIORLIGHTS") { - EndUse = "ExteriorLights"; - - } else if (endUseMeter == "HEATING" || endUseMeter == "HTG") { - EndUse = "Heating"; - - } else if (endUseMeter == "HEATPRODUCED") { - EndUse = "HeatProduced"; - - } else if (endUseMeter == "COOLING" || endUseMeter == "CLG") { - EndUse = "Cooling"; - - } else if (endUseMeter == "DOMESTICHOTWATER" || endUseMeter == "DHW" || endUseMeter == "DOMESTIC HOT WATER") { - EndUse = "WaterSystems"; - - } else if (endUseMeter == "COGEN" || endUseMeter == "COGENERATION") { - EndUse = "Cogeneration"; - - } else if (endUseMeter == "INTERIOREQUIPMENT" || endUseMeter == "INTERIOR EQUIPMENT") { - EndUse = "InteriorEquipment"; - - } else if (endUseMeter == "EXTERIOREQUIPMENT" || endUseMeter == "EXTERIOR EQUIPMENT" || endUseMeter == "EXT EQ" || - endUseMeter == "EXTERIOREQ") { - EndUse = "ExteriorEquipment"; - - } else if (endUseMeter == "EXTERIOR:WATEREQUIPMENT") { - EndUse = "ExteriorEquipment"; - - } else if (endUseMeter == "PURCHASEDHOTWATER" || endUseMeter == "DISTRICTHOTWATER" || endUseMeter == "PURCHASED HEATING") { - EndUse = "DistrictHotWater"; - - } else if (endUseMeter == "PURCHASEDCOLDWATER" || endUseMeter == "DISTRICTCHILLEDWATER" || endUseMeter == "PURCHASEDCHILLEDWATER" || - endUseMeter == "PURCHASED COLD WATER" || endUseMeter == "PURCHASED COOLING") { - EndUse = "DistrictChilledWater"; - - } else if (endUseMeter == "FANS" || endUseMeter == "FAN") { - EndUse = "Fans"; - - } else if (endUseMeter == "HEATINGCOILS" || endUseMeter == "HEATINGCOIL" || endUseMeter == "HEATING COILS" || - endUseMeter == "HEATING COIL") { - EndUse = "HeatingCoils"; - - } else if (endUseMeter == "COOLINGCOILS" || endUseMeter == "COOLINGCOIL" || endUseMeter == "COOLING COILS" || - endUseMeter == "COOLING COIL") { - EndUse = "CoolingCoils"; - - } else if (endUseMeter == "PUMPS" || endUseMeter == "PUMP") { - EndUse = "Pumps"; - - } else if (endUseMeter == "FREECOOLING" || endUseMeter == "FREE COOLING") { - EndUse = "Freecooling"; - - } else if (endUseMeter == "LOOPTOLOOP") { - EndUse = "LoopToLoop"; - - } else if (endUseMeter == "CHILLERS" || endUseMeter == "CHILLER") { - EndUse = "Chillers"; - - } else if (endUseMeter == "BOILERS" || endUseMeter == "BOILER") { - EndUse = "Boilers"; - - } else if (endUseMeter == "BASEBOARD" || endUseMeter == "BASEBOARDS") { - EndUse = "Baseboard"; - - } else if (endUseMeter == "COOLINGPANEL" || endUseMeter == "COOLINGPANELS") { - EndUse = "CoolingPanel"; - - } else if (endUseMeter == "HEATREJECTION" || endUseMeter == "HEAT REJECTION") { - EndUse = "HeatRejection"; - - } else if (endUseMeter == "HUMIDIFIER" || endUseMeter == "HUMIDIFIERS") { - EndUse = "Humidifier"; - - } else if (endUseMeter == "HEATRECOVERY" || endUseMeter == "HEAT RECOVERY") { - EndUse = "HeatRecovery"; - - } else if (endUseMeter == "PHOTOVOLTAICS" || endUseMeter == "PV" || endUseMeter == "PHOTOVOLTAIC") { - EndUse = "Photovoltaic"; - - } else if (endUseMeter == "WINDTURBINES" || endUseMeter == "WT" || endUseMeter == "WINDTURBINE") { - EndUse = "WindTurbine"; - - } else if (endUseMeter == "ELECTRICSTORAGE") { - EndUse = "ElectricStorage"; - - } else if (endUseMeter == "POWERCONVERSION") { - - EndUse = "PowerConversion"; - - } else if (endUseMeter == "HEAT RECOVERY FOR COOLING" || endUseMeter == "HEATRECOVERYFORCOOLING" || - endUseMeter == "HEATRECOVERYCOOLING") { - EndUse = "HeatRecoveryForCooling"; - - } else if (endUseMeter == "HEAT RECOVERY FOR HEATING" || endUseMeter == "HEATRECOVERYFORHEATING" || - endUseMeter == "HEATRECOVERYHEATING") { - EndUse = "HeatRecoveryForHeating"; - - } else if (endUseMeter == "ELECTRICITYEMISSIONS") { - EndUse = "ElectricityEmissions"; - - } else if (endUseMeter == "PURCHASEDELECTRICITYEMISSIONS") { - EndUse = "PurchasedElectricityEmissions"; - - } else if (endUseMeter == "SOLDELECTRICITYEMISSIONS") { - EndUse = "SoldElectricityEmissions"; - - } else if (endUseMeter == "NATURALGASEMISSIONS") { - EndUse = "NaturalGasEmissions"; - - } else if (endUseMeter == "FUELOILNO1EMISSIONS") { - EndUse = "FuelOilNo1Emissions"; - - } else if (endUseMeter == "FUELOILNO2EMISSIONS") { - EndUse = "FuelOilNo2Emissions"; - - } else if (endUseMeter == "COALEMISSIONS") { - EndUse = "CoalEmissions"; - - } else if (endUseMeter == "GASOLINEEMISSIONS") { - EndUse = "GasolineEmissions"; - - } else if (endUseMeter == "PROPANEEMISSIONS") { - EndUse = "PropaneEmissions"; - - } else if (endUseMeter == "DIESELEMISSIONS") { - EndUse = "DieselEmissions"; - - } else if (endUseMeter == "OTHERFUEL1EMISSIONS") { - EndUse = "OtherFuel1Emissions"; + // outVarNum == -1 is only true in unit tests + if (outVarNum != -1) { + OutVar *var = op->outVars[outVarNum]; + var->meterNums.push_back(meterNum); + meter->srcVarNums.push_back(outVarNum); + } - } else if (endUseMeter == "OTHERFUEL2EMISSIONS") { - EndUse = "OtherFuel2Emissions"; + return meterNum; + } - } else if (endUseMeter == "CARBONEQUIVALENTEMISSIONS") { - EndUse = "CarbonEquivalentEmissions"; + void AttachMeters(EnergyPlusData &state, + Constant::Units const units, // Units for this meter + Constant::eResource resource, // Electricity, Gas, etc. + SOVEndUseCat sovEndUseCat, // End-use category (Lights, Heating, etc.) + std::string_view const EndUseSub, // End-use subcategory (user-defined, e.g., General Lights, Task Lights, etc.) + SOVGroup sovGroup, // Group key (Facility, Zone, Building, etc.) + std::string const &ZoneName, // Zone key only applicable for Building group + std::string const &SpaceType, // Space Type key only applicable for Building group + int const outVarNum // Number of this report variable + ) + { - } else if (endUseMeter == "REFRIGERATION") { - EndUse = "Refrigeration"; + // SUBROUTINE INFORMATION: + // AUTHOR Linda Lawrie + // DATE WRITTEN January 2001 - } else if (endUseMeter == "COLDSTORAGECHARGE") { - EndUse = "ColdStorageCharge"; + // PURPOSE OF THIS SUBROUTINE: + // This subroutine determines which meters this variable will be on (if any), + // creates those meters and links the variable to them (and vice versa). - } else if (endUseMeter == "COLDSTORAGEDISCHARGE") { - EndUse = "ColdStorageDischarge"; + std::string_view resourceName = Constant::eResourceNames[(int)resource]; - } else if (endUseMeter == "WATERSYSTEMS" || endUseMeter == "WATERSYSTEM" || endUseMeter == "Water System") { - EndUse = "WaterSystems"; + std::string endUseSub = standardizeEndUseSub(sovEndUseCat, EndUseSub); - } else if (endUseMeter == "RAINWATER") { - EndUse = "Rainwater"; + if (!endUseSub.empty()) addEndUseSubcategory(state, sovEndUseCat, endUseSub); - } else if (endUseMeter == "CONDENSATE") { - EndUse = "Condensate"; + if (!SpaceType.empty()) addEndUseSpaceType(state, sovEndUseCat, SpaceType); - } else if (endUseMeter == "WELLWATER") { - EndUse = "Wellwater"; + std::string meterName = format("{}:Facility", resourceName); + AddMeter(state, meterName, units, resource, SOVEndUseCat::Invalid, "", SOVGroup::Invalid, outVarNum); - } else if (endUseMeter == "MAINSWATER" || endUseMeter == "PURCHASEDWATER") { - EndUse = "MainsWater"; + if (sovGroup != SOVGroup::Invalid) { + std::string groupMeterName = format("{}:{}", resourceName, sovGroupNames[(int)sovGroup]); + AddMeter(state, groupMeterName, units, resource, SOVEndUseCat::Invalid, "", sovGroup, outVarNum); - } else { - ShowSevereError(state, format("Illegal EndUse (for Meters) Entered={}", EndUse)); - LocalErrorsFound = true; - } + if (sovGroup == SOVGroup::Building) { + if (!ZoneName.empty()) { + std::string zoneMeterName = format("{}:Zone:{}", resourceName, ZoneName); + AddMeter(state, zoneMeterName, units, resource, SOVEndUseCat::Invalid, "", SOVGroup::Zone, outVarNum); + } + if (!SpaceType.empty()) { + std::string spaceMeterName = format("{}:SpaceType:{}", resourceName, SpaceType); + AddMeter(state, spaceMeterName, units, resource, SOVEndUseCat::Invalid, "", SOVGroup::SpaceType, outVarNum); + } + } // if (Group == "Building") } //!! Following if we do EndUse by ResourceType - if (!LocalErrorsFound && !EndUse.empty()) { - Found = Util::FindItem(EndUse + ':' + ResourceType, op->EnergyMeters); - if (Found == 0) AddMeter(state, EndUse + ':' + ResourceType, MtrUnits, ResourceType, EndUse, "", ""); + if (sovEndUseCat != SOVEndUseCat::Invalid) { + std::string_view sovEndUseCatName = sovEndUseCatNames[(int)sovEndUseCat]; + std::string enduseMeterName = format("{}:{}", sovEndUseCatName, resourceName); + AddMeter(state, enduseMeterName, units, resource, sovEndUseCat, "", SOVGroup::Invalid, outVarNum); - if (Group == "Building") { // Match to Zone and Space + if (sovGroup == SOVGroup::Building) { // Match to Zone and Space if (!ZoneName.empty()) { - Found = Util::FindItem(EndUse + ':' + ResourceType + ":Zone:" + ZoneName, op->EnergyMeters); - if (Found == 0) { - AddMeter(state, EndUse + ':' + ResourceType + ":Zone:" + ZoneName, MtrUnits, ResourceType, EndUse, "", "Zone"); - } + std::string enduseZoneMeterName = format("{}:{}:Zone:{}", sovEndUseCatName, resourceName, ZoneName); + AddMeter(state, enduseZoneMeterName, units, resource, sovEndUseCat, "", SOVGroup::Zone, outVarNum); } if (!SpaceType.empty()) { - Found = Util::FindItem(EndUse + ':' + ResourceType + ":SpaceType:" + SpaceType, op->EnergyMeters); - if (Found == 0) { - AddMeter(state, EndUse + ':' + ResourceType + ":SpaceType:" + SpaceType, MtrUnits, ResourceType, EndUse, "", "SpaceType"); - } + std::string enduseSpaceMeterName = format("{}:{}:SpaceType:{}", sovEndUseCatName, resourceName, SpaceType); + AddMeter(state, enduseSpaceMeterName, units, resource, sovEndUseCat, "", SOVGroup::SpaceType, outVarNum); } } - } else if (LocalErrorsFound) { - ErrorsFound = true; - } - // End-Use Subcategories - if (!LocalErrorsFound && !EndUseSub.empty()) { - MeterName = EndUseSub + ':' + EndUse + ':' + ResourceType; - Found = Util::FindItem(MeterName, op->EnergyMeters); - if (Found == 0) AddMeter(state, MeterName, MtrUnits, ResourceType, EndUse, EndUseSub, ""); + // End-Use Subcategories + if (!endUseSub.empty()) { + std::string subEnduseMeterName = format("{}:{}:{}", endUseSub, sovEndUseCatNames[(int)sovEndUseCat], resourceName); + AddMeter(state, subEnduseMeterName, units, resource, sovEndUseCat, endUseSub, SOVGroup::Invalid, outVarNum); - if (Group == "Building") { // Match to Zone and Space - if (!ZoneName.empty()) { - Found = Util::FindItem(EndUseSub + ':' + EndUse + ':' + ResourceType + ":Zone:" + ZoneName, op->EnergyMeters); - if (Found == 0) { - AddMeter(state, - EndUseSub + ':' + EndUse + ':' + ResourceType + ":Zone:" + ZoneName, - MtrUnits, - ResourceType, - EndUse, - EndUseSub, - "Zone"); + if (sovGroup == SOVGroup::Building) { // Match to Zone and Space + if (!ZoneName.empty()) { + std::string subEnduseZoneMeterName = format("{}:{}:{}:Zone:{}", endUseSub, sovEndUseCatName, resourceName, ZoneName); + AddMeter(state, subEnduseZoneMeterName, units, resource, sovEndUseCat, endUseSub, SOVGroup::Zone, outVarNum); } - } - if (!SpaceType.empty()) { - Found = Util::FindItem(EndUseSub + ':' + EndUse + ':' + ResourceType + ":SpaceType:" + SpaceType, op->EnergyMeters); - if (Found == 0) { - AddMeter(state, - EndUseSub + ':' + EndUse + ':' + ResourceType + ":SpaceType:" + SpaceType, - MtrUnits, - ResourceType, - EndUse, - EndUseSub, - "SpaceType"); + if (!SpaceType.empty()) { + std::string subEnduseSpaceMeterName = format("{}:{}:{}:SpaceType:{}", endUseSub, sovEndUseCatName, resourceName, SpaceType); + AddMeter(state, subEnduseSpaceMeterName, units, resource, sovEndUseCat, endUseSub, SOVGroup::SpaceType, outVarNum); } - } - } - } else if (LocalErrorsFound) { - ErrorsFound = true; + } // if (sovGroup == Building) + } // if (!endUseSub.empty()) + } // if (sovEndUseCat != Invalid) + } // AttachMeters() + + std::string standardizeEndUseSub(SOVEndUseCat sovEndUseCat, std::string_view endUseSubName) + { + if (!endUseSubName.empty()) { + return std::string(endUseSubName); + } else if (sovEndUseCat == SOVEndUseCat::Invalid) { + return ""; + } else if (sovEndUseCat2endUse[(int)sovEndUseCat] != Constant::EndUse::Invalid) { + return "General"; + } else { + return ""; } } - void DetermineMeterIPUnits(EnergyPlusData &state, - OutputProcessor::RT_IPUnits &CodeForIPUnits, // Output Code for IP Units - std::string const &ResourceType, // Resource Type - OutputProcessor::Unit const MtrUnits, // Meter units - bool &ErrorsFound // true if errors found during subroutine + OutputProcessor::RT_IPUnits GetResourceIPUnits(EnergyPlusData &state, + Constant::eResource resource, // Resource Type + Constant::Units const units, // Meter units + bool &ErrorsFound // true if errors found during subroutine ) { @@ -2061,37 +1540,54 @@ namespace OutputProcessor { // and we need to add WATER (for m3/gal, etc) // SUBROUTINE LOCAL VARIABLE DECLARATIONS: + RT_IPUnits IPUnits; + + // Commented this out to avoid accidentally clearing an error condition by calling this function + // ErrorsFound = false; + + switch (resource) { + case Constant::eResource::Electricity: + case Constant::eResource::ElectricityProduced: + case Constant::eResource::ElectricityPurchased: + case Constant::eResource::ElectricitySurplusSold: + case Constant::eResource::ElectricityNet: { + IPUnits = RT_IPUnits::Electricity; + } break; + case Constant::eResource::NaturalGas: { + IPUnits = RT_IPUnits::Gas; + } break; + case Constant::eResource::Water: + case Constant::eResource::MainsWater: + case Constant::eResource::RainWater: + case Constant::eResource::WellWater: + case Constant::eResource::OnSiteWater: { + IPUnits = RT_IPUnits::Water; + } break; + case Constant::eResource::DistrictCooling: + case Constant::eResource::PlantLoopCoolingDemand: { + IPUnits = RT_IPUnits::Cooling; + } break; + default: { + if (units == Constant::Units::m3) { + IPUnits = RT_IPUnits::OtherM3; + } else if (units == Constant::Units::kg) { + IPUnits = RT_IPUnits::OtherKG; + } else if (units == Constant::Units::L) { + IPUnits = RT_IPUnits::OtherL; + } else { + IPUnits = RT_IPUnits::OtherJ; + } + } break; + } // switch - ErrorsFound = false; - std::string UC_ResourceType = Util::makeUPPER(ResourceType); - - CodeForIPUnits = RT_IPUnits::OtherJ; - if (has(UC_ResourceType, "ELEC")) { - CodeForIPUnits = RT_IPUnits::Electricity; - } else if (has(UC_ResourceType, "GAS")) { - CodeForIPUnits = RT_IPUnits::Gas; - } else if (has(UC_ResourceType, "COOL")) { - CodeForIPUnits = RT_IPUnits::Cooling; - } - if (MtrUnits == OutputProcessor::Unit::m3 && has(UC_ResourceType, "WATER")) { - CodeForIPUnits = RT_IPUnits::Water; - } else if (MtrUnits == OutputProcessor::Unit::m3) { - CodeForIPUnits = RT_IPUnits::OtherM3; - } - if (MtrUnits == OutputProcessor::Unit::kg) { - CodeForIPUnits = RT_IPUnits::OtherKG; - } - if (MtrUnits == OutputProcessor::Unit::L) { - CodeForIPUnits = RT_IPUnits::OtherL; - } // write(outputfiledebug,*) 'resourcetype=',TRIM(resourcetype) // write(outputfiledebug,*) 'ipunits type=',CodeForIPUnits - if (MtrUnits != OutputProcessor::Unit::kg && MtrUnits != OutputProcessor::Unit::J && MtrUnits != OutputProcessor::Unit::m3 && - MtrUnits != OutputProcessor::Unit::L) { - ShowWarningError(state, - format("DetermineMeterIPUnits: Meter units not recognized for IP Units conversion=[{}].", unitEnumToString(MtrUnits))); + if (units != Constant::Units::kg && units != Constant::Units::J && units != Constant::Units::m3 && units != Constant::Units::L) { + ShowWarningError( + state, format("DetermineMeterIPUnits: Meter units not recognized for IP Units conversion=[{}].", Constant::unitNames[(int)units])); ErrorsFound = true; } + return IPUnits; } void UpdateMeters(EnergyPlusData &state, int const TimeStamp) // Current TimeStamp (for max/min) @@ -2100,304 +1596,147 @@ namespace OutputProcessor { // SUBROUTINE INFORMATION: // AUTHOR Linda Lawrie // DATE WRITTEN April 2001 - // MODIFIED na - // RE-ENGINEERED na // PURPOSE OF THIS SUBROUTINE: // This subroutine updates the meters with the current time step value // for each meter. Also, sets min/max values for hourly...run period reporting. - // METHODOLOGY EMPLOYED: - // Goes thru the number of meters, setting min/max as appropriate. Uses timestamp - // from calling program. - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - if (state.dataGlobal->WarmupFlag) { return; } auto &op = state.dataOutputProcessor; - if (!op->MeterValue.allocated()) { + if (op->meters.size() == 0 || op->meterValues.size() == 0) { return; } - for (int Meter = 1; Meter <= op->NumEnergyMeters; ++Meter) { - if (op->EnergyMeters(Meter).TypeOfMeter != MtrType::CustomDec && op->EnergyMeters(Meter).TypeOfMeter != MtrType::CustomDiff) { - op->EnergyMeters(Meter).TSValue += op->MeterValue(Meter); + for (int iMeter = 0; iMeter < (int)op->meters.size(); ++iMeter) { + auto *meter = op->meters[iMeter]; + if (meter->type != MeterType::CustomDec && meter->type != MeterType::CustomDiff) { + meter->periods[(int)ReportFreq::TimeStep].Value += op->meterValues[iMeter]; + // Is this correct? What is going on here? } else { - op->EnergyMeters(Meter).TSValue = op->EnergyMeters(op->EnergyMeters(Meter).SourceMeter).TSValue - op->MeterValue(Meter); + meter->periods[(int)ReportFreq::TimeStep].Value += op->meterValues[iMeter]; + // meter->periods[(int)ReportFreq::TimeStep].Value = + // op->meters[meter->decMeterNum]->periods[(int)ReportFreq::TimeStep].Value - op->meterValues[iMeter]; } - op->EnergyMeters(Meter).HRValue += op->EnergyMeters(Meter).TSValue; - op->EnergyMeters(Meter).DYValue += op->EnergyMeters(Meter).TSValue; - op->EnergyMeters(Meter).MNValue += op->EnergyMeters(Meter).TSValue; - op->EnergyMeters(Meter).YRValue += op->EnergyMeters(Meter).TSValue; - op->EnergyMeters(Meter).SMValue += op->EnergyMeters(Meter).TSValue; - // if (op->isFinalYear) op->EnergyMeters(Meter).FinYrSMValue += op->EnergyMeters(Meter).TSValue; - op->EnergyMeters(Meter).FinYrSMValue += op->EnergyMeters(Meter).TSValue; - } + + Real64 TSValue = meter->periods[(int)ReportFreq::TimeStep].Value; + meter->periods[(int)ReportFreq::Hour].Value += TSValue; + meter->periods[(int)ReportFreq::Day].Value += TSValue; + meter->periods[(int)ReportFreq::Month].Value += TSValue; + meter->periods[(int)ReportFreq::Year].Value += TSValue; + meter->periods[(int)ReportFreq::Simulation].Value += TSValue; + meter->periodFinYrSM.Value += TSValue; + } // for (iMeter) + // Set Max - for (int Meter = 1; Meter <= op->NumEnergyMeters; ++Meter) { + for (auto *meter : op->meters) { + Real64 TSValue = meter->periods[(int)ReportFreq::TimeStep].Value; + Real64 TSValueComp = TSValue; // - 0.00001; + // Todo - HRMinVal, HRMaxVal not used - if (op->EnergyMeters(Meter).TSValue > op->EnergyMeters(Meter).DYMaxVal) { - op->EnergyMeters(Meter).DYMaxVal = op->EnergyMeters(Meter).TSValue; - op->EnergyMeters(Meter).DYMaxValDate = TimeStamp; - } else { - continue; // Not max val of month or year, if not max of day so far - } - if (op->EnergyMeters(Meter).TSValue > op->EnergyMeters(Meter).MNMaxVal) { - op->EnergyMeters(Meter).MNMaxVal = op->EnergyMeters(Meter).TSValue; - op->EnergyMeters(Meter).MNMaxValDate = TimeStamp; - } else { - continue; - } - if (op->EnergyMeters(Meter).TSValue > op->EnergyMeters(Meter).YRMaxVal) { - op->EnergyMeters(Meter).YRMaxVal = op->EnergyMeters(Meter).TSValue; - op->EnergyMeters(Meter).YRMaxValDate = TimeStamp; - } - if (op->EnergyMeters(Meter).TSValue > op->EnergyMeters(Meter).SMMaxVal) { - op->EnergyMeters(Meter).SMMaxVal = op->EnergyMeters(Meter).TSValue; - op->EnergyMeters(Meter).SMMaxValDate = TimeStamp; - } - // if (op->isFinalYear) { - if (op->EnergyMeters(Meter).TSValue > op->EnergyMeters(Meter).FinYrSMMaxVal) { - op->EnergyMeters(Meter).FinYrSMMaxVal = op->EnergyMeters(Meter).TSValue; - op->EnergyMeters(Meter).FinYrSMMaxValDate = TimeStamp; - } - //} - } - // Set Min - for (int Meter = 1; Meter <= op->NumEnergyMeters; ++Meter) { - if (op->EnergyMeters(Meter).TSValue < op->EnergyMeters(Meter).DYMinVal) { - op->EnergyMeters(Meter).DYMinVal = op->EnergyMeters(Meter).TSValue; - op->EnergyMeters(Meter).DYMinValDate = TimeStamp; - } else { - continue; - } - if (op->EnergyMeters(Meter).TSValue < op->EnergyMeters(Meter).MNMinVal) { - op->EnergyMeters(Meter).MNMinVal = op->EnergyMeters(Meter).TSValue; - op->EnergyMeters(Meter).MNMinValDate = TimeStamp; - } else { - continue; - } - if (op->EnergyMeters(Meter).TSValue < op->EnergyMeters(Meter).YRMinVal) { - op->EnergyMeters(Meter).YRMinVal = op->EnergyMeters(Meter).TSValue; - op->EnergyMeters(Meter).YRMinValDate = TimeStamp; - } - if (op->EnergyMeters(Meter).TSValue < op->EnergyMeters(Meter).SMMinVal) { - op->EnergyMeters(Meter).SMMinVal = op->EnergyMeters(Meter).TSValue; - op->EnergyMeters(Meter).SMMinValDate = TimeStamp; + auto &periodDY = meter->periods[(int)ReportFreq::Day]; + if (TSValueComp <= periodDY.MaxVal) continue; + periodDY.MaxVal = TSValue; + periodDY.MaxValDate = TimeStamp; + + auto &periodMN = meter->periods[(int)ReportFreq::Month]; + if (TSValueComp <= periodMN.MaxVal) continue; + periodMN.MaxVal = TSValue; + periodMN.MaxValDate = TimeStamp; + + auto &periodYR = meter->periods[(int)ReportFreq::Year]; + if (TSValueComp > periodYR.MaxVal) { + periodYR.MaxVal = TSValue; + periodYR.MaxValDate = TimeStamp; } - // if (op->isFinalYear) { - if (op->EnergyMeters(Meter).TSValue < op->EnergyMeters(Meter).FinYrSMMinVal) { - op->EnergyMeters(Meter).FinYrSMMinVal = op->EnergyMeters(Meter).TSValue; - op->EnergyMeters(Meter).FinYrSMMinValDate = TimeStamp; + + auto &periodSM = meter->periods[(int)ReportFreq::Simulation]; + if (TSValueComp > periodSM.MaxVal) { + periodSM.MaxVal = TSValue; + periodSM.MaxValDate = TimeStamp; } - //} - } - for (int Meter = 1; Meter <= op->NumEnergyMeters; ++Meter) { - op->MeterValue(Meter) = 0.0; // Ready for next update - } - } - void ReportTSMeters(EnergyPlusData &state, - Real64 const StartMinute, // Start Minute for TimeStep - Real64 const EndMinute, // End Minute for TimeStep - bool &PrintESOTimeStamp, // True if the ESO Time Stamp also needs to be printed - bool PrintTimeStampToSQL // Print Time Stamp to SQL file - ) - { + if (TSValueComp > meter->periodFinYrSM.MaxVal) { + meter->periodFinYrSM.MaxVal = TSValue; + meter->periodFinYrSM.MaxValDate = TimeStamp; + } + } // for (meter) - // SUBROUTINE INFORMATION: - // AUTHOR Linda Lawrie - // DATE WRITTEN January 2001 - // MODIFIED na - // RE-ENGINEERED na + // Set Min + for (auto *meter : op->meters) { + Real64 TSValue = meter->periods[(int)ReportFreq::TimeStep].Value; + Real64 TSValueComp = TSValue; // + 0.00001; - // PURPOSE OF THIS SUBROUTINE: - // This subroutine reports on the meters that have been requested for - // reporting on each time step. + auto &periodDY = meter->periods[(int)ReportFreq::Day]; + if (TSValueComp >= periodDY.MinVal) continue; - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int Loop; // Loop Control - bool PrintTimeStamp; - int CurDayType; - auto &op = state.dataOutputProcessor; + periodDY.MinVal = TSValue; + periodDY.MinValDate = TimeStamp; - if (!state.dataResultsFramework->resultsFramework->TSMeters.rDataFrameEnabled()) { - state.dataResultsFramework->resultsFramework->initializeMeters(op->EnergyMeters, ReportingFrequency::TimeStep); - } + auto &periodMN = meter->periods[(int)ReportFreq::Month]; + if (TSValueComp >= periodMN.MinVal) continue; - PrintTimeStamp = true; - for (Loop = 1; Loop <= op->NumEnergyMeters; ++Loop) { - op->EnergyMeters(Loop).CurTSValue = op->EnergyMeters(Loop).TSValue; - if (!op->EnergyMeters(Loop).RptTS && !op->EnergyMeters(Loop).RptAccTS) continue; - if (PrintTimeStamp) { - CurDayType = state.dataEnvrn->DayOfWeek; - if (state.dataEnvrn->HolidayIndex > 0) { - CurDayType = state.dataEnvrn->HolidayIndex; - } - WriteTimeStampFormatData(state, - state.files.mtr, - ReportingFrequency::EachCall, - op->TimeStepStampReportNbr, - op->TimeStepStampReportChr, - state.dataGlobal->DayOfSimChr, - PrintTimeStamp && PrintTimeStampToSQL, - state.dataEnvrn->Month, - state.dataEnvrn->DayOfMonth, - state.dataGlobal->HourOfDay, - EndMinute, - StartMinute, - state.dataEnvrn->DSTIndicator, - ScheduleManager::dayTypeNames[CurDayType]); - if (state.dataResultsFramework->resultsFramework->TSMeters.rDataFrameEnabled()) { - state.dataResultsFramework->resultsFramework->TSMeters.newRow( - state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, state.dataGlobal->HourOfDay, EndMinute, state.dataGlobal->CalendarYear); - } - PrintTimeStamp = false; - PrintTimeStampToSQL = false; - } + periodMN.MinVal = TSValue; + periodMN.MinValDate = TimeStamp; - if (PrintESOTimeStamp && !op->EnergyMeters(Loop).RptTSFO && !op->EnergyMeters(Loop).RptAccTSFO) { - CurDayType = state.dataEnvrn->DayOfWeek; - if (state.dataEnvrn->HolidayIndex > 0) { - CurDayType = state.dataEnvrn->HolidayIndex; - } - WriteTimeStampFormatData(state, - state.files.eso, - ReportingFrequency::EachCall, - op->TimeStepStampReportNbr, - op->TimeStepStampReportChr, - state.dataGlobal->DayOfSimChr, - PrintTimeStamp && PrintESOTimeStamp && PrintTimeStampToSQL, - state.dataEnvrn->Month, - state.dataEnvrn->DayOfMonth, - state.dataGlobal->HourOfDay, - EndMinute, - StartMinute, - state.dataEnvrn->DSTIndicator, - ScheduleManager::dayTypeNames[CurDayType]); - PrintESOTimeStamp = false; + auto &periodYR = meter->periods[(int)ReportFreq::Year]; + if (TSValueComp < periodYR.MinVal) { + periodYR.MinVal = TSValue; + periodYR.MinValDate = TimeStamp; } - if (op->EnergyMeters(Loop).RptTS) { - WriteReportMeterData(state, - op->EnergyMeters(Loop).TSRptNum, - op->EnergyMeters(Loop).TSRptNumChr, - op->EnergyMeters(Loop).TSValue, - ReportingFrequency::TimeStep, - state.dataOutputProcessor->rDummy1TS, - state.dataOutputProcessor->iDummy1TS, - state.dataOutputProcessor->rDummy2TS, - state.dataOutputProcessor->iDummy2TS, - op->EnergyMeters(Loop).RptTSFO); - state.dataResultsFramework->resultsFramework->TSMeters.pushVariableValue(op->EnergyMeters(Loop).TSRptNum, - op->EnergyMeters(Loop).TSValue); + auto &periodSM = meter->periods[(int)ReportFreq::Simulation]; + if (TSValueComp < periodSM.MinVal) { + periodSM.MinVal = TSValue; + periodSM.MinValDate = TimeStamp; } - if (op->EnergyMeters(Loop).RptAccTS) { - WriteCumulativeReportMeterData(state, - op->EnergyMeters(Loop).TSAccRptNum, - fmt::to_string(op->EnergyMeters(Loop).TSAccRptNum), - op->EnergyMeters(Loop).SMValue, - op->EnergyMeters(Loop).RptAccTSFO); - state.dataResultsFramework->resultsFramework->TSMeters.pushVariableValue(op->EnergyMeters(Loop).TSAccRptNum, - op->EnergyMeters(Loop).SMValue); + if (TSValueComp < meter->periodFinYrSM.MinVal) { + meter->periodFinYrSM.MinVal = TSValue; + meter->periodFinYrSM.MinValDate = TimeStamp; } - } + } // for (meter) - if (op->NumEnergyMeters > 0) { - for (auto &e : op->EnergyMeters) - e.TSValue = 0.0; + for (int iMeter = 0; iMeter < (int)op->meters.size(); ++iMeter) { + op->meterValues[iMeter] = 0.0; // Ready for next update } - } + } // UpdateMeters() - void ReportHRMeters(EnergyPlusData &state, bool PrintTimeStampToSQL // Print Time Stamp to SQL file - ) + void ResetAccumulationWhenWarmupComplete(EnergyPlusData &state) { - // SUBROUTINE INFORMATION: - // AUTHOR Linda Lawrie - // DATE WRITTEN January 2001 - // MODIFIED na - // RE-ENGINEERED na + // AUTHOR Jason Glazer + // DATE WRITTEN June 2015 // PURPOSE OF THIS SUBROUTINE: - // This subroutine reports on the meters that have been requested for - // reporting on each hour. + // Resets the accumulating meter values. Needed after warmup period is over to + // reset the totals on meters so that they are not accumulated over the warmup period - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int Loop; // Loop Control - bool PrintTimeStamp; - int CurDayType; auto &op = state.dataOutputProcessor; - if (!state.dataResultsFramework->resultsFramework->HRMeters.rDataFrameEnabled()) { - state.dataResultsFramework->resultsFramework->initializeMeters(op->EnergyMeters, ReportingFrequency::Hourly); - } - - PrintTimeStamp = true; - for (Loop = 1; Loop <= op->NumEnergyMeters; ++Loop) { - if (!op->EnergyMeters(Loop).RptHR && !op->EnergyMeters(Loop).RptAccHR) continue; - if (PrintTimeStamp) { - CurDayType = state.dataEnvrn->DayOfWeek; - if (state.dataEnvrn->HolidayIndex > 0) { - CurDayType = state.dataEnvrn->HolidayIndex; - } - WriteTimeStampFormatData(state, - state.files.mtr, - ReportingFrequency::Hourly, - op->TimeStepStampReportNbr, - op->TimeStepStampReportChr, - state.dataGlobal->DayOfSimChr, - PrintTimeStamp && PrintTimeStampToSQL, - state.dataEnvrn->Month, - state.dataEnvrn->DayOfMonth, - state.dataGlobal->HourOfDay, - _, - _, - state.dataEnvrn->DSTIndicator, - ScheduleManager::dayTypeNames[CurDayType]); - if (state.dataResultsFramework->resultsFramework->HRMeters.rDataFrameEnabled()) { - state.dataResultsFramework->resultsFramework->HRMeters.newRow( - state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, state.dataGlobal->HourOfDay, 0, state.dataGlobal->CalendarYear); - } - PrintTimeStamp = false; - PrintTimeStampToSQL = false; - } - - if (op->EnergyMeters(Loop).RptHR) { - WriteReportMeterData(state, - op->EnergyMeters(Loop).HRRptNum, - op->EnergyMeters(Loop).HRRptNumChr, - op->EnergyMeters(Loop).HRValue, - ReportingFrequency::Hourly, - state.dataOutputProcessor->rDummy1, - state.dataOutputProcessor->iDummy1, - state.dataOutputProcessor->rDummy2, - state.dataOutputProcessor->iDummy2, - op->EnergyMeters(Loop).RptHRFO); // EnergyMeters(Loop)%HRMinVal, EnergyMeters(Loop)%HRMinValDate, & | - // EnergyMeters(Loop)%HRMaxVal, EnergyMeters(Loop)%HRMaxValDate, & - state.dataResultsFramework->resultsFramework->HRMeters.pushVariableValue(op->EnergyMeters(Loop).HRRptNum, - op->EnergyMeters(Loop).HRValue); - op->EnergyMeters(Loop).HRValue = 0.0; + for (auto *meter : op->meters) { + for (int iPeriod = (int)ReportFreq::Hour; iPeriod < (int)ReportFreq::Num; ++iPeriod) { + meter->periods[iPeriod].resetVals(); } + meter->periodFinYrSM.resetVals(); + } - if (op->EnergyMeters(Loop).RptAccHR) { - WriteCumulativeReportMeterData(state, - op->EnergyMeters(Loop).HRAccRptNum, - fmt::to_string(op->EnergyMeters(Loop).HRAccRptNum), - op->EnergyMeters(Loop).SMValue, - op->EnergyMeters(Loop).RptAccHRFO); - state.dataResultsFramework->resultsFramework->HRMeters.pushVariableValue(op->EnergyMeters(Loop).HRAccRptNum, - op->EnergyMeters(Loop).SMValue); + for (auto *var : op->outVars) { + if (var->freq == ReportFreq::Month || var->freq == ReportFreq::Year || var->freq == ReportFreq::Simulation) { + var->StoreValue = 0.0; + var->NumStored = 0; } } - } + } // ResetAccumulationWhenWarmupComplete() - void ReportDYMeters(EnergyPlusData &state, bool PrintTimeStampToSQL // Print Time Stamp to SQL file + void ReportTSMeters(EnergyPlusData &state, + Real64 const StartMinute, // Start Minute for TimeStep + Real64 const EndMinute, // End Minute for TimeStep + bool &PrintESOTimeStamp, // True if the ESO Time Stamp also needs to be printed + bool PrintTimeStampToSQL // Print Time Stamp to SQL file ) { @@ -2409,21 +1748,25 @@ namespace OutputProcessor { // PURPOSE OF THIS SUBROUTINE: // This subroutine reports on the meters that have been requested for - // reporting on each day. + // reporting on each time step. // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int Loop; // Loop Control bool PrintTimeStamp; int CurDayType; auto &op = state.dataOutputProcessor; + auto &rf = state.dataResultsFramework->resultsFramework; + auto &rfMetersTS = rf->Meters[(int)ReportFreq::TimeStep]; - if (!state.dataResultsFramework->resultsFramework->DYMeters.rVariablesScanned()) { - state.dataResultsFramework->resultsFramework->initializeMeters(op->EnergyMeters, ReportingFrequency::Daily); + if (!rfMetersTS.dataFrameEnabled()) { + rf->initializeMeters(op->meters, ReportFreq::TimeStep); } PrintTimeStamp = true; - for (Loop = 1; Loop <= op->NumEnergyMeters; ++Loop) { - if (!op->EnergyMeters(Loop).RptDY && !op->EnergyMeters(Loop).RptAccDY) continue; + for (int Loop = 0; Loop < (int)op->meters.size(); ++Loop) { + auto *meter = op->meters[Loop]; + auto &periodTS = meter->periods[(int)ReportFreq::TimeStep]; + meter->CurTSValue = periodTS.Value; + if (!periodTS.Rpt && !periodTS.accRpt) continue; if (PrintTimeStamp) { CurDayType = state.dataEnvrn->DayOfWeek; if (state.dataEnvrn->HolidayIndex > 0) { @@ -2431,276 +1774,210 @@ namespace OutputProcessor { } WriteTimeStampFormatData(state, state.files.mtr, - ReportingFrequency::Daily, - op->DailyStampReportNbr, - op->DailyStampReportChr, + ReportFreq::EachCall, + op->freqStampReportNums[(int)ReportFreq::TimeStep], state.dataGlobal->DayOfSimChr, PrintTimeStamp && PrintTimeStampToSQL, state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, - _, - _, - _, + state.dataGlobal->HourOfDay, + EndMinute, + StartMinute, state.dataEnvrn->DSTIndicator, ScheduleManager::dayTypeNames[CurDayType]); - if (state.dataResultsFramework->resultsFramework->DYMeters.rDataFrameEnabled()) { - state.dataResultsFramework->resultsFramework->DYMeters.newRow( - state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, state.dataGlobal->HourOfDay, 0, state.dataGlobal->CalendarYear); + if (rfMetersTS.dataFrameEnabled()) { + rfMetersTS.newRow( + state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, state.dataGlobal->HourOfDay, EndMinute, state.dataGlobal->CalendarYear); } PrintTimeStamp = false; PrintTimeStampToSQL = false; } - if (op->EnergyMeters(Loop).RptDY) { + if (PrintESOTimeStamp && !periodTS.RptFO && !periodTS.accRptFO) { + CurDayType = (state.dataEnvrn->HolidayIndex > 0) ? state.dataEnvrn->HolidayIndex : state.dataEnvrn->DayOfWeek; + WriteTimeStampFormatData(state, + state.files.eso, + ReportFreq::EachCall, + op->freqStampReportNums[(int)ReportFreq::TimeStep], + state.dataGlobal->DayOfSimChr, + PrintTimeStamp && PrintESOTimeStamp && PrintTimeStampToSQL, + state.dataEnvrn->Month, + state.dataEnvrn->DayOfMonth, + state.dataGlobal->HourOfDay, + EndMinute, + StartMinute, + state.dataEnvrn->DSTIndicator, + ScheduleManager::dayTypeNames[CurDayType]); + PrintESOTimeStamp = false; + } + + if (periodTS.Rpt) { WriteReportMeterData(state, - op->EnergyMeters(Loop).DYRptNum, - op->EnergyMeters(Loop).DYRptNumChr, - op->EnergyMeters(Loop).DYValue, - ReportingFrequency::Daily, - op->EnergyMeters(Loop).DYMinVal, - op->EnergyMeters(Loop).DYMinValDate, - op->EnergyMeters(Loop).DYMaxVal, - op->EnergyMeters(Loop).DYMaxValDate, - op->EnergyMeters(Loop).RptDYFO); - state.dataResultsFramework->resultsFramework->DYMeters.pushVariableValue(op->EnergyMeters(Loop).DYRptNum, - op->EnergyMeters(Loop).DYValue); - op->EnergyMeters(Loop).DYValue = 0.0; - op->EnergyMeters(Loop).DYMinVal = MinSetValue; - op->EnergyMeters(Loop).DYMaxVal = MaxSetValue; + periodTS.RptNum, + periodTS.Value, + ReportFreq::TimeStep, + -1.0, // MinValue + -1, // MinValueDate + -1.0, // MaxValue + -1, // MaxValueDate + periodTS.RptFO); + rfMetersTS.pushVariableValue(periodTS.RptNum, periodTS.Value); } - if (op->EnergyMeters(Loop).RptAccDY) { - WriteCumulativeReportMeterData(state, - op->EnergyMeters(Loop).DYAccRptNum, - fmt::to_string(op->EnergyMeters(Loop).DYAccRptNum), - op->EnergyMeters(Loop).SMValue, - op->EnergyMeters(Loop).RptAccDYFO); - state.dataResultsFramework->resultsFramework->DYMeters.pushVariableValue(op->EnergyMeters(Loop).DYAccRptNum, - op->EnergyMeters(Loop).SMValue); + if (periodTS.accRpt) { + WriteCumulativeReportMeterData(state, periodTS.accRptNum, periodTS.Value, periodTS.accRptFO); + rfMetersTS.pushVariableValue(periodTS.accRptNum, periodTS.Value); } } - } - void ReportMNMeters(EnergyPlusData &state, bool PrintTimeStampToSQL // Print Time Stamp to SQL file + for (auto *meter : op->meters) { + meter->periods[(int)ReportFreq::TimeStep].Value = 0.0; + } + } // ReportTSMeters() + + void ReportMeters(EnergyPlusData &state, + ReportFreq freq, + bool PrintTimeStampToSQL // Print Time Stamp to SQL file ) { // SUBROUTINE INFORMATION: // AUTHOR Linda Lawrie // DATE WRITTEN January 2001 - // MODIFIED na - // RE-ENGINEERED na // PURPOSE OF THIS SUBROUTINE: // This subroutine reports on the meters that have been requested for - // reporting on each month. + // reporting on each hour. // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int Loop; // Loop Control bool PrintTimeStamp; + int CurDayType; auto &op = state.dataOutputProcessor; + auto &rf = state.dataResultsFramework->resultsFramework; + auto &rfMeters = rf->Meters[(int)freq]; + + assert(freq == ReportFreq::Hour || freq == ReportFreq::Day || freq == ReportFreq::Month || freq == ReportFreq::Year || + freq == ReportFreq::Simulation); - if (!state.dataResultsFramework->resultsFramework->MNMeters.rVariablesScanned()) { - state.dataResultsFramework->resultsFramework->initializeMeters(op->EnergyMeters, ReportingFrequency::Monthly); + if (!rfMeters.dataFrameEnabled()) { + rf->initializeMeters(op->meters, freq); } PrintTimeStamp = true; - for (Loop = 1; Loop <= op->NumEnergyMeters; ++Loop) { - if (!op->EnergyMeters(Loop).RptMN && !op->EnergyMeters(Loop).RptAccMN) continue; - if (PrintTimeStamp) { - WriteTimeStampFormatData(state, - state.files.mtr, - ReportingFrequency::Monthly, - op->MonthlyStampReportNbr, - op->MonthlyStampReportChr, - state.dataGlobal->DayOfSimChr, - PrintTimeStamp && PrintTimeStampToSQL, - state.dataEnvrn->Month); - if (state.dataResultsFramework->resultsFramework->MNMeters.rDataFrameEnabled()) { - state.dataResultsFramework->resultsFramework->MNMeters.newRow( - state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, state.dataGlobal->HourOfDay, 0, state.dataGlobal->CalendarYear); - } - PrintTimeStamp = false; - PrintTimeStampToSQL = false; - } + for (auto *meter : op->meters) { + auto &period = meter->periods[(int)freq]; - if (op->EnergyMeters(Loop).RptMN) { - WriteReportMeterData(state, - op->EnergyMeters(Loop).MNRptNum, - op->EnergyMeters(Loop).MNRptNumChr, - op->EnergyMeters(Loop).MNValue, - ReportingFrequency::Monthly, - op->EnergyMeters(Loop).MNMinVal, - op->EnergyMeters(Loop).MNMinValDate, - op->EnergyMeters(Loop).MNMaxVal, - op->EnergyMeters(Loop).MNMaxValDate, - op->EnergyMeters(Loop).RptMNFO); - state.dataResultsFramework->resultsFramework->MNMeters.pushVariableValue(op->EnergyMeters(Loop).MNRptNum, - op->EnergyMeters(Loop).MNValue); - op->EnergyMeters(Loop).MNValue = 0.0; - op->EnergyMeters(Loop).MNMinVal = MinSetValue; - op->EnergyMeters(Loop).MNMaxVal = MaxSetValue; - } - - if (op->EnergyMeters(Loop).RptAccMN) { - WriteCumulativeReportMeterData(state, - op->EnergyMeters(Loop).MNAccRptNum, - fmt::to_string(op->EnergyMeters(Loop).MNAccRptNum), - op->EnergyMeters(Loop).SMValue, - op->EnergyMeters(Loop).RptAccMNFO); - state.dataResultsFramework->resultsFramework->MNMeters.pushVariableValue(op->EnergyMeters(Loop).MNAccRptNum, - op->EnergyMeters(Loop).SMValue); + if (freq == ReportFreq::Simulation) { + meter->periodLastSM.Value = period.Value; + meter->periodLastSM.MinVal = period.MinVal; + meter->periodLastSM.MinValDate = period.MinValDate; + meter->periodLastSM.MaxVal = period.MaxVal; + meter->periodLastSM.MaxValDate = period.MaxValDate; } - } - } - - void ReportYRMeters(EnergyPlusData &state, bool PrintTimeStampToSQL) - { - - // SUBROUTINE INFORMATION: - // AUTHOR Jason DeGraw - // DATE WRITTEN January 2018 - // MODIFIED na - // RE-ENGINEERED na - - // PURPOSE OF THIS SUBROUTINE: - // This subroutine reports on the meters that have been requested for - // reporting on each year. - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int Loop; // Loop Control - bool PrintTimeStamp; - auto &op = state.dataOutputProcessor; - - if (!state.dataResultsFramework->resultsFramework->YRMeters.rVariablesScanned()) { - state.dataResultsFramework->resultsFramework->initializeMeters(op->EnergyMeters, ReportingFrequency::Yearly); - } - PrintTimeStamp = true; - for (Loop = 1; Loop <= op->NumEnergyMeters; ++Loop) { - if (!op->EnergyMeters(Loop).RptYR && !op->EnergyMeters(Loop).RptAccYR) continue; + if (!period.Rpt && !period.accRpt) continue; if (PrintTimeStamp) { - WriteYearlyTimeStamp( - state, state.files.mtr, op->YearlyStampReportChr, state.dataGlobal->CalendarYearChr, PrintTimeStamp && PrintTimeStampToSQL); - if (state.dataResultsFramework->resultsFramework->YRMeters.rDataFrameEnabled()) { - state.dataResultsFramework->resultsFramework->YRMeters.newRow( - state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, state.dataGlobal->HourOfDay, 0, state.dataGlobal->CalendarYear); - } - PrintTimeStamp = false; - PrintTimeStampToSQL = false; - } + CurDayType = (state.dataEnvrn->HolidayIndex > 0) ? state.dataEnvrn->HolidayIndex : state.dataEnvrn->DayOfWeek; - if (op->EnergyMeters(Loop).RptYR) { - WriteReportMeterData(state, - op->EnergyMeters(Loop).YRRptNum, - op->EnergyMeters(Loop).YRRptNumChr, - op->EnergyMeters(Loop).YRValue, - ReportingFrequency::Yearly, - op->EnergyMeters(Loop).YRMinVal, - op->EnergyMeters(Loop).YRMinValDate, - op->EnergyMeters(Loop).YRMaxVal, - op->EnergyMeters(Loop).YRMaxValDate, - op->EnergyMeters(Loop).RptYRFO); - state.dataResultsFramework->resultsFramework->YRMeters.pushVariableValue(op->EnergyMeters(Loop).YRRptNum, - op->EnergyMeters(Loop).YRValue); - op->EnergyMeters(Loop).YRValue = 0.0; - op->EnergyMeters(Loop).YRMinVal = MinSetValue; - op->EnergyMeters(Loop).YRMaxVal = MaxSetValue; - } + switch (freq) { - if (op->EnergyMeters(Loop).RptAccYR) { - WriteCumulativeReportMeterData(state, - op->EnergyMeters(Loop).YRAccRptNum, - fmt::to_string(op->EnergyMeters(Loop).YRAccRptNum), - op->EnergyMeters(Loop).YRValue, - op->EnergyMeters(Loop).RptAccYRFO); - state.dataResultsFramework->resultsFramework->YRMeters.pushVariableValue(op->EnergyMeters(Loop).YRAccRptNum, - op->EnergyMeters(Loop).SMValue); - } - } - } + case ReportFreq::Hour: { + WriteTimeStampFormatData(state, + state.files.mtr, + freq, + op->freqStampReportNums[(int)freq], + state.dataGlobal->DayOfSimChr, + PrintTimeStamp && PrintTimeStampToSQL, + state.dataEnvrn->Month, + state.dataEnvrn->DayOfMonth, + state.dataGlobal->HourOfDay, + -1, // EndMinute + -1, // StartMinute + state.dataEnvrn->DSTIndicator, + ScheduleManager::dayTypeNames[CurDayType]); + } break; - void ReportSMMeters(EnergyPlusData &state, bool PrintTimeStampToSQL // Print Time Stamp to SQL file - ) - { + case ReportFreq::Day: { + WriteTimeStampFormatData(state, + state.files.mtr, + freq, + op->freqStampReportNums[(int)freq], + state.dataGlobal->DayOfSimChr, + PrintTimeStamp && PrintTimeStampToSQL, + state.dataEnvrn->Month, + state.dataEnvrn->DayOfMonth, + -1, // Hour + -1, // EndMinute + -1, // StartMinute + state.dataEnvrn->DSTIndicator, + ScheduleManager::dayTypeNames[CurDayType]); + } break; - // SUBROUTINE INFORMATION: - // AUTHOR Linda Lawrie - // DATE WRITTEN January 2001 - // MODIFIED na - // RE-ENGINEERED na + case ReportFreq::Month: { + WriteTimeStampFormatData(state, + state.files.mtr, + freq, + op->freqStampReportNums[(int)freq], + state.dataGlobal->DayOfSimChr, + PrintTimeStamp && PrintTimeStampToSQL, + state.dataEnvrn->Month); + } break; - // PURPOSE OF THIS SUBROUTINE: - // This subroutine reports on the meters that have been requested for - // reporting on each environment/run period. + case ReportFreq::Year: { + WriteYearlyTimeStamp(state, + state.files.mtr, + op->freqStampReportNums[(int)freq], + state.dataGlobal->CalendarYearChr, + PrintTimeStamp && PrintTimeStampToSQL); + } break; - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int Loop; // Loop Control - bool PrintTimeStamp; - auto &op = state.dataOutputProcessor; + case ReportFreq::Simulation: { + WriteTimeStampFormatData(state, + state.files.mtr, + freq, + op->freqStampReportNums[(int)freq], + state.dataGlobal->DayOfSimChr, + PrintTimeStamp && PrintTimeStampToSQL); + } break; - if (!state.dataResultsFramework->resultsFramework->SMMeters.rVariablesScanned()) { - state.dataResultsFramework->resultsFramework->initializeMeters(op->EnergyMeters, ReportingFrequency::Simulation); - } + default: { + } break; + } // switch (freq) - PrintTimeStamp = true; - for (Loop = 1; Loop <= op->NumEnergyMeters; ++Loop) { - op->EnergyMeters(Loop).LastSMValue = op->EnergyMeters(Loop).SMValue; - op->EnergyMeters(Loop).LastSMMinVal = op->EnergyMeters(Loop).SMMinVal; - op->EnergyMeters(Loop).LastSMMinValDate = op->EnergyMeters(Loop).SMMinValDate; - op->EnergyMeters(Loop).LastSMMaxVal = op->EnergyMeters(Loop).SMMaxVal; - op->EnergyMeters(Loop).LastSMMaxValDate = op->EnergyMeters(Loop).SMMaxValDate; - if (!op->EnergyMeters(Loop).RptSM && !op->EnergyMeters(Loop).RptAccSM) continue; - if (PrintTimeStamp) { - WriteTimeStampFormatData(state, - state.files.mtr, - ReportingFrequency::Simulation, - op->RunPeriodStampReportNbr, - op->RunPeriodStampReportChr, - state.dataGlobal->DayOfSimChr, - PrintTimeStamp && PrintTimeStampToSQL); - if (state.dataResultsFramework->resultsFramework->SMMeters.rDataFrameEnabled()) { - state.dataResultsFramework->resultsFramework->SMMeters.newRow( + if (rfMeters.dataFrameEnabled()) { + rfMeters.newRow( state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, state.dataGlobal->HourOfDay, 0, state.dataGlobal->CalendarYear); } PrintTimeStamp = false; PrintTimeStampToSQL = false; } - if (op->EnergyMeters(Loop).RptSM) { + if (period.Rpt) { WriteReportMeterData(state, - op->EnergyMeters(Loop).SMRptNum, - op->EnergyMeters(Loop).SMRptNumChr, - op->EnergyMeters(Loop).SMValue, - ReportingFrequency::Simulation, - op->EnergyMeters(Loop).SMMinVal, - op->EnergyMeters(Loop).SMMinValDate, - op->EnergyMeters(Loop).SMMaxVal, - op->EnergyMeters(Loop).SMMaxValDate, - op->EnergyMeters(Loop).RptSMFO); - state.dataResultsFramework->resultsFramework->SMMeters.pushVariableValue(op->EnergyMeters(Loop).SMRptNum, - op->EnergyMeters(Loop).SMValue); - } - - if (op->EnergyMeters(Loop).RptAccSM) { - WriteCumulativeReportMeterData(state, - op->EnergyMeters(Loop).SMAccRptNum, - fmt::to_string(op->EnergyMeters(Loop).SMAccRptNum), - op->EnergyMeters(Loop).SMValue, - op->EnergyMeters(Loop).RptAccSMFO); - state.dataResultsFramework->resultsFramework->SMMeters.pushVariableValue(op->EnergyMeters(Loop).SMAccRptNum, - op->EnergyMeters(Loop).SMValue); + period.RptNum, + period.Value, + freq, + (freq == ReportFreq::Hour) ? -1.0 : period.MinVal, + (freq == ReportFreq::Hour) ? -1 : period.MinValDate, + (freq == ReportFreq::Hour) ? -1.0 : period.MaxVal, + (freq == ReportFreq::Hour) ? -1 : period.MaxValDate, + period.RptFO); // EnergyMeters(Loop)%HRMinVal, EnergyMeters(Loop)%HRMinValDate, & | + // EnergyMeters(Loop)%HRMaxVal, EnergyMeters(Loop)%HRMaxValDate, & + rfMeters.pushVariableValue(period.RptNum, period.Value); + period.Value = 0.0; + + if (freq != ReportFreq::Hour) { + period.MinVal = MinSetValue; + period.MaxVal = MaxSetValue; + } } - } - if (op->NumEnergyMeters > 0) { - for (auto &e : op->EnergyMeters) { - e.SMValue = 0.0; - e.SMMinVal = MinSetValue; - e.SMMaxVal = MaxSetValue; + if (period.accRpt) { + WriteCumulativeReportMeterData(state, period.accRptNum, meter->periods[(int)ReportFreq::Simulation].Value, period.accRptFO); + rfMeters.pushVariableValue(period.accRptNum, meter->periods[(int)ReportFreq::Simulation].Value); } - } - } + } // for (meter) + } // ReportMeters() void ReportForTabularReports(EnergyPlusData &state) { @@ -2720,95 +1997,112 @@ namespace OutputProcessor { // SUBROUTINE LOCAL VARIABLE DECLARATIONS: auto &op = state.dataOutputProcessor; - for (auto &m : op->EnergyMeters) { - OutputProcessor::RT_IPUnits const RT_forIPUnits(m.RT_forIPUnits); - if (RT_forIPUnits == RT_IPUnits::Electricity) { + for (auto *meter : op->meters) { + auto &period = meter->periodFinYrSM; + + switch (meter->RT_forIPUnits) { + case RT_IPUnits::Electricity: { OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMelecannual, m.Name, m.FinYrSMValue * Constant::convertJtoGJ); + state, state.dataOutRptPredefined->pdchEMelecannual, meter->Name, period.Value * Constant::convertJtoGJ); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMelecminvalue, m.Name, m.FinYrSMMinVal / state.dataGlobal->TimeStepZoneSec); + state, state.dataOutRptPredefined->pdchEMelecminvalue, meter->Name, period.MinVal / state.dataGlobal->TimeStepZoneSec); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMelecminvaluetime, m.Name, DateToStringWithMonth(m.FinYrSMMinValDate)); + state, state.dataOutRptPredefined->pdchEMelecminvaluetime, meter->Name, DateToStringWithMonth(period.MinValDate)); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMelecmaxvalue, m.Name, m.FinYrSMMaxVal / state.dataGlobal->TimeStepZoneSec); + state, state.dataOutRptPredefined->pdchEMelecmaxvalue, meter->Name, period.MaxVal / state.dataGlobal->TimeStepZoneSec); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMelecmaxvaluetime, m.Name, DateToStringWithMonth(m.FinYrSMMaxValDate)); - } else if (RT_forIPUnits == RT_IPUnits::Gas) { + state, state.dataOutRptPredefined->pdchEMelecmaxvaluetime, meter->Name, DateToStringWithMonth(period.MaxValDate)); + } break; + + case RT_IPUnits::Gas: { OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMgasannual, m.Name, m.FinYrSMValue * Constant::convertJtoGJ); + state, state.dataOutRptPredefined->pdchEMgasannual, meter->Name, period.Value * Constant::convertJtoGJ); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMgasminvalue, m.Name, m.FinYrSMMinVal / state.dataGlobal->TimeStepZoneSec); + state, state.dataOutRptPredefined->pdchEMgasminvalue, meter->Name, period.MinVal / state.dataGlobal->TimeStepZoneSec); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMgasminvaluetime, m.Name, DateToStringWithMonth(m.FinYrSMMinValDate)); + state, state.dataOutRptPredefined->pdchEMgasminvaluetime, meter->Name, DateToStringWithMonth(period.MinValDate)); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMgasmaxvalue, m.Name, m.FinYrSMMaxVal / state.dataGlobal->TimeStepZoneSec); + state, state.dataOutRptPredefined->pdchEMgasmaxvalue, meter->Name, period.MaxVal / state.dataGlobal->TimeStepZoneSec); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMgasmaxvaluetime, m.Name, DateToStringWithMonth(m.FinYrSMMaxValDate)); - } else if (RT_forIPUnits == RT_IPUnits::Cooling) { + state, state.dataOutRptPredefined->pdchEMgasmaxvaluetime, meter->Name, DateToStringWithMonth(period.MaxValDate)); + } break; + + case RT_IPUnits::Cooling: { OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMcoolannual, m.Name, m.FinYrSMValue * Constant::convertJtoGJ); + state, state.dataOutRptPredefined->pdchEMcoolannual, meter->Name, period.Value * Constant::convertJtoGJ); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMcoolminvalue, m.Name, m.FinYrSMMinVal / state.dataGlobal->TimeStepZoneSec); + state, state.dataOutRptPredefined->pdchEMcoolminvalue, meter->Name, period.MinVal / state.dataGlobal->TimeStepZoneSec); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMcoolminvaluetime, m.Name, DateToStringWithMonth(m.FinYrSMMinValDate)); + state, state.dataOutRptPredefined->pdchEMcoolminvaluetime, meter->Name, DateToStringWithMonth(period.MinValDate)); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMcoolmaxvalue, m.Name, m.FinYrSMMaxVal / state.dataGlobal->TimeStepZoneSec); + state, state.dataOutRptPredefined->pdchEMcoolmaxvalue, meter->Name, period.MaxVal / state.dataGlobal->TimeStepZoneSec); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMcoolmaxvaluetime, m.Name, DateToStringWithMonth(m.FinYrSMMaxValDate)); - } else if (RT_forIPUnits == RT_IPUnits::Water) { - OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchEMwaterannual, m.Name, m.FinYrSMValue); + state, state.dataOutRptPredefined->pdchEMcoolmaxvaluetime, meter->Name, DateToStringWithMonth(period.MaxValDate)); + } break; + + case RT_IPUnits::Water: { + OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchEMwaterannual, meter->Name, period.Value); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMwaterminvalue, m.Name, m.FinYrSMMinVal / state.dataGlobal->TimeStepZoneSec); + state, state.dataOutRptPredefined->pdchEMwaterminvalue, meter->Name, period.MinVal / state.dataGlobal->TimeStepZoneSec); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMwaterminvaluetime, m.Name, DateToStringWithMonth(m.FinYrSMMinValDate)); + state, state.dataOutRptPredefined->pdchEMwaterminvaluetime, meter->Name, DateToStringWithMonth(period.MinValDate)); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMwatermaxvalue, m.Name, m.FinYrSMMaxVal / state.dataGlobal->TimeStepZoneSec); + state, state.dataOutRptPredefined->pdchEMwatermaxvalue, meter->Name, period.MaxVal / state.dataGlobal->TimeStepZoneSec); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMwatermaxvaluetime, m.Name, DateToStringWithMonth(m.FinYrSMMaxValDate)); - } else if (RT_forIPUnits == RT_IPUnits::OtherKG) { - OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchEMotherKGannual, m.Name, m.FinYrSMValue); + state, state.dataOutRptPredefined->pdchEMwatermaxvaluetime, meter->Name, DateToStringWithMonth(period.MaxValDate)); + } break; + + case RT_IPUnits::OtherKG: { + OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchEMotherKGannual, meter->Name, period.Value); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMotherKGminvalue, m.Name, m.FinYrSMMinVal / state.dataGlobal->TimeStepZoneSec, 3); + state, state.dataOutRptPredefined->pdchEMotherKGminvalue, meter->Name, period.MinVal / state.dataGlobal->TimeStepZoneSec, 3); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMotherKGminvaluetime, m.Name, DateToStringWithMonth(m.FinYrSMMinValDate)); + state, state.dataOutRptPredefined->pdchEMotherKGminvaluetime, meter->Name, DateToStringWithMonth(period.MinValDate)); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMotherKGmaxvalue, m.Name, m.FinYrSMMaxVal / state.dataGlobal->TimeStepZoneSec, 3); + state, state.dataOutRptPredefined->pdchEMotherKGmaxvalue, meter->Name, period.MaxVal / state.dataGlobal->TimeStepZoneSec, 3); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMotherKGmaxvaluetime, m.Name, DateToStringWithMonth(m.FinYrSMMaxValDate)); - } else if (RT_forIPUnits == RT_IPUnits::OtherM3) { - OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchEMotherM3annual, m.Name, m.FinYrSMValue, 3); + state, state.dataOutRptPredefined->pdchEMotherKGmaxvaluetime, meter->Name, DateToStringWithMonth(period.MaxValDate)); + } break; + + case RT_IPUnits::OtherM3: { + OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchEMotherM3annual, meter->Name, period.Value, 3); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMotherM3minvalue, m.Name, m.FinYrSMMinVal / state.dataGlobal->TimeStepZoneSec, 3); + state, state.dataOutRptPredefined->pdchEMotherM3minvalue, meter->Name, period.MinVal / state.dataGlobal->TimeStepZoneSec, 3); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMotherM3minvaluetime, m.Name, DateToStringWithMonth(m.FinYrSMMinValDate)); + state, state.dataOutRptPredefined->pdchEMotherM3minvaluetime, meter->Name, DateToStringWithMonth(period.MinValDate)); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMotherM3maxvalue, m.Name, m.FinYrSMMaxVal / state.dataGlobal->TimeStepZoneSec, 3); + state, state.dataOutRptPredefined->pdchEMotherM3maxvalue, meter->Name, period.MaxVal / state.dataGlobal->TimeStepZoneSec, 3); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMotherM3maxvaluetime, m.Name, DateToStringWithMonth(m.FinYrSMMaxValDate)); - } else if (RT_forIPUnits == RT_IPUnits::OtherL) { - OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchEMotherLannual, m.Name, m.FinYrSMValue, 3); + state, state.dataOutRptPredefined->pdchEMotherM3maxvaluetime, meter->Name, DateToStringWithMonth(period.MaxValDate)); + } break; + + case RT_IPUnits::OtherL: { + OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchEMotherLannual, meter->Name, period.Value, 3); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMotherLminvalue, m.Name, m.FinYrSMMinVal / state.dataGlobal->TimeStepZoneSec, 3); + state, state.dataOutRptPredefined->pdchEMotherLminvalue, meter->Name, period.MinVal / state.dataGlobal->TimeStepZoneSec, 3); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMotherLminvaluetime, m.Name, DateToStringWithMonth(m.FinYrSMMinValDate)); + state, state.dataOutRptPredefined->pdchEMotherLminvaluetime, meter->Name, DateToStringWithMonth(period.MinValDate)); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMotherLmaxvalue, m.Name, m.FinYrSMMaxVal / state.dataGlobal->TimeStepZoneSec, 3); + state, state.dataOutRptPredefined->pdchEMotherLmaxvalue, meter->Name, period.MaxVal / state.dataGlobal->TimeStepZoneSec, 3); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMotherLmaxvaluetime, m.Name, DateToStringWithMonth(m.FinYrSMMaxValDate)); - } else { + state, state.dataOutRptPredefined->pdchEMotherLmaxvaluetime, meter->Name, DateToStringWithMonth(period.MaxValDate)); + } break; + + default: { OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMotherJannual, m.Name, m.FinYrSMValue * Constant::convertJtoGJ); + state, state.dataOutRptPredefined->pdchEMotherJannual, meter->Name, period.Value * Constant::convertJtoGJ); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMotherJminvalue, m.Name, m.FinYrSMMinVal / state.dataGlobal->TimeStepZoneSec); + state, state.dataOutRptPredefined->pdchEMotherJminvalue, meter->Name, period.MinVal / state.dataGlobal->TimeStepZoneSec); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMotherJminvaluetime, m.Name, DateToStringWithMonth(m.FinYrSMMinValDate)); + state, state.dataOutRptPredefined->pdchEMotherJminvaluetime, meter->Name, DateToStringWithMonth(period.MinValDate)); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMotherJmaxvalue, m.Name, m.FinYrSMMaxVal / state.dataGlobal->TimeStepZoneSec); + state, state.dataOutRptPredefined->pdchEMotherJmaxvalue, meter->Name, period.MaxVal / state.dataGlobal->TimeStepZoneSec); OutputReportPredefined::PreDefTableEntry( - state, state.dataOutRptPredefined->pdchEMotherJmaxvaluetime, m.Name, DateToStringWithMonth(m.FinYrSMMaxValDate)); - } - } - } + state, state.dataOutRptPredefined->pdchEMotherJmaxvaluetime, meter->Name, DateToStringWithMonth(period.MaxValDate)); + } break; + } // switch + } // for (meter) + } // ReportForTabularReports() std::string DateToStringWithMonth(int const codedDate) // word containing encoded month, day, hour, minute { @@ -2871,244 +2165,124 @@ namespace OutputProcessor { case 8: monthName = "AUG"; break; - case 9: - monthName = "SEP"; - break; - case 10: - monthName = "OCT"; - break; - case 11: - monthName = "NOV"; - break; - case 12: - monthName = "DEC"; - break; - default: - assert(false); - } - - return format(DateFmt, Day, monthName, Hour, Minute); - } - - void ReportMeterDetails(EnergyPlusData &state) - { - - // SUBROUTINE INFORMATION: - // AUTHOR Linda Lawrie - // DATE WRITTEN January 2006 - // MODIFIED na - // RE-ENGINEERED na - - // PURPOSE OF THIS SUBROUTINE: - // Writes the meter details report. This shows which variables are on - // meters as well as the meter contents. - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - auto &op = state.dataOutputProcessor; - - for (int VarMeter = 1; VarMeter <= op->NumVarMeterArrays; ++VarMeter) { - - const std::string mtrUnitString = unitEnumToStringBrackets(op->RVariableTypes(op->VarMeterArrays(VarMeter).RepVariable).units); - - std::string Multipliers; - Real64 const ZoneMult = op->RVariableTypes(op->VarMeterArrays(VarMeter).RepVariable).VarPtr.ZoneMult; - Real64 const ZoneListMult = op->RVariableTypes(op->VarMeterArrays(VarMeter).RepVariable).VarPtr.ZoneListMult; - - if (ZoneMult > 1 || ZoneListMult > 1) { - Multipliers = format(" * {} (Zone Multiplier = {}, Zone List Multiplier = {})", ZoneMult * ZoneListMult, ZoneMult, ZoneListMult); - } - - print(state.files.mtd, - "\n Meters for {},{}{}{}\n", - op->RVariableTypes(op->VarMeterArrays(VarMeter).RepVariable).VarPtr.ReportIDChr, - op->RVariableTypes(op->VarMeterArrays(VarMeter).RepVariable).VarName, - mtrUnitString, - Multipliers); - - for (int I = 1; I <= op->VarMeterArrays(VarMeter).NumOnMeters; ++I) { - print(state.files.mtd, " OnMeter={}{}\n", op->EnergyMeters(op->VarMeterArrays(VarMeter).OnMeters(I)).Name, mtrUnitString); - } - - for (int I = 1; I <= op->VarMeterArrays(VarMeter).NumOnCustomMeters; ++I) { - print( - state.files.mtd, " OnCustomMeter={}{}\n", op->EnergyMeters(op->VarMeterArrays(VarMeter).OnCustomMeters(I)).Name, mtrUnitString); - } - } - - for (int Meter = 1; Meter <= op->NumEnergyMeters; ++Meter) { - print(state.files.mtd, "\n For Meter={}{}", op->EnergyMeters(Meter).Name, unitEnumToStringBrackets(op->EnergyMeters(Meter).Units)); - if (!op->EnergyMeters(Meter).ResourceType.empty()) { - print(state.files.mtd, ", ResourceType={}", op->EnergyMeters(Meter).ResourceType); - } - if (!op->EnergyMeters(Meter).EndUse.empty()) { - print(state.files.mtd, ", EndUse={}", op->EnergyMeters(Meter).EndUse); - } - if (!op->EnergyMeters(Meter).Group.empty()) { - print(state.files.mtd, ", Group={}", op->EnergyMeters(Meter).Group); - } - print(state.files.mtd, ", contents are:\n"); - - bool CustDecWritten = false; - - for (int VarMeter = 1; VarMeter <= op->NumVarMeterArrays; ++VarMeter) { - if (op->EnergyMeters(Meter).TypeOfMeter == MtrType::Normal) { - if (any_eq(op->VarMeterArrays(VarMeter).OnMeters, Meter)) { - for (int VarMeter1 = 1; VarMeter1 <= op->VarMeterArrays(VarMeter).NumOnMeters; ++VarMeter1) { - if (op->VarMeterArrays(VarMeter).OnMeters(VarMeter1) != Meter) continue; - - std::string Multipliers; - Real64 const ZoneMult = op->RVariableTypes(op->VarMeterArrays(VarMeter).RepVariable).VarPtr.ZoneMult; - Real64 const ZoneListMult = op->RVariableTypes(op->VarMeterArrays(VarMeter).RepVariable).VarPtr.ZoneListMult; - - if (ZoneMult > 1 || ZoneListMult > 1) { - Multipliers = format( - " * {} (Zone Multiplier = {}, Zone List Multiplier = {})", ZoneMult * ZoneListMult, ZoneMult, ZoneListMult); - } - - print(state.files.mtd, " {}{}\n", op->RVariableTypes(op->VarMeterArrays(VarMeter).RepVariable).VarName, Multipliers); - } - } - } - if (op->EnergyMeters(Meter).TypeOfMeter != MtrType::Normal) { - if (op->VarMeterArrays(VarMeter).NumOnCustomMeters > 0) { - if (any_eq(op->VarMeterArrays(VarMeter).OnCustomMeters, Meter)) { - if (!CustDecWritten && op->EnergyMeters(Meter).TypeOfMeter == MtrType::CustomDec) { - print(state.files.mtd, - " Values for this meter will be Source Meter={}; but will be decremented by:\n", - op->EnergyMeters(op->EnergyMeters(Meter).SourceMeter).Name); - CustDecWritten = true; - } - for (int VarMeter1 = 1; VarMeter1 <= op->VarMeterArrays(VarMeter).NumOnCustomMeters; ++VarMeter1) { - if (op->VarMeterArrays(VarMeter).OnCustomMeters(VarMeter1) != Meter) continue; - - std::string Multipliers; - Real64 const ZoneMult = op->RVariableTypes(op->VarMeterArrays(VarMeter).RepVariable).VarPtr.ZoneMult; - Real64 const ZoneListMult = op->RVariableTypes(op->VarMeterArrays(VarMeter).RepVariable).VarPtr.ZoneListMult; - - if (ZoneMult > 1 || ZoneListMult > 1) { - Multipliers = format( - " * {} (Zone Multiplier = {}, Zone List Multiplier = {})", ZoneMult * ZoneListMult, ZoneMult, ZoneListMult); - } - - print(state.files.mtd, " {}{}\n", op->RVariableTypes(op->VarMeterArrays(VarMeter).RepVariable).VarName, Multipliers); - } - } - } - } - } + case 9: + monthName = "SEP"; + break; + case 10: + monthName = "OCT"; + break; + case 11: + monthName = "NOV"; + break; + case 12: + monthName = "DEC"; + break; + default: + assert(false); } + + return format(DateFmt, Day, monthName, Hour, Minute); } - // ***************************************************************************** - // End of routines for Energy Meters implementation in EnergyPlus. - // ***************************************************************************** + std::string OutVar::multiplierString() const + { + return (ZoneMult == 1 && ZoneListMult == 1) + ? "" + : format(" * {} (Zone Multiplier = {}, Zone List Multiplier = {})", ZoneMult * ZoneListMult, ZoneMult, ZoneListMult); + } - void addEndUseSubcategory(EnergyPlusData &state, std::string const &EndUseName, std::string const &EndUseSubName) + void ReportMeterDetails(EnergyPlusData &state) { // SUBROUTINE INFORMATION: - // AUTHOR Peter Graham Ellis - // DATE WRITTEN February 2006 - // MODIFIED na - // RE-ENGINEERED na + // AUTHOR Linda Lawrie + // DATE WRITTEN January 2006 // PURPOSE OF THIS SUBROUTINE: - // This subroutine manages the list of subcategories for each end-use category. + // Writes the meter details report. This shows which variables are on + // meters as well as the meter contents. // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int EndUseSubNum; - int NumSubs; auto &op = state.dataOutputProcessor; - bool Found = false; - for (size_t EndUseNum = 1; EndUseNum <= static_cast(Constant::EndUse::Num); ++EndUseNum) { - if (Util::SameString(op->EndUseCategory(EndUseNum).Name, EndUseName)) { - - for (EndUseSubNum = 1; EndUseSubNum <= op->EndUseCategory(EndUseNum).NumSubcategories; ++EndUseSubNum) { - if (Util::SameString(op->EndUseCategory(EndUseNum).SubcategoryName(EndUseSubNum), EndUseSubName)) { - // Subcategory already exists, no further action required - Found = true; - break; - } - } + for (auto const *var : op->outVars) { - if (!Found) { - // Add the subcategory by reallocating the array - NumSubs = op->EndUseCategory(EndUseNum).NumSubcategories; - op->EndUseCategory(EndUseNum).SubcategoryName.redimension(NumSubs + 1); + if (var->meterNums.empty()) continue; - op->EndUseCategory(EndUseNum).NumSubcategories = NumSubs + 1; - op->EndUseCategory(EndUseNum).SubcategoryName(NumSubs + 1) = EndUseSubName; + print(state.files.mtd, + "\n Meters for {},{} [{}]{}\n", + var->ReportID, + var->keyColonName, + Constant::unitNames[(int)var->units], + var->multiplierString()); - if (op->EndUseCategory(EndUseNum).NumSubcategories > op->MaxNumSubcategories) { - op->MaxNumSubcategories = op->EndUseCategory(EndUseNum).NumSubcategories; - } + for (int const meterNum : var->meterNums) { + auto const *meter = op->meters[meterNum]; - Found = true; - } - break; + print(state.files.mtd, + " On{}Meter={} [{}]\n", + (meter->type == MeterType::Normal) ? "" : "Custom", + meter->Name, + Constant::unitNames[(int)meter->units]); } - } + } // for (var) - if (!Found) { - ShowSevereError(state, format("Nonexistent end use passed to AddEndUseSubcategory={}", EndUseName)); - } - } - void addEndUseSpaceType(EnergyPlusData &state, std::string const &EndUseName, std::string const &EndUseSpaceTypeName) - { - - auto &op = state.dataOutputProcessor; + for (auto const *meter : op->meters) { - bool Found = false; - for (size_t EndUseNum = 1; EndUseNum <= static_cast(Constant::EndUse::Num); ++EndUseNum) { - if (Util::SameString(op->EndUseCategory(EndUseNum).Name, EndUseName)) { + print(state.files.mtd, "\n For Meter={} [{}]", meter->Name, Constant::unitNames[(int)meter->units]); + if (meter->resource != Constant::eResource::Invalid) { + print(state.files.mtd, ", ResourceType={}", Constant::eResourceNames[(int)meter->resource]); + } + if (meter->sovEndUseCat != SOVEndUseCat::Invalid) { + print(state.files.mtd, ", EndUse={}", sovEndUseCatNames[(int)meter->sovEndUseCat]); + } + if (meter->sovGroup != SOVGroup::Invalid) { + print(state.files.mtd, ", Group={}", sovGroupNames[(int)meter->sovGroup]); + } + print(state.files.mtd, ", contents are:\n"); - for (int endUseSpTypeNum = 1; endUseSpTypeNum <= op->EndUseCategory(EndUseNum).numSpaceTypes; ++endUseSpTypeNum) { - if (Util::SameString(op->EndUseCategory(EndUseNum).spaceTypeName(endUseSpTypeNum), EndUseSpaceTypeName)) { - // Space type already exists, no further action required - Found = true; - break; - } + if (meter->type == MeterType::Normal) { + for (int srcVarNum : meter->srcVarNums) { + auto const *var = op->outVars[srcVarNum]; + print(state.files.mtd, " {}{}\n", var->keyColonName, var->multiplierString()); } - if (!Found) { - // Add the space type by reallocating the array - int numSpTypes = op->EndUseCategory(EndUseNum).numSpaceTypes; - op->EndUseCategory(EndUseNum).spaceTypeName.redimension(numSpTypes + 1); - - op->EndUseCategory(EndUseNum).numSpaceTypes = numSpTypes + 1; - op->EndUseCategory(EndUseNum).spaceTypeName(numSpTypes + 1) = EndUseSpaceTypeName; - - if (op->EndUseCategory(EndUseNum).numSpaceTypes > op->maxNumEndUseSpaceTypes) { - op->maxNumEndUseSpaceTypes = op->EndUseCategory(EndUseNum).numSpaceTypes; - } + } else if (meter->type == MeterType::Custom) { + for (int srcVarNum : meter->srcVarNums) { + auto const *var = op->outVars[srcVarNum]; + print(state.files.mtd, " {}{}\n", var->keyColonName, var->multiplierString()); + } - Found = true; + } else if (meter->type == MeterType::CustomDec) { + print(state.files.mtd, + " Values for this meter will be Source Meter={}; but will be decremented by:\n", + op->meters[meter->decMeterNum]->Name); + for (int srcVarNum : meter->srcVarNums) { + auto const *var = op->outVars[srcVarNum]; + print(state.files.mtd, " {}{}\n", var->keyColonName, var->multiplierString()); } - break; } - } + } // for (meter) + } // ReportMeterDetails() - if (!Found) { - ShowSevereError(state, format("Nonexistent end use passed to addEndUseSpaceType={}", EndUseName)); - } - } + // ***************************************************************************** + // End of routines for Energy Meters implementation in EnergyPlus. + // ***************************************************************************** void WriteTimeStampFormatData( EnergyPlusData &state, InputOutputFile &outputFile, - ReportingFrequency const reportingInterval, // See Module Parameter Definitions for ReportEach, ReportTimeStep, ReportHourly, etc. - int const reportID, // The ID of the time stamp - std::string const &reportIDString, // The ID of the time stamp - std::string const &DayOfSimChr, // the number of days simulated so far + ReportFreq const reportingInterval, // See Module Parameter Definitions for ReportEach, ReportTimeStep, ReportHourly, etc. + int const reportID, // The ID of the time stamp + std::string const &DayOfSimChr, // the number of days simulated so far bool writeToSQL, - ObjexxFCL::Optional_int_const Month, // the month of the reporting interval - ObjexxFCL::Optional_int_const DayOfMonth, // The day of the reporting interval - ObjexxFCL::Optional_int_const Hour, // The hour of the reporting interval - ObjexxFCL::Optional EndMinute, // The last minute in the reporting interval - ObjexxFCL::Optional StartMinute, // The starting minute of the reporting interval - ObjexxFCL::Optional_int_const DST, // A flag indicating whether daylight savings time is observed - ObjexxFCL::Optional_string_const DayType // The day tied for the data (e.g., Monday) + int const Month, // the month of the reporting interval + int const DayOfMonth, // The day of the reporting interval + int const Hour, // The hour of the reporting interval + Real64 const EndMinute, // The last minute in the reporting interval + Real64 const StartMinute, // The starting minute of the reporting interval + int const DST, // A flag indicating whether daylight savings time is observed + std::string_view const DayType // The day tied for the data (e.g., Monday) ) { @@ -3124,153 +2298,157 @@ namespace OutputProcessor { // and was moved to this location to simplify maintenance and to allow for data output // to the SQL database - assert(reportIDString.length() + DayOfSimChr.length() + (DayType.present() ? DayType().length() : 0u) + 26 < - N_WriteTimeStampFormatData); // Check will fit in stamp size + std::string reportStr = (reportID == -1) ? "" : std::to_string(reportID); + + assert(reportStr.length() + DayOfSimChr.length() + (DayType.length()) + 26 < N_WriteTimeStampFormatData); // Check will fit in stamp size if (!outputFile.good()) return; + auto &sql = state.dataSQLiteProcedures->sqlite; + switch (reportingInterval) { - case ReportingFrequency::EachCall: - case ReportingFrequency::TimeStep: + case ReportFreq::EachCall: + case ReportFreq::TimeStep: { + assert(Month != -1 && DayOfMonth != -1 && Hour != -1 && StartMinute != -1 && EndMinute != -1 && DST != -1 && !DayType.empty()); print(outputFile, "{},{},{:2d},{:2d},{:2d},{:2d},{:5.2f},{:5.2f},{}\n", - reportIDString.c_str(), - DayOfSimChr.c_str(), - Month(), - DayOfMonth(), - DST(), - Hour(), - StartMinute(), - EndMinute(), - DayType().c_str()); - if (writeToSQL && state.dataSQLiteProcedures->sqlite) { - state.dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(static_cast(reportingInterval), - reportID, - state.dataGlobal->DayOfSim, - state.dataEnvrn->CurEnvirNum, - state.dataGlobal->CalendarYear, - state.dataEnvrn->CurrentYearIsLeapYear, - Month, - DayOfMonth, - Hour, - EndMinute, - StartMinute, - DST, - DayType, - state.dataGlobal->WarmupFlag); - } - break; - case ReportingFrequency::Hourly: + reportStr, + DayOfSimChr, + Month, + DayOfMonth, + DST, + Hour, + StartMinute, + EndMinute, + DayType); + + if (writeToSQL && sql) { + sql->createSQLiteTimeIndexRecord(reportingInterval, + reportID, + state.dataGlobal->DayOfSim, + state.dataEnvrn->CurEnvirNum, + state.dataGlobal->CalendarYear, + state.dataEnvrn->CurrentYearIsLeapYear, + Month, + DayOfMonth, + Hour, + EndMinute, + StartMinute, + DST, + DayType, + state.dataGlobal->WarmupFlag); + } + } break; + + case ReportFreq::Hour: { + assert(Month != -1 && DayOfMonth != -1 && Hour != -1 && DST != -1 && !DayType.empty()); print(outputFile, "{},{},{:2d},{:2d},{:2d},{:2d},{:5.2f},{:5.2f},{}\n", - reportIDString.c_str(), - DayOfSimChr.c_str(), - Month(), - DayOfMonth(), - DST(), - Hour(), + reportStr, + DayOfSimChr, + Month, + DayOfMonth, + DST, + Hour, 0.0, 60.0, - DayType().c_str()); - if (writeToSQL && state.dataSQLiteProcedures->sqlite) { - state.dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(static_cast(reportingInterval), - reportID, - state.dataGlobal->DayOfSim, - state.dataEnvrn->CurEnvirNum, - state.dataGlobal->CalendarYear, - state.dataEnvrn->CurrentYearIsLeapYear, - Month, - DayOfMonth, - Hour, - _, - _, - DST, - DayType, - state.dataGlobal->WarmupFlag); - } - break; - case ReportingFrequency::Daily: - print(outputFile, - "{},{},{:2d},{:2d},{:2d},{}\n", - reportIDString.c_str(), - DayOfSimChr.c_str(), - Month(), - DayOfMonth(), - DST(), - DayType().c_str()); - if (writeToSQL && state.dataSQLiteProcedures->sqlite) { - state.dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(static_cast(reportingInterval), - reportID, - state.dataGlobal->DayOfSim, - state.dataEnvrn->CurEnvirNum, - state.dataGlobal->CalendarYear, - state.dataEnvrn->CurrentYearIsLeapYear, - Month, - DayOfMonth, - _, - _, - _, - DST, - DayType, - state.dataGlobal->WarmupFlag); - } - break; - case ReportingFrequency::Monthly: - print(outputFile, "{},{},{:2d}\n", reportIDString.c_str(), DayOfSimChr.c_str(), Month()); - if (writeToSQL && state.dataSQLiteProcedures->sqlite) { - state.dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(static_cast(reportingInterval), - reportID, - state.dataGlobal->DayOfSim, - state.dataEnvrn->CurEnvirNum, - state.dataGlobal->CalendarYear, - state.dataEnvrn->CurrentYearIsLeapYear, - Month); - } - break; - case ReportingFrequency::Simulation: - print(outputFile, "{},{}\n", reportIDString.c_str(), DayOfSimChr.c_str()); - if (writeToSQL && state.dataSQLiteProcedures->sqlite) { - state.dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(static_cast(reportingInterval), - reportID, - state.dataGlobal->DayOfSim, - state.dataEnvrn->CurEnvirNum, - state.dataGlobal->CalendarYear, - state.dataEnvrn->CurrentYearIsLeapYear); - } - break; - default: - if (state.dataSQLiteProcedures->sqlite) { - state.dataSQLiteProcedures->sqlite->sqliteWriteMessage(format( - "Illegal reportingInterval passed to WriteTimeStampFormatData: {}", static_cast(reportingInterval))); - } - break; - } - } + DayType); + if (writeToSQL && sql) { + sql->createSQLiteTimeIndexRecord(reportingInterval, + reportID, + state.dataGlobal->DayOfSim, + state.dataEnvrn->CurEnvirNum, + state.dataGlobal->CalendarYear, + state.dataEnvrn->CurrentYearIsLeapYear, + Month, + DayOfMonth, + Hour, + -1, // EndMinute + -1, // StartMinute + DST, + DayType, + state.dataGlobal->WarmupFlag); + } + } break; + case ReportFreq::Day: { + assert(Month != -1 && DayOfMonth != -1 && DST != -1 && !DayType.empty()); + print(outputFile, "{},{},{:2d},{:2d},{:2d},{}\n", reportStr, DayOfSimChr, Month, DayOfMonth, DST, DayType); + if (writeToSQL && sql) { + sql->createSQLiteTimeIndexRecord(reportingInterval, + reportID, + state.dataGlobal->DayOfSim, + state.dataEnvrn->CurEnvirNum, + state.dataGlobal->CalendarYear, + state.dataEnvrn->CurrentYearIsLeapYear, + Month, + DayOfMonth, + -1, // Hour + -1, // EndMinute + -1, // StartMinute + DST, + DayType, + state.dataGlobal->WarmupFlag); + } + } break; + + case ReportFreq::Month: { + assert(Month != -1); + print(outputFile, "{},{},{:2d}\n", reportStr, DayOfSimChr, Month); + if (writeToSQL && sql) { + sql->createSQLiteTimeIndexRecord(reportingInterval, + reportID, + state.dataGlobal->DayOfSim, + state.dataEnvrn->CurEnvirNum, + state.dataGlobal->CalendarYear, + state.dataEnvrn->CurrentYearIsLeapYear, + Month); + } + } break; + + case ReportFreq::Simulation: { + print(outputFile, "{},{}\n", reportStr, DayOfSimChr); + if (writeToSQL && sql) { + sql->createSQLiteTimeIndexRecord(reportingInterval, + reportID, + state.dataGlobal->DayOfSim, + state.dataEnvrn->CurEnvirNum, + state.dataGlobal->CalendarYear, + state.dataEnvrn->CurrentYearIsLeapYear); + } + } break; + default: { + if (sql) { + sql->sqliteWriteMessage( + format("Illegal reportingInterval passed to WriteTimeStampFormatData: {}", (int)reportingInterval)); + } + } break; + } // switch (reportFreq) + } // WriteTimeStampFormatData() void WriteYearlyTimeStamp(EnergyPlusData &state, InputOutputFile &outputFile, - std::string const &reportIDString, // The ID of the time stamp - std::string const &yearOfSimChr, // the year of the simulation + int reportID, // The ID of the time stamp + std::string const &yearOfSimChr, // the year of the simulation bool writeToSQL) { - print(outputFile, "{},{}\n", reportIDString, yearOfSimChr); - if (writeToSQL && state.dataSQLiteProcedures->sqlite) { - state.dataSQLiteProcedures->sqlite->createYearlyTimeIndexRecord(state.dataGlobal->CalendarYear, state.dataEnvrn->CurEnvirNum); + print(outputFile, "{},{}\n", reportID, yearOfSimChr); + auto &sql = state.dataSQLiteProcedures->sqlite; + if (writeToSQL && sql) { + sql->createYearlyTimeIndexRecord(state.dataGlobal->CalendarYear, state.dataEnvrn->CurEnvirNum); } - } + } // WriteYearlyTimeStamp() void WriteReportVariableDictionaryItem(EnergyPlusData &state, - ReportingFrequency const reportingInterval, // The reporting interval (e.g., hourly, daily) + ReportFreq const freq, // The reporting interval (e.g., hourly, daily) StoreType const storeType, int const reportID, // The reporting ID for the data [[maybe_unused]] int const indexGroupKey, // The reporting group (e.g., Zone, Plant Loop, etc.) std::string const &indexGroup, // The reporting group (e.g., Zone, Plant Loop, etc.) - std::string const &reportIDChr, // The reporting ID for the data std::string_view const keyedValue, // The key name for the data std::string_view const variableName, // The variable's actual name TimeStepType const timeStepType, - OutputProcessor::Unit const unitsForVar, // The variables units - ObjexxFCL::Optional_string_const customUnitName, + Constant::Units const units, // The variables units + std::string_view const customUnitName, std::string_view const ScheduleName) { @@ -3285,83 +2463,49 @@ namespace OutputProcessor { // and the SQL database // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - std::string FreqString; auto &op = state.dataOutputProcessor; + auto &rf = state.dataResultsFramework->resultsFramework; + auto &sql = state.dataSQLiteProcedures->sqlite; - FreqString = frequencyNotice(storeType, reportingInterval); - - if (!ScheduleName.empty()) { - FreqString = fmt::format("{},{}", FreqString, ScheduleName); - } + std::string_view unitsString = (units == Constant::Units::customEMS && !customUnitName.empty()) + ? customUnitName + : ((units == Constant::Units::Invalid) ? "" : Constant::unitNames[(int)units]); - std::string UnitsString; - if (unitsForVar == OutputProcessor::Unit::customEMS && present(customUnitName)) { - UnitsString = customUnitName; - } else { - UnitsString = unitEnumToString(unitsForVar); + if (state.files.eso.good()) { + print(state.files.eso, + "{},{},{},{} [{}]{}{}{}\n", + reportID, + reportFreqArbitraryInts[(int)freq], + keyedValue, + variableName, + unitsString, + reportingFrequencyNoticeStrings[(int)freq], + !ScheduleName.empty() ? "," : "", + ScheduleName); } - const auto write = [&](InputOutputFile &file, const int interval) { - if (file.good()) { - print(file, "{},{},{},{} [{}]{}\n", reportIDChr, interval, keyedValue, variableName, UnitsString, FreqString); - } - }; - switch (reportingInterval) { - case ReportingFrequency::EachCall: - case ReportingFrequency::TimeStep: - write(state.files.eso, 1); - break; - case ReportingFrequency::Hourly: - op->TrackingHourlyVariables = true; - write(state.files.eso, 1); - break; - case ReportingFrequency::Daily: - op->TrackingDailyVariables = true; - write(state.files.eso, 7); - break; - case ReportingFrequency::Monthly: - op->TrackingMonthlyVariables = true; - write(state.files.eso, 9); - break; - case ReportingFrequency::Simulation: - op->TrackingRunPeriodVariables = true; - write(state.files.eso, 11); - break; - case ReportingFrequency::Yearly: - op->TrackingYearlyVariables = true; - write(state.files.eso, 11); - break; - default: - assert(false); - } + if (freq == ReportFreq::Hour || freq == ReportFreq::Day || freq == ReportFreq::Month || freq == ReportFreq::Year || + freq == ReportFreq::Simulation) + op->freqTrackingVariables[(int)freq] = true; - if (state.dataSQLiteProcedures->sqlite) { - state.dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord(reportID, - static_cast(storeType), - indexGroup, - keyedValue, - variableName, - static_cast(timeStepType), - UnitsString, - static_cast(reportingInterval), - false, - ScheduleName); + if (sql) { + sql->createSQLiteReportDictionaryRecord( + reportID, storeType, indexGroup, keyedValue, variableName, timeStepType, unitsString, freq, false, ScheduleName); } - state.dataResultsFramework->resultsFramework->addReportVariable(keyedValue, variableName, UnitsString, reportingInterval); - // add to ResultsFramework for output variable list, need to check RVI/MVI later - } + rf->addReportVariable(keyedValue, variableName, unitsString, freq); + + } // WriteReportVariableDictionaryItem() void WriteMeterDictionaryItem(EnergyPlusData &state, - ReportingFrequency const reportingInterval, // The reporting interval (e.g., hourly, daily) + ReportFreq const freq, // The reporting interval (e.g., hourly, daily) StoreType const storeType, int const reportID, // The reporting ID in for the variable [[maybe_unused]] int const indexGroupKey, // The reporting group for the variable std::string const &indexGroup, // The reporting group for the variable - std::string const &reportIDChr, // The reporting ID in for the variable std::string const &meterName, // The variable's meter name - OutputProcessor::Unit const unit, // The variables units + Constant::Units const units, // The variables units bool const cumulativeMeterFlag, // A flag indicating cumulative data bool const meterFileOnlyFlag // A flag indicating whether the data is to be written to standard output ) @@ -3380,20 +2524,21 @@ namespace OutputProcessor { // data reporting to the SQL database // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - std::string UnitsString = unitEnumToString(unit); + auto &rf = state.dataResultsFramework->resultsFramework; + auto &sql = state.dataSQLiteProcedures->sqlite; - std::string const FreqString(frequencyNotice(storeType, reportingInterval)); + std::string FreqString = std::string(reportingFrequencyNoticeStrings[(int)freq]); + std::string FreqString2 = FreqString.substr(0, index(FreqString, '[')); const auto print_meter = [&](EnergyPlusData &state, const int frequency) { const auto out = [&](InputOutputFile &of) { if (of.good()) { if (cumulativeMeterFlag) { static constexpr std::string_view fmt = "{},{},Cumulative {} [{}]{}\n"; - size_t const lenString = index(FreqString, '['); - print(of, fmt, reportIDChr, 1, meterName, UnitsString, FreqString.substr(0, lenString)); + print(of, fmt, reportID, 1, meterName, Constant::unitNames[(int)units], FreqString2); } else { static constexpr std::string_view fmt = "{},{},{} [{}]{}\n"; - print(of, fmt, reportIDChr, frequency, meterName, UnitsString, FreqString); + print(of, fmt, reportID, frequency, meterName, Constant::unitNames[(int)units], FreqString); } } }; @@ -3404,49 +2549,25 @@ namespace OutputProcessor { } }; - switch (reportingInterval) { - case ReportingFrequency::EachCall: - case ReportingFrequency::TimeStep: - case ReportingFrequency::Hourly: // -1, 0, 1 - print_meter(state, 1); - break; - case ReportingFrequency::Daily: // 2 - print_meter(state, 7); - break; - case ReportingFrequency::Monthly: // 3 - print_meter(state, 9); - break; - case ReportingFrequency::Yearly: // 5 - case ReportingFrequency::Simulation: // 4 - print_meter(state, 11); - break; - default: - assert(false); - } + print_meter(state, reportFreqArbitraryInts[(int)freq]); static constexpr std::string_view keyedValueStringCum("Cumulative "); static constexpr std::string_view keyedValueStringNon; std::string_view const keyedValueString(cumulativeMeterFlag ? keyedValueStringCum : keyedValueStringNon); - if (state.dataSQLiteProcedures->sqlite) { - state.dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord(reportID, - static_cast(storeType), - indexGroup, - keyedValueString, - meterName, - 1, - UnitsString, - static_cast(reportingInterval), - true); + if (sql) { + sql->createSQLiteReportDictionaryRecord( + reportID, storeType, indexGroup, keyedValueString, meterName, TimeStepType::Zone, Constant::unitNames[(int)units], freq, true); } - state.dataResultsFramework->resultsFramework->addReportMeter(meterName, UnitsString, reportingInterval); // add to ResultsFramework for output variable list, need to check RVI/MVI later - } + rf->addReportMeter(meterName, Constant::unitNames[(int)units], freq); + + } // WriteMeterDictionaryItem() void WriteRealVariableOutput(EnergyPlusData &state, - RealVariables &realVar, // Real variable to write out - ReportingFrequency const reportType // The report type or interval (e.g., hourly) + OutVarReal *realVar, // Real variable to write out + ReportFreq const reportFreq // The report type or interval (e.g., hourly) ) { @@ -3462,37 +2583,35 @@ namespace OutputProcessor { // of the UpdateDataandReport subroutine. The code was moved to facilitate // easier maintenance and writing of data to the SQL database. - if (realVar.Report && realVar.frequency == reportType && realVar.Stored) { - if (realVar.NumStored > 0.0) { + if (realVar->Report && realVar->freq == reportFreq && realVar->Stored) { + if (realVar->NumStored > 0.0) { WriteReportRealData(state, - realVar.ReportID, - realVar.ReportIDChr, - realVar.StoreValue, - realVar.storeType, - realVar.NumStored, - realVar.frequency, - realVar.MinValue, - realVar.minValueDate, - realVar.MaxValue, - realVar.maxValueDate); + realVar->ReportID, + realVar->StoreValue, + realVar->storeType, + realVar->NumStored, + realVar->freq, + realVar->MinValue, + realVar->minValueDate, + realVar->MaxValue, + realVar->maxValueDate); ++state.dataGlobal->StdOutputRecordCount; } - realVar.StoreValue = 0.0; - realVar.NumStored = 0.0; - realVar.MinValue = MinSetValue; - realVar.MaxValue = MaxSetValue; - realVar.Stored = false; + realVar->StoreValue = 0.0; + realVar->NumStored = 0.0; + realVar->MinValue = MinSetValue; + realVar->MaxValue = MaxSetValue; + realVar->Stored = false; } - } + } // WriteRealVariableOutput() void WriteReportRealData(EnergyPlusData &state, int const reportID, - std::string const &creportID, Real64 const repValue, StoreType const storeType, Real64 const numOfItemsStored, - ReportingFrequency const reportingInterval, + ReportFreq const freq, Real64 const minValue, int const minValueDate, Real64 const MaxValue, @@ -3514,6 +2633,8 @@ namespace OutputProcessor { std::string NumberOut; // Character for producing "number out" Real64 repVal(repValue); // The variable's value + auto &rf = state.dataResultsFramework->resultsFramework; + auto &sql = state.dataSQLiteProcedures->sqlite; if (storeType == StoreType::Averaged) { repVal /= numOfItemsStored; @@ -3521,75 +2642,62 @@ namespace OutputProcessor { if (repVal == 0.0) { NumberOut = "0.0"; } else { - dtoa(repVal, state.dataOutputProcessor->s_WriteReportRealData); - NumberOut = std::string(state.dataOutputProcessor->s_WriteReportRealData); + char realData[129]; + dtoa(repVal, realData); + NumberOut = std::string(realData); } - if (state.dataResultsFramework->resultsFramework->timeSeriesEnabled()) { + if (rf->timeSeriesEnabled()) { //// The others (<= hourly) are handled inline with the code - // add to daily TS data store - if (reportingInterval == ReportingFrequency::Daily) { - state.dataResultsFramework->resultsFramework->RIDailyTSData.pushVariableValue(reportID, repVal); - } - // add to monthly TS data store - if (reportingInterval == ReportingFrequency::Monthly) { - state.dataResultsFramework->resultsFramework->RIMonthlyTSData.pushVariableValue(reportID, repVal); - } - // add to run period TS data store - if (reportingInterval == ReportingFrequency::Simulation) { - state.dataResultsFramework->resultsFramework->RIRunPeriodTSData.pushVariableValue(reportID, repVal); - } - // add to annual TS data store - if (reportingInterval == ReportingFrequency::Yearly) { - state.dataResultsFramework->resultsFramework->RIYearlyTSData.pushVariableValue(reportID, repVal); + if (freq == ReportFreq::Day || freq == ReportFreq::Month || freq == ReportFreq::Year || freq == ReportFreq::Simulation) { + rf->freqTSData[(int)freq].pushVariableValue(reportID, repVal); } } - if (state.dataSQLiteProcedures->sqlite) { - state.dataSQLiteProcedures->sqlite->createSQLiteReportDataRecord( - reportID, repVal, static_cast(reportingInterval), minValue, minValueDate, MaxValue, maxValueDate); + if (sql) { + sql->createSQLiteReportDataRecord(reportID, repVal, freq, minValue, minValueDate, MaxValue, maxValueDate); } - if ((reportingInterval == ReportingFrequency::EachCall) || (reportingInterval == ReportingFrequency::TimeStep) || - (reportingInterval == ReportingFrequency::Hourly)) { // -1, 0, 1 + if ((freq == ReportFreq::EachCall) || (freq == ReportFreq::TimeStep) || (freq == ReportFreq::Hour)) { // -1, 0, 1 if (state.files.eso.good()) { - print(state.files.eso, "{},{}\n", creportID, NumberOut); + print(state.files.eso, "{},{}\n", reportID, NumberOut); } - } else { // if ( ( reportingInterval == ReportingFrequency::Daily ) || ( reportingInterval == ReportingFrequency::Monthly ) || ( - // reportingInterval == ReportingFrequency::Simulation ) ) { // 2, 3, 4, 5 + } else { // if ( ( reportingInterval == ReportFreq::Daily ) || ( reportingInterval == ReportFreq::Monthly ) || ( + // reportingInterval == ReportFreq::Simulation ) ) { // 2, 3, 4, 5 std::string MaxOut; // Character for Max out string std::string MinOut; // Character for Min out string if (MaxValue == 0.0) { MaxOut = "0.0"; } else { - dtoa(MaxValue, state.dataOutputProcessor->s_WriteReportRealData); - MaxOut = std::string(state.dataOutputProcessor->s_WriteReportRealData); + char realData[129]; + dtoa(MaxValue, realData); + MaxOut = std::string(realData); } if (minValue == 0.0) { MinOut = "0.0"; } else { - dtoa(minValue, state.dataOutputProcessor->s_WriteReportRealData); - MinOut = std::string(state.dataOutputProcessor->s_WriteReportRealData); + char realData[129]; + dtoa(minValue, realData); + MinOut = std::string(realData); } // Append the min and max strings with date information - ProduceMinMaxString(MinOut, minValueDate, reportingInterval); - ProduceMinMaxString(MaxOut, maxValueDate, reportingInterval); + ProduceMinMaxString(MinOut, minValueDate, freq); + ProduceMinMaxString(MaxOut, maxValueDate, freq); if (state.files.eso.good()) { - print(state.files.eso, "{},{},{},{}\n", creportID, NumberOut, MinOut, MaxOut); + print(state.files.eso, "{},{},{},{}\n", reportID, NumberOut, MinOut, MaxOut); } } - } + } // WriteReportRealData() void WriteCumulativeReportMeterData(EnergyPlusData &state, - int const reportID, // The variable's report ID - std::string const &creportID, // variable ID in characters - Real64 const repValue, // The variable's value - bool const meterOnlyFlag // A flag that indicates if the data should be written to standard output + int const reportID, // The variable's report ID + Real64 const repValue, // The variable's value + bool const meterOnlyFlag // A flag that indicates if the data should be written to standard output ) { @@ -3604,37 +2712,38 @@ namespace OutputProcessor { // SQL database. std::string NumberOut; // Character for producing "number out" + auto &sql = state.dataSQLiteProcedures->sqlite; if (repValue == 0.0) { NumberOut = "0.0"; } else { - dtoa(repValue, state.dataOutputProcessor->s_WriteCumulativeReportMeterData); - NumberOut = std::string(state.dataOutputProcessor->s_WriteCumulativeReportMeterData); + char meterData[129]; + dtoa(repValue, meterData); + NumberOut = std::string(meterData); } - if (state.dataSQLiteProcedures->sqlite) { - state.dataSQLiteProcedures->sqlite->createSQLiteReportDataRecord(reportID, repValue); + if (sql) { + sql->createSQLiteReportDataRecord(reportID, repValue); } - if (state.files.mtr.good()) print(state.files.mtr, "{},{}\n", creportID, NumberOut); + if (state.files.mtr.good()) print(state.files.mtr, "{},{}\n", reportID, NumberOut); ++state.dataGlobal->StdMeterRecordCount; if (!meterOnlyFlag) { - if (state.files.eso.good()) print(state.files.eso, "{},{}\n", creportID, NumberOut); + if (state.files.eso.good()) print(state.files.eso, "{},{}\n", reportID, NumberOut); ++state.dataGlobal->StdOutputRecordCount; } - } + } // WriteCumulativeReportMeterData() void WriteReportMeterData(EnergyPlusData &state, - int const reportID, // The variable's report ID - std::string const &creportID, // variable ID in characters - Real64 const repValue, // The variable's value - ReportingFrequency const reportingInterval, // The variable's reporting interval (e.g., hourly) - Real64 const minValue, // The variable's minimum value during the reporting interval - int const minValueDate, // The date the minimum value occurred - Real64 const MaxValue, // The variable's maximum value during the reporting interval - int const maxValueDate, // The date of the maximum value - bool const meterOnlyFlag // Indicates whether the data is for the meter file only + int const reportID, // The variable's report ID + Real64 const repValue, // The variable's value + ReportFreq const freq, // The variable's reporting interval (e.g., hourly) + Real64 const minValue, // The variable's minimum value during the reporting interval + int const minValueDate, // The date the minimum value occurred + Real64 const MaxValue, // The variable's maximum value during the reporting interval + int const maxValueDate, // The date of the maximum value + bool const meterOnlyFlag // Indicates whether the data is for the meter file only ) { @@ -3649,33 +2758,28 @@ namespace OutputProcessor { // SQL database. std::string NumberOut; // Character for producing "number out" + auto &sql = state.dataSQLiteProcedures->sqlite; if (repValue == 0.0) { NumberOut = "0.0"; } else { - dtoa(repValue, state.dataOutputProcessor->s_WriteReportMeterData); - NumberOut = std::string(state.dataOutputProcessor->s_WriteReportMeterData); + char meterData[129]; + dtoa(repValue, meterData); + NumberOut = std::string(meterData); } - if (state.dataSQLiteProcedures->sqlite) { - state.dataSQLiteProcedures->sqlite->createSQLiteReportDataRecord(reportID, - repValue, - static_cast(reportingInterval), - minValue, - minValueDate, - MaxValue, - maxValueDate, - state.dataGlobal->MinutesPerTimeStep); + if (sql) { + sql->createSQLiteReportDataRecord( + reportID, repValue, freq, minValue, minValueDate, MaxValue, maxValueDate, state.dataGlobal->MinutesPerTimeStep); } - if ((reportingInterval == ReportingFrequency::EachCall) || (reportingInterval == ReportingFrequency::TimeStep) || - (reportingInterval == ReportingFrequency::Hourly)) { // -1, 0, 1 + if ((freq == ReportFreq::EachCall) || (freq == ReportFreq::TimeStep) || (freq == ReportFreq::Hour)) { // -1, 0, 1 if (state.files.mtr.good()) { - print(state.files.mtr, "{},{}\n", creportID, NumberOut); + print(state.files.mtr, "{},{}\n", reportID, NumberOut); } ++state.dataGlobal->StdMeterRecordCount; if (state.files.eso.good() && !meterOnlyFlag) { - print(state.files.eso, "{},{}\n", creportID, NumberOut); + print(state.files.eso, "{},{}\n", reportID, NumberOut); ++state.dataGlobal->StdOutputRecordCount; } } else { // if ( ( reportingInterval == ReportDaily ) || ( reportingInterval == ReportMonthly ) || ( reportingInterval == ReportSim ) ) { @@ -3686,37 +2790,38 @@ namespace OutputProcessor { if (MaxValue == 0.0) { MaxOut = "0.0"; } else { - dtoa(MaxValue, state.dataOutputProcessor->s_WriteReportMeterData); - MaxOut = std::string(state.dataOutputProcessor->s_WriteReportMeterData); + char meterData[129]; + dtoa(MaxValue, meterData); + MaxOut = std::string(meterData); } if (minValue == 0.0) { MinOut = "0.0"; } else { - dtoa(minValue, state.dataOutputProcessor->s_WriteReportMeterData); - MinOut = std::string(state.dataOutputProcessor->s_WriteReportMeterData); + char meterData[129]; + dtoa(minValue, meterData); + MinOut = std::string(meterData); } // Append the min and max strings with date information - ProduceMinMaxString(MinOut, minValueDate, reportingInterval); - ProduceMinMaxString(MaxOut, maxValueDate, reportingInterval); + ProduceMinMaxString(MinOut, minValueDate, freq); + ProduceMinMaxString(MaxOut, maxValueDate, freq); if (state.files.mtr.good()) { - print(state.files.mtr, "{},{},{},{}\n", creportID, NumberOut, MinOut, MaxOut); + print(state.files.mtr, "{},{},{},{}\n", reportID, NumberOut, MinOut, MaxOut); } ++state.dataGlobal->StdMeterRecordCount; if (state.files.eso.good() && !meterOnlyFlag) { - print(state.files.eso, "{},{},{},{}\n", creportID, NumberOut, MinOut, MaxOut); + print(state.files.eso, "{},{},{},{}\n", reportID, NumberOut, MinOut, MaxOut); ++state.dataGlobal->StdOutputRecordCount; } } - } + } // WriteReportMeterData() void WriteNumericData(EnergyPlusData &state, - int const reportID, // The variable's reporting ID - std::string const &creportID, // variable ID in characters - Real64 const repValue // The variable's value + int const reportID, // The variable's reporting ID + Real64 const repValue // The variable's value ) { // SUBROUTINE INFORMATION: @@ -3733,24 +2838,24 @@ namespace OutputProcessor { // Much of the code here was an included in earlier versions // of the UpdateDataandReport subroutine. The code was moved to facilitate // easier maintenance and writing of data to the SQL database. + auto &sql = state.dataSQLiteProcedures->sqlite; if (state.dataSysVars->UpdateDataDuringWarmupExternalInterface && !state.dataSysVars->ReportDuringWarmup) return; - dtoa(repValue, state.dataOutputProcessor->s_WriteNumericData); - - if (state.dataSQLiteProcedures->sqlite) { - state.dataSQLiteProcedures->sqlite->createSQLiteReportDataRecord(reportID, repValue); + if (sql) { + sql->createSQLiteReportDataRecord(reportID, repValue); } if (state.files.eso.good()) { - print(state.files.eso, "{},{}\n", creportID, state.dataOutputProcessor->s_WriteNumericData); + char numericData[129]; + dtoa(repValue, numericData); + print(state.files.eso, "{},{}\n", reportID, numericData); } - } + } // WriteNumericData() void WriteNumericData(EnergyPlusData &state, - int const reportID, // The variable's reporting ID - std::string const &creportID, // variable ID in characters - int32_t const repValue // The variable's value + int const reportID, // The variable's reporting ID + int32_t const repValue // The variable's value ) { // SUBROUTINE INFORMATION: @@ -3769,19 +2874,20 @@ namespace OutputProcessor { // easier maintenance and writing of data to the SQL database. // i32toa(repValue, state.dataOutputProcessor->s_WriteNumericData); + auto &sql = state.dataSQLiteProcedures->sqlite; - if (state.dataSQLiteProcedures->sqlite) { - state.dataSQLiteProcedures->sqlite->createSQLiteReportDataRecord(reportID, repValue); + if (sql) { + sql->createSQLiteReportDataRecord(reportID, repValue); } if (state.files.eso.good()) { - print(state.files.eso, "{},{}\n", creportID, fmt::format_int(repValue).c_str()); + print(state.files.eso, "{},{}\n", reportID, fmt::format_int(repValue).c_str()); } - } + } // WriteNumericData() void WriteIntegerVariableOutput(EnergyPlusData &state, - IntegerVariables &intVar, // Integer variable to write out - ReportingFrequency const reportType // The report type (i.e., the reporting interval) + OutVarInt *intVar, // Integer variable to write out + ReportFreq const reportFreq // The report type (i.e., the reporting interval) ) { @@ -3799,41 +2905,39 @@ namespace OutputProcessor { if (state.dataSysVars->UpdateDataDuringWarmupExternalInterface && !state.dataSysVars->ReportDuringWarmup) return; - if (intVar.Report && intVar.frequency == reportType && intVar.Stored) { - if (intVar.NumStored > 0.0) { + if (intVar->Report && intVar->freq == reportFreq && intVar->Stored) { + if (intVar->NumStored > 0.0) { WriteReportIntegerData(state, - intVar.ReportID, - intVar.ReportIDChr, - intVar.StoreValue, - intVar.storeType, - intVar.NumStored, - intVar.frequency, - intVar.MinValue, - intVar.minValueDate, - intVar.MaxValue, - intVar.maxValueDate); + intVar->ReportID, + intVar->StoreValue, + intVar->storeType, + intVar->NumStored, + intVar->freq, + intVar->MinValue, + intVar->minValueDate, + intVar->MaxValue, + intVar->maxValueDate); ++state.dataGlobal->StdOutputRecordCount; } - intVar.StoreValue = 0.0; - intVar.NumStored = 0.0; - intVar.MinValue = IMinSetValue; - intVar.MaxValue = IMaxSetValue; - intVar.Stored = false; + intVar->StoreValue = 0.0; + intVar->NumStored = 0.0; + intVar->MinValue = IMinSetValue; + intVar->MaxValue = IMaxSetValue; + intVar->Stored = false; } - } + } // WriteIntegerVariableOutput() void WriteReportIntegerData(EnergyPlusData &state, - int const reportID, // The variable's reporting ID - std::string const &reportIDString, // The variable's reporting ID (character) - Real64 const repValue, // The variable's value - StoreType const storeType, // Type of item (averaged or summed) - Real64 const numOfItemsStored, // The number of items (hours or timesteps) of data stored - ReportingFrequency const reportingInterval, // The reporting interval (e.g., monthly) - int const minValue, // The variable's minimum value during the reporting interval - int const minValueDate, // The date the minimum value occurred - int const MaxValue, // The variable's maximum value during the reporting interval - int const maxValueDate // The date the maximum value occurred + int const reportID, // The variable's reporting ID + Real64 const repValue, // The variable's value + StoreType const storeType, // Type of item (averaged or summed) + Real64 const numOfItemsStored, // The number of items (hours or timesteps) of data stored + ReportFreq const freq, // The reporting interval (e.g., monthly) + int const minValue, // The variable's minimum value during the reporting interval + int const minValueDate, // The date the minimum value occurred + int const MaxValue, // The variable's maximum value during the reporting interval + int const maxValueDate // The date the maximum value occurred ) { @@ -3857,6 +2961,8 @@ namespace OutputProcessor { Real64 rmaxValue; Real64 rminValue; Real64 repVal; // The variable's value + auto &rf = state.dataResultsFramework->resultsFramework; + auto &sql = state.dataSQLiteProcedures->sqlite; repVal = repValue; if (storeType == StoreType::Averaged) { @@ -3871,56 +2977,39 @@ namespace OutputProcessor { // Append the min and max strings with date information MinOut = fmt::to_string(minValue); MaxOut = fmt::to_string(MaxValue); - ProduceMinMaxString(MinOut, minValueDate, reportingInterval); - ProduceMinMaxString(MaxOut, maxValueDate, reportingInterval); + ProduceMinMaxString(MinOut, minValueDate, freq); + ProduceMinMaxString(MaxOut, maxValueDate, freq); - if (state.dataResultsFramework->resultsFramework->timeSeriesEnabled()) { + if (rf->timeSeriesEnabled() && + (freq == ReportFreq::Day || freq == ReportFreq::Month || freq == ReportFreq::Year || freq == ReportFreq::Simulation)) { // add to daily TS data store - if (reportingInterval == ReportingFrequency::Daily) { - state.dataResultsFramework->resultsFramework->RIDailyTSData.pushVariableValue(reportID, repVal); - } - // add to monthly TS data store - if (reportingInterval == ReportingFrequency::Monthly) { - state.dataResultsFramework->resultsFramework->RIMonthlyTSData.pushVariableValue(reportID, repVal); - } - // add to run period TS data store - if (reportingInterval == ReportingFrequency::Simulation) { - state.dataResultsFramework->resultsFramework->RIRunPeriodTSData.pushVariableValue(reportID, repVal); - } - // add to annual TS data store - if (reportingInterval == ReportingFrequency::Yearly) { - state.dataResultsFramework->resultsFramework->RIYearlyTSData.pushVariableValue(reportID, repVal); - } + rf->freqTSData[(int)freq].pushVariableValue(reportID, repVal); } rminValue = minValue; rmaxValue = MaxValue; - if (state.dataSQLiteProcedures->sqlite) { - state.dataSQLiteProcedures->sqlite->createSQLiteReportDataRecord( - reportID, repVal, static_cast(reportingInterval), rminValue, minValueDate, rmaxValue, maxValueDate); + if (sql) { + sql->createSQLiteReportDataRecord(reportID, repVal, freq, rminValue, minValueDate, rmaxValue, maxValueDate); } - if ((reportingInterval == ReportingFrequency::EachCall) || (reportingInterval == ReportingFrequency::TimeStep) || - (reportingInterval == ReportingFrequency::Hourly)) { // -1, 0, 1 + if ((freq == ReportFreq::EachCall) || (freq == ReportFreq::TimeStep) || (freq == ReportFreq::Hour)) { // -1, 0, 1 if (state.files.eso.good()) { - print(state.files.eso, "{},{}\n", reportIDString, NumberOut); + print(state.files.eso, "{},{}\n", reportID, NumberOut); } } else { // if ( ( reportingInterval == ReportDaily ) || ( reportingInterval == ReportMonthly ) || ( reportingInterval == ReportSim ) ) { // // 2, 3, 4 if (state.files.eso.good()) { - print(state.files.eso, "{},{},{},{}\n", reportIDString, NumberOut, MinOut, MaxOut); + print(state.files.eso, "{},{},{},{}\n", reportID, NumberOut, MinOut, MaxOut); } } - } + } // WriteReportIntegerData() - int DetermineIndexGroupKeyFromMeterName(EnergyPlusData &state, std::string const &meterName) // the meter name + int DetermineIndexGroupKeyFromMeterName([[maybe_unused]] EnergyPlusData &state, std::string const &meterName) // the meter name { // FUNCTION INFORMATION: // AUTHOR Greg Stark // DATE WRITTEN May 2009 - // MODIFIED na - // RE-ENGINEERED na // PURPOSE OF THIS FUNCTION: // This function attemps to guess determine how a meter variable should be @@ -3929,43 +3018,43 @@ namespace OutputProcessor { // Facility indices are in the 100s if (has(meterName, "Electricity:Facility")) { - state.dataOutputProcessor->indexGroupKey = 100; + return 100; } else if (has(meterName, "NaturalGas:Facility")) { - state.dataOutputProcessor->indexGroupKey = 101; + return 101; } else if (has(meterName, "DistricHeatingWater:Facility")) { - state.dataOutputProcessor->indexGroupKey = 102; + return 102; } else if (has(meterName, "DistricCooling:Facility")) { - state.dataOutputProcessor->indexGroupKey = 103; + return 103; } else if (has(meterName, "ElectricityNet:Facility")) { - state.dataOutputProcessor->indexGroupKey = 104; + return 104; // Building indices are in the 200s } else if (has(meterName, "Electricity:Building")) { - state.dataOutputProcessor->indexGroupKey = 201; + return 201; } else if (has(meterName, "NaturalGas:Building")) { - state.dataOutputProcessor->indexGroupKey = 202; + return 202; // HVAC indices are in the 300s } else if (has(meterName, "Electricity:HVAC")) { - state.dataOutputProcessor->indexGroupKey = 301; + return 301; // InteriorLights:Electricity:Zone indices are in the 500s } else if (has(meterName, "InteriorLights:Electricity:Zone")) { - state.dataOutputProcessor->indexGroupKey = 501; + return 501; // InteriorLights:Electricity indices are in the 400s } else if (has(meterName, "InteriorLights:Electricity")) { - state.dataOutputProcessor->indexGroupKey = 401; + return 401; // Unknown items have negative indices } else { - state.dataOutputProcessor->indexGroupKey = -11; + return -11; } - return state.dataOutputProcessor->indexGroupKey; - } + return -1; + } // DetermineIndexGroupKeyFromMeterName() - std::string DetermineIndexGroupFromMeterGroup(MeterType const &meter) // the meter + std::string DetermineIndexGroupFromMeterGroup(Meter const *meter) // the meter { // FUNCTION INFORMATION: @@ -3981,26 +3070,26 @@ namespace OutputProcessor { // Return value std::string indexGroup; - if (len(meter.Group) > 0) { - indexGroup = meter.Group; + if (meter->sovGroup != SOVGroup::Invalid) { + indexGroup = sovGroupNames[(int)meter->sovGroup]; } else { indexGroup = "Facility"; } - if (len(meter.ResourceType) > 0) { - indexGroup += ":" + meter.ResourceType; + if (meter->resource != Constant::eResource::Invalid) { + indexGroup += format(":{}", Constant::eResourceNames[(int)meter->resource]); } - if (len(meter.EndUse) > 0) { - indexGroup += ":" + meter.EndUse; + if (meter->sovEndUseCat != SOVEndUseCat::Invalid) { + indexGroup += format(":{}", sovEndUseCatNames[(int)meter->sovEndUseCat]); } - if (len(meter.EndUseSub) > 0) { - indexGroup += ":" + meter.EndUseSub; + if (len(meter->EndUseSub) > 0) { + indexGroup += ":" + meter->EndUseSub; } return indexGroup; - } + } // DetermineIndexGroupFromMeterGroup() void SetInternalVariableValue(EnergyPlusData &state, OutputProcessor::VariableType const varType, // 1=integer, 2=real, 3=meter @@ -4013,8 +3102,6 @@ namespace OutputProcessor { // SUBROUTINE INFORMATION: // AUTHOR B. Griffith // DATE WRITTEN August 2012 - // MODIFIED na - // RE-ENGINEERED na // PURPOSE OF THIS SUBROUTINE: // This is a simple set routine for output pointers @@ -4028,358 +3115,50 @@ namespace OutputProcessor { auto &op = state.dataOutputProcessor; if (varType == VariableType::Integer) { - *op->IVariableTypes(keyVarIndex).VarPtr.Which = SetIntVal; + OutVarInt *varInt = dynamic_cast(op->outVars[keyVarIndex]); + assert(varInt != nullptr); + *varInt->Which = SetIntVal; } else if (varType == VariableType::Real) { - *op->RVariableTypes(keyVarIndex).VarPtr.Which = SetRealVal; + OutVarReal *varReal = dynamic_cast(op->outVars[keyVarIndex]); + assert(varReal != nullptr); + *varReal->Which = SetRealVal; } else if (varType == VariableType::Meter) { - op->EnergyMeters(keyVarIndex).CurTSValue = SetRealVal; + op->meters[keyVarIndex]->CurTSValue = SetRealVal; } - } - - // returns the string corresponding to the OutputProcessor::Unit enum in brackets - std::string unitEnumToStringBrackets(EnergyPlus::OutputProcessor::Unit const unitIn) - { - // J.Glazer - August/September 2017 - return " [" + unitEnumToString(unitIn) + "]"; - } + } // SetInternalVariableValue() // returns the unit string for a DDVariableTypes item and custom string when customEMS is used - std::string unitStringFromDDitem(EnergyPlusData &state, int const ddItemPtr // index provided for DDVariableTypes + std::string unitStringFromDDitem(EnergyPlusData &state, int const ddNum // index provided for DDVariableTypes ) { - // J.Glazer - August/September 2017 - OutputProcessor::Unit ddUnit = state.dataOutputProcessor->DDVariableTypes(ddItemPtr).units; - if (ddUnit != OutputProcessor::Unit::customEMS) { - return unitEnumToStringBrackets(ddUnit); - } else { - return " [" + state.dataOutputProcessor->DDVariableTypes(ddItemPtr).unitNameCustomEMS + "]"; - } - } - - // returns the string corresponding to the OutputProcessor::Unit enum - std::string unitEnumToString(EnergyPlus::OutputProcessor::Unit const unitIn) - { - // J.Glazer - August/September 2017 - // TODO: Use a constexpr array of string views - switch (unitIn) { - case OutputProcessor::Unit::J: - return "J"; - case OutputProcessor::Unit::W: - return "W"; - case OutputProcessor::Unit::C: - return "C"; - case OutputProcessor::Unit::None: - return ""; - case OutputProcessor::Unit::kg: - return "kg"; - case OutputProcessor::Unit::W_m2: - return "W/m2"; - case OutputProcessor::Unit::m3: - return "m3"; - case OutputProcessor::Unit::hr: - return "hr"; - case OutputProcessor::Unit::kg_s: - return "kg/s"; - case OutputProcessor::Unit::deg: - return "deg"; - case OutputProcessor::Unit::m3_s: - return "m3/s"; - case OutputProcessor::Unit::W_m2K: - return "W/m2-K"; - case OutputProcessor::Unit::kgWater_kgDryAir: - return "kgWater/kgDryAir"; - case OutputProcessor::Unit::Perc: - return "%"; - case OutputProcessor::Unit::m_s: - return "m/s"; - case OutputProcessor::Unit::lux: - return "lux"; - case OutputProcessor::Unit::kgWater_s: - return "kgWater/s"; - case OutputProcessor::Unit::rad: - return "rad"; - case OutputProcessor::Unit::Pa: - return "Pa"; - case OutputProcessor::Unit::J_kg: - return "J/kg"; - case OutputProcessor::Unit::m: - return "m"; - case OutputProcessor::Unit::lum_W: - return "lum/W"; - case OutputProcessor::Unit::kg_m3: - return "kg/m3"; - case OutputProcessor::Unit::L: - return "L"; - case OutputProcessor::Unit::ach: - return "ach"; - case OutputProcessor::Unit::m2: - return "m2"; - case OutputProcessor::Unit::deltaC: - return "deltaC"; - case OutputProcessor::Unit::J_kgK: - return "J/kg-K"; - case OutputProcessor::Unit::W_W: - return "W/W"; - case OutputProcessor::Unit::clo: - return "clo"; - case OutputProcessor::Unit::W_mK: - return "W/m-K"; - case OutputProcessor::Unit::W_K: - return "W/K"; - case OutputProcessor::Unit::K_W: - return "K/W"; - case OutputProcessor::Unit::ppm: - return "ppm"; - case OutputProcessor::Unit::kg_kg: - return "kg/kg"; - case OutputProcessor::Unit::s: - return "s"; - case OutputProcessor::Unit::cd_m2: - return "cd/m2"; - case OutputProcessor::Unit::kmol_s: - return "kmol/s"; - case OutputProcessor::Unit::K_m: - return "K/m"; - case OutputProcessor::Unit::min: - return "min"; - case OutputProcessor::Unit::J_kgWater: - return "J/kgWater"; - case OutputProcessor::Unit::rev_min: - return "rev/min"; - case OutputProcessor::Unit::kg_m2s: - return "kg/m2-s"; - case OutputProcessor::Unit::J_m2: - return "J/m2"; - case OutputProcessor::Unit::A: - return "A"; - case OutputProcessor::Unit::V: - return "V"; - case OutputProcessor::Unit::W_m2C: - return "W/m2-C"; - case OutputProcessor::Unit::Ah: - return "Ah"; - case OutputProcessor::Unit::Btu_h_W: - return "Btu/h-W"; - default: - return "unknown"; - } - } - - // returns the OutputProcessor::Unit enum value when a string containing the units is provided without brackets - OutputProcessor::Unit unitStringToEnum(std::string const &unitIn) - { - // J.Glazer - August/September 2017 - std::string unitUpper = Util::makeUPPER(unitIn); - if (unitUpper == "J") { - return OutputProcessor::Unit::J; - } else if (unitUpper == "DELTAC") { - return OutputProcessor::Unit::deltaC; - } else if (unitUpper.empty()) { - return OutputProcessor::Unit::None; - } else if (unitUpper == "W") { - return OutputProcessor::Unit::W; - } else if (unitUpper == "C") { - return OutputProcessor::Unit::C; - } else if (unitUpper == "KG/S") { - return OutputProcessor::Unit::kg_s; - } else if (unitUpper == "KGWATER/KGDRYAIR") { - return OutputProcessor::Unit::kgWater_kgDryAir; - } else if (unitUpper == "PPM") { - return OutputProcessor::Unit::ppm; - } else if (unitUpper == "PA") { - return OutputProcessor::Unit::Pa; - } else if (unitUpper == "M3/S") { - return OutputProcessor::Unit::m3_s; - } else if (unitUpper == "MIN") { - return OutputProcessor::Unit::min; - } else if (unitUpper == "M3") { - return OutputProcessor::Unit::m3; - } else if (unitUpper == "KG") { - return OutputProcessor::Unit::kg; - } else if (unitUpper == "ACH") { - return OutputProcessor::Unit::ach; - } else if (unitUpper == "W/W") { - return OutputProcessor::Unit::W_W; - } else if (unitUpper == "LUX") { - return OutputProcessor::Unit::lux; - } else if (unitUpper == "LUM/W") { - return OutputProcessor::Unit::lum_W; - } else if (unitUpper == "HR") { - return OutputProcessor::Unit::hr; - } else if (unitUpper == "CD/M2") { - return OutputProcessor::Unit::cd_m2; - } else if (unitUpper == "J/KGWATER") { - return OutputProcessor::Unit::J_kgWater; - } else if (unitUpper == "M/S") { - return OutputProcessor::Unit::m_s; - } else if (unitUpper == "W/M2") { - return OutputProcessor::Unit::W_m2; - } else if (unitUpper == "M") { - return OutputProcessor::Unit::m; - } else if (unitUpper == "AH") { - return OutputProcessor::Unit::Ah; - } else if (unitUpper == "A") { - return OutputProcessor::Unit::A; - } else if (unitUpper == "V") { - return OutputProcessor::Unit::V; - } else if (unitUpper == "KMOL/S") { - return OutputProcessor::Unit::kmol_s; - } else if (unitUpper == "REV/MIN") { - return OutputProcessor::Unit::rev_min; - } else if (unitUpper == "W/M2-K") { - return OutputProcessor::Unit::W_m2K; - } else if (unitUpper == "J/KG") { - return OutputProcessor::Unit::J_kg; - } else if (unitUpper == "KG/KG") { - return OutputProcessor::Unit::kg_kg; - } else if (unitUpper == "%") { - return OutputProcessor::Unit::Perc; - } else if (unitUpper == "DEG") { - return OutputProcessor::Unit::deg; - } else if (unitUpper == "S") { - return OutputProcessor::Unit::s; - } else if (unitUpper == "KG/M3") { - return OutputProcessor::Unit::kg_m3; - } else if (unitUpper == "KG/M2-S") { - return OutputProcessor::Unit::kg_m2s; - } else if (unitUpper == "J/KG-K") { - return OutputProcessor::Unit::J_kgK; - } else if (unitUpper == "L") { - return OutputProcessor::Unit::L; - } else if (unitUpper == "K/M") { - return OutputProcessor::Unit::K_m; - } else if (unitUpper == "M2") { - return OutputProcessor::Unit::m2; - } else if (unitUpper == "W/M2-C") { - return OutputProcessor::Unit::W_m2C; - } else if (unitUpper == "RAD") { - return OutputProcessor::Unit::rad; - } else if (unitUpper == "J/M2") { - return OutputProcessor::Unit::J_m2; - } else if (unitUpper == "CLO") { - return OutputProcessor::Unit::clo; - } else if (unitUpper == "W/M-K") { - return OutputProcessor::Unit::W_mK; - } else if (unitUpper == "W/K") { - return OutputProcessor::Unit::W_K; - } else if (unitUpper == "K/W") { - return OutputProcessor::Unit::K_W; - } else if (unitUpper == "KGWATER/S") { - return OutputProcessor::Unit::kgWater_s; - } else { - return OutputProcessor::Unit::unknown; - } - } + // This function is here just for unit test purposes + DDOutVar *ddVar = state.dataOutputProcessor->ddOutVars[ddNum]; + Constant::Units units = ddVar->units; + return format(" [{}]", units == Constant::Units::customEMS ? ddVar->unitNameCustomEMS : Constant::unitNames[(int)units]); + } // unitStringFromDDitem() } // namespace OutputProcessor -void SetupOutputVariable(EnergyPlusData &state, - std::string_view const VariableName, // String Name of variable (with units) - OutputProcessor::Unit VariableUnit, // Actual units corresponding to the actual variable - Real64 &ActualVariable, // Actual Variable, used to set up pointer - OutputProcessor::SOVTimeStepType TimeStepTypeKey, // Zone, HeatBalance=1, HVAC, System, Plant=2 - OutputProcessor::SOVStoreType VariableTypeKey, // State, Average=1, NonState, Sum=2 - std::string_view const KeyedValue // Associated Key for this variable -) -{ - SetupOutputVariable(state, VariableName, VariableUnit, ActualVariable, TimeStepTypeKey, VariableTypeKey, KeyedValue, ""); -} - -void SetupOutputVariable(EnergyPlusData &state, - std::string_view const VariableName, // String Name of variable (with units) - OutputProcessor::Unit VariableUnit, // Actual units corresponding to the actual variable - Real64 &ActualVariable, // Actual Variable, used to set up pointer - OutputProcessor::SOVTimeStepType TimeStepTypeKey, // Zone, HeatBalance=1, HVAC, System, Plant=2 - OutputProcessor::SOVStoreType VariableTypeKey, // State, Average=1, NonState, Sum=2 - std::string_view const KeyedValue, // Associated Key for this variable - ReportFreqSOV ReportFreq, // Internal use -- causes reporting at this freqency - eResourceSOV ResourceTypeKey, // Meter Resource Type (Electricity, Gas, etc) - EndUseCatSOV EndUseKey, // Meter End Use Key (Lights, Heating, Cooling, etc) - std::string_view const EndUseSubKey, // Meter End Use Sub Key (General Lights, Task Lights, etc) - GroupSOV GroupKey, // Meter Super Group Key (Building, System, Plant) - std::string_view const ZoneKey, // Meter Zone Key (zone name) - int const ZoneMult, // Zone Multiplier, defaults to 1 - int const ZoneListMult, // Zone List Multiplier, defaults to 1 - int const indexGroupKey, // Group identifier for SQL output - std::string_view const customUnitName, // the custom name for the units from EMS definition of units - std::string_view const SpaceType // Space type (applicable for Building group only) -) -{ - std::string locReportFreq = ""; - std::string locResourceTypeKey = ""; - std::string locEndUseKey = ""; - std::string locGroupKey = ""; - - if (ReportFreq == ReportFreqSOV::Num) { - // Fatal error warning message - ShowFatalError(state, "Invalid Resource Type."); - } else if (ReportFreq == ReportFreqSOV::EachCall) // This is valid - { - locReportFreq = "DETAILED"; - } else { - locReportFreq = ReporFreqSOVNames[static_cast(ReportFreq)]; - } - - if (ResourceTypeKey == eResourceSOV::Invalid || ResourceTypeKey == eResourceSOV::Num) { - // Fatal error warning message - ShowFatalError(state, "Invalid Resource Type."); - } else { - locResourceTypeKey = eResourceSOVNames[static_cast(ResourceTypeKey)]; - } - - if (EndUseKey == EndUseCatSOV::Invalid || EndUseKey == EndUseCatSOV::Num) { - // Fatal error warning message - ShowFatalError(state, "Invalid End Use Category."); - } else { - locEndUseKey = endUseCatSOVNames[static_cast(EndUseKey)]; - } - - if (GroupKey == GroupSOV::Invalid || GroupKey == GroupSOV::Num) { - ShowFatalError(state, "Invalid Group Type."); - } else { - locGroupKey = GroupSOVNames[static_cast(GroupKey)]; - } - - SetupOutputVariable(state, - VariableName, - VariableUnit, - ActualVariable, - TimeStepTypeKey, - VariableTypeKey, - KeyedValue, - locReportFreq, - locResourceTypeKey, - locEndUseKey, - EndUseSubKey, - locGroupKey, - ZoneKey, - ZoneMult, - ZoneListMult, - indexGroupKey, - customUnitName, - SpaceType); -} - // TODO: Probably move these to a different location void SetupOutputVariable(EnergyPlusData &state, - std::string_view const VariableName, // String Name of variable (with units) - OutputProcessor::Unit const VariableUnit, // Actual units corresponding to the actual variable - Real64 &ActualVariable, // Actual Variable, used to set up pointer - OutputProcessor::SOVTimeStepType const TimeStepTypeKey, // Zone, HeatBalance=1, HVAC, System, Plant=2 - OutputProcessor::SOVStoreType const VariableTypeKey, // State, Average=1, NonState, Sum=2 - std::string_view const KeyedValue, // Associated Key for this variable - std::string_view const ReportFreq, // Internal use -- causes reporting at this frequency - std::string_view const ResourceTypeKey, // Meter Resource Type (Electricity, Gas, etc) - std::string_view const EndUseKey, // Meter End Use Key (Lights, Heating, Cooling, etc) - std::string_view const EndUseSubKey, // Meter End Use Sub Key (General Lights, Task Lights, etc) - std::string_view const GroupKey, // Meter Super Group Key (Building, System, Plant) - std::string_view const ZoneKey, // Meter Zone Key (zone name) - int const ZoneMult, // Zone Multiplier, defaults to 1 - int const ZoneListMult, // Zone List Multiplier, defaults to 1 - int const indexGroupKey, // Group identifier for SQL output - std::string_view const customUnitName, // the custom name for the units from EMS definition of units - std::string_view const SpaceType // Space type (applicable for Building group only) + std::string_view const name, // String Name of variable (with units) + Constant::Units const units, // Actual units corresponding to the actual variable + Real64 &ActualVariable, // Actual Variable, used to set up pointer + OutputProcessor::SOVTimeStepType sovTimeStep, // Zone, HeatBalance=1, HVAC, System, Plant=2 + OutputProcessor::SOVStoreType sovStore, // State, Average=1, NonState, Sum=2 + std::string const &key, // Associated Key for this variable + Constant::eResource resource, // Meter Resource Type (Electricity, Gas, etc) + OutputProcessor::SOVEndUseCat sovEndUseCat, // Meter End Use Key (Lights, Heating, Cooling, etc) + std::string_view const EndUseSub, // Meter End Use Sub Key (General Lights, Task Lights, etc) + OutputProcessor::SOVGroup sovGroup, // Meter Super Group Key (Building, System, Plant) + std::string const &zone, // Meter Zone Key (zone name) + int const ZoneMult, // Zone Multiplier, defaults to 1 + int const ZoneListMult, // Zone List Multiplier, defaults to 1 + int const indexGroupKey, // Group identifier for SQL output + std::string_view const customUnitName, // the custom name for the units from EMS definition of units + std::string const &spaceType, // Space type (applicable for Building group only) + OutputProcessor::ReportFreq freq // Internal use -- causes reporting at this frequency ) { @@ -4398,270 +3177,121 @@ void SetupOutputVariable(EnergyPlusData &state, // Pointers (as pointers), pointers (as indices), and lots of other KEWL data stuff. using namespace OutputProcessor; - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int CV; - TimeStepType TimeStepType; // 1=TimeStepZone, 2=TimeStepSys - StoreType VariableType; // 1=Average, 2=Sum, 3=Min/Max - int Loop; - ReportingFrequency RepFreq(ReportingFrequency::Hourly); - std::string ResourceType; // Will hold value of ResourceTypeKey - std::string EndUse; // Will hold value of EndUseKey - std::string EndUseSub; // Will hold value of EndUseSubKey - std::string Group; // Will hold value of GroupKey - std::string zoneName; // Will hold value of ZoneKey - std::string spaceType; // Will hold value of SpaceType + auto &op = state.dataOutputProcessor; if (!op->OutputInitialized) InitializeOutput(state); - // Variable name without units - const std::string_view VarName = VariableName; + std::vector reqVarNums; // Determine whether to Report or not - CheckReportVariable(state, KeyedValue, VarName); - - if (op->NumExtraVars == 0) { - op->NumExtraVars = 1; - op->ReportList = -1; + CheckReportVariable(state, name, key, reqVarNums); + if (reqVarNums.empty()) { + reqVarNums.push_back(-1); } - // If ReportFreq present, overrides input - if (!ReportFreq.empty()) { - RepFreq = determineFrequency(state, ReportFreq); - op->NumExtraVars = 1; - op->ReportList = 0; + // Is this redundant with CheckReportVariable? + bool const ThisOneOnTheList = DataOutputs::FindItemInVariableList(state, key, name); + + TimeStepType timeStep = sovTimeStep2TimeStep[(int)sovTimeStep]; + StoreType store = sovStoreType2StoreType[(int)sovStore]; + + bool OnMeter = (resource != Constant::eResource::Invalid) || (sovEndUseCat != SOVEndUseCat::Invalid) || (!EndUseSub.empty()) || + (sovGroup != SOVGroup::Invalid) || (!zone.empty()) || (!spaceType.empty()); + + if (OnMeter && store == StoreType::Averaged) { + ShowSevereError(state, "Meters can only be \"Summed\" variables"); + ShowContinueError(state, fmt::format("..reference variable={}:{}", key, name)); + OnMeter = false; } - // DataOutputs::OutputVariablesForSimulation is case-insensitive - bool const ThisOneOnTheList = DataOutputs::FindItemInVariableList(state, KeyedValue, VarName); - bool OnMeter = false; // True if this variable is on a meter + int ddOutVarNum = AddDDOutVar(state, name, timeStep, store, VariableType::Real, units, customUnitName); + auto *ddOutVar = op->ddOutVars[ddOutVarNum]; - for (Loop = 1; Loop <= op->NumExtraVars; ++Loop) { + ++op->NumOfRVariable_Setup; - if (Loop == 1) ++op->NumOfRVariable_Setup; + // If we add any output variables here at all, the first one will be at this index + int firstAddedOutVarNum = (int)op->outVars.size(); - if (Loop == 1) { - OnMeter = false; - if (!ResourceTypeKey.empty()) { - ResourceType = ResourceTypeKey; - OnMeter = true; - } else { - ResourceType = ""; - } - if (!EndUseKey.empty()) { - EndUse = EndUseKey; - OnMeter = true; - } else { - EndUse = ""; - } - if (!EndUseSubKey.empty()) { - EndUseSub = EndUseSubKey; - OnMeter = true; - } else { - EndUseSub = ""; - if (!EndUseKey.empty()) { - if (std::find(endUseCategoryNames.begin(), endUseCategoryNames.end(), Util::makeUPPER(std::string{EndUseKey})) != - endUseCategoryNames.end()) { - EndUseSub = "General"; - } - } - } - if (!GroupKey.empty()) { - Group = GroupKey; - OnMeter = true; - } else { - Group = ""; - } - if (!ZoneKey.empty()) { - zoneName = ZoneKey; - OnMeter = true; - } else { - zoneName = ""; - } - if (!SpaceType.empty()) { - spaceType = SpaceType; - OnMeter = true; - } else { - spaceType = ""; - } - } + op->NumTotalRVariable += reqVarNums.size(); - TimeStepType = ValidateTimeStepType(state, TimeStepTypeKey); - VariableType = validateVariableType(state, VariableTypeKey); + if (!OnMeter && !ThisOneOnTheList) return; - AddToOutputVariableList(state, VarName, TimeStepType, VariableType, VariableType::Real, VariableUnit, customUnitName); - ++op->NumTotalRVariable; + if (store == StoreType::Summed) ++op->NumOfRVariable_Sum; + if (OnMeter) ++op->NumOfRVariable_Meter; - if (!OnMeter && !ThisOneOnTheList) continue; + for (int reqVarNum : reqVarNums) { ++op->NumOfRVariable; - if (Loop == 1 && VariableType == StoreType::Summed) { - ++op->NumOfRVariable_Sum; - if (!ResourceTypeKey.empty()) { - ++op->NumOfRVariable_Meter; - } - } - if (op->NumOfRVariable > op->MaxRVariable) { - ReallocateRVar(state); - } - CV = op->NumOfRVariable; - auto &thisRvar = op->RVariableTypes(CV); - thisRvar.timeStepType = TimeStepType; - thisRvar.storeType = VariableType; - thisRvar.VarName = fmt::format("{}:{}", KeyedValue, VarName); - thisRvar.VarNameOnly = VarName; - thisRvar.VarNameOnlyUC = Util::makeUPPER(VarName); - thisRvar.VarNameUC = Util::makeUPPER(thisRvar.VarName); - thisRvar.KeyNameOnlyUC = Util::makeUPPER(KeyedValue); - thisRvar.units = VariableUnit; - if (VariableUnit == OutputProcessor::Unit::customEMS) { - thisRvar.unitNameCustomEMS = customUnitName; - } - AssignReportNumber(state, op->CurrentReportNumber); - std::string const IDOut = fmt::to_string(op->CurrentReportNumber); - thisRvar.ReportID = op->CurrentReportNumber; - auto &thisVarPtr = thisRvar.VarPtr; - thisVarPtr.Value = 0.0; - thisVarPtr.TSValue = 0.0; - thisVarPtr.StoreValue = 0.0; - thisVarPtr.NumStored = 0.0; - thisVarPtr.MaxValue = MaxSetValue; - thisVarPtr.maxValueDate = 0; - thisVarPtr.MinValue = MinSetValue; - thisVarPtr.minValueDate = 0; - thisVarPtr.Which = &ActualVariable; - thisVarPtr.ReportID = op->CurrentReportNumber; - thisVarPtr.ReportIDChr = IDOut.substr(0, 15); - thisVarPtr.storeType = VariableType; - thisVarPtr.Stored = false; - thisVarPtr.Report = false; - thisVarPtr.frequency = ReportingFrequency::Hourly; - thisVarPtr.SchedPtr = 0; - thisVarPtr.MeterArrayPtr = 0; - thisVarPtr.ZoneMult = ZoneMult; - thisVarPtr.ZoneListMult = ZoneListMult; - - if (Loop == 1) { - if (OnMeter) { - if (VariableType == StoreType::Averaged) { - ShowSevereError(state, "Meters can only be \"Summed\" variables"); - ShowContinueError(state, fmt::format("..reference variable={}:{}", KeyedValue, VariableName)); - } else { - Unit mtrUnits = op->RVariableTypes(CV).units; - bool ErrorsFound = false; - AttachMeters( - state, mtrUnits, ResourceType, EndUse, EndUseSub, Group, zoneName, spaceType, CV, thisVarPtr.MeterArrayPtr, ErrorsFound); - if (ErrorsFound) { - ShowContinueError(state, fmt::format("Invalid Meter spec for variable={}:{}", KeyedValue, VariableName)); - op->ErrorsLogged = true; - } - } - } + + OutVarReal *var = new OutVarReal; + op->outVars.push_back(var); + + // Link this keyed variable to the dictionary entry + ddOutVar->keyOutVarNums.push_back(op->outVars.size() - 1); + var->ddVarNum = ddOutVarNum; + + var->varType = VariableType::Real; + var->timeStepType = timeStep; + var->storeType = store; + var->name = name; + var->nameUC = Util::makeUPPER(var->name); + var->keyUC = Util::makeUPPER(key); + var->keyColonName = fmt::format("{}:{}", key, name); + var->keyColonNameUC = Util::makeUPPER(var->keyColonName); + var->units = units; + if (units == Constant::Units::customEMS) var->unitNameCustomEMS = customUnitName; + var->freq = freq; + var->SchedPtr = 0; + var->ReportID = ++op->ReportNumberCounter; + var->Which = &ActualVariable; + var->ZoneMult = ZoneMult; + var->ZoneListMult = ZoneListMult; + + // This is only done for the first variable in the list. It + // could be moved out of this loop entirely but then some + // numberings in unit tests would not line up + if (OnMeter) { + AttachMeters(state, units, resource, sovEndUseCat, EndUseSub, sovGroup, zone, spaceType, firstAddedOutVarNum); + OnMeter = false; } - if (op->ReportList(Loop) == -1) continue; + // This is a dummy variable that is not being reported, it is only being used to feed a particular meter. + if (reqVarNum == -1) continue; - thisVarPtr.Report = true; + var->Report = true; - if (op->ReportList(Loop) == 0) { - thisVarPtr.frequency = RepFreq; - thisVarPtr.SchedPtr = 0; - } else { - thisVarPtr.frequency = op->ReqRepVars(op->ReportList(Loop)).frequency; - thisVarPtr.SchedPtr = op->ReqRepVars(op->ReportList(Loop)).SchedPtr; + // freq != ReportFreq::Hour + if (freq == ReportFreq::Hour) { + var->freq = op->reqVars[reqVarNum]->freq; + var->SchedPtr = op->reqVars[reqVarNum]->SchedPtr; } - if (thisVarPtr.Report) { - if (thisVarPtr.SchedPtr != 0) { - WriteReportVariableDictionaryItem(state, - thisVarPtr.frequency, - thisVarPtr.storeType, - thisVarPtr.ReportID, - indexGroupKey, - std::string(sovTimeStepTypeStrings[(int)TimeStepTypeKey]), - thisVarPtr.ReportIDChr, - KeyedValue, - VarName, - thisRvar.timeStepType, - thisRvar.units, - thisRvar.unitNameCustomEMS, - op->ReqRepVars(op->ReportList(Loop)).SchedName); - } else { - WriteReportVariableDictionaryItem(state, - thisVarPtr.frequency, - thisVarPtr.storeType, - thisVarPtr.ReportID, - indexGroupKey, - std::string(sovTimeStepTypeStrings[(int)TimeStepTypeKey]), - thisVarPtr.ReportIDChr, - KeyedValue, - VarName, - thisRvar.timeStepType, - thisRvar.units, - thisRvar.unitNameCustomEMS); - } - } + WriteReportVariableDictionaryItem(state, + var->freq, + var->storeType, + var->ReportID, + indexGroupKey, + std::string(sovTimeStepTypeStrings[(int)sovTimeStep]), + key, + name, + var->timeStepType, + var->units, + var->unitNameCustomEMS, + (var->SchedPtr != 0) ? state.dataScheduleMgr->Schedule(var->SchedPtr).Name : ""); } -} - -void SetupOutputVariable(EnergyPlusData &state, - std::string_view const VariableName, // String Name of variable - OutputProcessor::Unit const VariableUnit, // Actual units corresponding to the actual variable - int &ActualVariable, // Actual Variable, used to set up pointer - OutputProcessor::SOVTimeStepType const TimeStepTypeKey, // Zone, HeatBalance=1, HVAC, System, Plant=2 - OutputProcessor::SOVStoreType const VariableTypeKey, // State, Average=1, NonState, Sum=2 - std::string_view const KeyedValue // Associated Key for this variable -) -{ - SetupOutputVariable(state, - VariableName, // String Name of variable - VariableUnit, // Actual units corresponding to the actual variable - ActualVariable, // Actual Variable, used to set up pointer - TimeStepTypeKey, // Zone, HeatBalance=1, HVAC, System, Plant=2 - VariableTypeKey, // State, Average=1, NonState, Sum=2 - KeyedValue, // Associated Key for this variable - "" // Internal use -- causes reporting at this freqency - // indexGroupKey // Group identifier for SQL output - ); -} -void SetupOutputVariable(EnergyPlusData &state, - std::string_view const VariableName, // String Name of variable - OutputProcessor::Unit const VariableUnit, // Actual units corresponding to the actual variable - int &ActualVariable, // Actual Variable, used to set up pointer - OutputProcessor::SOVTimeStepType const TimeStepTypeKey, // Zone, HeatBalance=1, HVAC, System, Plant=2 - OutputProcessor::SOVStoreType const VariableTypeKey, // State, Average=1, NonState, Sum=2 - std::string_view const KeyedValue, // Associated Key for this variable - OutputProcessor::ReportingFrequency const ReportFreq, // Internal use -- causes reporting at this freqency - int const indexGroupKey // Group identifier for SQL output -) -{ - if (ReportFreq == OutputProcessor::ReportingFrequency::EachCall) // This is valid - { - SetupOutputVariable( - state, VariableName, VariableUnit, ActualVariable, TimeStepTypeKey, VariableTypeKey, KeyedValue, "DETAILED", indexGroupKey); - } else { - SetupOutputVariable(state, - VariableName, - VariableUnit, - ActualVariable, - TimeStepTypeKey, - VariableTypeKey, - KeyedValue, - OutputProcessor::ReportingFrequencyNames[static_cast(ReportFreq)], - indexGroupKey); - } -} +} // SetupOutputVariable() void SetupOutputVariable(EnergyPlusData &state, - std::string_view const VariableName, // String Name of variable - OutputProcessor::Unit const VariableUnit, // Actual units corresponding to the actual variable - int &ActualVariable, // Actual Variable, used to set up pointer - OutputProcessor::SOVTimeStepType const TimeStepTypeKey, // Zone, HeatBalance=1, HVAC, System, Plant=2 - OutputProcessor::SOVStoreType const VariableTypeKey, // State, Average=1, NonState, Sum=2 - std::string_view const KeyedValue, // Associated Key for this variable - std::string_view const ReportFreq, // Internal use -- causes reporting at this freqency - int const indexGroupKey // Group identifier for SQL output + std::string_view const name, // String Name of variable + Constant::Units const units, // Actual units corresponding to the actual variable + int &ActualVariable, // Actual Variable, used to set up pointer + OutputProcessor::SOVTimeStepType sovTimeStepType, // Zone, HeatBalance=1, HVAC, System, Plant=2 + OutputProcessor::SOVStoreType sovStoreType, // State, Average=1, NonState, Sum=2 + std::string const &key, // Associated Key for this variable + int const indexGroupKey, // Group identifier for SQL output + OutputProcessor::ReportFreq freq // Internal use -- causes reporting at this freqency ) { @@ -4676,137 +3306,86 @@ void SetupOutputVariable(EnergyPlusData &state, // to track values of the output variables of EnergyPlus. // METHODOLOGY EMPLOYED: - // Pointers (as pointers), pointers (as indices), and lots of other KEWL data stuff. + // Pointers (as pointers), pointers (as indices), and lots of other KEWL data stuff <-- LOL // Using/Aliasing using namespace OutputProcessor; // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int CV; - TimeStepType TimeStepType; // 1=TimeStepZone, 2=TimeStepSys - StoreType VariableType; // 1=Average, 2=Sum, 3=Min/Max - int Loop; - ReportingFrequency RepFreq(ReportingFrequency::Hourly); auto &op = state.dataOutputProcessor; if (!op->OutputInitialized) InitializeOutput(state); - // Variable name without units - const std::string_view VarName = VariableName; - // Determine whether to Report or not - CheckReportVariable(state, KeyedValue, VarName); - - if (op->NumExtraVars == 0) { - op->NumExtraVars = 1; - op->ReportList = -1; + std::vector reqVarNums; + CheckReportVariable(state, name, key, reqVarNums); + if (reqVarNums.empty()) { + reqVarNums.push_back(-1); } - // If ReportFreq present, overrides input - if (!ReportFreq.empty()) { - RepFreq = determineFrequency(state, ReportFreq); - op->NumExtraVars = 1; - op->ReportList = 0; - } + TimeStepType timeStepType = sovTimeStep2TimeStep[(int)sovTimeStepType]; + StoreType storeType = sovStoreType2StoreType[(int)sovStoreType]; // DataOutputs::OutputVariablesForSimulation is case-insentitive - bool const ThisOneOnTheList = DataOutputs::FindItemInVariableList(state, KeyedValue, VarName); + int ddOutVarNum = AddDDOutVar(state, name, timeStepType, storeType, VariableType::Integer, units); + auto *ddOutVar = op->ddOutVars[ddOutVarNum]; - for (Loop = 1; Loop <= op->NumExtraVars; ++Loop) { + ++op->NumOfIVariable_Setup; - if (Loop == 1) ++op->NumOfIVariable_Setup; + op->NumTotalIVariable += (!reqVarNums.empty()) ? reqVarNums.size() : 1; + bool ThisOneOnTheList = DataOutputs::FindItemInVariableList(state, key, name); + if (!ThisOneOnTheList) return; - TimeStepType = ValidateTimeStepType(state, TimeStepTypeKey); - VariableType = validateVariableType(state, VariableTypeKey); - - AddToOutputVariableList(state, VarName, TimeStepType, VariableType, VariableType::Integer, VariableUnit); - ++op->NumTotalIVariable; + if (storeType == StoreType::Summed) { + ++op->NumOfIVariable_Sum; + } - if (!ThisOneOnTheList) continue; + for (int reqVarNum : reqVarNums) { ++op->NumOfIVariable; - if (Loop == 1 && VariableType == StoreType::Summed) { - ++op->NumOfIVariable_Sum; - } - if (op->NumOfIVariable > op->MaxIVariable) { - ReallocateIVar(state); - } - CV = op->NumOfIVariable; - auto &thisIVar = op->IVariableTypes(CV); - thisIVar.timeStepType = TimeStepType; - thisIVar.storeType = VariableType; - thisIVar.VarName = fmt::format("{}:{}", KeyedValue, VarName); - thisIVar.VarNameOnly = VarName; - thisIVar.VarNameOnlyUC = Util::makeUPPER(VarName); - thisIVar.VarNameUC = Util::makeUPPER(thisIVar.VarName); - thisIVar.KeyNameOnlyUC = Util::makeUPPER(KeyedValue); - thisIVar.units = VariableUnit; - AssignReportNumber(state, op->CurrentReportNumber); - std::string const IDOut = fmt::to_string(op->CurrentReportNumber); - thisIVar.ReportID = op->CurrentReportNumber; - auto &thisVarPtr = thisIVar.VarPtr; - thisVarPtr.Value = 0.0; - thisVarPtr.StoreValue = 0.0; - thisVarPtr.TSValue = 0.0; - thisVarPtr.NumStored = 0.0; - // IVariable%LastTSValue=0 - thisVarPtr.MaxValue = IMaxSetValue; - thisVarPtr.maxValueDate = 0; - thisVarPtr.MinValue = IMinSetValue; - thisVarPtr.minValueDate = 0; - thisVarPtr.Which = &ActualVariable; - thisVarPtr.ReportID = op->CurrentReportNumber; - thisVarPtr.ReportIDChr = IDOut.substr(0, 15); - thisVarPtr.storeType = VariableType; - thisVarPtr.Stored = false; - thisVarPtr.Report = false; - thisVarPtr.frequency = ReportingFrequency::Hourly; - thisVarPtr.SchedPtr = 0; - - if (op->ReportList(Loop) == -1) continue; - - thisVarPtr.Report = true; - - if (op->ReportList(Loop) == 0) { - thisVarPtr.frequency = RepFreq; - thisVarPtr.SchedPtr = 0; + OutVarInt *var = new OutVarInt; + op->outVars.push_back(var); + // Add to ddVar key list + ddOutVar->keyOutVarNums.push_back(op->outVars.size() - 1); + + var->varType = VariableType::Integer; + var->timeStepType = timeStepType; + var->storeType = storeType; + var->name = name; + var->nameUC = Util::makeUPPER(var->name); + var->keyUC = Util::makeUPPER(key); + var->keyColonName = fmt::format("{}:{}", key, name); + var->keyColonNameUC = Util::makeUPPER(var->keyColonName); + var->units = units; + var->ReportID = ++op->ReportNumberCounter; + var->Which = &ActualVariable; + + if (reqVarNum == -1) continue; + + var->Report = true; + + if (freq != ReportFreq::Hour) { + var->freq = freq; + var->SchedPtr = 0; } else { - thisVarPtr.frequency = op->ReqRepVars(op->ReportList(Loop)).frequency; - thisVarPtr.SchedPtr = op->ReqRepVars(op->ReportList(Loop)).SchedPtr; - } - - if (thisVarPtr.Report) { - - if (thisVarPtr.SchedPtr != 0) { - WriteReportVariableDictionaryItem(state, - thisVarPtr.frequency, - thisVarPtr.storeType, - thisVarPtr.ReportID, - indexGroupKey, - std::string(sovTimeStepTypeStrings[(int)TimeStepTypeKey]), - thisVarPtr.ReportIDChr, - KeyedValue, - VarName, - thisIVar.timeStepType, - thisIVar.units, - op->ReqRepVars(op->ReportList(Loop)).SchedName); - } else { - WriteReportVariableDictionaryItem(state, - thisVarPtr.frequency, - thisVarPtr.storeType, - thisVarPtr.ReportID, - indexGroupKey, - std::string(sovTimeStepTypeStrings[(int)TimeStepTypeKey]), - thisVarPtr.ReportIDChr, - KeyedValue, - VarName, - thisIVar.timeStepType, - thisIVar.units); - } - } + var->freq = op->reqVars[reqVarNum]->freq; + var->SchedPtr = op->reqVars[reqVarNum]->SchedPtr; + } + + WriteReportVariableDictionaryItem(state, + var->freq, + var->storeType, + var->ReportID, + indexGroupKey, + std::string(sovTimeStepTypeStrings[(int)sovTimeStepType]), + key, + name, + var->timeStepType, + var->units, + (var->SchedPtr != 0) ? state.dataScheduleMgr->Schedule(var->SchedPtr).Name : ""); } -} +} // SetOutputVariable() void UpdateDataandReport(EnergyPlusData &state, OutputProcessor::TimeStepType const t_TimeStepTypeKey) // What kind of data to update (Zone, HVAC) { @@ -4822,50 +3401,33 @@ void UpdateDataandReport(EnergyPlusData &state, OutputProcessor::TimeStepType co // This subroutine writes the actual report variable (for user requested // Report Variables) strings to the standard output file. - // METHODOLOGY EMPLOYED: - // na - - // REFERENCES: - // na - // Using/Aliasing using namespace OutputProcessor; using General::EncodeMonDayHrMin; using ScheduleManager::GetCurrentScheduleValue; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: bool TimePrint(true); // True if the time needs to be printed bool EndTimeStepFlag(false); // True when it's the end of the Zone Time Step auto &op = state.dataOutputProcessor; + auto &rf = state.dataResultsFramework->resultsFramework; if (t_TimeStepTypeKey != TimeStepType::Zone && t_TimeStepTypeKey != TimeStepType::System) { ShowFatalError(state, "Invalid reporting requested -- UpdateDataAndReport"); } // Basic record keeping and report out if "detailed" - Real64 StartMinute = op->TimeValue.at(t_TimeStepTypeKey).CurMinute; // StartMinute for UpdateData call - op->TimeValue.at(t_TimeStepTypeKey).CurMinute += (*op->TimeValue.at(t_TimeStepTypeKey).TimeStep) * 60.0; + Real64 StartMinute = op->TimeValue[(int)t_TimeStepTypeKey].CurMinute; // StartMinute for UpdateData call + op->TimeValue[(int)t_TimeStepTypeKey].CurMinute += (*op->TimeValue[(int)t_TimeStepTypeKey].TimeStep) * 60.0; if (t_TimeStepTypeKey == TimeStepType::System && - (op->TimeValue.at(TimeStepType::System).CurMinute == op->TimeValue.at(TimeStepType::Zone).CurMinute)) { + (op->TimeValue[(int)TimeStepType::System].CurMinute == op->TimeValue[(int)TimeStepType::Zone].CurMinute)) { EndTimeStepFlag = true; } else if (t_TimeStepTypeKey == TimeStepType::Zone) { EndTimeStepFlag = true; } else { EndTimeStepFlag = false; } - Real64 MinuteNow = op->TimeValue.at(t_TimeStepTypeKey).CurMinute; // What minute it is now + Real64 MinuteNow = op->TimeValue[(int)t_TimeStepTypeKey].CurMinute; // What minute it is now int MDHM; // Month,Day,Hour,Minute EncodeMonDayHrMin(MDHM, state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, state.dataGlobal->HourOfDay, int(MinuteNow)); @@ -4874,214 +3436,182 @@ void UpdateDataandReport(EnergyPlusData &state, OutputProcessor::TimeStepType co Real64 rxTime = (MinuteNow - StartMinute) / double(state.dataGlobal->MinutesPerTimeStep); // (MinuteNow-StartMinute)/REAL(MinutesPerTimeStep,r64) - for execution time - if (state.dataResultsFramework->resultsFramework->timeSeriesEnabled()) { + if (rf->timeSeriesEnabled()) { // R and I data frames for TimeStepType::TimeStepZone - if (t_TimeStepTypeKey == TimeStepType::Zone && !state.dataResultsFramework->resultsFramework->RIDetailedZoneTSData.rVariablesScanned()) { - state.dataResultsFramework->resultsFramework->initializeRTSDataFrame( - ReportingFrequency::EachCall, op->RVariableTypes, op->NumOfRVariable, TimeStepType::Zone); - } - if (t_TimeStepTypeKey == TimeStepType::Zone && !state.dataResultsFramework->resultsFramework->RIDetailedZoneTSData.iVariablesScanned()) { - state.dataResultsFramework->resultsFramework->initializeITSDataFrame( - ReportingFrequency::EachCall, op->IVariableTypes, op->NumOfIVariable, TimeStepType::Zone); - } - - // R and I data frames for TimeStepType::TimeStepSystem - if (t_TimeStepTypeKey == TimeStepType::System && !state.dataResultsFramework->resultsFramework->RIDetailedHVACTSData.rVariablesScanned()) { - state.dataResultsFramework->resultsFramework->initializeRTSDataFrame( - ReportingFrequency::EachCall, op->RVariableTypes, op->NumOfRVariable, TimeStepType::System); - } - if (t_TimeStepTypeKey == TimeStepType::System && !state.dataResultsFramework->resultsFramework->RIDetailedHVACTSData.iVariablesScanned()) { - state.dataResultsFramework->resultsFramework->initializeITSDataFrame( - ReportingFrequency::EachCall, op->IVariableTypes, op->NumOfIVariable, TimeStepType::System); + if (!rf->detailedTSData[(int)t_TimeStepTypeKey].variablesScanned()) { + rf->initializeTSDataFrame(ReportFreq::EachCall, op->outVars, t_TimeStepTypeKey); } } - if (state.dataResultsFramework->resultsFramework->timeSeriesEnabled()) { - if (t_TimeStepTypeKey == TimeStepType::Zone) { - state.dataResultsFramework->resultsFramework->RIDetailedZoneTSData.newRow(state.dataEnvrn->Month, - state.dataEnvrn->DayOfMonth, - state.dataGlobal->HourOfDay, - op->TimeValue.at(TimeStepType::Zone).CurMinute, - state.dataGlobal->CalendarYear); - } - if (t_TimeStepTypeKey == TimeStepType::System) { - // TODO this was an error probably, was using TimeValue(1) - state.dataResultsFramework->resultsFramework->RIDetailedHVACTSData.newRow(state.dataEnvrn->Month, - state.dataEnvrn->DayOfMonth, - state.dataGlobal->HourOfDay, - op->TimeValue.at(TimeStepType::System).CurMinute, - state.dataGlobal->CalendarYear); - } + if (rf->timeSeriesEnabled()) { + rf->detailedTSData[(int)t_TimeStepTypeKey].newRow(state.dataEnvrn->Month, + state.dataEnvrn->DayOfMonth, + state.dataGlobal->HourOfDay, + op->TimeValue[(int)t_TimeStepTypeKey].CurMinute, + state.dataGlobal->CalendarYear); } // Main "Record Keeping" Loops for R and I variables - for (int Loop = 1; Loop <= op->NumOfRVariable; ++Loop) { - if (op->RVariableTypes(Loop).timeStepType != t_TimeStepTypeKey) continue; - - // Act on the RVariables variable - auto &rVar(op->RVariableTypes(Loop).VarPtr); - rVar.Stored = true; - if (rVar.storeType == StoreType::Averaged) { - Real64 CurVal = (*rVar.Which) * rxTime; + for (auto *var : op->outVars) { + if (var->varType != VariableType::Real) continue; + if (var->timeStepType != t_TimeStepTypeKey) continue; + + OutVarReal *rVar = dynamic_cast(var); + assert(rVar != nullptr); + + rVar->Stored = true; + if (rVar->storeType == StoreType::Averaged) { + Real64 CurVal = (*rVar->Which) * rxTime; // CALL SetMinMax(RVar%Which,MDHM,RVar%MaxValue,RVar%maxValueDate,RVar%MinValue,RVar%minValueDate) - if ((*rVar.Which) > rVar.MaxValue) { - rVar.MaxValue = (*rVar.Which); - rVar.maxValueDate = MDHM; + if ((*rVar->Which) > rVar->MaxValue) { + rVar->MaxValue = (*rVar->Which); + rVar->maxValueDate = MDHM; } - if ((*rVar.Which) < rVar.MinValue) { - rVar.MinValue = (*rVar.Which); - rVar.minValueDate = MDHM; + if ((*rVar->Which) < rVar->MinValue) { + rVar->MinValue = (*rVar->Which); + rVar->minValueDate = MDHM; } - rVar.TSValue += CurVal; - rVar.EITSValue = rVar.TSValue; // CR - 8481 fix - 09/06/2011 + rVar->TSValue += CurVal; + rVar->EITSValue = rVar->TSValue; // CR - 8481 fix - 09/06/2011 } else { // CurVal=RVar%Which - if ((*rVar.Which) > rVar.MaxValue) { - rVar.MaxValue = (*rVar.Which); - rVar.maxValueDate = MDHM; + if ((*rVar->Which) > rVar->MaxValue) { + rVar->MaxValue = (*rVar->Which); + rVar->maxValueDate = MDHM; } - if ((*rVar.Which) < rVar.MinValue) { - rVar.MinValue = (*rVar.Which); - rVar.minValueDate = MDHM; + if ((*rVar->Which) < rVar->MinValue) { + rVar->MinValue = (*rVar->Which); + rVar->minValueDate = MDHM; } - rVar.TSValue += (*rVar.Which); - rVar.EITSValue = rVar.TSValue; // CR - 8481 fix - 09/06/2011 + rVar->TSValue += (*rVar->Which); + rVar->EITSValue = rVar->TSValue; // CR - 8481 fix - 09/06/2011 } // End of "record keeping" Report if applicable - if (!rVar.Report) continue; + if (!rVar->Report) continue; bool ReportNow = true; - if (rVar.SchedPtr > 0) ReportNow = (GetCurrentScheduleValue(state, rVar.SchedPtr) != 0.0); // SetReportNow(RVar%SchedPtr) + if (rVar->SchedPtr > 0) ReportNow = (GetCurrentScheduleValue(state, rVar->SchedPtr) != 0.0); // SetReportNow(RVar%SchedPtr) if (!ReportNow) continue; - rVar.tsStored = true; - if (!rVar.thisTSStored) { - ++rVar.thisTSCount; - rVar.thisTSStored = true; + rVar->tsStored = true; + if (!rVar->thisTSStored) { + ++rVar->thisTSCount; + rVar->thisTSStored = true; } - if (rVar.frequency == ReportingFrequency::EachCall) { + if (rVar->freq == ReportFreq::EachCall) { if (TimePrint) { if (op->LHourP != state.dataGlobal->HourOfDay || std::abs(op->LStartMin - StartMinute) > 0.001 || - std::abs(op->LEndMin - op->TimeValue.at(t_TimeStepTypeKey).CurMinute) > 0.001) { + std::abs(op->LEndMin - op->TimeValue[(int)t_TimeStepTypeKey].CurMinute) > 0.001) { int CurDayType = state.dataEnvrn->DayOfWeek; if (state.dataEnvrn->HolidayIndex > 0) { CurDayType = state.dataEnvrn->HolidayIndex; } WriteTimeStampFormatData(state, state.files.eso, - ReportingFrequency::EachCall, - op->TimeStepStampReportNbr, - op->TimeStepStampReportChr, + ReportFreq::EachCall, + op->freqStampReportNums[(int)ReportFreq::TimeStep], state.dataGlobal->DayOfSimChr, true, state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, state.dataGlobal->HourOfDay, - op->TimeValue.at(t_TimeStepTypeKey).CurMinute, + op->TimeValue[(int)t_TimeStepTypeKey].CurMinute, StartMinute, state.dataEnvrn->DSTIndicator, ScheduleManager::dayTypeNames[CurDayType]); op->LHourP = state.dataGlobal->HourOfDay; op->LStartMin = StartMinute; - op->LEndMin = op->TimeValue.at(t_TimeStepTypeKey).CurMinute; + op->LEndMin = op->TimeValue[(int)t_TimeStepTypeKey].CurMinute; } TimePrint = false; } - WriteNumericData(state, rVar.ReportID, rVar.ReportIDChr, *rVar.Which); + WriteNumericData(state, rVar->ReportID, *rVar->Which); ++state.dataGlobal->StdOutputRecordCount; - if (state.dataResultsFramework->resultsFramework->timeSeriesEnabled()) { - if (t_TimeStepTypeKey == TimeStepType::Zone) { - state.dataResultsFramework->resultsFramework->RIDetailedZoneTSData.pushVariableValue(rVar.ReportID, *rVar.Which); - } - if (t_TimeStepTypeKey == TimeStepType::System) { - state.dataResultsFramework->resultsFramework->RIDetailedHVACTSData.pushVariableValue(rVar.ReportID, *rVar.Which); - } + if (rf->timeSeriesEnabled()) { + rf->detailedTSData[(int)t_TimeStepTypeKey].pushVariableValue(rVar->ReportID, *rVar->Which); } } } - for (int Loop = 1; Loop <= op->NumOfIVariable; ++Loop) { - if (op->IVariableTypes(Loop).timeStepType != t_TimeStepTypeKey) continue; + for (auto *var : op->outVars) { + if (var->varType != VariableType::Integer) continue; + if (var->timeStepType != t_TimeStepTypeKey) continue; // Act on the IVariables variable - auto &iVar = op->IVariableTypes(Loop).VarPtr; - iVar.Stored = true; + auto *iVar = dynamic_cast(var); + assert(iVar != nullptr); + + iVar->Stored = true; // ICurVal=IVar%Which - if (iVar.storeType == StoreType::Averaged) { - Real64 ICurVal = (*iVar.Which) * rxTime; - iVar.TSValue += ICurVal; - iVar.EITSValue = iVar.TSValue; // CR - 8481 fix - 09/06/2011 - if (nint(ICurVal) > iVar.MaxValue) { - iVar.MaxValue = nint(ICurVal); // Record keeping for date and time go here too - iVar.maxValueDate = MDHM; //+ TimeValue.at(t_TimeStepTypeKey)%TimeStep - } - if (nint(ICurVal) < iVar.MinValue) { - iVar.MinValue = nint(ICurVal); - iVar.minValueDate = MDHM; //+ TimeValue.at(t_TimeStepTypeKey)%TimeStep + if (iVar->storeType == StoreType::Averaged) { + Real64 ICurVal = (*iVar->Which) * rxTime; + iVar->TSValue += ICurVal; + iVar->EITSValue = iVar->TSValue; // CR - 8481 fix - 09/06/2011 + if (nint(ICurVal) > iVar->MaxValue) { + iVar->MaxValue = nint(ICurVal); // Record keeping for date and time go here too + iVar->maxValueDate = MDHM; //+ TimeValue.at(t_TimeStepTypeKey)%TimeStep + } + if (nint(ICurVal) < iVar->MinValue) { + iVar->MinValue = nint(ICurVal); + iVar->minValueDate = MDHM; //+ TimeValue.at(t_TimeStepTypeKey)%TimeStep } } else { - if ((*iVar.Which) > iVar.MaxValue) { - iVar.MaxValue = (*iVar.Which); // Record keeping for date and time go here too - iVar.maxValueDate = MDHM; //+ TimeValue(TimeStepType)%TimeStep + if ((*iVar->Which) > iVar->MaxValue) { + iVar->MaxValue = (*iVar->Which); // Record keeping for date and time go here too + iVar->maxValueDate = MDHM; //+ TimeValue(TimeStepType)%TimeStep } - if ((*iVar.Which) < iVar.MinValue) { - iVar.MinValue = (*iVar.Which); - iVar.minValueDate = MDHM; //+ TimeValue(TimeStepType)%TimeStep + if ((*iVar->Which) < iVar->MinValue) { + iVar->MinValue = (*iVar->Which); + iVar->minValueDate = MDHM; //+ TimeValue(TimeStepType)%TimeStep } - iVar.TSValue += (*iVar.Which); - iVar.EITSValue = iVar.TSValue; // CR - 8481 fix - 09/06/2011 + iVar->TSValue += (*iVar->Which); + iVar->EITSValue = iVar->TSValue; // CR - 8481 fix - 09/06/2011 } - if (!iVar.Report) continue; + if (!iVar->Report) continue; bool ReportNow = true; - if (iVar.SchedPtr > 0) ReportNow = (GetCurrentScheduleValue(state, iVar.SchedPtr) != 0.0); // SetReportNow(IVar%SchedPtr) + if (iVar->SchedPtr > 0) ReportNow = (GetCurrentScheduleValue(state, iVar->SchedPtr) != 0.0); // SetReportNow(IVar%SchedPtr) if (!ReportNow) continue; - iVar.tsStored = true; - if (!iVar.thisTSStored) { - ++iVar.thisTSCount; - iVar.thisTSStored = true; + iVar->tsStored = true; + if (!iVar->thisTSStored) { + ++iVar->thisTSCount; + iVar->thisTSStored = true; } - if (iVar.frequency == ReportingFrequency::EachCall) { + if (iVar->freq == ReportFreq::EachCall) { if (TimePrint) { if (op->LHourP != state.dataGlobal->HourOfDay || std::abs(op->LStartMin - StartMinute) > 0.001 || - std::abs(op->LEndMin - op->TimeValue.at(t_TimeStepTypeKey).CurMinute) > 0.001) { + std::abs(op->LEndMin - op->TimeValue[(int)t_TimeStepTypeKey].CurMinute) > 0.001) { int CurDayType = state.dataEnvrn->DayOfWeek; if (state.dataEnvrn->HolidayIndex > 0) { CurDayType = state.dataEnvrn->HolidayIndex; } WriteTimeStampFormatData(state, state.files.eso, - ReportingFrequency::EachCall, - op->TimeStepStampReportNbr, - op->TimeStepStampReportChr, + ReportFreq::EachCall, + op->freqStampReportNums[(int)ReportFreq::TimeStep], state.dataGlobal->DayOfSimChr, true, state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, state.dataGlobal->HourOfDay, - op->TimeValue.at(t_TimeStepTypeKey).CurMinute, + op->TimeValue[(int)t_TimeStepTypeKey].CurMinute, StartMinute, state.dataEnvrn->DSTIndicator, ScheduleManager::dayTypeNames[CurDayType]); op->LHourP = state.dataGlobal->HourOfDay; op->LStartMin = StartMinute; - op->LEndMin = op->TimeValue.at(t_TimeStepTypeKey).CurMinute; + op->LEndMin = op->TimeValue[(int)t_TimeStepTypeKey].CurMinute; } TimePrint = false; } // only time integer vars actual report as integer only is "detailed" - WriteNumericData(state, iVar.ReportID, iVar.ReportIDChr, *iVar.Which); + WriteNumericData(state, iVar->ReportID, *iVar->Which); ++state.dataGlobal->StdOutputRecordCount; - if (state.dataResultsFramework->resultsFramework->timeSeriesEnabled()) { - if (t_TimeStepTypeKey == TimeStepType::Zone) { - state.dataResultsFramework->resultsFramework->RIDetailedZoneTSData.pushVariableValue(iVar.ReportID, *iVar.Which); - } - if (t_TimeStepTypeKey == TimeStepType::System) { - state.dataResultsFramework->resultsFramework->RIDetailedHVACTSData.pushVariableValue(iVar.ReportID, *iVar.Which); - } + if (rf->timeSeriesEnabled()) { + rf->detailedTSData[(int)t_TimeStepTypeKey].pushVariableValue(iVar->ReportID, *iVar->Which); } } } @@ -5091,311 +3621,317 @@ void UpdateDataandReport(EnergyPlusData &state, OutputProcessor::TimeStepType co // TimeStep Block (Report on Zone TimeStep) if (EndTimeStepFlag) { - if (state.dataResultsFramework->resultsFramework->timeSeriesEnabled()) { - if (!state.dataResultsFramework->resultsFramework->RITimestepTSData.rVariablesScanned()) { - state.dataResultsFramework->resultsFramework->initializeRTSDataFrame( - ReportingFrequency::TimeStep, op->RVariableTypes, op->NumOfRVariable); - } - if (!state.dataResultsFramework->resultsFramework->RITimestepTSData.iVariablesScanned()) { - state.dataResultsFramework->resultsFramework->initializeITSDataFrame( - ReportingFrequency::TimeStep, op->IVariableTypes, op->NumOfIVariable); - } - state.dataResultsFramework->resultsFramework->RITimestepTSData.newRow(state.dataEnvrn->Month, - state.dataEnvrn->DayOfMonth, - state.dataGlobal->HourOfDay, - op->TimeValue.at(TimeStepType::Zone).CurMinute, - state.dataGlobal->CalendarYear); - } - - for (TimeStepType thisTimeStepType : {TimeStepType::Zone, TimeStepType::System}) { // Zone, HVAC - for (int Loop = 1; Loop <= op->NumOfRVariable; ++Loop) { - if (op->RVariableTypes(Loop).timeStepType != thisTimeStepType) continue; - auto &rVar = op->RVariableTypes(Loop).VarPtr; - // Update meters on the TimeStep (Zone) - if (rVar.MeterArrayPtr != 0 && !state.dataOutputProcessor->MeterValue.empty()) { - Real64 TimeStepValue = rVar.TSValue * rVar.ZoneMult * rVar.ZoneListMult; - for (int i = 1; i <= op->VarMeterArrays(rVar.MeterArrayPtr).NumOnMeters; i++) { - int index = op->VarMeterArrays(rVar.MeterArrayPtr).OnMeters(i); - state.dataOutputProcessor->MeterValue(index) += TimeStepValue; + if (rf->timeSeriesEnabled()) { + if (!rf->freqTSData[(int)ReportFreq::TimeStep].variablesScanned()) { + rf->initializeTSDataFrame(ReportFreq::TimeStep, op->outVars); + } + rf->freqTSData[(int)ReportFreq::TimeStep].newRow(state.dataEnvrn->Month, + state.dataEnvrn->DayOfMonth, + state.dataGlobal->HourOfDay, + op->TimeValue[(int)TimeStepType::Zone].CurMinute, + state.dataGlobal->CalendarYear); + } + + // Update meters on the TimeStep (Zone) + if (op->meterValues.capacity() > 0) { + for (int iMeter = 0; iMeter < (int)op->meters.size(); ++iMeter) { + auto *meter = op->meters[iMeter]; + if (meter->type == MeterType::Normal || meter->type == MeterType::Custom) { + for (int srcVarNum : meter->srcVarNums) { + auto *var = op->outVars[srcVarNum]; + // Separate the Zone variables from the HVAC variables using TimeStepType + if (var->timeStepType != TimeStepType::Zone && var->timeStepType != TimeStepType::System) continue; + // Add to the total all of the appropriate variables, make sure to use var->TSValue and not *var->Which + op->meterValues[iMeter] += var->TSValue * var->ZoneMult * var->ZoneListMult; } - for (int i = 1; i <= op->VarMeterArrays(rVar.MeterArrayPtr).NumOnCustomMeters; i++) { - int index = op->VarMeterArrays(rVar.MeterArrayPtr).OnCustomMeters(i); - state.dataOutputProcessor->MeterValue(index) += TimeStepValue; + } else if (meter->type == MeterType::CustomDec) { + auto *decMeter = op->meters[meter->decMeterNum]; + for (int srcVarNum : decMeter->srcVarNums) { + auto *var = op->outVars[srcVarNum]; + if (var->timeStepType != TimeStepType::Zone && var->timeStepType != TimeStepType::System) continue; + op->meterValues[iMeter] += var->TSValue * var->ZoneMult * var->ZoneListMult; } + for (int srcVarNum : meter->srcVarNums) { + auto *var = op->outVars[srcVarNum]; + if (var->timeStepType != TimeStepType::Zone && var->timeStepType != TimeStepType::System) continue; + op->meterValues[iMeter] -= var->TSValue * var->ZoneMult * var->ZoneListMult; + } + } else { + assert(false); } - - bool ReportNow = true; - if (rVar.SchedPtr > 0) ReportNow = (GetCurrentScheduleValue(state, rVar.SchedPtr) != 0.0); // SetReportNow(RVar%SchedPtr) - if (!ReportNow || !rVar.Report) { - rVar.TSValue = 0.0; - } - // IF (RVar%StoreType == AveragedVar) THEN - // RVar%Value=RVar%Value+RVar%TSValue/NumOfTimeStepInHour - // ELSE - rVar.Value += rVar.TSValue; - // ENDIF - - if (!ReportNow || !rVar.Report) continue; - - if (rVar.frequency == ReportingFrequency::TimeStep) { - if (TimePrint) { - if (op->LHourP != state.dataGlobal->HourOfDay || std::abs(op->LStartMin - StartMinute) > 0.001 || - std::abs(op->LEndMin - op->TimeValue.at(thisTimeStepType).CurMinute) > 0.001) { - int CurDayType = state.dataEnvrn->DayOfWeek; - if (state.dataEnvrn->HolidayIndex > 0) { - CurDayType = state.dataEnvrn->HolidayIndex; - } - WriteTimeStampFormatData(state, - state.files.eso, - ReportingFrequency::EachCall, - op->TimeStepStampReportNbr, - op->TimeStepStampReportChr, - state.dataGlobal->DayOfSimChr, - true, - state.dataEnvrn->Month, - state.dataEnvrn->DayOfMonth, - state.dataGlobal->HourOfDay, - op->TimeValue.at(thisTimeStepType).CurMinute, - StartMinute, - state.dataEnvrn->DSTIndicator, - ScheduleManager::dayTypeNames[CurDayType]); - op->LHourP = state.dataGlobal->HourOfDay; - op->LStartMin = StartMinute; - op->LEndMin = op->TimeValue.at(thisTimeStepType).CurMinute; + } // for (iMeter) + } // if (op->meterValues.capacity() > 0) + + for (auto *var : op->outVars) { + if (var->timeStepType != TimeStepType::Zone && var->timeStepType != TimeStepType::System) continue; + if (var->varType != VariableType::Real) continue; + // auto *rVar = dynamic_cast(var); + // assert(rVar != nullptr); + + bool ReportNow = true; + if (var->SchedPtr > 0) ReportNow = (GetCurrentScheduleValue(state, var->SchedPtr) != 0.0); // SetReportNow(RVar%SchedPtr) + if (!ReportNow || !var->Report) { + var->TSValue = 0.0; + } + // IF (RVar%StoreType == AveragedVar) THEN + // RVar%Value=RVar%Value+RVar%TSValue/NumOfTimeStepInHour + // ELSE + var->Value += var->TSValue; + // ENDIF + + if (!ReportNow || !var->Report) continue; + + if (var->freq == ReportFreq::TimeStep) { + if (TimePrint) { + if (op->LHourP != state.dataGlobal->HourOfDay || std::abs(op->LStartMin - StartMinute) > 0.001 || + std::abs(op->LEndMin - op->TimeValue[(int)var->timeStepType].CurMinute) > 0.001) { + int CurDayType = state.dataEnvrn->DayOfWeek; + if (state.dataEnvrn->HolidayIndex > 0) { + CurDayType = state.dataEnvrn->HolidayIndex; } - TimePrint = false; + WriteTimeStampFormatData(state, + state.files.eso, + ReportFreq::EachCall, + op->freqStampReportNums[(int)ReportFreq::TimeStep], + state.dataGlobal->DayOfSimChr, + true, + state.dataEnvrn->Month, + state.dataEnvrn->DayOfMonth, + state.dataGlobal->HourOfDay, + op->TimeValue[(int)var->timeStepType].CurMinute, + StartMinute, + state.dataEnvrn->DSTIndicator, + ScheduleManager::dayTypeNames[CurDayType]); + op->LHourP = state.dataGlobal->HourOfDay; + op->LStartMin = StartMinute; + op->LEndMin = op->TimeValue[(int)var->timeStepType].CurMinute; } + TimePrint = false; + } // if (TimePrint) - WriteNumericData(state, rVar.ReportID, rVar.ReportIDChr, rVar.TSValue); - ++state.dataGlobal->StdOutputRecordCount; + WriteNumericData(state, var->ReportID, var->TSValue); + ++state.dataGlobal->StdOutputRecordCount; - if (state.dataResultsFramework->resultsFramework->timeSeriesEnabled()) { - state.dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(rVar.ReportID, rVar.TSValue); - } + if (rf->timeSeriesEnabled()) { + rf->freqTSData[(int)ReportFreq::TimeStep].pushVariableValue(var->ReportID, var->TSValue); } - rVar.TSValue = 0.0; - rVar.thisTSStored = false; - } // Number of R Variables - - for (int Loop = 1; Loop <= op->NumOfIVariable; ++Loop) { - if (op->IVariableTypes(Loop).timeStepType != thisTimeStepType) continue; - auto &iVar = op->IVariableTypes(Loop).VarPtr; - bool ReportNow = true; - if (iVar.SchedPtr > 0) ReportNow = (GetCurrentScheduleValue(state, iVar.SchedPtr) != 0.0); // SetReportNow(IVar%SchedPtr) - if (!ReportNow) { - iVar.TSValue = 0.0; - } - // IF (IVar%StoreType == AveragedVar) THEN - // IVar%Value=IVar%Value+REAL(IVar%TSValue,r64)/REAL(NumOfTimeStepInHour,r64) - // ELSE - iVar.Value += iVar.TSValue; - // ENDIF - - if (!ReportNow || !iVar.Report) continue; - - if (iVar.frequency == ReportingFrequency::TimeStep) { - if (TimePrint) { - if (op->LHourP != state.dataGlobal->HourOfDay || std::abs(op->LStartMin - StartMinute) > 0.001 || - std::abs(op->LEndMin - op->TimeValue.at(thisTimeStepType).CurMinute) > 0.001) { - int CurDayType = state.dataEnvrn->DayOfWeek; - if (state.dataEnvrn->HolidayIndex > 0) { - CurDayType = state.dataEnvrn->HolidayIndex; - } - WriteTimeStampFormatData(state, - state.files.eso, - ReportingFrequency::EachCall, - op->TimeStepStampReportNbr, - op->TimeStepStampReportChr, - state.dataGlobal->DayOfSimChr, - true, - state.dataEnvrn->Month, - state.dataEnvrn->DayOfMonth, - state.dataGlobal->HourOfDay, - op->TimeValue.at(thisTimeStepType).CurMinute, - StartMinute, - state.dataEnvrn->DSTIndicator, - ScheduleManager::dayTypeNames[CurDayType]); - op->LHourP = state.dataGlobal->HourOfDay; - op->LStartMin = StartMinute; - op->LEndMin = op->TimeValue.at(thisTimeStepType).CurMinute; + } + var->TSValue = 0.0; + var->thisTSStored = false; + } // for (var) + + // Have to replicate this loop twice so that all integer + // variables appear after all real variables to avoid spurious + // diffs in ESO files. After this PR is merged can go ahead and delete this. + for (auto *var : op->outVars) { + if (var->timeStepType != TimeStepType::Zone && var->timeStepType != TimeStepType::System) continue; + if (var->varType != VariableType::Integer) continue; + // auto *rVar = dynamic_cast(var); + // assert(rVar != nullptr); + + bool ReportNow = true; + if (var->SchedPtr > 0) ReportNow = (GetCurrentScheduleValue(state, var->SchedPtr) != 0.0); // SetReportNow(RVar%SchedPtr) + if (!ReportNow || !var->Report) { + var->TSValue = 0.0; + } + // IF (RVar%StoreType == AveragedVar) THEN + // RVar%Value=RVar%Value+RVar%TSValue/NumOfTimeStepInHour + // ELSE + var->Value += var->TSValue; + // ENDIF + + if (!ReportNow || !var->Report) continue; + + if (var->freq == ReportFreq::TimeStep) { + if (TimePrint) { + if (op->LHourP != state.dataGlobal->HourOfDay || std::abs(op->LStartMin - StartMinute) > 0.001 || + std::abs(op->LEndMin - op->TimeValue[(int)var->timeStepType].CurMinute) > 0.001) { + int CurDayType = state.dataEnvrn->DayOfWeek; + if (state.dataEnvrn->HolidayIndex > 0) { + CurDayType = state.dataEnvrn->HolidayIndex; } - TimePrint = false; + WriteTimeStampFormatData(state, + state.files.eso, + ReportFreq::EachCall, + op->freqStampReportNums[(int)ReportFreq::TimeStep], + state.dataGlobal->DayOfSimChr, + true, + state.dataEnvrn->Month, + state.dataEnvrn->DayOfMonth, + state.dataGlobal->HourOfDay, + op->TimeValue[(int)var->timeStepType].CurMinute, + StartMinute, + state.dataEnvrn->DSTIndicator, + ScheduleManager::dayTypeNames[CurDayType]); + op->LHourP = state.dataGlobal->HourOfDay; + op->LStartMin = StartMinute; + op->LEndMin = op->TimeValue[(int)var->timeStepType].CurMinute; } + TimePrint = false; + } // if (TimePrint) - WriteNumericData(state, iVar.ReportID, iVar.ReportIDChr, iVar.TSValue); - ++state.dataGlobal->StdOutputRecordCount; + WriteNumericData(state, var->ReportID, var->TSValue); + ++state.dataGlobal->StdOutputRecordCount; - if (state.dataResultsFramework->resultsFramework->timeSeriesEnabled()) { - state.dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(iVar.ReportID, iVar.TSValue); - } + if (rf->timeSeriesEnabled()) { + rf->freqTSData[(int)ReportFreq::TimeStep].pushVariableValue(var->ReportID, var->TSValue); } - iVar.TSValue = 0.0; - iVar.thisTSStored = false; - } // Number of I Variables - } // Index Type (Zone or HVAC) + } + var->TSValue = 0.0; + var->thisTSStored = false; + } // for (var) UpdateMeters(state, MDHM); - ReportTSMeters(state, StartMinute, op->TimeValue.at(TimeStepType::Zone).CurMinute, TimePrint, TimePrint); + ReportTSMeters(state, StartMinute, op->TimeValue[(int)TimeStepType::Zone].CurMinute, TimePrint, TimePrint); } // TimeStep Block // Hour Block if (state.dataGlobal->EndHourFlag) { - if (op->TrackingHourlyVariables) { + if (op->freqTrackingVariables[(int)ReportFreq::Hour]) { int CurDayType = state.dataEnvrn->DayOfWeek; if (state.dataEnvrn->HolidayIndex > 0) { CurDayType = state.dataEnvrn->HolidayIndex; } WriteTimeStampFormatData(state, state.files.eso, - ReportingFrequency::Hourly, - op->TimeStepStampReportNbr, - op->TimeStepStampReportChr, + ReportFreq::Hour, + op->freqStampReportNums[(int)ReportFreq::TimeStep], state.dataGlobal->DayOfSimChr, true, state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, state.dataGlobal->HourOfDay, - _, - _, + -1, // EndMinute + -1, // startMinute state.dataEnvrn->DSTIndicator, ScheduleManager::dayTypeNames[CurDayType]); TimePrint = false; } - if (state.dataResultsFramework->resultsFramework->timeSeriesEnabled()) { - if (!state.dataResultsFramework->resultsFramework->RIHourlyTSData.rVariablesScanned()) { - state.dataResultsFramework->resultsFramework->initializeRTSDataFrame( - ReportingFrequency::Hourly, op->RVariableTypes, op->NumOfRVariable); - } - if (!state.dataResultsFramework->resultsFramework->RIHourlyTSData.iVariablesScanned()) { - state.dataResultsFramework->resultsFramework->initializeITSDataFrame( - ReportingFrequency::Hourly, op->IVariableTypes, op->NumOfIVariable); + if (rf->timeSeriesEnabled()) { + if (!rf->freqTSData[(int)ReportFreq::Hour].variablesScanned()) { + rf->initializeTSDataFrame(ReportFreq::Hour, op->outVars); } - state.dataResultsFramework->resultsFramework->RIHourlyTSData.newRow( + rf->freqTSData[(int)ReportFreq::Hour].newRow( state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, state.dataGlobal->HourOfDay, 0, state.dataGlobal->CalendarYear); } - for (TimeStepType thisTimeStepType : {TimeStepType::Zone, TimeStepType::System}) { // Zone, HVAC - op->TimeValue.at(thisTimeStepType).CurMinute = 0.0; - for (int Loop = 1; Loop <= op->NumOfRVariable; ++Loop) { - if (op->RVariableTypes(Loop).timeStepType != thisTimeStepType) continue; - auto &rVar = op->RVariableTypes(Loop).VarPtr; - // ReportNow=.TRUE. - // IF (RVar%SchedPtr > 0) & - // ReportNow=(GetCurrentScheduleValue(state, RVar%SchedPtr) /= 0.0) !SetReportNow(RVar%SchedPtr) - - // IF (ReportNow) THEN - if (rVar.tsStored) { - if (rVar.storeType == StoreType::Averaged) { - rVar.Value /= double(rVar.thisTSCount); - } - if (rVar.Report && rVar.frequency == ReportingFrequency::Hourly && rVar.Stored) { - WriteNumericData(state, rVar.ReportID, rVar.ReportIDChr, rVar.Value); - ++state.dataGlobal->StdOutputRecordCount; - rVar.Stored = false; - // add time series value for hourly to data store - if (state.dataResultsFramework->resultsFramework->timeSeriesEnabled()) { - state.dataResultsFramework->resultsFramework->RIHourlyTSData.pushVariableValue(rVar.ReportID, rVar.Value); - } - } - rVar.StoreValue += rVar.Value; - ++rVar.NumStored; + op->TimeValue[(int)TimeStepType::Zone].CurMinute = 0.0; + op->TimeValue[(int)TimeStepType::System].CurMinute = 0.0; + + for (auto *var : op->outVars) { + if (var->varType != VariableType::Real) continue; + if (var->timeStepType != TimeStepType::Zone && var->timeStepType != TimeStepType::System) continue; + + // ReportNow=.TRUE. + // IF (RVar%SchedPtr > 0) & + // ReportNow=(GetCurrentScheduleValue(state, RVar%SchedPtr) /= 0.0) !SetReportNow(RVar%SchedPtr) + + // IF (ReportNow) THEN + if (var->tsStored) { + if (var->storeType == StoreType::Averaged) { + var->Value /= double(var->thisTSCount); } - rVar.tsStored = false; - rVar.thisTSStored = false; - rVar.thisTSCount = 0; - rVar.Value = 0.0; - } // Number of R Variables - - for (int Loop = 1; Loop <= op->NumOfIVariable; ++Loop) { - if (op->IVariableTypes(Loop).timeStepType != thisTimeStepType) continue; - auto &iVar = op->IVariableTypes(Loop).VarPtr; - // ReportNow=.TRUE. - // IF (IVar%SchedPtr > 0) & - // ReportNow=(GetCurrentScheduleValue(state, IVar%SchedPtr) /= 0.0) !SetReportNow(IVar%SchedPtr) - // IF (ReportNow) THEN - if (iVar.tsStored) { - if (iVar.storeType == StoreType::Averaged) { - iVar.Value /= double(iVar.thisTSCount); + if (var->Report && var->freq == ReportFreq::Hour && var->Stored) { + WriteNumericData(state, var->ReportID, var->Value); + ++state.dataGlobal->StdOutputRecordCount; + var->Stored = false; + // add time series value for hourly to data store + if (rf->timeSeriesEnabled()) { + rf->freqTSData[(int)ReportFreq::Hour].pushVariableValue(var->ReportID, var->Value); } - if (iVar.Report && iVar.frequency == ReportingFrequency::Hourly && iVar.Stored) { - WriteNumericData(state, iVar.ReportID, iVar.ReportIDChr, iVar.Value); - ++state.dataGlobal->StdOutputRecordCount; - iVar.Stored = false; - if (state.dataResultsFramework->resultsFramework->timeSeriesEnabled()) { - state.dataResultsFramework->resultsFramework->RIHourlyTSData.pushVariableValue(iVar.ReportID, iVar.Value); - } + } + var->StoreValue += var->Value; + ++var->NumStored; + } + var->tsStored = false; + var->thisTSStored = false; + var->thisTSCount = 0; + var->Value = 0.0; + } // for (var) + + for (auto *var : op->outVars) { + if (var->varType != VariableType::Integer) continue; + if (var->timeStepType != TimeStepType::Zone && var->timeStepType != TimeStepType::System) continue; + + // ReportNow=.TRUE. + // IF (RVar%SchedPtr > 0) & + // ReportNow=(GetCurrentScheduleValue(state, RVar%SchedPtr) /= 0.0) !SetReportNow(RVar%SchedPtr) + + // IF (ReportNow) THEN + if (var->tsStored) { + if (var->storeType == StoreType::Averaged) { + var->Value /= double(var->thisTSCount); + } + if (var->Report && var->freq == ReportFreq::Hour && var->Stored) { + WriteNumericData(state, var->ReportID, var->Value); + ++state.dataGlobal->StdOutputRecordCount; + var->Stored = false; + // add time series value for hourly to data store + if (rf->timeSeriesEnabled()) { + rf->freqTSData[(int)ReportFreq::Hour].pushVariableValue(var->ReportID, var->Value); } - iVar.StoreValue += iVar.Value; - ++iVar.NumStored; } - iVar.tsStored = false; - iVar.thisTSStored = false; - iVar.thisTSCount = 0; - iVar.Value = 0.0; - } // Number of I Variables - } // thisTimeStepType (Zone or HVAC) - - ReportHRMeters(state, TimePrint); + var->StoreValue += var->Value; + ++var->NumStored; + } + var->tsStored = false; + var->thisTSStored = false; + var->thisTSCount = 0; + var->Value = 0.0; + } // for (var) + ReportMeters(state, ReportFreq::Hour, TimePrint); } // Hour Block if (!state.dataGlobal->EndHourFlag) return; // Day Block if (state.dataGlobal->EndDayFlag) { - if (op->TrackingDailyVariables) { + if (op->freqTrackingVariables[(int)ReportFreq::Day]) { int CurDayType = state.dataEnvrn->DayOfWeek; if (state.dataEnvrn->HolidayIndex > 0) { CurDayType = state.dataEnvrn->HolidayIndex; } WriteTimeStampFormatData(state, state.files.eso, - ReportingFrequency::Daily, - op->DailyStampReportNbr, - op->DailyStampReportChr, + ReportFreq::Day, + op->freqStampReportNums[(int)ReportFreq::Day], state.dataGlobal->DayOfSimChr, true, state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, - _, - _, - _, + -1, // Hour + -1, // EndMinute + -1, // StartMinute state.dataEnvrn->DSTIndicator, ScheduleManager::dayTypeNames[CurDayType]); TimePrint = false; } - if (state.dataResultsFramework->resultsFramework->timeSeriesEnabled()) { - if (!state.dataResultsFramework->resultsFramework->RIDailyTSData.rVariablesScanned()) { - state.dataResultsFramework->resultsFramework->initializeRTSDataFrame( - ReportingFrequency::Daily, op->RVariableTypes, op->NumOfRVariable); - } - if (!state.dataResultsFramework->resultsFramework->RIDailyTSData.iVariablesScanned()) { - state.dataResultsFramework->resultsFramework->initializeITSDataFrame( - ReportingFrequency::Daily, op->IVariableTypes, op->NumOfIVariable); + if (rf->timeSeriesEnabled()) { + if (!rf->freqTSData[(int)ReportFreq::Day].variablesScanned()) { + rf->initializeTSDataFrame(ReportFreq::Day, op->outVars); } - state.dataResultsFramework->resultsFramework->RIDailyTSData.newRow( + rf->freqTSData[(int)ReportFreq::Day].newRow( state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, state.dataGlobal->HourOfDay, 0, state.dataGlobal->CalendarYear); } op->NumHoursInMonth += 24; - for (TimeStepType thisTimeStepType : {TimeStepType::Zone, TimeStepType::System}) { // Zone, HVAC - for (int Loop = 1; Loop <= op->NumOfRVariable; ++Loop) { - if (op->RVariableTypes(Loop).timeStepType == thisTimeStepType) { - WriteRealVariableOutput(state, op->RVariableTypes(Loop).VarPtr, ReportingFrequency::Daily); - } - } // Number of R Variables + for (auto *var : op->outVars) { + if (var->timeStepType != TimeStepType::Zone && var->timeStepType != TimeStepType::System) continue; + if (var->varType != VariableType::Real) continue; + WriteRealVariableOutput(state, dynamic_cast(var), ReportFreq::Day); + } - for (int Loop = 1; Loop <= op->NumOfIVariable; ++Loop) { - if (op->IVariableTypes(Loop).timeStepType == thisTimeStepType) { - WriteIntegerVariableOutput(state, op->IVariableTypes(Loop).VarPtr, ReportingFrequency::Daily); - } - } // Number of I Variables - } // thisTimeStepType (Zone or HVAC) + for (auto *var : op->outVars) { + if (var->timeStepType != TimeStepType::Zone && var->timeStepType != TimeStepType::System) continue; + if (var->varType != VariableType::Integer) continue; + WriteIntegerVariableOutput(state, dynamic_cast(var), ReportFreq::Day); + } - ReportDYMeters(state, TimePrint); + ReportMeters(state, ReportFreq::Day, TimePrint); } // Day Block @@ -5404,174 +3940,113 @@ void UpdateDataandReport(EnergyPlusData &state, OutputProcessor::TimeStepType co // Month Block if (state.dataEnvrn->EndMonthFlag || state.dataGlobal->EndEnvrnFlag) { - if (op->TrackingMonthlyVariables) { + if (op->freqTrackingVariables[(int)ReportFreq::Month]) { WriteTimeStampFormatData(state, state.files.eso, - ReportingFrequency::Monthly, - op->MonthlyStampReportNbr, - op->MonthlyStampReportChr, + ReportFreq::Month, + op->freqStampReportNums[(int)ReportFreq::Month], state.dataGlobal->DayOfSimChr, true, state.dataEnvrn->Month); TimePrint = false; } - if (state.dataResultsFramework->resultsFramework->timeSeriesEnabled()) { - if (!state.dataResultsFramework->resultsFramework->RIMonthlyTSData.rVariablesScanned()) { - state.dataResultsFramework->resultsFramework->initializeRTSDataFrame( - ReportingFrequency::Monthly, op->RVariableTypes, op->NumOfRVariable); + if (rf->timeSeriesEnabled()) { + if (!rf->freqTSData[(int)ReportFreq::Month].variablesScanned()) { + rf->initializeTSDataFrame(ReportFreq::Month, op->outVars); } - if (!state.dataResultsFramework->resultsFramework->RIMonthlyTSData.iVariablesScanned()) { - state.dataResultsFramework->resultsFramework->initializeITSDataFrame( - ReportingFrequency::Monthly, op->IVariableTypes, op->NumOfIVariable); - } - state.dataResultsFramework->resultsFramework->RIMonthlyTSData.newRow( + rf->freqTSData[(int)ReportFreq::Month].newRow( state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, state.dataGlobal->HourOfDay, 0, state.dataGlobal->CalendarYear); } op->NumHoursInSim += op->NumHoursInMonth; state.dataEnvrn->EndMonthFlag = false; - for (TimeStepType thisTimeStepType : {TimeStepType::Zone, TimeStepType::System}) { // Zone, HVAC - for (int Loop = 1; Loop <= op->NumOfRVariable; ++Loop) { - if (op->RVariableTypes(Loop).timeStepType == thisTimeStepType) { - WriteRealVariableOutput(state, op->RVariableTypes(Loop).VarPtr, ReportingFrequency::Monthly); - } - } // Number of R Variables + for (auto *var : op->outVars) { + if (var->timeStepType != TimeStepType::Zone && var->timeStepType != TimeStepType::System) continue; + if (var->varType != VariableType::Real) continue; + WriteRealVariableOutput(state, dynamic_cast(var), ReportFreq::Month); + } - for (int Loop = 1; Loop <= op->NumOfIVariable; ++Loop) { - if (op->IVariableTypes(Loop).timeStepType == thisTimeStepType) { - WriteIntegerVariableOutput(state, op->IVariableTypes(Loop).VarPtr, ReportingFrequency::Monthly); - } - } // Number of I Variables - } // thisTimeStepType (Zone, HVAC) + for (auto *var : op->outVars) { + if (var->timeStepType != TimeStepType::Zone && var->timeStepType != TimeStepType::System) continue; + if (var->varType != VariableType::Integer) continue; + WriteIntegerVariableOutput(state, dynamic_cast(var), ReportFreq::Month); + } // for (var) - ReportMNMeters(state, TimePrint); + ReportMeters(state, ReportFreq::Month, TimePrint); op->NumHoursInMonth = 0; } // Month Block // Sim/Environment Block if (state.dataGlobal->EndEnvrnFlag) { - if (op->TrackingRunPeriodVariables) { + if (op->freqTrackingVariables[(int)ReportFreq::Simulation]) { WriteTimeStampFormatData(state, state.files.eso, - ReportingFrequency::Simulation, - op->RunPeriodStampReportNbr, - op->RunPeriodStampReportChr, + ReportFreq::Simulation, + op->freqStampReportNums[(int)ReportFreq::Simulation], state.dataGlobal->DayOfSimChr, true); TimePrint = false; } - if (state.dataResultsFramework->resultsFramework->timeSeriesEnabled()) { - if (!state.dataResultsFramework->resultsFramework->RIRunPeriodTSData.rVariablesScanned()) { - state.dataResultsFramework->resultsFramework->initializeRTSDataFrame( - ReportingFrequency::Simulation, op->RVariableTypes, op->NumOfRVariable); + if (rf->timeSeriesEnabled()) { + if (!rf->freqTSData[(int)ReportFreq::Simulation].variablesScanned()) { + rf->initializeTSDataFrame(ReportFreq::Simulation, op->outVars); } - if (!state.dataResultsFramework->resultsFramework->RIRunPeriodTSData.iVariablesScanned()) { - state.dataResultsFramework->resultsFramework->initializeITSDataFrame( - ReportingFrequency::Simulation, op->IVariableTypes, op->NumOfIVariable); - } - state.dataResultsFramework->resultsFramework->RIRunPeriodTSData.newRow( + rf->freqTSData[(int)ReportFreq::Simulation].newRow( state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, state.dataGlobal->HourOfDay, 0, state.dataGlobal->CalendarYear); } - for (TimeStepType thisTimeStepType : {TimeStepType::Zone, TimeStepType::System}) { // Zone, HVAC - for (int Loop = 1; Loop <= op->NumOfRVariable; ++Loop) { - if (op->RVariableTypes(Loop).timeStepType == thisTimeStepType) { - WriteRealVariableOutput(state, op->RVariableTypes(Loop).VarPtr, ReportingFrequency::Simulation); - } - } // Number of R Variables - for (int Loop = 1; Loop <= op->NumOfIVariable; ++Loop) { - if (op->IVariableTypes(Loop).timeStepType == thisTimeStepType) { - WriteIntegerVariableOutput(state, op->IVariableTypes(Loop).VarPtr, ReportingFrequency::Simulation); - } - } // Number of I Variables - } // thisTimeStepType (Zone, HVAC) + for (auto *var : op->outVars) { + if (var->timeStepType != TimeStepType::Zone && var->timeStepType != TimeStepType::System) continue; + if (var->varType != VariableType::Real) continue; + WriteRealVariableOutput(state, dynamic_cast(var), ReportFreq::Simulation); + } - ReportSMMeters(state, TimePrint); + for (auto *var : op->outVars) { + if (var->timeStepType != TimeStepType::Zone && var->timeStepType != TimeStepType::System) continue; + if (var->varType != VariableType::Integer) continue; + WriteIntegerVariableOutput(state, dynamic_cast(var), ReportFreq::Simulation); + } // Number of I Variables + + ReportMeters(state, ReportFreq::Simulation, TimePrint); op->NumHoursInSim = 0; } // Yearly Block if (state.dataEnvrn->EndYearFlag) { - if (op->TrackingYearlyVariables) { - WriteYearlyTimeStamp(state, state.files.eso, op->YearlyStampReportChr, state.dataGlobal->CalendarYearChr, true); + if (op->freqTrackingVariables[(int)ReportFreq::Year]) { + WriteYearlyTimeStamp(state, state.files.eso, op->freqStampReportNums[(int)ReportFreq::Year], state.dataGlobal->CalendarYearChr, true); TimePrint = false; } - if (state.dataResultsFramework->resultsFramework->timeSeriesEnabled()) { - if (!state.dataResultsFramework->resultsFramework->RIYearlyTSData.rVariablesScanned()) { - state.dataResultsFramework->resultsFramework->initializeRTSDataFrame( - ReportingFrequency::Yearly, op->RVariableTypes, op->NumOfRVariable); - } - if (!state.dataResultsFramework->resultsFramework->RIYearlyTSData.iVariablesScanned()) { - state.dataResultsFramework->resultsFramework->initializeITSDataFrame( - ReportingFrequency::Yearly, op->IVariableTypes, op->NumOfIVariable); + if (rf->timeSeriesEnabled()) { + if (!rf->freqTSData[(int)ReportFreq::Year].variablesScanned()) { + rf->initializeTSDataFrame(ReportFreq::Year, op->outVars); } - state.dataResultsFramework->resultsFramework->RIYearlyTSData.newRow( + rf->freqTSData[(int)ReportFreq::Year].newRow( state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, state.dataGlobal->HourOfDay, 0, state.dataGlobal->CalendarYear); } - for (TimeStepType thisTimeStepType : {TimeStepType::Zone, TimeStepType::System}) { // Zone, HVAC - for (int Loop = 1; Loop <= op->NumOfRVariable; ++Loop) { - if (op->RVariableTypes(Loop).timeStepType == thisTimeStepType) { - WriteRealVariableOutput(state, op->RVariableTypes(Loop).VarPtr, ReportingFrequency::Yearly); - } - } // Number of R Variables - for (int Loop = 1; Loop <= op->NumOfIVariable; ++Loop) { - if (op->IVariableTypes(Loop).timeStepType == thisTimeStepType) { - WriteIntegerVariableOutput(state, op->IVariableTypes(Loop).VarPtr, ReportingFrequency::Yearly); - } - } // Number of I Variables - } // thisTimeStepType (Zone, HVAC) + for (auto *var : op->outVars) { + if (var->timeStepType != TimeStepType::Zone && var->timeStepType != TimeStepType::System) continue; + if (var->varType != VariableType::Real) continue; + WriteRealVariableOutput(state, dynamic_cast(var), ReportFreq::Year); + } + + for (auto *var : op->outVars) { + if (var->timeStepType != TimeStepType::Zone && var->timeStepType != TimeStepType::System) continue; + if (var->varType != VariableType::Integer) continue; + WriteIntegerVariableOutput(state, dynamic_cast(var), ReportFreq::Year); + } // Number of I Variables - ReportYRMeters(state, TimePrint); + ReportMeters(state, ReportFreq::Year, TimePrint); state.dataGlobal->CalendarYear += 1; state.dataGlobal->CalendarYearChr = fmt::to_string(state.dataGlobal->CalendarYear); } -} - -void AssignReportNumber(EnergyPlusData &state, int &ReportNumber) -{ - - // SUBROUTINE INFORMATION: - // AUTHOR Linda K. Lawrie - // DATE WRITTEN December 1997 - // MODIFIED na - // RE-ENGINEERED na - - // PURPOSE OF THIS SUBROUTINE: - // This subroutine returns the next report number available. The report number - // is used in output reports as a key. - - // METHODOLOGY EMPLOYED: - // Use internal ReportNumberCounter to maintain current report numbers. - - // REFERENCES: - // na - - // USE STATEMENTS: - using namespace OutputProcessor; - - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // FUNCTION PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // FUNCTION LOCAL VARIABLE DECLARATIONS: - - ++state.dataOutputProcessor->ReportNumberCounter; - ReportNumber = state.dataOutputProcessor->ReportNumberCounter; -} +} // UpdateDataandReport() void GenOutputVariablesAuditReport(EnergyPlusData &state) { @@ -5579,8 +4054,6 @@ void GenOutputVariablesAuditReport(EnergyPlusData &state) // SUBROUTINE INFORMATION: // AUTHOR Linda Lawrie // DATE WRITTEN February 2000 - // MODIFIED na - // RE-ENGINEERED na // PURPOSE OF THIS SUBROUTINE: // This subroutine reports (to the .err file) any report variables @@ -5595,19 +4068,22 @@ void GenOutputVariablesAuditReport(EnergyPlusData &state) using namespace OutputProcessor; // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int Loop; auto &op = state.dataOutputProcessor; - std::map reportFrequency({{ReportingFrequency::EachCall, "Detailed"}, - {ReportingFrequency::TimeStep, "TimeStep"}, - {ReportingFrequency::Hourly, "Hourly"}, - {ReportingFrequency::Daily, "Daily"}, - {ReportingFrequency::Monthly, "Monthly"}, - {ReportingFrequency::Yearly, "Annual"}}); - - for (Loop = 1; Loop <= op->NumOfReqVariables; ++Loop) { - if (op->ReqRepVars(Loop).Used) continue; - if (op->ReqRepVars(Loop).Key.empty()) op->ReqRepVars(Loop).Key = "*"; - if (has(op->ReqRepVars(Loop).VarName, "OPAQUE SURFACE INSIDE FACE CONDUCTION") && !state.dataGlobal->DisplayAdvancedReportVariables && + + static constexpr std::array localReportFreqNames = { + "Detailed", // EachCall // For some reason, this is "Detailed" here and "Each Call" in other places + "TimeStep", // TimeStep + "Hourly", // Hourly + "Daily", // Daily + "Monthly", // Monthly + "RunPeriod", // Simulation + "Annual" // Yearly + }; + + for (auto *reqVar : op->reqVars) { + if (reqVar->Used) continue; + if (reqVar->key.empty()) reqVar->key = "*"; + if (has(reqVar->name, "OPAQUE SURFACE INSIDE FACE CONDUCTION") && !state.dataGlobal->DisplayAdvancedReportVariables && !state.dataOutputProcessor->OpaqSurfWarned) { ShowWarningError(state, R"(Variables containing "Opaque Surface Inside Face Conduction" are now "advanced" variables.)"); ShowContinueError(state, "You must enter the \"Output:Diagnostics,DisplayAdvancedReportVariables;\" statement to view."); @@ -5621,13 +4097,9 @@ void GenOutputVariablesAuditReport(EnergyPlusData &state) "or the requested variable is an advanced output which requires Output : Diagnostics, DisplayAdvancedReportVariables;"); state.dataOutputProcessor->Rept = true; } - ShowMessage(state, - format("Key={}, VarName={}, Frequency={}", - op->ReqRepVars(Loop).Key, - op->ReqRepVars(Loop).VarName, - reportFrequency[op->ReqRepVars(Loop).frequency])); + ShowMessage(state, format("Key={}, VarName={}, Frequency={}", reqVar->key, reqVar->name, localReportFreqNames[(int)reqVar->freq])); } -} +} // GenOutputVariablesAuditReport() void UpdateMeterReporting(EnergyPlusData &state) { @@ -5698,6 +4170,7 @@ void UpdateMeterReporting(EnergyPlusData &state) bool ErrorsFound(false); // If errors detected in input auto &op = state.dataOutputProcessor; + auto &ipsc = state.dataIPShortCut; GetCustomMeterInput(state, ErrorsFound); if (ErrorsFound) { @@ -5706,7 +4179,7 @@ void UpdateMeterReporting(EnergyPlusData &state) // Helper lambda to locate a meter index from its name. Returns a negative value if not found auto setupMeterFromMeterName = // (AUTO_OK_LAMBDA) - [&state](std::string &name, std::string const &freqString, bool MeterFileOnlyIndicator, bool CumulativeIndicator) -> bool { + [&state](std::string &name, ReportFreq freq, bool MeterFileOnlyIndicator, bool CumulativeIndicator) -> bool { bool result = false; size_t varnameLen = index(name, '['); @@ -5719,17 +4192,15 @@ void UpdateMeterReporting(EnergyPlusData &state) std::string::size_type wildCardPosition = index(name, '*'); if (wildCardPosition == std::string::npos) { - int meterIndex = Util::FindItem(name, op->EnergyMeters); - if (meterIndex > 0) { - ReportingFrequency ReportFreq = determineFrequency(state, freqString); - SetInitialMeterReportingAndOutputNames(state, meterIndex, MeterFileOnlyIndicator, ReportFreq, CumulativeIndicator); + if (auto found = op->meterMap.find(name); found != op->meterMap.end()) { + SetInitialMeterReportingAndOutputNames(state, found->second, MeterFileOnlyIndicator, freq, CumulativeIndicator); result = true; } } else { // Wildcard input - ReportingFrequency ReportFreq = determineFrequency(state, freqString); - for (int meterIndex = 1; meterIndex <= op->NumEnergyMeters; ++meterIndex) { - if (Util::SameString(op->EnergyMeters(meterIndex).Name.substr(0, wildCardPosition), name.substr(0, wildCardPosition))) { - SetInitialMeterReportingAndOutputNames(state, meterIndex, MeterFileOnlyIndicator, ReportFreq, CumulativeIndicator); + std::string nameSubstr = name.substr(0, wildCardPosition); + for (int iMeter = 0; iMeter < (int)op->meters.size(); ++iMeter) { + if (Util::SameString(op->meters[iMeter]->Name.substr(0, wildCardPosition), nameSubstr)) { + SetInitialMeterReportingAndOutputNames(state, iMeter, MeterFileOnlyIndicator, freq, CumulativeIndicator); result = true; } } @@ -5738,106 +4209,106 @@ void UpdateMeterReporting(EnergyPlusData &state) return result; }; - auto &cCurrentModuleObject = state.dataIPShortCut->cCurrentModuleObject; - cCurrentModuleObject = "Output:Meter"; - NumReqMeters = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject); + ipsc->cCurrentModuleObject = "Output:Meter"; + NumReqMeters = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, ipsc->cCurrentModuleObject); for (Loop = 1; Loop <= NumReqMeters; ++Loop) { state.dataInputProcessing->inputProcessor->getObjectItem(state, - cCurrentModuleObject, + ipsc->cCurrentModuleObject, Loop, Alphas, NumAlpha, Numbers, NumNumbers, IOStat, - state.dataIPShortCut->lNumericFieldBlanks, - state.dataIPShortCut->lAlphaFieldBlanks, - state.dataIPShortCut->cAlphaFieldNames, - state.dataIPShortCut->cNumericFieldNames); + ipsc->lNumericFieldBlanks, + ipsc->lAlphaFieldBlanks, + ipsc->cAlphaFieldNames, + ipsc->cNumericFieldNames); bool meterFileOnlyIndicator = false; bool cumulativeIndicator = false; - if (!setupMeterFromMeterName(Alphas(1), Alphas(2), meterFileOnlyIndicator, cumulativeIndicator)) { - ShowWarningError( - state, format("{}: invalid {}=\"{}\" - not found.", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(1), Alphas(1))); + ReportFreq freq = determineFrequency(state, Util::makeUPPER(Alphas(2))); + + if (!setupMeterFromMeterName(Alphas(1), freq, meterFileOnlyIndicator, cumulativeIndicator)) { + ShowWarningError(state, format("{}: invalid {}=\"{}\" - not found.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); } } - cCurrentModuleObject = "Output:Meter:MeterFileOnly"; - NumReqMeterFOs = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject); + ipsc->cCurrentModuleObject = "Output:Meter:MeterFileOnly"; + NumReqMeterFOs = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, ipsc->cCurrentModuleObject); for (Loop = 1; Loop <= NumReqMeterFOs; ++Loop) { state.dataInputProcessing->inputProcessor->getObjectItem(state, - cCurrentModuleObject, + ipsc->cCurrentModuleObject, Loop, Alphas, NumAlpha, Numbers, NumNumbers, IOStat, - state.dataIPShortCut->lNumericFieldBlanks, - state.dataIPShortCut->lAlphaFieldBlanks, - state.dataIPShortCut->cAlphaFieldNames, - state.dataIPShortCut->cNumericFieldNames); + ipsc->lNumericFieldBlanks, + ipsc->lAlphaFieldBlanks, + ipsc->cAlphaFieldNames, + ipsc->cNumericFieldNames); bool meterFileOnlyIndicator = true; bool cumulativeIndicator = false; - if (!setupMeterFromMeterName(Alphas(1), Alphas(2), meterFileOnlyIndicator, cumulativeIndicator)) { - ShowWarningError( - state, format("{}: invalid {}=\"{}\" - not found.", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(1), Alphas(1))); + ReportFreq freq = determineFrequency(state, Util::makeUPPER(Alphas(2))); + if (!setupMeterFromMeterName(Alphas(1), freq, meterFileOnlyIndicator, cumulativeIndicator)) { + ShowWarningError(state, format("{}: invalid {}=\"{}\" - not found.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); } } - cCurrentModuleObject = "Output:Meter:Cumulative"; - NumReqMeters = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject); + ipsc->cCurrentModuleObject = "Output:Meter:Cumulative"; + NumReqMeters = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, ipsc->cCurrentModuleObject); for (Loop = 1; Loop <= NumReqMeters; ++Loop) { state.dataInputProcessing->inputProcessor->getObjectItem(state, - cCurrentModuleObject, + ipsc->cCurrentModuleObject, Loop, Alphas, NumAlpha, Numbers, NumNumbers, IOStat, - state.dataIPShortCut->lNumericFieldBlanks, - state.dataIPShortCut->lAlphaFieldBlanks, - state.dataIPShortCut->cAlphaFieldNames, - state.dataIPShortCut->cNumericFieldNames); + ipsc->lNumericFieldBlanks, + ipsc->lAlphaFieldBlanks, + ipsc->cAlphaFieldNames, + ipsc->cNumericFieldNames); bool meterFileOnlyIndicator = false; bool cumulativeIndicator = true; - if (!setupMeterFromMeterName(Alphas(1), Alphas(2), meterFileOnlyIndicator, cumulativeIndicator)) { - ShowWarningError( - state, format("{}: invalid {}=\"{}\" - not found.", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(1), Alphas(1))); + ReportFreq freq = determineFrequency(state, Util::makeUPPER(Alphas(2))); + if (!setupMeterFromMeterName(Alphas(1), freq, meterFileOnlyIndicator, cumulativeIndicator)) { + ShowWarningError(state, format("{}: invalid {}=\"{}\" - not found.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); } } - cCurrentModuleObject = "Output:Meter:Cumulative:MeterFileOnly"; - NumReqMeterFOs = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject); + ipsc->cCurrentModuleObject = "Output:Meter:Cumulative:MeterFileOnly"; + NumReqMeterFOs = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, ipsc->cCurrentModuleObject); for (Loop = 1; Loop <= NumReqMeterFOs; ++Loop) { state.dataInputProcessing->inputProcessor->getObjectItem(state, - cCurrentModuleObject, + ipsc->cCurrentModuleObject, Loop, Alphas, NumAlpha, Numbers, NumNumbers, IOStat, - state.dataIPShortCut->lNumericFieldBlanks, - state.dataIPShortCut->lAlphaFieldBlanks, - state.dataIPShortCut->cAlphaFieldNames, - state.dataIPShortCut->cNumericFieldNames); + ipsc->lNumericFieldBlanks, + ipsc->lAlphaFieldBlanks, + ipsc->cAlphaFieldNames, + ipsc->cNumericFieldNames); bool meterFileOnlyIndicator = true; bool cumulativeIndicator = true; - if (!setupMeterFromMeterName(Alphas(1), Alphas(2), meterFileOnlyIndicator, cumulativeIndicator)) { - ShowWarningError( - state, format("{}: invalid {}=\"{}\" - not found.", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(1), Alphas(1))); + ReportFreq freq = determineFrequency(state, Util::makeUPPER(Alphas(2))); + if (!setupMeterFromMeterName(Alphas(1), freq, meterFileOnlyIndicator, cumulativeIndicator)) { + ShowWarningError(state, format("{}: invalid {}=\"{}\" - not found.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); } } @@ -5847,22 +4318,21 @@ void UpdateMeterReporting(EnergyPlusData &state) ShowFatalError(state, "UpdateMeterReporting: Previous Meter Specification errors cause program termination."); } - op->MeterValue.dimension(op->NumEnergyMeters, 0.0); -} + op->meterValues.resize(op->meters.size(), 0.0); + std::fill(op->meterValues.begin(), op->meterValues.end(), 0.0); +} // UpdateMeterReporting() void SetInitialMeterReportingAndOutputNames(EnergyPlusData &state, int const WhichMeter, // Which meter number bool const MeterFileOnlyIndicator, // true if this is a meter file only reporting - OutputProcessor::ReportingFrequency const FrequencyIndicator, // at what frequency is the meter reported - bool const CumulativeIndicator // true if this is a Cumulative meter reporting + OutputProcessor::ReportFreq freq, // at what frequency is the meter reported + bool const CumulativeIndicator // true if this is a Cumulative meter reporting ) { // SUBROUTINE INFORMATION: // AUTHOR Linda Lawrie // DATE WRITTEN February 2007 - // MODIFIED na - // RE-ENGINEERED na // PURPOSE OF THIS SUBROUTINE: // Set values and output initial names to output files. @@ -5871,699 +4341,154 @@ void SetInitialMeterReportingAndOutputNames(EnergyPlusData &state, using namespace OutputProcessor; // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int indexGroupKey; std::string indexGroup; auto &op = state.dataOutputProcessor; - if ((FrequencyIndicator == ReportingFrequency::EachCall) || - (FrequencyIndicator == ReportingFrequency::TimeStep)) { // roll "detailed" into TimeStep - if (!CumulativeIndicator) { - if (MeterFileOnlyIndicator) { - if (op->EnergyMeters(WhichMeter).RptTS) { - ShowWarningError( - state, - format( - "Output:Meter:MeterFileOnly requested for \"{}\" (TimeStep), already on \"Output:Meter\". Will report to both {} and {}", - op->EnergyMeters(WhichMeter).Name, - state.files.eso.filePath.filename().string(), - state.files.mtr.filePath.filename().string())); - } - } - if (!op->EnergyMeters(WhichMeter).RptTS) { - op->EnergyMeters(WhichMeter).RptTS = true; - if (MeterFileOnlyIndicator) op->EnergyMeters(WhichMeter).RptTSFO = true; - indexGroupKey = DetermineIndexGroupKeyFromMeterName(state, op->EnergyMeters(WhichMeter).Name); - indexGroup = DetermineIndexGroupFromMeterGroup(op->EnergyMeters(WhichMeter)); - WriteMeterDictionaryItem(state, - FrequencyIndicator, - StoreType::Summed, - op->EnergyMeters(WhichMeter).TSRptNum, - indexGroupKey, - indexGroup, - op->EnergyMeters(WhichMeter).TSRptNumChr, - op->EnergyMeters(WhichMeter).Name, - op->EnergyMeters(WhichMeter).Units, - false, - MeterFileOnlyIndicator); - } - } else { - if (MeterFileOnlyIndicator) { - if (op->EnergyMeters(WhichMeter).RptAccTS) { - ShowWarningError(state, - format("Output:Meter:MeterFileOnly requested for \"Cumulative {}\" (TimeStep), already on \"Output:Meter\". " - "Will report to both {} and {}", - op->EnergyMeters(WhichMeter).Name, - state.files.eso.filePath.filename().string(), - state.files.mtr.filePath.filename().string())); - } - } - if (!op->EnergyMeters(WhichMeter).RptAccTS) { - op->EnergyMeters(WhichMeter).RptAccTS = true; - if (MeterFileOnlyIndicator) op->EnergyMeters(WhichMeter).RptAccTSFO = true; - indexGroupKey = DetermineIndexGroupKeyFromMeterName(state, op->EnergyMeters(WhichMeter).Name); - indexGroup = DetermineIndexGroupFromMeterGroup(op->EnergyMeters(WhichMeter)); - WriteMeterDictionaryItem(state, - FrequencyIndicator, - StoreType::Summed, - op->EnergyMeters(WhichMeter).TSAccRptNum, - indexGroupKey, - indexGroup, - fmt::to_string(op->EnergyMeters(WhichMeter).TSAccRptNum), - op->EnergyMeters(WhichMeter).Name, - op->EnergyMeters(WhichMeter).Units, - true, - MeterFileOnlyIndicator); - } - } - } else if (FrequencyIndicator == ReportingFrequency::Hourly) { - if (!CumulativeIndicator) { - if (MeterFileOnlyIndicator) { - if (op->EnergyMeters(WhichMeter).RptHR) { - ShowWarningError( - state, - format("Output:Meter:MeterFileOnly requested for \"{}\" (Hourly), already on \"Output:Meter\". Will report to both {} and {}", - op->EnergyMeters(WhichMeter).Name, - state.files.eso.filePath.filename().string(), - state.files.mtr.filePath.filename().string())); - } - } - if (!op->EnergyMeters(WhichMeter).RptHR) { - op->EnergyMeters(WhichMeter).RptHR = true; - if (MeterFileOnlyIndicator) op->EnergyMeters(WhichMeter).RptHRFO = true; - if (!MeterFileOnlyIndicator) op->TrackingHourlyVariables = true; - indexGroupKey = DetermineIndexGroupKeyFromMeterName(state, op->EnergyMeters(WhichMeter).Name); - indexGroup = DetermineIndexGroupFromMeterGroup(op->EnergyMeters(WhichMeter)); - WriteMeterDictionaryItem(state, - FrequencyIndicator, - StoreType::Summed, - op->EnergyMeters(WhichMeter).HRRptNum, - indexGroupKey, - indexGroup, - op->EnergyMeters(WhichMeter).HRRptNumChr, - op->EnergyMeters(WhichMeter).Name, - op->EnergyMeters(WhichMeter).Units, - false, - MeterFileOnlyIndicator); - } - } else { - if (MeterFileOnlyIndicator) { - if (op->EnergyMeters(WhichMeter).RptAccHR) { - ShowWarningError(state, - format("Output:Meter:MeterFileOnly requested for \"Cummulative {}\" (Hourly), already on \"Output:Meter\". Will " - "report to both {} and {}", - op->EnergyMeters(WhichMeter).Name, - state.files.eso.filePath.filename().string(), - state.files.mtr.filePath.filename().string())); - } - } - if (!op->EnergyMeters(WhichMeter).RptAccHR) { - op->EnergyMeters(WhichMeter).RptAccHR = true; - if (MeterFileOnlyIndicator) op->EnergyMeters(WhichMeter).RptAccHRFO = true; - if (!MeterFileOnlyIndicator) op->TrackingHourlyVariables = true; - indexGroupKey = DetermineIndexGroupKeyFromMeterName(state, op->EnergyMeters(WhichMeter).Name); - indexGroup = DetermineIndexGroupFromMeterGroup(op->EnergyMeters(WhichMeter)); - WriteMeterDictionaryItem(state, - FrequencyIndicator, - StoreType::Summed, - op->EnergyMeters(WhichMeter).HRAccRptNum, - indexGroupKey, - indexGroup, - fmt::to_string(op->EnergyMeters(WhichMeter).HRAccRptNum), - op->EnergyMeters(WhichMeter).Name, - op->EnergyMeters(WhichMeter).Units, - true, - MeterFileOnlyIndicator); - } - } - } else if (FrequencyIndicator == ReportingFrequency::Daily) { - if (!CumulativeIndicator) { - if (MeterFileOnlyIndicator) { - if (op->EnergyMeters(WhichMeter).RptDY) { - ShowWarningError( - state, - format("Output:Meter:MeterFileOnly requested for \"{}\" (Daily), already on \"Output:Meter\". Will report to both {} and {}", - op->EnergyMeters(WhichMeter).Name, - state.files.eso.filePath.filename().string(), - state.files.mtr.filePath.filename().string())); - } - } - if (!op->EnergyMeters(WhichMeter).RptDY) { - op->EnergyMeters(WhichMeter).RptDY = true; - if (MeterFileOnlyIndicator) op->EnergyMeters(WhichMeter).RptDYFO = true; - if (!MeterFileOnlyIndicator) op->TrackingDailyVariables = true; - indexGroupKey = DetermineIndexGroupKeyFromMeterName(state, op->EnergyMeters(WhichMeter).Name); - indexGroup = DetermineIndexGroupFromMeterGroup(op->EnergyMeters(WhichMeter)); - WriteMeterDictionaryItem(state, - FrequencyIndicator, - StoreType::Summed, - op->EnergyMeters(WhichMeter).DYRptNum, - indexGroupKey, - indexGroup, - op->EnergyMeters(WhichMeter).DYRptNumChr, - op->EnergyMeters(WhichMeter).Name, - op->EnergyMeters(WhichMeter).Units, - false, - MeterFileOnlyIndicator); - } - } else { - if (MeterFileOnlyIndicator) { - if (op->EnergyMeters(WhichMeter).RptAccDY) { - ShowWarningError(state, - format("Output:Meter:MeterFileOnly requested for \"Cumulative {}\" (Daily), already on \"Output:Meter\". Will " - "report to both {} and {}", - op->EnergyMeters(WhichMeter).Name, - state.files.eso.filePath.filename().string(), - state.files.mtr.filePath.filename().string())); - } - } - if (!op->EnergyMeters(WhichMeter).RptAccDY) { - op->EnergyMeters(WhichMeter).RptAccDY = true; - if (MeterFileOnlyIndicator) op->EnergyMeters(WhichMeter).RptAccDYFO = true; - if (!MeterFileOnlyIndicator) op->TrackingDailyVariables = true; - indexGroupKey = DetermineIndexGroupKeyFromMeterName(state, op->EnergyMeters(WhichMeter).Name); - indexGroup = DetermineIndexGroupFromMeterGroup(op->EnergyMeters(WhichMeter)); - WriteMeterDictionaryItem(state, - FrequencyIndicator, - StoreType::Summed, - op->EnergyMeters(WhichMeter).DYAccRptNum, - indexGroupKey, - indexGroup, - fmt::to_string(op->EnergyMeters(WhichMeter).DYAccRptNum), - op->EnergyMeters(WhichMeter).Name, - op->EnergyMeters(WhichMeter).Units, - true, - MeterFileOnlyIndicator); - } - } - } else if (FrequencyIndicator == ReportingFrequency::Monthly) { - if (!CumulativeIndicator) { - if (MeterFileOnlyIndicator) { - if (op->EnergyMeters(WhichMeter).RptMN) { - ShowWarningError( - state, - format( - "Output:Meter:MeterFileOnly requested for \"{}\" (Monthly), already on \"Output:Meter\". Will report to both {} and {}", - op->EnergyMeters(WhichMeter).Name, - state.files.eso.filePath.filename().string(), - state.files.mtr.filePath.filename().string())); - } - } - if (!op->EnergyMeters(WhichMeter).RptMN) { - op->EnergyMeters(WhichMeter).RptMN = true; - if (MeterFileOnlyIndicator) op->EnergyMeters(WhichMeter).RptMNFO = true; - if (!MeterFileOnlyIndicator) op->TrackingMonthlyVariables = true; - indexGroupKey = DetermineIndexGroupKeyFromMeterName(state, op->EnergyMeters(WhichMeter).Name); - indexGroup = DetermineIndexGroupFromMeterGroup(op->EnergyMeters(WhichMeter)); - WriteMeterDictionaryItem(state, - FrequencyIndicator, - StoreType::Summed, - op->EnergyMeters(WhichMeter).MNRptNum, - indexGroupKey, - indexGroup, - op->EnergyMeters(WhichMeter).MNRptNumChr, - op->EnergyMeters(WhichMeter).Name, - op->EnergyMeters(WhichMeter).Units, - false, - MeterFileOnlyIndicator); - } - } else { - if (MeterFileOnlyIndicator) { - if (op->EnergyMeters(WhichMeter).RptAccMN) { - ShowWarningError(state, - format("Output:Meter:MeterFileOnly requested for \"Cumulative {}\" (Monthly), already on \"Output:Meter\". Will " - "report to both {} and {}", - op->EnergyMeters(WhichMeter).Name, - state.files.eso.filePath.filename().string(), - state.files.mtr.filePath.filename().string())); - } - } - if (!op->EnergyMeters(WhichMeter).RptAccMN) { - op->EnergyMeters(WhichMeter).RptAccMN = true; - if (MeterFileOnlyIndicator) op->EnergyMeters(WhichMeter).RptAccMNFO = true; - if (!MeterFileOnlyIndicator) op->TrackingMonthlyVariables = true; - indexGroupKey = DetermineIndexGroupKeyFromMeterName(state, op->EnergyMeters(WhichMeter).Name); - indexGroup = DetermineIndexGroupFromMeterGroup(op->EnergyMeters(WhichMeter)); - WriteMeterDictionaryItem(state, - FrequencyIndicator, - StoreType::Summed, - op->EnergyMeters(WhichMeter).MNAccRptNum, - indexGroupKey, - indexGroup, - fmt::to_string(op->EnergyMeters(WhichMeter).MNAccRptNum), - op->EnergyMeters(WhichMeter).Name, - op->EnergyMeters(WhichMeter).Units, - true, - MeterFileOnlyIndicator); - } - } - } else if (FrequencyIndicator == ReportingFrequency::Yearly) { - if (!CumulativeIndicator) { - if (MeterFileOnlyIndicator) { - if (op->EnergyMeters(WhichMeter).RptYR) { - ShowWarningError( - state, - format("Output:Meter:MeterFileOnly requested for \"{}\" (Annual), already on \"Output:Meter\". Will report to both {} and {}", - op->EnergyMeters(WhichMeter).Name, - state.files.eso.filePath.filename().string(), - state.files.mtr.filePath.filename().string())); - } - } - if (!op->EnergyMeters(WhichMeter).RptYR) { - op->EnergyMeters(WhichMeter).RptYR = true; - if (MeterFileOnlyIndicator) op->EnergyMeters(WhichMeter).RptYRFO = true; - if (!MeterFileOnlyIndicator) op->TrackingYearlyVariables = true; - indexGroupKey = DetermineIndexGroupKeyFromMeterName(state, op->EnergyMeters(WhichMeter).Name); - indexGroup = DetermineIndexGroupFromMeterGroup(op->EnergyMeters(WhichMeter)); - WriteMeterDictionaryItem(state, - FrequencyIndicator, - StoreType::Summed, - op->EnergyMeters(WhichMeter).YRRptNum, - indexGroupKey, - indexGroup, - op->EnergyMeters(WhichMeter).YRRptNumChr, - op->EnergyMeters(WhichMeter).Name, - op->EnergyMeters(WhichMeter).Units, - false, - MeterFileOnlyIndicator); - } - } else { - if (MeterFileOnlyIndicator) { - if (op->EnergyMeters(WhichMeter).RptAccYR) { - ShowWarningError(state, - format("Output:Meter:MeterFileOnly requested for \"Cumulative {}\" (Annual), already on \"Output:Meter\". Will " - "report to both {} and {}", - op->EnergyMeters(WhichMeter).Name, - state.files.eso.filePath.filename().string(), - state.files.mtr.filePath.filename().string())); - } - } - if (!op->EnergyMeters(WhichMeter).RptAccYR) { - op->EnergyMeters(WhichMeter).RptAccYR = true; - if (MeterFileOnlyIndicator) op->EnergyMeters(WhichMeter).RptAccYRFO = true; - if (!MeterFileOnlyIndicator) op->TrackingYearlyVariables = true; - indexGroupKey = DetermineIndexGroupKeyFromMeterName(state, op->EnergyMeters(WhichMeter).Name); - indexGroup = DetermineIndexGroupFromMeterGroup(op->EnergyMeters(WhichMeter)); - WriteMeterDictionaryItem(state, - FrequencyIndicator, - StoreType::Summed, - op->EnergyMeters(WhichMeter).YRAccRptNum, - indexGroupKey, - indexGroup, - fmt::to_string(op->EnergyMeters(WhichMeter).YRAccRptNum), - op->EnergyMeters(WhichMeter).Name, - op->EnergyMeters(WhichMeter).Units, - true, - MeterFileOnlyIndicator); - } + auto *meter = op->meters[WhichMeter]; + auto &period = meter->periods[(freq == ReportFreq::EachCall) ? (int)ReportFreq::TimeStep : (int)freq]; + if (!CumulativeIndicator) { + if (MeterFileOnlyIndicator && period.Rpt) { + ShowWarningError(state, + format(R"(Output:Meter:MeterFileOnly requested for "{}" ({}), already on "Output:Meter". Will report to both {} and {})", + meter->Name, + reportFreqNames[(freq == ReportFreq::EachCall) ? (int)ReportFreq::TimeStep : (int)freq], + state.files.eso.filePath.filename().string(), + state.files.mtr.filePath.filename().string())); + } + if (!period.Rpt) { + period.Rpt = true; + if (MeterFileOnlyIndicator) + period.RptFO = true; + else + op->freqTrackingVariables[(int)freq] = true; + int indexGroupKey = DetermineIndexGroupKeyFromMeterName(state, meter->Name); + std::string indexGroup = DetermineIndexGroupFromMeterGroup(meter); + WriteMeterDictionaryItem( + state, freq, StoreType::Summed, period.RptNum, indexGroupKey, indexGroup, meter->Name, meter->units, false, MeterFileOnlyIndicator); + } + } else { // !CumulativeIndicator + if (MeterFileOnlyIndicator && period.accRpt) { + ShowWarningError(state, + format("Output:Meter:MeterFileOnly requested for \"Cumulative {}\" (TimeStep), already on \"Output:Meter\". " + "Will report to both {} and {}", + meter->Name, + state.files.eso.filePath.filename().string(), + state.files.mtr.filePath.filename().string())); } - } else if (FrequencyIndicator == ReportingFrequency::Simulation) { - if (!CumulativeIndicator) { - if (MeterFileOnlyIndicator) { - if (op->EnergyMeters(WhichMeter).RptSM) { - ShowWarningError(state, - format("Output:Meter:MeterFileOnly requested for \"{}\" (RunPeriod), already on \"Output:Meter\". Will report " - "to both {} and {}", - op->EnergyMeters(WhichMeter).Name, - state.files.eso.filePath.filename().string(), - state.files.mtr.filePath.filename().string())); - } - } - if (!op->EnergyMeters(WhichMeter).RptSM) { - op->EnergyMeters(WhichMeter).RptSM = true; - if (MeterFileOnlyIndicator) op->EnergyMeters(WhichMeter).RptSMFO = true; - if (!MeterFileOnlyIndicator) op->TrackingRunPeriodVariables = true; - indexGroupKey = DetermineIndexGroupKeyFromMeterName(state, op->EnergyMeters(WhichMeter).Name); - indexGroup = DetermineIndexGroupFromMeterGroup(op->EnergyMeters(WhichMeter)); - WriteMeterDictionaryItem(state, - FrequencyIndicator, - StoreType::Summed, - op->EnergyMeters(WhichMeter).SMRptNum, - indexGroupKey, - indexGroup, - op->EnergyMeters(WhichMeter).SMRptNumChr, - op->EnergyMeters(WhichMeter).Name, - op->EnergyMeters(WhichMeter).Units, - false, - MeterFileOnlyIndicator); - } - } else { - if (MeterFileOnlyIndicator) { - if (op->EnergyMeters(WhichMeter).RptAccSM) { - ShowWarningError(state, - format("Output:Meter:MeterFileOnly requested for \"Cumulative {}\" (RunPeriod), already on \"Output:Meter\". " - "Will report to both {} and {}", - op->EnergyMeters(WhichMeter).Name, - state.files.eso.filePath.filename().string(), - state.files.mtr.filePath.filename().string())); - } - } - if (!op->EnergyMeters(WhichMeter).RptAccSM) { - op->EnergyMeters(WhichMeter).RptAccSM = true; - if (MeterFileOnlyIndicator) op->EnergyMeters(WhichMeter).RptAccSMFO = true; - if (!MeterFileOnlyIndicator) op->TrackingRunPeriodVariables = true; - indexGroupKey = DetermineIndexGroupKeyFromMeterName(state, op->EnergyMeters(WhichMeter).Name); - indexGroup = DetermineIndexGroupFromMeterGroup(op->EnergyMeters(WhichMeter)); - WriteMeterDictionaryItem(state, - FrequencyIndicator, - StoreType::Summed, - op->EnergyMeters(WhichMeter).SMAccRptNum, - indexGroupKey, - indexGroup, - fmt::to_string(op->EnergyMeters(WhichMeter).SMAccRptNum), - op->EnergyMeters(WhichMeter).Name, - op->EnergyMeters(WhichMeter).Units, - true, - MeterFileOnlyIndicator); - } + + if (!period.accRpt) { + period.accRpt = true; + if (MeterFileOnlyIndicator) period.accRptFO = true; + int indexGroupKey = DetermineIndexGroupKeyFromMeterName(state, meter->Name); + std::string indexGroup = DetermineIndexGroupFromMeterGroup(op->meters[WhichMeter]); + WriteMeterDictionaryItem( + state, freq, StoreType::Summed, period.accRptNum, indexGroupKey, indexGroup, meter->Name, meter->units, true, MeterFileOnlyIndicator); } - } else { - } -} + } // if (CumulativeIndicator) +} // SetInitialMeterReportingAndOutputNames() -int GetMeterIndex(EnergyPlusData &state, std::string_view const MeterName) +int GetMeterIndex(EnergyPlusData &state, std::string const &name) { // FUNCTION INFORMATION: // AUTHOR Linda K. Lawrie // DATE WRITTEN August 2002 - // MODIFIED na - // RE-ENGINEERED na // PURPOSE OF THIS FUNCTION: // This function returns a index to the meter "number" (aka assigned report number) // for the meter name. If none active for this run, a zero is returned. This is used later to // obtain a meter "value". - // Using/Aliasing - using namespace OutputProcessor; - using SortAndStringUtilities::SetupAndSort; - - // Return value - int MeterIndex; - - // FUNCTION LOCAL VARIABLE DECLARATIONS: - // Valid Meter names because matching case insensitive - //////////// hoisted into namespace changed to GetMeterIndexFirstCall//////////// - // static bool FirstCall( true ); - //////////////////////////////////////////////// - int Found; auto &op = state.dataOutputProcessor; - if (op->GetMeterIndexFirstCall || (state.dataOutputProcessor->NumValidMeters != op->NumEnergyMeters)) { - state.dataOutputProcessor->NumValidMeters = op->NumEnergyMeters; - state.dataOutputProcessor->ValidMeterNames.allocate(state.dataOutputProcessor->NumValidMeters); - for (Found = 1; Found <= state.dataOutputProcessor->NumValidMeters; ++Found) { - state.dataOutputProcessor->ValidMeterNames(Found) = Util::makeUPPER(op->EnergyMeters(Found).Name); - } - state.dataOutputProcessor->iValidMeterNames.allocate(state.dataOutputProcessor->NumValidMeters); - SetupAndSort(state.dataOutputProcessor->ValidMeterNames, state.dataOutputProcessor->iValidMeterNames); - op->GetMeterIndexFirstCall = false; - } - - MeterIndex = Util::FindItemInSortedList(MeterName, state.dataOutputProcessor->ValidMeterNames, state.dataOutputProcessor->NumValidMeters); - if (MeterIndex != 0) MeterIndex = state.dataOutputProcessor->iValidMeterNames(MeterIndex); - - return MeterIndex; -} - -std::string GetMeterResourceType(EnergyPlusData &state, int const MeterNumber) // Which Meter Number (from GetMeterIndex) -{ - - // FUNCTION INFORMATION: - // AUTHOR Linda K. Lawrie - // DATE WRITTEN August 2002 - // MODIFIED na - // RE-ENGINEERED na - - // PURPOSE OF THIS FUNCTION: - // This function returns the character string of Resource Type for the - // given meter number/index. If MeterNumber is 0, ResourceType=Invalid/Unknown. - - // METHODOLOGY EMPLOYED: - // na - - // REFERENCES: - // na - - // Using/Aliasing - using namespace OutputProcessor; - - // Return value - std::string ResourceType; - - // Locals - // FUNCTION ARGUMENT DEFINITIONS: - - // FUNCTION PARAMETER DEFINITIONS: - // na + auto found = op->meterMap.find(name); + return (found != op->meterMap.end()) ? found->second : -1; +} // GetMeterIndex() - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // FUNCTION LOCAL VARIABLE DECLARATIONS: - if (MeterNumber > 0) { - ResourceType = state.dataOutputProcessor->EnergyMeters(MeterNumber).ResourceType; - } else { - ResourceType = "Invalid/Unknown"; - } - - return ResourceType; -} - -Real64 GetCurrentMeterValue(EnergyPlusData &state, int const MeterNumber) // Which Meter Number (from GetMeterIndex) +Constant::eResource GetMeterResourceType(EnergyPlusData &state, int const MeterNumber) // Which Meter Number (from GetMeterIndex) { // FUNCTION INFORMATION: // AUTHOR Linda K. Lawrie // DATE WRITTEN August 2002 - // MODIFIED na - // RE-ENGINEERED na - - // PURPOSE OF THIS FUNCTION: - // This function returns the current meter value (timestep) for the meter number indicated. - - // METHODOLOGY EMPLOYED: - // Uses internal EnergyMeters structure to get value. - - // REFERENCES: - // na // Using/Aliasing - using namespace OutputProcessor; - - // Return value - Real64 CurrentMeterValue; - - // Locals - // FUNCTION ARGUMENT DEFINITIONS: - - // FUNCTION PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // FUNCTION LOCAL VARIABLE DECLARATIONS: - // na - - if (MeterNumber > 0) { - CurrentMeterValue = state.dataOutputProcessor->EnergyMeters(MeterNumber).CurTSValue; - } else { - CurrentMeterValue = 0.0; - } - - return CurrentMeterValue; -} - -Real64 GetInstantMeterValue(EnergyPlusData &state, - int const MeterNumber, // Which Meter Number (from GetMeterIndex) - OutputProcessor::TimeStepType const t_timeStepType // Whether this is zone of HVAC -) -{ - - // FUNCTION INFORMATION: - // AUTHOR Richard Liesen - // DATE WRITTEN February 2003 - // MODIFIED na - // RE-ENGINEERED na - - // PURPOSE OF THIS FUNCTION: - // This function returns the Instantaneous meter value (timestep) for the meter number indicated - // using TimeStepType to differentiate between Zone and HVAC values. - - // METHODOLOGY EMPLOYED: - // Uses internal EnergyMeters structure to get value. - - // REFERENCES: - // na - - // Using/Aliasing - using namespace OutputProcessor; - - // Return value - Real64 InstantMeterValue(0.0); - - // Locals - // FUNCTION ARGUMENT DEFINITIONS: - - // FUNCTION PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // FUNCTION LOCAL VARIABLE DECLARATIONS: - - // EnergyMeters(Meter)%TSValue=EnergyMeters(EnergyMeters(Meter)%SourceMeter)%TSValue-MeterValue(Meter) - - if (MeterNumber == 0) return InstantMeterValue; - auto &op = state.dataOutputProcessor; - - auto &energy_meter = op->EnergyMeters(MeterNumber); - auto &cache_beg = energy_meter.InstMeterCacheStart; - auto &cache_end = energy_meter.InstMeterCacheEnd; - if (energy_meter.TypeOfMeter != MtrType::CustomDec) { - // section added to speed up the execution of this routine - // instead of looping through all the VarMeterArrays to see if a RVariableType is used for a - // specific meter, create a list of all the indexes for RVariableType that are used for that - // meter. - if (cache_beg == 0) { // not yet added to the cache - for (int Loop = 1; Loop <= op->NumVarMeterArrays; ++Loop) { - auto const &var_meter_on = op->VarMeterArrays(Loop).OnMeters; - for (int Meter = 1, Meter_end = op->VarMeterArrays(Loop).NumOnMeters; Meter <= Meter_end; ++Meter) { - if (var_meter_on(Meter) == MeterNumber) { - IncrementInstMeterCache(state); - cache_end = op->InstMeterCacheLastUsed; - if (cache_beg == 0) cache_beg = op->InstMeterCacheLastUsed; - op->InstMeterCache(op->InstMeterCacheLastUsed) = op->VarMeterArrays(Loop).RepVariable; - break; - } - } - auto const &var_meter_on_custom = op->VarMeterArrays(Loop).OnCustomMeters; - for (int Meter = 1, Meter_end = op->VarMeterArrays(Loop).NumOnCustomMeters; Meter <= Meter_end; ++Meter) { - if (var_meter_on_custom(Meter) == MeterNumber) { - IncrementInstMeterCache(state); - cache_end = op->InstMeterCacheLastUsed; - if (cache_beg == 0) cache_beg = op->InstMeterCacheLastUsed; - op->InstMeterCache(op->InstMeterCacheLastUsed) = op->VarMeterArrays(Loop).RepVariable; - break; - } - } // End Number of Meters Loop - } - } - for (int Loop = cache_beg; Loop <= cache_end; ++Loop) { - auto &r_var_loop = op->RVariableTypes(op->InstMeterCache(Loop)); - // Separate the Zone variables from the HVAC variables using TimeStepType - if (r_var_loop.timeStepType == t_timeStepType) { - auto &rVar = r_var_loop.VarPtr; - // Add to the total all of the appropriate variables - InstantMeterValue += (*rVar.Which) * rVar.ZoneMult * rVar.ZoneListMult; - } - } - } else { // MeterType_CustomDec - // Get Source Meter value - // Loop through all report meters to find correct report variables to add to instant meter total - for (int Loop = 1; Loop <= op->NumVarMeterArrays; ++Loop) { - auto &r_var_loop = op->RVariableTypes(op->VarMeterArrays(Loop).RepVariable); - - auto const &var_meter_on = op->VarMeterArrays(Loop).OnMeters; - for (int Meter = 1, Meter_end = op->VarMeterArrays(Loop).NumOnMeters; Meter <= Meter_end; ++Meter) { - if (var_meter_on(Meter) == energy_meter.SourceMeter) { - // Separate the Zone variables from the HVAC variables using TimeStepType - if (r_var_loop.timeStepType == t_timeStepType) { - auto &rVar = r_var_loop.VarPtr; - // Add to the total all of the appropriate variables - InstantMeterValue += (*rVar.Which) * rVar.ZoneMult * rVar.ZoneListMult; - break; - } - } - } - - auto const &var_meter_on_custom = op->VarMeterArrays(Loop).OnCustomMeters; - for (int Meter = 1, Meter_end = op->VarMeterArrays(Loop).NumOnCustomMeters; Meter <= Meter_end; ++Meter) { - if (var_meter_on_custom(Meter) == energy_meter.SourceMeter) { - // Separate the Zone variables from the HVAC variables using TimeStepType - if (r_var_loop.timeStepType == t_timeStepType) { - auto &rVar = r_var_loop.VarPtr; - // Add to the total all of the appropriate variables - InstantMeterValue += (*rVar.Which) * rVar.ZoneMult * rVar.ZoneListMult; - break; - } - } - } + using namespace OutputProcessor; - } // End Number of Meters Loop - for (int Loop = 1; Loop <= op->NumVarMeterArrays; ++Loop) { - auto &r_var_loop = op->RVariableTypes(op->VarMeterArrays(Loop).RepVariable); - - auto const &var_meter_on = op->VarMeterArrays(Loop).OnMeters; - for (int Meter = 1, Meter_end = op->VarMeterArrays(Loop).NumOnMeters; Meter <= Meter_end; ++Meter) { - if (var_meter_on(Meter) == MeterNumber) { - // Separate the Zone variables from the HVAC variables using TimeStepType - if (r_var_loop.timeStepType == t_timeStepType) { - auto &rVar = r_var_loop.VarPtr; - // Add to the total all of the appropriate variables - InstantMeterValue -= (*rVar.Which) * rVar.ZoneMult * rVar.ZoneListMult; - break; - } - } - } + return (MeterNumber != -1) ? state.dataOutputProcessor->meters[MeterNumber]->resource : Constant::eResource::Invalid; +} // GetMeterResourceType() - auto const &var_meter_on_custom = op->VarMeterArrays(Loop).OnCustomMeters; - for (int Meter = 1, Meter_end = op->VarMeterArrays(Loop).NumOnCustomMeters; Meter <= Meter_end; ++Meter) { - if (var_meter_on_custom(Meter) == MeterNumber) { - // Separate the Zone variables from the HVAC variables using TimeStepType - if (r_var_loop.timeStepType == t_timeStepType) { - auto &rVar = r_var_loop.VarPtr; - // Add to the total all of the appropriate variables - InstantMeterValue -= (*rVar.Which) * rVar.ZoneMult * rVar.ZoneListMult; - break; - } - } - } +Real64 GetCurrentMeterValue(EnergyPlusData &state, int const MeterNumber) // Which Meter Number (from GetMeterIndex) +{ - } // End Number of Meters Loop - } + // FUNCTION INFORMATION: + // AUTHOR Linda K. Lawrie + // DATE WRITTEN August 2002 - return InstantMeterValue; -} + // PURPOSE OF THIS FUNCTION: + // This function returns the current meter value (timestep) for the meter number indicated. -void IncrementInstMeterCache(EnergyPlusData &state) + return (MeterNumber != -1) ? state.dataOutputProcessor->meters[MeterNumber]->CurTSValue : 0.0; +} // GetCurrentMeterValue() + +Real64 GetInstantMeterValue(EnergyPlusData &state, + int const meterNum, // Which Meter Number (from GetMeterIndex) + OutputProcessor::TimeStepType const timeStepType // Whether this is zone of HVAC +) { - // SUBROUTINE INFORMATION: - // AUTHOR Jason Glazer - // DATE WRITTEN January 2013 - // MODIFIED - // RE-ENGINEERED na + + // FUNCTION INFORMATION: + // AUTHOR Richard Liesen + // DATE WRITTEN February 2003 // PURPOSE OF THIS FUNCTION: - // Manage the InstMeterCache array + // This function returns the Instantaneous meter value (timestep) for the meter number indicated + // using TimeStepType to differentiate between Zone and HVAC values. - // METHODOLOGY EMPLOYED: - // When the array grows to large, double it. + // Using/Aliasing + using namespace OutputProcessor; + + Real64 InstantMeterValue = 0.0; + + if (meterNum == -1) return InstantMeterValue; auto &op = state.dataOutputProcessor; + auto *meter = op->meters[meterNum]; - if (!allocated(op->InstMeterCache)) { - op->InstMeterCache.dimension(op->InstMeterCacheSizeInc, 0); // zero the entire array - op->InstMeterCacheLastUsed = 1; - } else { - ++op->InstMeterCacheLastUsed; - // if larger than current size grow the array - if (op->InstMeterCacheLastUsed > op->InstMeterCacheSize) { - op->InstMeterCache.redimension(op->InstMeterCacheSize += op->InstMeterCacheSizeInc, 0); + if (meter->type == MeterType::Normal || meter->type == MeterType::Custom) { + for (int srcVarNum : meter->srcVarNums) { + auto *var = op->outVars[srcVarNum]; + // Separate the Zone variables from the HVAC variables using TimeStepType + if (var->timeStepType != timeStepType) continue; + + auto *rVar = dynamic_cast(var); + assert(rVar != nullptr); + // Add to the total all of the appropriate variables + InstantMeterValue += (*rVar->Which) * rVar->ZoneMult * rVar->ZoneListMult; + } + + } else if (meter->type == MeterType::CustomDec) { + auto *decMeter = op->meters[meter->decMeterNum]; + for (int srcVarNum : decMeter->srcVarNums) { + auto *var = op->outVars[srcVarNum]; + if (var->timeStepType != timeStepType) continue; + auto *rVar = dynamic_cast(var); + assert(rVar != nullptr); + InstantMeterValue += (*rVar->Which) * rVar->ZoneMult * rVar->ZoneListMult; + } + for (int srcVarNum : meter->srcVarNums) { + auto *var = op->outVars[srcVarNum]; + if (var->timeStepType != timeStepType) continue; + auto *rVar = dynamic_cast(var); + assert(rVar != nullptr); + InstantMeterValue -= (*rVar->Which) * rVar->ZoneMult * rVar->ZoneListMult; } + } else { + assert(false); } -} + + return InstantMeterValue; +} // GetInstantMeterValue() Real64 GetInternalVariableValue(EnergyPlusData &state, OutputProcessor::VariableType const varType, // 1=integer, 2=real, 3=meter @@ -6574,7 +4499,6 @@ Real64 GetInternalVariableValue(EnergyPlusData &state, // AUTHOR Linda K. Lawrie // DATE WRITTEN December 2000 // MODIFIED August 2003, M. J. Witte - // RE-ENGINEERED na // PURPOSE OF THIS FUNCTION: // This function returns the current value of the Internal Variable assigned to @@ -6586,9 +4510,6 @@ Real64 GetInternalVariableValue(EnergyPlusData &state, // METHODOLOGY EMPLOYED: // Uses Internal OutputProcessor data structure to return value. - // REFERENCES: - // na - // Using/Aliasing using namespace OutputProcessor; using ScheduleManager::GetCurrentScheduleValue; @@ -6596,48 +4517,20 @@ Real64 GetInternalVariableValue(EnergyPlusData &state, // Return value Real64 resultVal; // value returned - // Locals - // FUNCTION ARGUMENT DEFINITIONS: - - // FUNCTION PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // FUNCTION LOCAL VARIABLE DECLARATIONS: - // na - auto &op = state.dataOutputProcessor; // Select based on variable type: integer, real, or meter - if (varType == VariableType::NotFound) { // Variable not a found variable + if (varType == VariableType::Invalid) { // Variable not a found variable resultVal = 0.0; - } else if (varType == VariableType::Integer) { - if (keyVarIndex > op->NumOfIVariable) { - ShowFatalError(state, "GetInternalVariableValue: Integer variable passed index beyond range of array."); - ShowContinueError(state, format("Index = {} Number of integer variables = {}", keyVarIndex, op->NumOfIVariable)); - } - if (keyVarIndex < 1) { - ShowFatalError(state, format("GetInternalVariableValue: Integer variable passed index <1. Index = {}", keyVarIndex)); + } else if (varType == VariableType::Integer || varType == VariableType::Real) { + if (keyVarIndex < 0 || keyVarIndex >= (int)op->outVars.size()) { + ShowFatalError(state, "GetInternalVariableValue: passed variable index beyond range of array."); + ShowContinueError(state, format("Index = {} Number of variables = {}", keyVarIndex, op->outVars.size())); } // must use %Which, %Value is always zero if variable is not a requested report variable - resultVal = double(*op->IVariableTypes(keyVarIndex).VarPtr.Which); - } else if (varType == VariableType::Real) { - if (keyVarIndex > op->NumOfRVariable) { - ShowFatalError(state, "GetInternalVariableValue: Real variable passed index beyond range of array."); - ShowContinueError(state, format("Index = {} Number of real variables = {}", keyVarIndex, op->NumOfRVariable)); - } - if (keyVarIndex < 1) { - ShowFatalError(state, format("GetInternalVariableValue: Integer variable passed index <1. Index = {}", keyVarIndex)); - } - - // must use %Which, %Value is always zero if variable is not a requested report variable - resultVal = *op->RVariableTypes(keyVarIndex).VarPtr.Which; + resultVal = (varType == VariableType::Integer) ? (double)*(dynamic_cast(op->outVars[keyVarIndex]))->Which + : (double)*(dynamic_cast(op->outVars[keyVarIndex]))->Which; } else if (varType == VariableType::Meter) { resultVal = GetCurrentMeterValue(state, keyVarIndex); } else if (varType == VariableType::Schedule) { @@ -6647,7 +4540,7 @@ Real64 GetInternalVariableValue(EnergyPlusData &state, } return resultVal; -} +} // GetInternalVariableValue() Real64 GetInternalVariableValueExternalInterface(EnergyPlusData &state, OutputProcessor::VariableType const varType, // 1=integer, 2=REAL(r64), 3=meter @@ -6657,8 +4550,6 @@ Real64 GetInternalVariableValueExternalInterface(EnergyPlusData &state, // FUNCTION INFORMATION: // AUTHOR Thierry S. Nouidui // DATE WRITTEN August 2011 - // MODIFIED na - // RE-ENGINEERED na // PURPOSE OF THIS FUNCTION: // This function returns the last zone-timestep value of the Internal Variable assigned to @@ -6670,9 +4561,6 @@ Real64 GetInternalVariableValueExternalInterface(EnergyPlusData &state, // METHODOLOGY EMPLOYED: // Uses Internal OutputProcessor data structure to return value. - // REFERENCES: - // na - // Using/Aliasing using namespace OutputProcessor; using ScheduleManager::GetCurrentScheduleValue; @@ -6680,46 +4568,17 @@ Real64 GetInternalVariableValueExternalInterface(EnergyPlusData &state, // Return value Real64 resultVal; // value returned - // Locals - // FUNCTION ARGUMENT DEFINITIONS: - - // FUNCTION PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // FUNCTION LOCAL VARIABLE DECLARATIONS: - // na - auto &op = state.dataOutputProcessor; // Select based on variable type: integer, REAL(r64), or meter - if (varType == VariableType::NotFound) { // Variable not a found variable + if (varType == VariableType::Invalid) { // Variable not a found variable resultVal = 0.0; - } else if (varType == VariableType::Integer) { - if (keyVarIndex > op->NumOfIVariable) { - ShowFatalError(state, "GetInternalVariableValueExternalInterface: passed index beyond range of array."); - } - if (keyVarIndex < 1) { - ShowFatalError(state, "GetInternalVariableValueExternalInterface: passed index beyond range of array."); - } - - // must use %EITSValue, %This is the last-zonetimestep value - resultVal = double(op->IVariableTypes(keyVarIndex).VarPtr.EITSValue); - } else if (varType == VariableType::Real) { - if (keyVarIndex > op->NumOfRVariable) { - ShowFatalError(state, "GetInternalVariableValueExternalInterface: passed index beyond range of array."); - } - if (keyVarIndex < 1) { + } else if (varType == VariableType::Integer || varType == VariableType::Real) { + if (keyVarIndex < 0 || keyVarIndex >= (int)op->outVars.size()) { ShowFatalError(state, "GetInternalVariableValueExternalInterface: passed index beyond range of array."); } - // must use %EITSValue, %This is the last-zonetimestep value - resultVal = op->RVariableTypes(keyVarIndex).VarPtr.EITSValue; + resultVal = (double)op->outVars[keyVarIndex]->EITSValue; } else if (varType == VariableType::Meter) { resultVal = GetCurrentMeterValue(state, keyVarIndex); } else if (varType == VariableType::Schedule) { @@ -6729,7 +4588,7 @@ Real64 GetInternalVariableValueExternalInterface(EnergyPlusData &state, } return resultVal; -} +} // GetInternalVariableValueExternalInterface() int GetNumMeteredVariables(EnergyPlusData &state, [[maybe_unused]] std::string const &ComponentType, // Given Component Type @@ -6740,8 +4599,6 @@ int GetNumMeteredVariables(EnergyPlusData &state, // FUNCTION INFORMATION: // AUTHOR Linda Lawrie // DATE WRITTEN May 2005 - // MODIFIED na - // RE-ENGINEERED na // PURPOSE OF THIS FUNCTION: // This function counts the number of metered variables associated with the @@ -6749,38 +4606,24 @@ int GetNumMeteredVariables(EnergyPlusData &state, // allocate arrays for a call the GetMeteredVariables routine. // FUNCTION LOCAL VARIABLE DECLARATIONS: - int Loop; int NumVariables = 0; auto &op = state.dataOutputProcessor; - for (Loop = 1; Loop <= op->NumOfRVariable; ++Loop) { + for (auto *var : op->outVars) { // Pos=INDEX(RVariableTypes(Loop)%VarName,':') // IF (ComponentName /= RVariableTypes(Loop)%VarNameUC(1:Pos-1)) CYCLE - if (ComponentName != op->RVariableTypes(Loop).KeyNameOnlyUC) continue; - auto &rVar = op->RVariableTypes(Loop).VarPtr; - if (rVar.MeterArrayPtr == 0) { - continue; - } - if (op->VarMeterArrays(rVar.MeterArrayPtr).NumOnMeters > 0) { + if (var->varType != OutputProcessor::VariableType::Real) continue; + if (ComponentName != var->keyUC) continue; + if (!var->meterNums.empty()) { ++NumVariables; } } - return NumVariables; -} - -void GetMeteredVariables(EnergyPlusData &state, - std::string const &ComponentType, // Given Component Type - std::string const &ComponentName, // Given Component Name (user defined) - Array1D_int &VarIndexes, // Variable Numbers - Array1D &VarTypes, // Variable Types (1=integer, 2=real, 3=meter) - Array1D &TimeStepTypes, // Variable Index Types (1=Zone,2=HVAC) - Array1D &unitsForVar, // units from enum for each variable - Array1D &ResourceTypes, // ResourceTypes for each variable - Array1D_string &EndUses, // EndUses for each variable - Array1D_string &Groups, // Groups for each variable - Array1D_string &Names, // Variable Names for each variable - int &NumFound // Number Found +} // GetNumMeteredVariables() + +int GetMeteredVariables(EnergyPlusData &state, + std::string const &ComponentName, // Given Component Name (user defined) + Array1D &meteredVars // Variable Types (1=integer, 2=real, 3=meter) ) { @@ -6798,156 +4641,65 @@ void GetMeteredVariables(EnergyPlusData &state, using namespace OutputProcessor; // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int Loop; int NumVariables; - int MeterPtr; - int NumOnMeterPtr; - int MeterNum; auto &op = state.dataOutputProcessor; NumVariables = 0; - for (Loop = 1; Loop <= op->NumOfRVariable; ++Loop) { + for (int iVar = 0; iVar < (int)op->outVars.size(); ++iVar) { // Pos=INDEX(RVariableTypes(Loop)%VarName,':') // IF (ComponentName /= RVariableTypes(Loop)%VarNameUC(1:Pos-1)) CYCLE - if (ComponentName != op->RVariableTypes(Loop).KeyNameOnlyUC) continue; - auto &rVar = op->RVariableTypes(Loop).VarPtr; - if (rVar.MeterArrayPtr == 0) continue; - NumOnMeterPtr = op->VarMeterArrays(rVar.MeterArrayPtr).NumOnMeters; - MeterPtr = op->VarMeterArrays(rVar.MeterArrayPtr).OnMeters(1); - if (MeterPtr) { - ++NumVariables; - VarIndexes(NumVariables) = Loop; - VarTypes(NumVariables) = VariableType::Real; - TimeStepTypes(NumVariables) = op->RVariableTypes(Loop).timeStepType; - unitsForVar(NumVariables) = op->RVariableTypes(Loop).units; - - ResourceTypes(NumVariables) = - static_cast(getEnumValue(Constant::eResourceNamesUC, Util::makeUPPER(op->EnergyMeters(MeterPtr).ResourceType))); - Names(NumVariables) = op->RVariableTypes(Loop).VarNameUC; - - for (MeterNum = 1; MeterNum <= NumOnMeterPtr; ++MeterNum) { - MeterPtr = op->VarMeterArrays(rVar.MeterArrayPtr).OnMeters(MeterNum); - if (!op->EnergyMeters(MeterPtr).EndUse.empty()) { - EndUses(NumVariables) = Util::makeUPPER(op->EnergyMeters(MeterPtr).EndUse); - break; - } - } - - for (MeterNum = 1; MeterNum <= NumOnMeterPtr; ++MeterNum) { - MeterPtr = op->VarMeterArrays(rVar.MeterArrayPtr).OnMeters(MeterNum); - if (!op->EnergyMeters(MeterPtr).Group.empty()) { - Groups(NumVariables) = Util::makeUPPER(op->EnergyMeters(MeterPtr).Group); - break; - } - } - - } else { - ShowWarningError(state, - format("Referenced variable or meter used in the wrong context \"{}\" of type \"{}\"", ComponentName, ComponentType)); - } - } - - NumFound = NumVariables; // Should just return this -} - -void GetMeteredVariables(EnergyPlusData &state, - std::string const &ComponentType, // Given Component Type - std::string const &ComponentName, // Given Component Name (user defined) - Array1D_int &VarIndexes, // Variable Numbers - Array1D &VarTypes, // Variable Types (1=integer, 2=real, 3=meter) - Array1D &TimeStepTypes, // Variable Index Types (1=Zone,2=HVAC) - Array1D &unitsForVar, // units from enum for each variable - Array1D &ResourceTypes, // ResourceTypes for each variable - Array1D_string &EndUses, // EndUses for each variable - Array1D_string &Groups, // Groups for each variable - Array1D_string &Names, // Variable Names for each variable - Array1D_int &VarIDs // Variable Report Numbers -) -{ - - // SUBROUTINE INFORMATION: - // AUTHOR Linda Lawrie - // DATE WRITTEN May 2005 - // MODIFIED Jason DeGraw 2/12/2020, de-optionalized - // RE-ENGINEERED na - // PURPOSE OF THIS SUBROUTINE: - // This routine gets the variable names and other associated information - // for metered variables associated with the given ComponentType/Name. + auto *var = op->outVars[iVar]; + if (var->varType != VariableType::Real) continue; + if (ComponentName != var->keyUC) continue; + if (var->meterNums.empty()) continue; - // Using/Aliasing - using namespace OutputProcessor; + auto &meteredVar = meteredVars(++NumVariables); - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int Loop; - int NumVariables; - int MeterPtr; - int NumOnMeterPtr; - int MeterNum; - auto &op = state.dataOutputProcessor; + meteredVar.num = iVar; + meteredVar.varType = VariableType::Real; + meteredVar.timeStepType = var->timeStepType; + meteredVar.units = var->units; - NumVariables = 0; + meteredVar.resource = op->meters[var->meterNums[0]]->resource; + meteredVar.name = var->keyColonNameUC; - for (Loop = 1; Loop <= op->NumOfRVariable; ++Loop) { - // Pos=INDEX(RVariableTypes(Loop)%VarName,':') - // IF (ComponentName /= RVariableTypes(Loop)%VarNameUC(1:Pos-1)) CYCLE - if (ComponentName != op->RVariableTypes(Loop).KeyNameOnlyUC) continue; - auto &rVar = op->RVariableTypes(Loop).VarPtr; - if (rVar.MeterArrayPtr == 0) continue; - NumOnMeterPtr = op->VarMeterArrays(rVar.MeterArrayPtr).NumOnMeters; - MeterPtr = op->VarMeterArrays(rVar.MeterArrayPtr).OnMeters(1); - if (MeterPtr) { - ++NumVariables; - VarIndexes(NumVariables) = Loop; - VarTypes(NumVariables) = VariableType::Real; - TimeStepTypes(NumVariables) = op->RVariableTypes(Loop).timeStepType; - unitsForVar(NumVariables) = op->RVariableTypes(Loop).units; - - ResourceTypes(NumVariables) = - static_cast(getEnumValue(Constant::eResourceNamesUC, Util::makeUPPER(op->EnergyMeters(MeterPtr).ResourceType))); - Names(NumVariables) = op->RVariableTypes(Loop).VarNameUC; - - for (MeterNum = 1; MeterNum <= NumOnMeterPtr; ++MeterNum) { - MeterPtr = op->VarMeterArrays(rVar.MeterArrayPtr).OnMeters(MeterNum); - if (!op->EnergyMeters(MeterPtr).EndUse.empty()) { - EndUses(NumVariables) = Util::makeUPPER(op->EnergyMeters(MeterPtr).EndUse); - break; - } + bool foundEndUse = false; + bool foundGroup = false; + for (int meterNum : var->meterNums) { + auto *meter = op->meters[meterNum]; + if (!foundEndUse && meter->sovEndUseCat != SOVEndUseCat::Invalid) { + meteredVar.sovEndUseCat = meter->sovEndUseCat; + foundEndUse = true; } - for (MeterNum = 1; MeterNum <= NumOnMeterPtr; ++MeterNum) { - MeterPtr = op->VarMeterArrays(rVar.MeterArrayPtr).OnMeters(MeterNum); - if (!op->EnergyMeters(MeterPtr).Group.empty()) { - Groups(NumVariables) = Util::makeUPPER(op->EnergyMeters(MeterPtr).Group); - break; - } + if (!foundGroup && meter->sovGroup != SOVGroup::Invalid) { + meteredVar.sovGroup = meter->sovGroup; + foundGroup = true; } - VarIDs(NumVariables) = rVar.ReportID; - - } else { - ShowWarningError(state, - format("Referenced variable or meter used in the wrong context \"{}\" of type \"{}\"", ComponentName, ComponentType)); + if (foundEndUse && foundGroup) break; } + + meteredVar.rptNum = var->ReportID; } -} + return NumVariables; +} // GetMeteredVariables() void GetVariableKeyCountandType(EnergyPlusData &state, - std::string const &varName, // Standard variable name - int &numKeys, // Number of keys found + std::string const &name, // Standard variable name + int &numKeys, // Number of keys found OutputProcessor::VariableType &varType, - OutputProcessor::StoreType &varAvgSum, // Variable is Averaged=1 or Summed=2 - OutputProcessor::TimeStepType &varStepType, // Variable time step is Zone=1 or HVAC=2 - OutputProcessor::Unit &varUnits // Units enumeration + OutputProcessor::StoreType &storeType, // Variable is Averaged=1 or Summed=2 + OutputProcessor::TimeStepType &timeStepType, // Variable time step is Zone=1 or HVAC=2 + Constant::Units &units // Units enumeration ) { // SUBROUTINE INFORMATION: // AUTHOR Michael J. Witte // DATE WRITTEN August 2003 - // MODIFIED na - // RE-ENGINEERED na // PURPOSE OF THIS SUBROUTINE: // This subroutine returns the variable TYPE (Real, integer, meter, schedule, etc.) @@ -6967,177 +4719,70 @@ void GetVariableKeyCountandType(EnergyPlusData &state, // Schedules - specific schedule values // When the variable is found, the variable type (varType) is set and the // number of associated keys is counted. - // varType is assigned as follows: - // 0 = not found - // 1 = integer - // 2 = real - // 3 = meter - // 4 = schedule - // varAvgSum is assigned as follows: - // 1 = averaged - // 2 = summed - // varStepType is assigned as follows: - // 1 = zone time step - // 2 = HVAC time step // Using/Aliasing using namespace OutputProcessor; using ScheduleManager::GetScheduleIndex; using ScheduleManager::GetScheduleType; - using SortAndStringUtilities::SetupAndSort; // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int Loop; // Loop counters - int Loop2; - std::string::size_type Position; // Starting point of search string - int VFound; // Found integer/real variable attributes - bool Found; // True if varName is found - bool Duplicate; // True if keyname is a duplicate - std::string VarKeyPlusName; // Full variable name including keyname and units - std::string varNameUpper; // varName pushed to all upper case auto &op = state.dataOutputProcessor; - // INITIALIZATIONS - if (op->InitFlag) { - op->curKeyVarIndexLimit = 1000; - op->keyVarIndexes.allocate(op->curKeyVarIndexLimit); - op->numVarNames = op->NumVariablesForOutput; - op->varNames.allocate(op->numVarNames); - for (Loop = 1; Loop <= op->NumVariablesForOutput; ++Loop) { - op->varNames(Loop) = Util::makeUPPER(op->DDVariableTypes(Loop).VarNameOnly); - } - op->ivarNames.allocate(op->numVarNames); - SetupAndSort(op->varNames, op->ivarNames); - op->InitFlag = false; - } - - if (op->numVarNames != op->NumVariablesForOutput) { - op->numVarNames = op->NumVariablesForOutput; - op->varNames.allocate(op->numVarNames); - for (Loop = 1; Loop <= op->NumVariablesForOutput; ++Loop) { - op->varNames(Loop) = Util::makeUPPER(op->DDVariableTypes(Loop).VarNameOnly); - } - op->ivarNames.allocate(op->numVarNames); - SetupAndSort(op->varNames, op->ivarNames); - } - - op->keyVarIndexes = 0; varType = VariableType::NotFound; numKeys = 0; - varAvgSum = StoreType::Averaged; - varStepType = TimeStepType::Zone; - varUnits = OutputProcessor::Unit::None; - Found = false; - Duplicate = false; - varNameUpper = varName; - - // Search Variable List First - VFound = Util::FindItemInSortedList(varNameUpper, op->varNames, op->numVarNames); - if (VFound != 0) { - varType = op->DDVariableTypes(op->ivarNames(VFound)).variableType; - } + storeType = StoreType::Averaged; + timeStepType = TimeStepType::Zone; + units = Constant::Units::None; // Why is this None and not Invalid? - if (varType == VariableType::Integer) { - // Search Integer Variables - for (Loop = 1; Loop <= op->NumOfIVariable; ++Loop) { - VarKeyPlusName = op->IVariableTypes(Loop).VarNameUC; - Position = index(VarKeyPlusName, ':' + varNameUpper, true); - if (Position != std::string::npos) { - if (VarKeyPlusName.substr(Position + 1) == varNameUpper) { - Found = true; - varType = VariableType::Integer; - Duplicate = false; - // Check if duplicate - duplicates happen if the same report variable/key name - // combination is requested more than once in the idf at different reporting - // frequencies - for (Loop2 = 1; Loop2 <= numKeys; ++Loop2) { - if (VarKeyPlusName == op->IVariableTypes(op->keyVarIndexes(Loop2)).VarNameUC) Duplicate = true; - } - if (!Duplicate) { - ++numKeys; - if (numKeys > op->curKeyVarIndexLimit) { - op->keyVarIndexes.redimension(op->curKeyVarIndexLimit += 500, 0); - } - op->keyVarIndexes(numKeys) = Loop; - varAvgSum = op->DDVariableTypes(op->ivarNames(VFound)).storeType; - varStepType = op->DDVariableTypes(op->ivarNames(VFound)).timeStepType; - varUnits = op->DDVariableTypes(op->ivarNames(VFound)).units; - } - } - } - } - } else if (varType == VariableType::Real) { - // Search real Variables Next - for (Loop = 1; Loop <= op->NumOfRVariable; ++Loop) { - if (op->RVariableTypes(Loop).VarNameOnlyUC == varNameUpper) { - Found = true; - varType = VariableType::Real; - Duplicate = false; - // Check if duplicate - duplicates happen if the same report variable/key name - // combination is requested more than once in the idf at different reporting - // frequencies - VarKeyPlusName = op->RVariableTypes(Loop).VarNameUC; - for (Loop2 = 1; Loop2 <= numKeys; ++Loop2) { - if (VarKeyPlusName == op->RVariableTypes(op->keyVarIndexes(Loop2)).VarNameUC) Duplicate = true; - } - if (!Duplicate) { - ++numKeys; - if (numKeys > op->curKeyVarIndexLimit) { - op->keyVarIndexes.redimension(op->curKeyVarIndexLimit += 500, 0); - } - op->keyVarIndexes(numKeys) = Loop; - varAvgSum = op->DDVariableTypes(op->ivarNames(VFound)).storeType; - varStepType = op->DDVariableTypes(op->ivarNames(VFound)).timeStepType; - varUnits = op->DDVariableTypes(op->ivarNames(VFound)).units; - } - } - } - } + std::string nameUC = Util::makeUPPER(name); - // Search Meters if not found in integers or reals - // Use the GetMeterIndex function - // Meters do not have keys, so only one will be found - if (!Found) { - op->keyVarIndexes(1) = GetMeterIndex(state, varName); - if (op->keyVarIndexes(1) > 0) { - Found = true; - numKeys = 1; - varType = VariableType::Meter; - varUnits = op->EnergyMeters(op->keyVarIndexes(1)).Units; - varAvgSum = StoreType::Summed; - varStepType = TimeStepType::Zone; - } - } + // Search Variable List First + if (auto found = op->ddOutVarMap.find(nameUC); found != op->ddOutVarMap.end()) { + auto const *ddOutVar = op->ddOutVars[found->second]; + varType = ddOutVar->variableType; + storeType = ddOutVar->storeType; + timeStepType = ddOutVar->timeStepType; + units = ddOutVar->units; + numKeys = ddOutVar->keyOutVarNums.size(); + + } else if (auto found = op->meterMap.find(nameUC); found != op->meterMap.end()) { + // Search Meters if not found in integers or reals + // Use the GetMeterIndex function + // Meters do not have keys, so only one will be found + int meterNum = found->second; + numKeys = 1; + varType = VariableType::Meter; + units = op->meters[meterNum]->units; + storeType = StoreType::Summed; + timeStepType = TimeStepType::Zone; - // Search schedules if not found in integers, reals, or meters - // Use the GetScheduleIndex function - // Schedules do not have keys, so only one will be found - if (!Found) { - op->keyVarIndexes(1) = GetScheduleIndex(state, varName); - if (op->keyVarIndexes(1) > 0) { - Found = true; + } else { + // Search schedules if not found in integers, reals, or meters + // Use the GetScheduleIndex function + // Schedules do not have keys, so only one will be found + int schedNum = GetScheduleIndex(state, nameUC); + if (schedNum > 0) { numKeys = 1; varType = VariableType::Schedule; - varUnits = unitStringToEnum(GetScheduleType(state, op->keyVarIndexes(1))); - varAvgSum = StoreType::Averaged; - varStepType = TimeStepType::Zone; + units = static_cast(getEnumValue(Constant::unitNamesUC, Util::makeUPPER(GetScheduleType(state, schedNum)))); + storeType = StoreType::Averaged; + timeStepType = TimeStepType::Zone; } } -} +} // GetVariableKeyCountandType() void GetVariableKeys(EnergyPlusData &state, std::string const &varName, // Standard variable name OutputProcessor::VariableType const varType, // 1=integer, 2=real, 3=meter - Array1D_string &keyNames, // Specific key name - Array1D_int &keyVarIndexes // Array index for + Array1D_string &keyNames, + Array1D_int &keyOutVarNums // Array index for + ) { // SUBROUTINE INFORMATION: // AUTHOR Michael J. Witte // DATE WRITTEN August 2003 - // MODIFIED na - // RE-ENGINEERED na // PURPOSE OF THIS SUBROUTINE: // This subroutine returns a list of keynames and indexes associated @@ -7157,90 +4802,46 @@ void GetVariableKeys(EnergyPlusData &state, using ScheduleManager::GetScheduleIndex; // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int Loop; // Loop counters - int Loop2; - std::string::size_type Position; // Starting point of search string - bool Duplicate; // True if keyname is a duplicate - int maxKeyNames; // Max allowable # of key names=size of keyNames array - int maxkeyVarIndexes; // Max allowable # of key indexes=size of keyVarIndexes array - int numKeys; // Number of keys found - std::string VarKeyPlusName; // Full variable name including keyname and units - std::string varNameUpper; // varName pushed to all upper case - - // INITIALIZATIONS - keyNames = ""; - keyVarIndexes = 0; - numKeys = 0; - Duplicate = false; - maxKeyNames = size(keyNames); - maxkeyVarIndexes = size(keyVarIndexes); - varNameUpper = Util::makeUPPER(varName); + std::string nameUC = Util::makeUPPER(varName); auto &op = state.dataOutputProcessor; // Select based on variable type: integer, real, or meter - if (varType == VariableType::Integer) { // Integer - for (Loop = 1; Loop <= op->NumOfIVariable; ++Loop) { - VarKeyPlusName = op->IVariableTypes(Loop).VarNameUC; - Position = index(VarKeyPlusName, ':' + varNameUpper, true); - if (Position != std::string::npos) { - if (VarKeyPlusName.substr(Position + 1) == varNameUpper) { - Duplicate = false; - // Check if duplicate - duplicates happen if the same report variable/key name - // combination is requested more than once in the idf at different reporting - // frequencies - for (Loop2 = 1; Loop2 <= numKeys; ++Loop2) { - if (VarKeyPlusName == op->IVariableTypes(keyVarIndexes(Loop2)).VarNameUC) Duplicate = true; - } - if (!Duplicate) { - ++numKeys; - if ((numKeys > maxKeyNames) || (numKeys > maxkeyVarIndexes)) { - ShowFatalError(state, "Invalid array size in GetVariableKeys"); - } - keyNames(numKeys) = op->IVariableTypes(Loop).VarNameUC.substr(0, Position); - keyVarIndexes(numKeys) = Loop; - } - } - } + if (varType == VariableType::Integer || varType == VariableType::Real) { + auto found = op->ddOutVarMap.find(nameUC); + if (found == op->ddOutVarMap.end()) return; + + auto const *ddOutVar = op->ddOutVars[found->second]; + + if (ddOutVar->keyOutVarNums.size() > size(keyOutVarNums)) { + ShowFatalError(state, "Invalid array size in GetVariableKeys"); } - } else if (varType == VariableType::Real) { // Real - for (Loop = 1; Loop <= op->NumOfRVariable; ++Loop) { - if (op->RVariableTypes(Loop).VarNameOnlyUC == varNameUpper) { - Duplicate = false; - // Check if duplicate - duplicates happen if the same report variable/key name - // combination is requested more than once in the idf at different reporting - // frequencies - VarKeyPlusName = op->RVariableTypes(Loop).VarNameUC; - for (Loop2 = 1; Loop2 <= numKeys; ++Loop2) { - if (VarKeyPlusName == op->RVariableTypes(keyVarIndexes(Loop2)).VarNameUC) Duplicate = true; - } - if (!Duplicate) { - ++numKeys; - if ((numKeys > maxKeyNames) || (numKeys > maxkeyVarIndexes)) { - ShowFatalError(state, "Invalid array size in GetVariableKeys"); - } - keyNames(numKeys) = op->RVariableTypes(Loop).KeyNameOnlyUC; - keyVarIndexes(numKeys) = Loop; - } - } + + int iKey = 0; + for (int keyOutVarNum : ddOutVar->keyOutVarNums) { + ++iKey; + keyOutVarNums(iKey) = keyOutVarNum; + keyNames(iKey) = op->outVars[keyOutVarNum]->keyUC; } + } else if (varType == VariableType::Meter) { // Meter - numKeys = 1; - if ((numKeys > maxKeyNames) || (numKeys > maxkeyVarIndexes)) { + + if (size(keyOutVarNums) == 0) { ShowFatalError(state, "Invalid array size in GetVariableKeys"); } + keyOutVarNums(1) = GetMeterIndex(state, varName); keyNames(1) = "Meter"; - keyVarIndexes(1) = GetMeterIndex(state, varName); + } else if (varType == VariableType::Schedule) { // Schedule - numKeys = 1; - if ((numKeys > maxKeyNames) || (numKeys > maxkeyVarIndexes)) { + + if (size(keyOutVarNums) == 0) { ShowFatalError(state, "Invalid array size in GetVariableKeys"); } + keyOutVarNums(1) = GetScheduleIndex(state, varName); keyNames(1) = "Environment"; - keyVarIndexes(1) = GetScheduleIndex(state, varName); } else { // do nothing } -} +} // GetVariableKeys() bool ReportingThisVariable(EnergyPlusData &state, std::string const &RepVarName) { @@ -7248,72 +4849,37 @@ bool ReportingThisVariable(EnergyPlusData &state, std::string const &RepVarName) // FUNCTION INFORMATION: // AUTHOR Linda Lawrie // DATE WRITTEN October 2008 - // MODIFIED na - // RE-ENGINEERED na // PURPOSE OF THIS FUNCTION: // This function scans the report variables and reports back // if user has requested this variable be reported. - - // METHODOLOGY EMPLOYED: - // na - - // REFERENCES: - // na - - // Using/Aliasing using namespace OutputProcessor; - // Return value - bool BeingReported; - - // Locals - // FUNCTION ARGUMENT DEFINITIONS: - - // FUNCTION PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // FUNCTION LOCAL VARIABLE DECLARATIONS: - int Found; auto &op = state.dataOutputProcessor; - BeingReported = false; - Found = Util::FindItem(RepVarName, op->ReqRepVars, &ReqReportVariables::VarName); - if (Found > 0) { - BeingReported = true; + std::string name = Util::makeUPPER(RepVarName); + + for (int iReqVar = 0; iReqVar < (int)op->reqVars.size(); ++iReqVar) { + if (op->reqVars[iReqVar]->name == name) return true; } - if (!BeingReported) { // check meter names too - Found = Util::FindItem(RepVarName, op->EnergyMeters); - if (Found > 0) { - if (op->EnergyMeters(Found).RptTS || op->EnergyMeters(Found).RptHR || op->EnergyMeters(Found).RptDY || op->EnergyMeters(Found).RptMN || - op->EnergyMeters(Found).RptSM || op->EnergyMeters(Found).RptTSFO || op->EnergyMeters(Found).RptHRFO || - op->EnergyMeters(Found).RptDYFO || op->EnergyMeters(Found).RptMNFO || op->EnergyMeters(Found).RptSMFO || - op->EnergyMeters(Found).RptAccTS || op->EnergyMeters(Found).RptAccHR || op->EnergyMeters(Found).RptAccDY || - op->EnergyMeters(Found).RptAccMN || op->EnergyMeters(Found).RptAccSM || op->EnergyMeters(Found).RptAccTSFO || - op->EnergyMeters(Found).RptAccHRFO || op->EnergyMeters(Found).RptAccDYFO || op->EnergyMeters(Found).RptAccMNFO || - op->EnergyMeters(Found).RptAccSMFO) { - BeingReported = true; - } + if (auto found = op->meterMap.find(name); found != op->meterMap.end()) { + auto const *meter = op->meters[found->second]; + for (int iFreq = (int)ReportFreq::TimeStep; iFreq < (int)ReportFreq::Num; ++iFreq) { + if (iFreq == (int)ReportFreq::Year) continue; + auto const &period = meter->periods[iFreq]; + if (period.Rpt || period.RptFO || period.accRpt || period.accRptFO) return true; } } - return BeingReported; -} + return false; +} // ReportingThisVariable() -void InitPollutionMeterReporting(EnergyPlusData &state, std::string const &ReportFreqName) +void InitPollutionMeterReporting(EnergyPlusData &state, OutputProcessor::ReportFreq freq) { // SUBROUTINE INFORMATION:Richard Liesen // DATE WRITTEN July 2002 - // MODIFIED na - // RE-ENGINEERED na // PURPOSE OF THIS SUBROUTINE: // This subroutine is called at the end of the first HVAC iteration and @@ -7359,177 +4925,34 @@ void InitPollutionMeterReporting(EnergyPlusData &state, std::string const &Repor // Using/Aliasing using namespace OutputProcessor; - // SUBROUTINE PARAMETER DEFINITIONS: - // Now for the Pollution Meters - static Array1D_string const PollutionMeters({1, 29}, - {"Electricity:Facility", - "Diesel:Facility", - "DistrictCooling:Facility", - "DistrictHeatingWater:Facility", - "DistrictHeatingSteam:Facility", - "NaturalGas:Facility", - "GASOLINE:Facility", - "COAL:Facility", - "FuelOilNo1:Facility", - "FuelOilNo2:Facility", - "Propane:Facility", - "ElectricityProduced:Facility", - "CO2:Facility", - "CO:Facility", - "CH4:Facility", - "NOx:Facility", - "N2O:Facility", - "SO2:Facility", - "PM:Facility", - "PM10:Facility", - "PM2.5:Facility", - "NH3:Facility", - "NMVOC:Facility", - "Hg:Facility", - "Pb:Facility", - "WaterEnvironmentalFactors:Facility", - "Nuclear High:Facility", - "Nuclear Low:Facility", - "Carbon Equivalent:Facility"}); // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int Loop; - int NumReqMeters; - int Meter; - ReportingFrequency ReportFreq(determineFrequency(state, ReportFreqName)); - int indexGroupKey; - std::string indexGroup; auto &op = state.dataOutputProcessor; - NumReqMeters = 29; + for (int iResource = 0; iResource < (int)Constant::eResource::Num; ++iResource) { + std::string meterName = format("{}:Facility", Constant::eResourceNames[iResource]); + std::string meterNameUC = Util::makeUPPER(meterName); - for (Loop = 1; Loop <= NumReqMeters; ++Loop) { + auto found = op->meterMap.find(meterNameUC); + if (found == op->meterMap.end()) continue; - Meter = Util::FindItem(PollutionMeters(Loop), op->EnergyMeters); - if (Meter > 0) { // All the active meters for this run are set, but all are still searched for. + auto *meter = op->meters[found->second]; + auto &period = meter->periods[(int)freq]; - indexGroupKey = DetermineIndexGroupKeyFromMeterName(state, op->EnergyMeters(Meter).Name); - indexGroup = DetermineIndexGroupFromMeterGroup(op->EnergyMeters(Meter)); - // All of the specified meters are checked and the headers printed to the meter file if this - // has not been done previously - if (ReportFreq == ReportingFrequency::TimeStep) { - if (op->EnergyMeters(Meter).RptTS) { - op->EnergyMeters(Meter).RptTS = true; - } else { - op->EnergyMeters(Meter).RptTS = true; - WriteMeterDictionaryItem(state, - ReportFreq, - StoreType::Summed, - op->EnergyMeters(Meter).TSRptNum, - indexGroupKey, - indexGroup, - op->EnergyMeters(Meter).TSRptNumChr, - op->EnergyMeters(Meter).Name, - op->EnergyMeters(Meter).Units, - false, - false); - } - } else if (ReportFreq == ReportingFrequency::Hourly) { - if (op->EnergyMeters(Meter).RptHR) { - op->EnergyMeters(Meter).RptHR = true; - op->TrackingHourlyVariables = true; - } else { - op->EnergyMeters(Meter).RptHR = true; - op->TrackingHourlyVariables = true; - WriteMeterDictionaryItem(state, - ReportFreq, - StoreType::Summed, - op->EnergyMeters(Meter).HRRptNum, - indexGroupKey, - indexGroup, - op->EnergyMeters(Meter).HRRptNumChr, - op->EnergyMeters(Meter).Name, - op->EnergyMeters(Meter).Units, - false, - false); - } - } else if (ReportFreq == ReportingFrequency::Daily) { - if (op->EnergyMeters(Meter).RptDY) { - op->EnergyMeters(Meter).RptDY = true; - op->TrackingDailyVariables = true; - } else { - op->EnergyMeters(Meter).RptDY = true; - op->TrackingDailyVariables = true; - WriteMeterDictionaryItem(state, - ReportFreq, - StoreType::Summed, - op->EnergyMeters(Meter).DYRptNum, - indexGroupKey, - indexGroup, - op->EnergyMeters(Meter).DYRptNumChr, - op->EnergyMeters(Meter).Name, - op->EnergyMeters(Meter).Units, - false, - false); - } - } else if (ReportFreq == ReportingFrequency::Monthly) { - if (op->EnergyMeters(Meter).RptMN) { - op->EnergyMeters(Meter).RptMN = true; - op->TrackingMonthlyVariables = true; - } else { - op->EnergyMeters(Meter).RptMN = true; - op->TrackingMonthlyVariables = true; - WriteMeterDictionaryItem(state, - ReportFreq, - StoreType::Summed, - op->EnergyMeters(Meter).MNRptNum, - indexGroupKey, - indexGroup, - op->EnergyMeters(Meter).MNRptNumChr, - op->EnergyMeters(Meter).Name, - op->EnergyMeters(Meter).Units, - false, - false); - } - } else if (ReportFreq == ReportingFrequency::Yearly) { - if (op->EnergyMeters(Meter).RptYR) { - op->EnergyMeters(Meter).RptYR = true; - op->TrackingYearlyVariables = true; - } else { - op->EnergyMeters(Meter).RptYR = true; - op->TrackingMonthlyVariables = true; - WriteMeterDictionaryItem(state, - ReportFreq, - StoreType::Summed, - op->EnergyMeters(Meter).YRRptNum, - indexGroupKey, - indexGroup, - op->EnergyMeters(Meter).YRRptNumChr, - op->EnergyMeters(Meter).Name, - op->EnergyMeters(Meter).Units, - false, - false); - } - } else if (ReportFreq == ReportingFrequency::Simulation) { - if (op->EnergyMeters(Meter).RptSM) { - op->EnergyMeters(Meter).RptSM = true; - op->TrackingRunPeriodVariables = true; - } else { - op->EnergyMeters(Meter).RptSM = true; - op->TrackingRunPeriodVariables = true; - WriteMeterDictionaryItem(state, - ReportFreq, - StoreType::Summed, - op->EnergyMeters(Meter).SMRptNum, - indexGroupKey, - indexGroup, - op->EnergyMeters(Meter).SMRptNumChr, - op->EnergyMeters(Meter).Name, - op->EnergyMeters(Meter).Units, - false, - false); - } - } else { - } + int indexGroupKey = DetermineIndexGroupKeyFromMeterName(state, meter->Name); + std::string indexGroup = DetermineIndexGroupFromMeterGroup(meter); + + // All of the specified meters are checked and the headers printed to the meter file if this + // has not been done previously + if (!period.Rpt) { + period.Rpt = true; + WriteMeterDictionaryItem( + state, freq, StoreType::Summed, period.RptNum, indexGroupKey, indexGroup, meter->Name, meter->units, false, false); + op->freqTrackingVariables[(int)freq] = true; } } -} +} // InitPollutionMeterReporting() void ProduceRDDMDD(EnergyPlusData &state) { @@ -7537,8 +4960,6 @@ void ProduceRDDMDD(EnergyPlusData &state) // SUBROUTINE INFORMATION: // AUTHOR Linda Lawrie // DATE WRITTEN March 2009 - // MODIFIED na - // RE-ENGINEERED na // PURPOSE OF THIS SUBROUTINE: // provide a single call for writing out the Report Data Dictionary and Meter Data Dictionary. @@ -7546,32 +4967,15 @@ void ProduceRDDMDD(EnergyPlusData &state) // Using/Aliasing using namespace OutputProcessor; using General::ScanForReports; - using SortAndStringUtilities::SetupAndSort; // SUBROUTINE LOCAL VARIABLE DECLARATIONS: std::string VarOption1; std::string VarOption2; bool DoReport; - int Item; bool SortByName; - int ItemPtr; - - struct VariableTypes - { - // Members - int RealIntegerType; // Real= 1, Integer=2 - int VarPtr; // pointer to real/integer VariableTypes structures - int TimeStepType; - int StoreType; - std::string UnitsString; - - // Default Constructor - VariableTypes() : RealIntegerType(0), VarPtr(0), TimeStepType(0), StoreType(0) - { - } - }; auto &op = state.dataOutputProcessor; + auto &rf = state.dataResultsFramework->resultsFramework; // See if Report Variables should be turned on SortByName = false; @@ -7606,228 +5010,160 @@ void ProduceRDDMDD(EnergyPlusData &state) print(state.files.mdd, "! Output:Meter Objects (applicable to this run){}", '\n'); } - Array1D_string VariableNames(op->NumVariablesForOutput); - for (int i = 1; i <= op->NumVariablesForOutput; ++i) - VariableNames(i) = op->DDVariableTypes(i).VarNameOnly; - Array1D_int iVariableNames(op->NumVariablesForOutput); + if (op->ProduceReportVDD == ReportVDD::Yes || op->ProduceReportVDD == ReportVDD::IDF) { + + auto miVar = op->ddOutVarMap.begin(); + int aiVar = 0; + for (;;) { + int iVar = -1; + // Too complicated to do this logic in the for loop header + if (SortByName) { + if (miVar == op->ddOutVarMap.end()) break; + iVar = miVar->second; + ++miVar; + } else { + if (aiVar == (int)op->ddOutVars.size()) break; + iVar = aiVar; + ++aiVar; + } + + auto *ddVar = op->ddOutVars[iVar]; - if (SortByName) { - SetupAndSort(VariableNames, iVariableNames); - } else { - for (Item = 1; Item <= op->NumVariablesForOutput; ++Item) { - iVariableNames(Item) = Item; - } - } + if (ddVar->ReportedOnDDFile) continue; - for (Item = 1; Item <= op->NumVariablesForOutput; ++Item) { - if (op->ProduceReportVDD == ReportVDD::Yes) { - ItemPtr = iVariableNames(Item); - if (!op->DDVariableTypes(ItemPtr).ReportedOnDDFile) { - print(state.files.rdd, - "{},{},{}{}{}", - StandardTimeStepTypeKey(op->DDVariableTypes(ItemPtr).timeStepType), - standardVariableTypeKey(op->DDVariableTypes(ItemPtr).storeType), - VariableNames(Item), - unitStringFromDDitem(state, ItemPtr), - '\n'); - state.dataResultsFramework->resultsFramework->RDD.push_back(StandardTimeStepTypeKey(op->DDVariableTypes(ItemPtr).timeStepType) + "," + - standardVariableTypeKey(op->DDVariableTypes(ItemPtr).storeType) + "," + - VariableNames(Item) + unitStringFromDDitem(state, ItemPtr)); - op->DDVariableTypes(ItemPtr).ReportedOnDDFile = true; - while (op->DDVariableTypes(ItemPtr).Next != 0) { - if (SortByName) { - ++ItemPtr; - } else { - ItemPtr = op->DDVariableTypes(ItemPtr).Next; - } - print(state.files.rdd, - "{},{},{}{}{}", - StandardTimeStepTypeKey(op->DDVariableTypes(ItemPtr).timeStepType), - standardVariableTypeKey(op->DDVariableTypes(ItemPtr).storeType), - VariableNames(Item), - unitStringFromDDitem(state, ItemPtr), - '\n'); - state.dataResultsFramework->resultsFramework->RDD.push_back(StandardTimeStepTypeKey(op->DDVariableTypes(ItemPtr).timeStepType) + - "," + - standardVariableTypeKey(op->DDVariableTypes(ItemPtr).storeType) + - "," + VariableNames(Item) + unitStringFromDDitem(state, ItemPtr)); - op->DDVariableTypes(ItemPtr).ReportedOnDDFile = true; - } + std::string_view timeStepName = timeStepNames[(int)ddVar->timeStepType]; + std::string_view storeTypeName = storeTypeNames[(int)ddVar->storeType]; + std::string_view varName = ddVar->name; + std::string_view unitName = + (ddVar->units == Constant::Units::customEMS) ? ddVar->unitNameCustomEMS : Constant::unitNames[(int)ddVar->units]; + if (op->ProduceReportVDD == ReportVDD::Yes) { + print(state.files.rdd, "{},{},{} [{}]\n", timeStepName, storeTypeName, varName, unitName); + rf->RDD.push_back(format("{},{},{} [{}]", timeStepName, storeTypeName, varName, unitName)); + } else { + print(state.files.rdd, "Output:Variable,*,{},hourly; !- {} {} [{}]\n", varName, timeStepName, storeTypeName, unitName); + rf->RDD.push_back(format("{},{},{} [{}]", timeStepName, storeTypeName, varName, unitName)); } - } else if (op->ProduceReportVDD == ReportVDD::IDF) { - ItemPtr = iVariableNames(Item); - if (!op->DDVariableTypes(ItemPtr).ReportedOnDDFile) { - print(state.files.rdd, - "Output:Variable,*,{},hourly; !- {} {}{}{}", - VariableNames(Item), - StandardTimeStepTypeKey(op->DDVariableTypes(ItemPtr).timeStepType), - standardVariableTypeKey(op->DDVariableTypes(ItemPtr).storeType), - unitStringFromDDitem(state, ItemPtr), - '\n'); - state.dataResultsFramework->resultsFramework->RDD.push_back(StandardTimeStepTypeKey(op->DDVariableTypes(ItemPtr).timeStepType) + "," + - standardVariableTypeKey(op->DDVariableTypes(ItemPtr).storeType) + "," + - VariableNames(Item) + unitStringFromDDitem(state, ItemPtr)); - op->DDVariableTypes(ItemPtr).ReportedOnDDFile = true; - while (op->DDVariableTypes(ItemPtr).Next != 0) { - if (SortByName) { - ++ItemPtr; + + ddVar->ReportedOnDDFile = true; + if (SortByName) { + while (ddVar->Next != -1) { + ddVar = op->ddOutVars[ddVar->Next]; + + std::string_view timeStepName = timeStepNames[(int)ddVar->timeStepType]; + std::string_view storeTypeName = storeTypeNames[(int)ddVar->storeType]; + std::string_view varName = ddVar->name; + std::string_view unitName = + (ddVar->units == Constant::Units::customEMS) ? ddVar->unitNameCustomEMS : Constant::unitNames[(int)ddVar->units]; + + if (op->ProduceReportVDD == ReportVDD::Yes) { + print(state.files.rdd, "{},{},{} [{}]\n", timeStepName, storeTypeName, varName, unitName); + rf->RDD.push_back(format("{},{},{} [{}]", timeStepName, storeTypeName, varName, unitName)); } else { - ItemPtr = op->DDVariableTypes(ItemPtr).Next; + print(state.files.rdd, "Output:Variable,*,{},hourly; !- {} {} [{}]\n", varName, timeStepName, storeTypeName, unitName); + rf->RDD.push_back(format("{},{},{} [{}]", timeStepName, storeTypeName, varName, unitName)); } - print(state.files.rdd, - "Output:Variable,*,{},hourly; !- {} {}{}{}", - VariableNames(Item), - StandardTimeStepTypeKey(op->DDVariableTypes(ItemPtr).timeStepType), - standardVariableTypeKey(op->DDVariableTypes(ItemPtr).storeType), - unitStringFromDDitem(state, ItemPtr), - '\n'); - state.dataResultsFramework->resultsFramework->RDD.push_back(StandardTimeStepTypeKey(op->DDVariableTypes(ItemPtr).timeStepType) + - "," + - standardVariableTypeKey(op->DDVariableTypes(ItemPtr).storeType) + - "," + VariableNames(Item) + unitStringFromDDitem(state, ItemPtr)); - op->DDVariableTypes(ItemPtr).ReportedOnDDFile = true; - } - } - } - } + ddVar->ReportedOnDDFile = true; + } // while (ddVar->Next != 0) + } // if (SortByName) + } // for (aiVar, miVar) + } // if (produceReportVDD) state.files.rdd.close(); - // Now EnergyMeter variables - VariableNames.allocate(op->NumEnergyMeters); - iVariableNames.allocate(op->NumEnergyMeters); - if (SortByName) { - for (Item = 1; Item <= op->NumEnergyMeters; ++Item) { - VariableNames(Item) = op->EnergyMeters(Item).Name; - } - SetupAndSort(VariableNames, iVariableNames); - } else { - for (Item = 1; Item <= op->NumEnergyMeters; ++Item) { - VariableNames(Item) = op->EnergyMeters(Item).Name; - iVariableNames(Item) = Item; - } - } - - for (Item = 1; Item <= op->NumEnergyMeters; ++Item) { - ItemPtr = iVariableNames(Item); + auto miMeter = op->meterMap.begin(); + for (int aiMeter = 0; aiMeter < (int)op->meters.size() && miMeter != op->meterMap.end(); ++aiMeter, ++miMeter) { + int iMeter = (SortByName) ? miMeter->second : aiMeter; + auto *meter = op->meters[iMeter]; + std::string_view unitName = Constant::unitNames[(int)meter->units]; if (op->ProduceReportVDD == ReportVDD::Yes) { - print(state.files.mdd, - "Zone,Meter,{}{}{}", - op->EnergyMeters(ItemPtr).Name, - unitEnumToStringBrackets(op->EnergyMeters(ItemPtr).Units), - '\n'); - state.dataResultsFramework->resultsFramework->MDD.push_back("Zone,Meter," + op->EnergyMeters(ItemPtr).Name + - unitEnumToStringBrackets(op->EnergyMeters(ItemPtr).Units)); + print(state.files.mdd, "Zone,Meter,{} [{}]\n", meter->Name, unitName); + rf->MDD.push_back(format("Zone,Meter,{}, [{}]", meter->Name, unitName)); } else if (op->ProduceReportVDD == ReportVDD::IDF) { - print(state.files.mdd, - "Output:Meter,{},hourly; !-{}{}", - op->EnergyMeters(ItemPtr).Name, - unitEnumToStringBrackets(op->EnergyMeters(ItemPtr).Units), - '\n'); - state.dataResultsFramework->resultsFramework->MDD.push_back("Output:Meter," + op->EnergyMeters(ItemPtr).Name + - unitEnumToStringBrackets(op->EnergyMeters(ItemPtr).Units)); - print(state.files.mdd, - "Output:Meter:Cumulative,{},hourly; !-{}{}", - op->EnergyMeters(ItemPtr).Name, - unitEnumToStringBrackets(op->EnergyMeters(ItemPtr).Units), - '\n'); - state.dataResultsFramework->resultsFramework->MDD.push_back("Output:Meter:Cumulative," + op->EnergyMeters(ItemPtr).Name + - unitEnumToStringBrackets(op->EnergyMeters(ItemPtr).Units)); + print(state.files.mdd, "Output:Meter,{},hourly; !- [{}]\n", meter->Name, unitName); + rf->MDD.push_back(format("Output:Meter,{}, [{}]", meter->Name, unitName)); + print(state.files.mdd, "Output:Meter:Cumulative,{},hourly; !- [{}]\n", meter->Name, unitName); + rf->MDD.push_back(format("Output:Meter:Cumulative,{}, [{}]", meter->Name, unitName)); } } state.files.mdd.close(); -} - -void AddToOutputVariableList(EnergyPlusData &state, - std::string_view const VarName, // Variable Name - OutputProcessor::TimeStepType const TimeStepType, - OutputProcessor::StoreType const StateType, - OutputProcessor::VariableType const VariableType, - OutputProcessor::Unit const unitsForVar, - std::string_view const customUnitName // the custom name for the units from EMS definition of units +} // ProduceRDDMDD() + +int AddDDOutVar(EnergyPlusData &state, + std::string_view const name, // Variable Name + OutputProcessor::TimeStepType const timeStepType, + OutputProcessor::StoreType const storeType, + OutputProcessor::VariableType const variableType, + Constant::Units const units, + std::string_view const customUnitName // the custom name for the units from EMS definition of units ) { // SUBROUTINE INFORMATION: // AUTHOR Linda Lawrie // DATE WRITTEN August 2010 - // MODIFIED na - // RE-ENGINEERED na // PURPOSE OF THIS SUBROUTINE: // This routine maintains a unique list of Output Variables for the // Variable Dictionary output. - // METHODOLOGY EMPLOYED: - // na - - // REFERENCES: - // na - // Using/Aliasing using namespace OutputProcessor; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: auto &op = state.dataOutputProcessor; - int dup = 0; // for duplicate variable name - if (op->NumVariablesForOutput > 0) { - dup = Util::FindItemInList(VarName, op->DDVariableTypes, &VariableTypeForDDOutput::VarNameOnly, op->NumVariablesForOutput); - } else { - op->DDVariableTypes.allocate(LVarAllocInc); - op->MaxVariablesForOutput = LVarAllocInc; - } - if (dup == 0) { - ++op->NumVariablesForOutput; - if (op->NumVariablesForOutput > op->MaxVariablesForOutput) { - op->DDVariableTypes.redimension(op->MaxVariablesForOutput += LVarAllocInc); - } - op->DDVariableTypes(op->NumVariablesForOutput).timeStepType = TimeStepType; - op->DDVariableTypes(op->NumVariablesForOutput).storeType = StateType; - op->DDVariableTypes(op->NumVariablesForOutput).variableType = VariableType; - op->DDVariableTypes(op->NumVariablesForOutput).VarNameOnly = VarName; - op->DDVariableTypes(op->NumVariablesForOutput).units = unitsForVar; - if (!customUnitName.empty() && unitsForVar == OutputProcessor::Unit::customEMS) { - op->DDVariableTypes(op->NumVariablesForOutput).unitNameCustomEMS = customUnitName; - } - } else if (unitsForVar != op->DDVariableTypes(dup).units) { // not the same as first units - int dup2 = 0; // for duplicate variable name - while (op->DDVariableTypes(dup).Next != 0) { - if (unitsForVar != op->DDVariableTypes(op->DDVariableTypes(dup).Next).units) { - dup = op->DDVariableTypes(dup).Next; + std::string nameUC = Util::makeUPPER(name); + + auto found = op->ddOutVarMap.find(nameUC); + if (found == op->ddOutVarMap.end()) { + auto *ddVar = new DDOutVar(); + op->ddOutVars.push_back(ddVar); + // Add to map + op->ddOutVarMap.insert_or_assign(nameUC, op->ddOutVars.size() - 1); + + ddVar->timeStepType = timeStepType; + ddVar->storeType = storeType; + ddVar->variableType = variableType; + ddVar->name = name; + ddVar->units = units; + if (!customUnitName.empty() && units == Constant::Units::customEMS) { + ddVar->unitNameCustomEMS = customUnitName; + } + return op->ddOutVars.size() - 1; + + } else if (units == op->ddOutVars[found->second]->units) { + return found->second; + + } else { // not the same as first units + int dup2 = -1; // for duplicate variable name + auto *ddVarDup = op->ddOutVars[found->second]; + while (ddVarDup->Next != -1) { + if (units != op->ddOutVars[ddVarDup->Next]->units) { + ddVarDup = op->ddOutVars[ddVarDup->Next]; continue; } - dup2 = op->DDVariableTypes(dup).Next; + dup2 = ddVarDup->Next; break; } - if (dup2 == 0) { - ++op->NumVariablesForOutput; - if (op->NumVariablesForOutput > op->MaxVariablesForOutput) { - op->DDVariableTypes.redimension(op->MaxVariablesForOutput += LVarAllocInc); - } - op->DDVariableTypes(op->NumVariablesForOutput).timeStepType = TimeStepType; - op->DDVariableTypes(op->NumVariablesForOutput).storeType = StateType; - op->DDVariableTypes(op->NumVariablesForOutput).variableType = VariableType; - op->DDVariableTypes(op->NumVariablesForOutput).VarNameOnly = VarName; - op->DDVariableTypes(op->NumVariablesForOutput).units = unitsForVar; - if (!customUnitName.empty() && unitsForVar == OutputProcessor::Unit::customEMS) { - op->DDVariableTypes(op->NumVariablesForOutput).unitNameCustomEMS = customUnitName; - } - op->DDVariableTypes(dup).Next = op->NumVariablesForOutput; - } - } -} + if (dup2 == -1) { + DDOutVar *ddVar2 = new DDOutVar(); + op->ddOutVars.push_back(ddVar2); + // Don't add this one to the map. Leave the map pointing to the first one + ddVar2->timeStepType = timeStepType; + ddVar2->storeType = storeType; + ddVar2->variableType = variableType; + ddVar2->name = name; + ddVar2->units = units; + if (!customUnitName.empty() && units == Constant::Units::customEMS) { + ddVar2->unitNameCustomEMS = customUnitName; + } + ddVarDup->Next = op->ddOutVars.size() - 1; + + return op->ddOutVars.size() - 1; + } else { + return dup2; + } // if (dup2 == 0) + } // if (unitsForVar) +} // AddDDOutVar() int initErrorFile(EnergyPlusData &state) { @@ -7837,6 +5173,6 @@ int initErrorFile(EnergyPlusData &state) return EXIT_FAILURE; } return EXIT_SUCCESS; -} +} // initErrorFile() } // namespace EnergyPlus diff --git a/src/EnergyPlus/OutputProcessor.hh b/src/EnergyPlus/OutputProcessor.hh index 5a36bfe5204..58a9139136e 100644 --- a/src/EnergyPlus/OutputProcessor.hh +++ b/src/EnergyPlus/OutputProcessor.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -49,15 +49,13 @@ #define OutputProcessor_hh_INCLUDED // C++ Headers +#include #include #include -#include // ObjexxFCL Headers #include #include -#include -#include // EnergyPlus Headers #include @@ -88,6 +86,7 @@ namespace OutputProcessor { Num }; static constexpr std::array sovTimeStepTypeStrings = {"System", "HVAC", "Zone", "Plant"}; + enum class SOVStoreType { Invalid = -1, @@ -116,7 +115,7 @@ namespace OutputProcessor { enum class VariableType { Invalid = -1, - NotFound, // ref: GetVariableKeyCountandType, 0 = not found + NotFound, // ref: GetVariableKeyCountandType, 0 = not found // TODO: This is actually used separately from Invalid, need to get rid of it Integer, // ref: GetVariableKeyCountandType, 1 = integer Real, // ref: GetVariableKeyCountandType, 2 = real Meter, // ref: GetVariableKeyCountandType, 3 = meter @@ -124,7 +123,7 @@ namespace OutputProcessor { Num }; - enum class MtrType + enum class MeterType { Invalid = -1, Normal, // Type value for normal meters @@ -136,21 +135,6 @@ namespace OutputProcessor { constexpr int N_WriteTimeStampFormatData(100); - static constexpr std::array endUseCategoryNames = {"HEATING", - "COOLING", - "INTERIORLIGHTS", - "EXTERIORLIGHTS", - "INTERIOREQUIPMENT", - "EXTERIOREQUIPMENT", - "FANS", - "PUMPS", - "HEATREJECTION", - "HUMIDIFIER", - "HEATRECOVERY", - "WATERSYSTEMS", - "REFRIGERATION", - "COGENERATION"}; - constexpr int RVarAllocInc(1000); constexpr int LVarAllocInc(1000); constexpr int IVarAllocInc(10); @@ -170,374 +154,484 @@ namespace OutputProcessor { Num }; - enum class Unit + enum class ReportFreq { Invalid = -1, - kg_s, - C, - kgWater_kgDryAir, - ppm, - Pa, - m3_s, - None, - min, - W, - J, - m3, - kg, - ach, - W_W, - lux, - lum_W, - hr, - cd_m2, - J_kgWater, - m_s, - W_m2, - m, - Ah, - A, - V, - deltaC, - kmol_s, - rev_min, - Btu_h_W, - W_m2K, - J_kg, - kg_kg, - Perc, - deg, - s, - kg_m3, - kg_m2s, - J_kgK, - L, - K_m, - m2, - W_m2C, - rad, - J_m2, - clo, - W_mK, - W_K, - K_W, - kgWater_s, - unknown, - customEMS, + EachCall, // Write out each time UpdatedataandReport is called + TimeStep, // Write out at 'EndTimeStepFlag' + Hour, // Write out at 'EndHourFlag' + Day, // Write out at 'EndDayFlag' + Month, // Write out at end of month (must be determined) + Simulation, // Write out once per environment 'EndEnvrnFlag' + Year, // Write out at 'EndYearFlag' Num }; - enum class ReportingFrequency - { - EachCall = -1, // Write out each time UpdatedataandReport is called - TimeStep, // Write out at 'EndTimeStepFlag' - Hourly, // Write out at 'EndHourFlag' - Daily, // Write out at 'EndDayFlag' - Monthly, // Write out at end of month (must be determined) - Simulation, // Write out once per environment 'EndEnvrnFlag' - Yearly, // Write out at 'EndYearFlag' - Num + static constexpr std::array reportFreqNames = { + "Each Call", // EachCall + "TimeStep", // TimeStep + "Hourly", // Hourly + "Daily", // Daily + "Monthly", // Monthly + "RunPeriod", // Simulation + "Annual" // Yearly }; - static constexpr std::array ReportingFrequencyNames = { - "TIMESTEP", "HOURLY", "DAILY", "MONTHLY", "SIMULATION", "YEARLY"}; + + static constexpr std::array reportFreqNamesUC = { + "EACH CALL", // EachCall + "TIMESTEP", // TimeStep + "HOURLY", // Hourly + "DAILY", // Daily + "MONTHLY", // Monthly + "RUNPERIOD", // Simulation + "ANNUAL" // Yearly + }; + + // What is this thing? + constexpr std::array reportFreqArbitraryInts = {1, 1, 1, 7, 9, 11, 11}; enum class StoreType { Invalid = -1, - Averaged = 1, // Type value for "averaged" variables + Averaged = 1, // Type value for "averaged" variables // TODO: is this just for printing annual tables Summed, // Type value for "summed" variables Num }; + constexpr std::array storeTypeNames = { + "UNUSED", + "Average", // Averaged + "Sum" // Summed + }; + + constexpr std::array sovStoreType2StoreType = {StoreType::Averaged, // State + StoreType::Summed, // Non-state + StoreType::Summed, // Sum + StoreType::Averaged}; // Average + enum class TimeStepType { Invalid = -1, - Zone = 1, // Type value for "zone" timestep variables - System = 2, // Type value for "system" timestep variables + Zone = 1, // Type value for "zone" timestep variables // TODO: is this just for printing Annual tables? + System, // Type value for "system" timestep variables + Num + }; + + constexpr std::array timeStepNames = { + "UNUSED", + "Zone", // Zone + "HVAC" // System + }; + + static constexpr std::array sovTimeStep2TimeStep = {TimeStepType::System, // System + TimeStepType::System, // HVAC + TimeStepType::Zone, // Zone + TimeStepType::System}; // Plant + + enum class SOVEndUseCat + { + Invalid = -1, + Heating, + Cooling, + InteriorLights, + ExteriorLights, + InteriorEquipment, + ExteriorEquipment, + Fans, + Pumps, + HeatRejection, + Humidification, + HeatRecovery, + WaterSystem, + Refrigeration, + Cogeneration, + Baseboard, + Boilers, + CarbonEquivalentEmissions, + Chillers, + CoalEmissions, + ColdStorageCharge, + ColdStorageDischarge, + Condensate, + CoolingCoils, + CoolingPanel, + DieselEmissions, + DistrictChilledWater, + DistrictHotWater, + ElectricityEmissions, + ElectricStorage, + FreeCooling, + FuelOilNo1Emissions, + FuelOilNo2Emissions, + GasolineEmissions, + HeatingCoils, + HeatProduced, + HeatRecoveryForCooling, + HeatRecoveryForHeating, + LoopToLoop, + MainsWater, + NaturalGasEmissions, + OtherFuel1Emissions, + OtherFuel2Emissions, + Photovoltaic, + PowerConversion, + PropaneEmissions, + PurchasedElectricityEmissions, + RainWater, + SoldElectricityEmissions, + WellWater, + WindTurbine, + Num + }; + + static constexpr std::array sovEndUseCatNames = {"Heating", + "Cooling", + "InteriorLights", + "ExteriorLights", + "InteriorEquipment", + "ExteriorEquipment", + "Fans", + "Pumps", + "HeatRejection", + "Humidifier", + "HeatRecovery", + "WaterSystems", + "Refrigeration", + "Cogeneration", + "Baseboard", + "Boilers", + "CarbonEquivalentEmissions", + "Chillers", + "CoalEmissions", + "ColdStorageCharge", + "ColdStorageDischarge", + "Condensate", + "CoolingCoils", + "CoolingPanel", + "DieselEmissions", + "DistrictChilledWater", + "DistrictHotWater", + "ElectricityEmissions", + "ElectricStorage", + "FreeCooling", + "FuelOilNo1Emissions", + "FuelOilNo2Emissions", + "GasolineEmissions", + "HeatingCoils", + "HeatProduced", + "HeatRecoveryForCooling", + "HeatRecoveryForHeating", + "LoopToLoop", + "MainsWater", + "NaturalGasEmissions", + "OtherFuel1Emissions", + "OtherFuel2Emissions", + "Photovoltaic", + "PowerConversion", + "PropaneEmissions", + "PurchasedElectricityEmissions", + "RainWater", + "SoldElectricityEmissions", + "WellWater", + "WindTurbine"}; + + static constexpr std::array sovEndUseCatNamesUC = {"HEATING", + "COOLING", + "INTERIORLIGHTS", + "EXTERIORLIGHTS", + "INTERIOREQUIPMENT", + "EXTERIOREQUIPMENT", + "FANS", + "PUMPS", + "HEATREJECTION", + "HUMIDIFIER", + "HEATRECOVERY", + "WATERSYSTEMS", + "REFRIGERATION", + "COGENERATION", + "BASEBOARD", + "BOILERS", + "CARBONEQUIVALENTEMISSIONS", + "CHILLERS", + "COALEMISSIONS", + "COLDSTORAGECHARGE", + "COLDSTORAGEDISCHARGE", + "CONDENSATE", + "COOLINGCOILS", + "COOLINGPANEL", + "DIESELEMISSIONS", + "DISTRICTCHILLEDWATER", + "DISTRICTHOTWATER", + "ELECTRICITYEMISSIONS", + "ELECTRICSTORAGE", + "FREECOOLING", + "FUELOILNO1EMISSIONS", + "FUELOILNO2EMISSIONS", + "GASOLINEEMISSIONS", + "HEATINGCOILS", + "HEATPRODUCED", + "HEATRECOVERYFORCOOLING", + "HEATRECOVERYFORHEATING", + "LOOPTOLOOP", + "MAINSWATER", + "NATURALGASEMISSIONS", + "OTHERFUEL1EMISSIONS", + "OTHERFUEL2EMISSIONS", + "PHOTOVOLTAIC", + "POWERCONVERSION", + "PROPANEEMISSIONS", + "PURCHASEDELECTRICITYEMISSIONS", + "RAINWATER", + "SOLDELECTRICITYEMISSIONS", + "WELLWATER", + "WINDTURBINE"}; + + static constexpr std::array sovEndUseCat2endUse = { + Constant::EndUse::Heating, // Heating + Constant::EndUse::Cooling, // Cooling + Constant::EndUse::InteriorLights, // InteriorLights + Constant::EndUse::ExteriorLights, // ExteriorLights + Constant::EndUse::InteriorEquipment, // InteriorEquipment + Constant::EndUse::ExteriorEquipment, // ExteriorEquipment + Constant::EndUse::Fans, // Fans + Constant::EndUse::Pumps, // Pumps + Constant::EndUse::HeatRejection, // HeatRejection + Constant::EndUse::Humidification, // Humidification + Constant::EndUse::HeatRecovery, // HeatRecovery + Constant::EndUse::WaterSystem, // WaterSystem + Constant::EndUse::Refrigeration, // Refrigeration + Constant::EndUse::Cogeneration, // Cogeneration + Constant::EndUse::Invalid, // Baseboard + Constant::EndUse::Invalid, // Boilers + Constant::EndUse::Invalid, // CarbonEquivalentEmissions + Constant::EndUse::Invalid, // Chillers + Constant::EndUse::Invalid, // CoalEmissions + Constant::EndUse::Invalid, // ColdStorageCharge + Constant::EndUse::Invalid, // ColdStorageDischarge + Constant::EndUse::Invalid, // Condensate + Constant::EndUse::Invalid, // CoolingCoils + Constant::EndUse::Invalid, // CoolingPanel + Constant::EndUse::Invalid, // DieselEmissions + Constant::EndUse::Invalid, // DistrictChilledWater + Constant::EndUse::Invalid, // DistrictHotWater + Constant::EndUse::Invalid, // ElectricityEmissions + Constant::EndUse::Invalid, // ElectricStorage + Constant::EndUse::Invalid, // FreeCooling + Constant::EndUse::Invalid, // FuelOilNo1Emissions + Constant::EndUse::Invalid, // FuelOilNo2Emissions + Constant::EndUse::Invalid, // GasolineEmissions + Constant::EndUse::Invalid, // HeatingCoils + Constant::EndUse::Invalid, // HeatProduced + Constant::EndUse::Invalid, // HeatRecoveryForCooling + Constant::EndUse::Invalid, // HeatRecoveryForHeating + Constant::EndUse::Invalid, // LoopToLoop + Constant::EndUse::Invalid, // MainsWater + Constant::EndUse::Invalid, // NaturalGasEmissions + Constant::EndUse::Invalid, // OtherFuel1Emissions + Constant::EndUse::Invalid, // OtherFuel2Emissions + Constant::EndUse::Invalid, // Photovoltaic + Constant::EndUse::Invalid, // PowerConversion + Constant::EndUse::Invalid, // PropaneEmissions + Constant::EndUse::Invalid, // PurchasedElectricityEmissions + Constant::EndUse::Invalid, // RainWater + Constant::EndUse::Invalid, // SoldElectricityEmissions + Constant::EndUse::Invalid, // WellWater, + Constant::EndUse::Invalid, // WindTurbine, + }; + + enum class SOVGroup + { + Invalid = -1, + Building, + HVAC, + Plant, + Zone, + SpaceType, Num }; + static constexpr std::array sovGroupNames = {"Building", "HVAC", "Plant", "Zone", "SpaceType"}; + static constexpr std::array sovGroupNamesUC = {"BUILDING", "HVAC", "PLANT", "ZONE", "SPACETYPE"}; + struct TimeSteps { - Real64 *TimeStep = nullptr; // fortran POINTER Pointer to the Actual Time Step Variable (Zone or HVAC) + Real64 *TimeStep = nullptr; // Pointer to the Actual Time Step Variable (Zone or HVAC) Real64 CurMinute = 0.0; // Current minute (decoded from real Time Step Value) }; - struct RealVariables + struct OutVar { - Real64 *Which = nullptr; // The POINTER to the actual variable holding the value - Real64 Value; // Current Value of the variable (to resolution of Zone Time Step) - Real64 TSValue; // Value of this variable at the Zone Time Step - Real64 EITSValue; // Value of this variable at the Zone Time Step for external interface - Real64 StoreValue; // At end of Zone Time Step, value is placed here for later reporting - Real64 NumStored; // Number of hours stored - StoreType storeType; // Variable Type (Summed/Non-Static or Average/Static) - bool Stored; // True when value is stored - bool Report; // User has requested reporting of this variable in the IDF - bool tsStored; // if stored for this zone timestep - bool thisTSStored; // if stored for this zone timestep - int thisTSCount; - ReportingFrequency frequency; // How often to report this variable - Real64 MaxValue; // Maximum reporting (only for Averaged variables, and those greater than Time Step) - int maxValueDate; // Date stamp of maximum - Real64 MinValue; // Minimum reporting (only for Averaged variables, and those greater than Time Step) - int minValueDate; // Date stamp of minimum - int ReportID; // Report variable ID number - std::string ReportIDChr; // Report variable ID number (character -- for printing) - int SchedPtr; // If scheduled, this points to the schedule - int MeterArrayPtr; // If metered, this points to an array of applicable meters - int ZoneMult; // If metered, Zone Multiplier is applied - int ZoneListMult; // If metered, Zone List Multiplier is applied - - // Default Constructor - RealVariables() - : Value(0.0), TSValue(0.0), EITSValue(0.0), StoreValue(0.0), NumStored(0.0), storeType(StoreType::Averaged), Stored(false), Report(false), - tsStored(false), thisTSStored(false), thisTSCount(0), frequency(ReportingFrequency::Hourly), MaxValue(-9999.0), maxValueDate(0), - MinValue(9999.0), minValueDate(0), ReportID(0), SchedPtr(0), MeterArrayPtr(0), ZoneMult(1), ZoneListMult(1) + int ddVarNum = -1; + VariableType varType = VariableType::Invalid; + TimeStepType timeStepType = TimeStepType::Zone; // Zone or System + StoreType storeType = StoreType::Averaged; // Variable Type (Summed/Non-Static or Average/Static) + Real64 Value = 0.0; // Current Value of the variable (to resolution of Zone Time Step) + Real64 TSValue = 0.0; // Value of this variable at the Zone Time Step + Real64 EITSValue = 0.0; // Value of this variable at the Zone Time Step for external interface + Real64 StoreValue = 0.0; // At end of Zone Time Step, value is placed here for later reporting + Real64 NumStored = 0.0; // Number of hours stored + bool Stored = false; // True when value is stored + bool Report = false; // User has requested reporting of this variable in the IDF + bool tsStored = false; // if stored for this zone timestep + bool thisTSStored = false; // if stored for this zone timestep + int thisTSCount = 0; + ReportFreq freq = ReportFreq::Hour; // How often to report this variable + int maxValueDate = 0; // Date stamp of maximum + int minValueDate = 0; // Date stamp of minimum + int ReportID = 0; // Report variable ID number + int SchedPtr = 0; // If scheduled, this points to the schedule + int ZoneMult = 1; // If metered, Zone Multiplier is applied + int ZoneListMult = 1; // If metered, Zone List Multiplier is applied + + std::string keyColonName = ""; // Name of Variable key:variable + std::string keyColonNameUC = ""; // Name of Variable (Uppercase) + std::string name = ""; // Name of Variable + std::string nameUC = ""; // Name of Variable with out key in uppercase + std::string keyUC = ""; // Name of key only witht out variable in uppercase + + Constant::Units units = Constant::Units::Invalid; // Units for Variable + std::string unitNameCustomEMS; // name of units when customEMS is used for EMS variables that are unusual + + std::vector meterNums; // Meter Numbers + + virtual ~OutVar(){}; + + std::string multiplierString() const; + }; + + struct OutVarReal : public OutVar + { + Real64 *Which = nullptr; // Pointer to the actual variable holding the value + Real64 MaxValue = -9999.0; // Maximum reporting (only for Averaged variables, and those greater than Time Step) + Real64 MinValue = 9999.0; // Minimum reporting (only for Averaged variables, and those greater than Time Step) + + OutVarReal() { + varType = VariableType::Real; } }; - struct IntegerVariables + struct OutVarInt : public OutVar { // Members int *Which = nullptr; // The POINTER to the actual variable holding the value - Real64 Value; // Current Value of the variable (to resolution of Zone Time Step) - Real64 TSValue; // Value of this variable at the Zone Time Step - Real64 EITSValue; // Value of this variable at the Zone Time Step for external interface - Real64 StoreValue; // At end of Zone Time Step, value is placed here for later reporting - Real64 NumStored; // Number of hours stored - StoreType storeType; // Variable Type (Summed/Non-Static or Average/Static) - bool Stored; // True when value is stored - bool Report; // User has requested reporting of this variable in the IDF - bool tsStored; // if stored for this zone timestep - bool thisTSStored; // if stored for this zone timestep - int thisTSCount; - ReportingFrequency frequency; // How often to report this variable - int MaxValue; // Maximum reporting (only for Averaged variables, and those greater than Time Step) - int maxValueDate; // Date stamp of maximum - int MinValue; // Minimum reporting (only for Averaged variables, and those greater than Time Step) - int minValueDate; // Date stamp of minimum - int ReportID; // Report variable ID number - std::string ReportIDChr; // Report variable ID number (character -- for printing) - int SchedPtr; // If scheduled, this points to the schedule - - // Default Constructor - IntegerVariables() - : Value(0.0), TSValue(0.0), EITSValue(0.0), StoreValue(0.0), NumStored(0.0), storeType(StoreType::Averaged), Stored(false), Report(false), - tsStored(false), thisTSStored(false), thisTSCount(0), frequency(ReportingFrequency::Hourly), MaxValue(-9999), maxValueDate(0), - MinValue(9999), minValueDate(0), ReportID(0), SchedPtr(0) + int MaxValue = -9999; // Maximum reporting (only for Averaged variables, and those greater than Time Step) + int MinValue = 9999; // Minimum reporting (only for Averaged variables, and those greater than Time Step) + + OutVarInt() { + varType = VariableType::Integer; } }; - struct VariableTypeForDDOutput + struct DDOutVar { // Members - TimeStepType timeStepType; // Type whether Zone or HVAC - StoreType storeType; // Variable Type (Summed/Non-Static or Average/Static) - VariableType variableType; // Integer, Real. - int Next; // Next variable of same name (different units) - bool ReportedOnDDFile; // true after written to .rdd/.mdd file - std::string VarNameOnly; // Name of Variable - OutputProcessor::Unit units; // Units for Variable - std::string unitNameCustomEMS; // name of units when customEMS is used for EMS variables that are unusual - - // Default Constructor - VariableTypeForDDOutput() - : timeStepType(TimeStepType::Zone), storeType(StoreType::Averaged), variableType(VariableType::NotFound), Next(0), - ReportedOnDDFile(false), units(OutputProcessor::Unit::None) - { - } + std::string name = ""; // Name of Variable + TimeStepType timeStepType = TimeStepType::Invalid; // Type whether Zone or HVAC + StoreType storeType = StoreType::Invalid; // Variable Type (Summed/Non-Static or Average/Static) + VariableType variableType = VariableType::Invalid; // Integer, Real. + int Next = -1; // Next variable of same name (different units) + bool ReportedOnDDFile = false; // true after written to .rdd/.mdd file + Constant::Units units = Constant::Units::Invalid; // Units for Variable + std::string unitNameCustomEMS = ""; // name of units when customEMS is used for EMS variables that are unusual + + std::vector keyOutVarNums; }; - struct RealVariableType + struct ReqVar // Structure for requested Report Variables { // Members - TimeStepType timeStepType; // Type whether Zone or HVAC - StoreType storeType; // Variable Type (Summed/Non-Static or Average/Static) - int ReportID; // Report variable ID number - std::string VarName; // Name of Variable key:variable - std::string VarNameUC; // Name of Variable (Uppercase) - std::string VarNameOnly; // Name of Variable - std::string VarNameOnlyUC; // Name of Variable with out key in uppercase - std::string KeyNameOnlyUC; // Name of key only witht out variable in uppercase - OutputProcessor::Unit units; // Units for Variable - std::string unitNameCustomEMS; // name of units when customEMS is used for EMS variables that are unusual - RealVariables VarPtr; // Pointer used to real Variables structure - - // Default Constructor - RealVariableType() : timeStepType(TimeStepType::Zone), storeType(StoreType::Averaged), ReportID(0), units(OutputProcessor::Unit::None) - { - } + std::string key = ""; // Could be blank or "*" + std::string name = ""; // Name of Variable + ReportFreq freq = ReportFreq::Hour; // Reporting Frequency + int SchedPtr = 0; // Index of the Schedule + std::string SchedName = ""; // Schedule Name + bool Used = false; // True when this combination (key, varname, frequency) has been set + + bool is_simple_string = true; // Whether the Key potentially includes a Regular Expression pattern + std::shared_ptr case_insensitive_pattern = nullptr; }; - struct IntegerVariableType + struct MeterPeriod { - // Members - TimeStepType timeStepType; // Type whether Zone or HVAC - StoreType storeType; // Variable Type (Summed/Non-Static or Average/Static) - int ReportID; // Report variable ID number - std::string VarName; // Name of Variable - std::string VarNameUC; // Name of Variable - std::string VarNameOnly; // Name of Variable - std::string VarNameOnlyUC; // Name of Variable with out key in uppercase - std::string KeyNameOnlyUC; // Name of key only witht out variable in uppercase - OutputProcessor::Unit units; // Units for Variable - IntegerVariables VarPtr; // Pointer used to integer Variables structure - - // Default Constructor - IntegerVariableType() : timeStepType(TimeStepType::Zone), storeType(StoreType::Averaged), ReportID(0), units(OutputProcessor::Unit::None) + Real64 Value = 0.0; // Daily Value + Real64 MaxVal = MaxSetValue; // Maximum Value + int MaxValDate = -1; // Date stamp of maximum + Real64 MinVal = MinSetValue; // Minimum Value + int MinValDate = -1; // Date stamp of minimum + + bool Rpt = false; // Report at End of Day + bool RptFO = false; // Report at End of Day -- meter file only + int RptNum = 0; // Report Number + bool accRpt = false; + bool accRptFO = false; + int accRptNum = 0; + + void resetVals() { + Value = 0.0; + MaxVal = MaxSetValue; + MaxValDate = 0; + MinVal = MinSetValue; + MinValDate = 0; } }; - struct ReqReportVariables // Structure for requested Report Variables + struct Meter { // Members - std::string Key; // Could be blank or "*" - std::string VarName; // Name of Variable - ReportingFrequency frequency; // Reporting Frequency - int SchedPtr; // Index of the Schedule - std::string SchedName; // Schedule Name - bool Used; // True when this combination (key, varname, frequency) has been set - - bool is_simple_string; // Whether the Key potentially includes a Regular Expression pattern - std::shared_ptr case_insensitive_pattern; - - // Default Constructor - ReqReportVariables() - : frequency(ReportingFrequency::Hourly), SchedPtr(0), Used(false), is_simple_string(true), case_insensitive_pattern(nullptr) + std::string Name = ""; // Name of the meter + MeterType type = MeterType::Invalid; // type of meter + Constant::eResource resource = Constant::eResource::Invalid; // Resource Type of the meter + SOVEndUseCat sovEndUseCat = SOVEndUseCat::Invalid; // End Use of the meter + std::string EndUseSub = ""; // End Use subcategory of the meter + SOVGroup sovGroup = SOVGroup::Invalid; // Group of the meter + Constant::Units units = Constant::Units::Invalid; // Units for the Meter + RT_IPUnits RT_forIPUnits; // Resource type number for IP Units (tabular) reporting + + Real64 CurTSValue = 0.0; // Current TimeStep Value (internal access) + + std::array periods; + + MeterPeriod periodLastSM; + MeterPeriod periodFinYrSM; + + std::vector dstMeterNums; // Destination meters for custom meters + + int decMeterNum = -1; // for custom decrement meters, the number of the meter being subtracted from + std::vector srcVarNums; // Source variables for custom meters + std::vector srcMeterNums; // Source meters for custom meters + + Meter(std::string_view name) { + Name = std::string(name); } }; - struct MeterArrayType + struct MeteredVar { - // Members - int NumOnMeters; // Number of OnMeter Entries for variable - int RepVariable; // Backwards pointer to real Variable - Array1D_int OnMeters; // Forward pointer to Meter Numbers - int NumOnCustomMeters; // Number of OnCustomMeter Entries for variable - Array1D_int OnCustomMeters; // Forward pointer to Custom Meter Numbers - - // Default Constructor - MeterArrayType() : NumOnMeters(0), RepVariable(0), OnMeters(10, 0), NumOnCustomMeters(0) - { - } + int num = -1; + std::string name = ""; + Constant::eResource resource = Constant::eResource::Invalid; + Constant::Units units = Constant::Units::Invalid; + VariableType varType = VariableType::Invalid; + TimeStepType timeStepType = TimeStepType::Invalid; + SOVEndUseCat sovEndUseCat = SOVEndUseCat::Invalid; + SOVGroup sovGroup = SOVGroup::Invalid; + int rptNum = -1; }; - struct MeterType + struct MeterData : MeteredVar { - // Members - std::string Name; // Name of the meter - std::string ResourceType; // Resource Type of the meter - std::string EndUse; // End Use of the meter - std::string EndUseSub; // End Use subcategory of the meter - std::string Group; // Group of the meter - OutputProcessor::Unit Units; // Units for the Meter - OutputProcessor::RT_IPUnits RT_forIPUnits; // Resource type number for IP Units (tabular) reporting - MtrType TypeOfMeter; // type of meter - int SourceMeter; // for custom decrement meters, this is the meter number for the subtraction - - Real64 TSValue; // TimeStep Value - Real64 CurTSValue; // Current TimeStep Value (internal access) - bool RptTS; // Report at End of TimeStep (Zone) - bool RptTSFO; // Report at End of TimeStep (Zone) -- meter file only - int TSRptNum; // Report Number for TS Values - std::string TSRptNumChr; // Report Number for TS Values (character -- for printing) - - Real64 HRValue; // Hourly Value - bool RptHR; // Report at End of Hour - bool RptHRFO; // Report at End of Hour -- meter file only - int HRRptNum; // Report Number for HR Values - std::string HRRptNumChr; // Report Number for HR Values (character -- for printing) - - Real64 DYValue; // Daily Value - bool RptDY; // Report at End of Day - bool RptDYFO; // Report at End of Day -- meter file only - Real64 DYMaxVal; // Maximum Value (Day) - int DYMaxValDate; // Date stamp of maximum - Real64 DYMinVal; // Minimum Value (Day) - int DYMinValDate; // Date stamp of minimum - int DYRptNum; // Report Number for DY Values - std::string DYRptNumChr; // Report Number for DY Values (character -- for printing) - - Real64 MNValue; // Monthly Value - bool RptMN; // Report at End of Month - bool RptMNFO; // Report at End of Month -- meter file only - Real64 MNMaxVal; // Maximum Value (Month) - int MNMaxValDate; // Date stamp of maximum - Real64 MNMinVal; // Minimum Value (Month) - int MNMinValDate; // Date stamp of minimum - int MNRptNum; // Report Number for MN Values - std::string MNRptNumChr; // Report Number for MN Values (character -- for printing) - - Real64 YRValue; // Yearly Value - bool RptYR; // Report at End of Year - bool RptYRFO; // Report at End of Year - Real64 YRMaxVal; // Maximum Value (Yearly) - int YRMaxValDate; // Date stamp of maximum - Real64 YRMinVal; // Minimum Value (Yearly) - int YRMinValDate; // Date stamp of minimum - int YRRptNum; // Report Number for YR Values - std::string YRRptNumChr; // Report Number for YR Values (character -- for printing) - - Real64 SMValue; // Simulation Value - bool RptSM; // Report at End of Environment/Simulation - bool RptSMFO; // Report at End of Environment/Simulation -- meter file only - Real64 SMMaxVal; // Maximum Value (Sim) - int SMMaxValDate; // Date stamp of maximum - Real64 SMMinVal; // Minimum Value (Sim) - int SMMinValDate; // Date stamp of minimum - int SMRptNum; // Report Number for SM Values - std::string SMRptNumChr; // Report Number for SM Values (character -- for printing) - - Real64 LastSMValue; // Simulation Value - Real64 LastSMMaxVal; // Maximum Value (Sim) - int LastSMMaxValDate; // Date stamp of maximum - Real64 LastSMMinVal; // Minimum Value (Sim) - int LastSMMinValDate; // Date stamp of minimum - Real64 FinYrSMValue; // Final Year Simulation Value - Real64 FinYrSMMaxVal; // Maximum Value (Sim) - int FinYrSMMaxValDate; // Date stamp of maximum - Real64 FinYrSMMinVal; // Minimum Value (Sim) - int FinYrSMMinValDate; // Date stamp of minimum - bool RptAccTS; // Report Cumulative Meter at Time Step - bool RptAccTSFO; // Report Cumulative Meter at Time Step -- meter file only - bool RptAccHR; // Report Cumulative Meter at Hour - bool RptAccHRFO; // Report Cumulative Meter at Hour -- meter file only - bool RptAccDY; // Report Cumulative Meter at Day - bool RptAccDYFO; // Report Cumulative Meter at Day -- meter file only - bool RptAccMN; // Report Cumulative Meter at Month - bool RptAccMNFO; // Report Cumulative Meter at Month -- meter file only - bool RptAccYR; // Report Cumulative Meter at Year - bool RptAccYRFO; // Report Cumulative Meter at Year -- meter file only - bool RptAccSM; // Report Cumulative Meter at Run Period - bool RptAccSMFO; // Report Cumulative Meter at Run Period -- meter file only - int TSAccRptNum; // Report Number for Acc Values - int HRAccRptNum; // Report Number for Acc Values - int DYAccRptNum; // Report Number for Acc Values - int MNAccRptNum; // Report Number for Acc Values - int YRAccRptNum; // Report Number for Acc Values - int SMAccRptNum; // Report Number for Acc Values - int InstMeterCacheStart; // index of the beginning of the instant meter cache - int InstMeterCacheEnd; // index of the end of the instant meter cache - - // Default Constructor - MeterType() - : Units(OutputProcessor::Unit::None), RT_forIPUnits(OutputProcessor::RT_IPUnits::Invalid), TypeOfMeter(MtrType::Normal), SourceMeter(0), - TSValue(0.0), CurTSValue(0.0), RptTS(false), RptTSFO(false), TSRptNum(0), HRValue(0.0), RptHR(false), RptHRFO(false), HRRptNum(0), - DYValue(0.0), RptDY(false), RptDYFO(false), DYMaxVal(-99999.0), DYMaxValDate(0), DYMinVal(99999.0), DYMinValDate(0), DYRptNum(0), - MNValue(0.0), RptMN(false), RptMNFO(false), MNMaxVal(-99999.0), MNMaxValDate(0), MNMinVal(99999.0), MNMinValDate(0), MNRptNum(0), - YRValue(0.0), RptYR(false), RptYRFO(false), YRMaxVal(-99999.0), YRMaxValDate(0), YRMinVal(99999.0), YRMinValDate(0), YRRptNum(0), - SMValue(0.0), RptSM(false), RptSMFO(false), SMMaxVal(-99999.0), SMMaxValDate(0), SMMinVal(99999.0), SMMinValDate(0), SMRptNum(0), - LastSMValue(0.0), LastSMMaxVal(-99999.0), LastSMMaxValDate(0), LastSMMinVal(99999.0), LastSMMinValDate(0), FinYrSMValue(0.0), - FinYrSMMaxVal(-99999.0), FinYrSMMaxValDate(0), FinYrSMMinVal(99999.0), FinYrSMMinValDate(0), RptAccTS(false), RptAccTSFO(false), - RptAccHR(false), RptAccHRFO(false), RptAccDY(false), RptAccDYFO(false), RptAccMN(false), RptAccMNFO(false), RptAccYR(false), - RptAccYRFO(false), RptAccSM(false), RptAccSMFO(false), TSAccRptNum(0), HRAccRptNum(0), DYAccRptNum(0), MNAccRptNum(0), YRAccRptNum(0), - SMAccRptNum(0), InstMeterCacheStart(0), InstMeterCacheEnd(0) + Constant::HeatOrCool heatOrCool = Constant::HeatOrCool::NoHeatNoCool; + Real64 curMeterReading = 0.0; + + // C++ doesn't figure this out automatically, so we have to do it ourselves + MeterData &operator=(MeteredVar const &mv) { + MeteredVar::operator=(mv); + return *this; } }; @@ -562,97 +656,49 @@ namespace OutputProcessor { ); void CheckReportVariable(EnergyPlusData &state, - std::string_view const KeyedValue, // Associated Key for this variable - std::string_view const VarName // String Name of variable (without units) - ); + std::string_view const name, // String Name of variable (without units) + std::string const &key, // Associated Key for this variable + std::vector &reqVarNums); void GetReportVariableInput(EnergyPlusData &state); - ReportingFrequency determineFrequency(EnergyPlusData &state, std::string_view const FreqString); - - std::string reportingFrequency(ReportingFrequency reportingInterval); - - void ProduceMinMaxString(std::string &String, // Current value - int DateValue, // Date of min/max - ReportingFrequency ReportFreq // Reporting Frequency - ); - - // TODO: GET RID OF THESE REDIMENSIONS - inline void ReallocateIntegerArray(Array1D_int &Array, - int &ArrayMax, // Current and resultant dimension for Array - int const ArrayInc // increment for redimension - ) - { - Array.redimension(ArrayMax += ArrayInc, 0); - } - - inline void ReallocateRVar(EnergyPlusData &state); + ReportFreq determineFrequency(EnergyPlusData &state, std::string_view const FreqString); - inline void ReallocateIVar(EnergyPlusData &state); - - TimeStepType ValidateTimeStepType(EnergyPlusData &state, - OutputProcessor::SOVTimeStepType TimeStepTypeKey // Index type (Zone, HVAC) for variables + void ProduceMinMaxString(std::string &String, // Current value + int DateValue, // Date of min/max + ReportFreq freq // Reporting Frequency ); - std::string StandardTimeStepTypeKey(TimeStepType timeStepType); - - StoreType validateVariableType(EnergyPlusData &state, OutputProcessor::SOVStoreType VariableTypeKey); - - std::string standardVariableTypeKey(StoreType VariableType); - // ***************************************************************************** // The following routines implement Energy Meters in EnergyPlus. // ***************************************************************************** void GetCustomMeterInput(EnergyPlusData &state, bool &ErrorsFound); - void - GetStandardMeterResourceType(EnergyPlusData &state, std::string &OutResourceType, std::string const &UserInputResourceType, bool &ErrorsFound); - - void AddMeter(EnergyPlusData &state, - std::string const &Name, // Name for the meter - OutputProcessor::Unit MtrUnits, // Units for the meter - std::string const &ResourceType, // ResourceType for the meter - std::string const &EndUse, // EndUse for the meter - std::string const &EndUseSub, // EndUse subcategory for the meter - std::string const &Group // Group for the meter - ); + int AddMeter(EnergyPlusData &state, + std::string const &Name, // Name for the meter + Constant::Units units, // Units for the meter + Constant::eResource resource, // ResourceType for the meter + SOVEndUseCat sovEndUseCat, // EndUse for the meter + std::string_view const EndUseSub, // EndUse subcategory for the meter + SOVGroup sovGroup, // Group for the meter + int outVarNum); void AttachMeters(EnergyPlusData &state, - EnergyPlus::OutputProcessor::Unit MtrUnits, // Units for this meter - std::string &ResourceType, // Electricity, Gas, etc. - std::string &EndUse, // End-use category (Lights, Heating, etc.) - std::string &EndUseSub, // End-use subcategory (user-defined, e.g., General Lights, Task Lights, etc.) - std::string &Group, // Group key (Facility, Zone, Building, etc.) - std::string const &ZoneName, // Zone key only applicable for Building group - std::string const &SpaceTypeName, // Space Type key only applicable for Building group - int RepVarNum, // Number of this report variable - int &MeterArrayPtr, // Output set of Pointers to Meters - bool &ErrorsFound // True if errors in this call + Constant::Units units, // Units for this meter + Constant::eResource resource, // Electricity, Gas, etc. + SOVEndUseCat sovEndUseCat, // End-use category (Lights, Heating, etc.) + std::string_view const EndUseSub, // End-use subcategory (user-defined, e.g., General Lights, Task Lights, etc.) + SOVGroup sovGroup, // Group key (Facility, Zone, Building, etc.) + std::string const &ZoneName, // Zone key only applicable for Building group + std::string const &SpaceTypeName, // Space Type key only applicable for Building group + int RepVarNum // Number of this report variable ); - void AttachCustomMeters(EnergyPlusData &state, - int RepVarNum, // Number of this report variable - int &MeterArrayPtr, // Input/Output set of Pointers to Meters - int MeterIndex // Which meter this is - ); - - void ValidateNStandardizeMeterTitles(EnergyPlusData &state, - OutputProcessor::Unit MtrUnits, // Units for the meter - std::string &ResourceType, // Electricity, Gas, etc. - std::string &EndUse, // End Use Type (Lights, Heating, etc.) - std::string &EndUseSub, // End Use Sub Type (General Lights, Task Lights, etc.) - std::string &Group, // Group key (Facility, Zone, Building, etc.) - bool &ErrorsFound, // True if errors in this call - const std::string &ZoneName, // Zone Name when Group=Building - const std::string &SpaceType // Space Type when Group=Building - ); - - void DetermineMeterIPUnits(EnergyPlusData &state, - OutputProcessor::RT_IPUnits &CodeForIPUnits, // Output Code for IP Units - std::string const &ResourceType, // Resource Type - OutputProcessor::Unit MtrUnits, // Meter units - bool &ErrorsFound // true if errors found during subroutine + OutputProcessor::RT_IPUnits GetResourceIPUnits(EnergyPlusData &state, + Constant::eResource resource, // Resource Type + Constant::Units units, // Meter units + bool &ErrorsFound // true if errors found during subroutine ); void UpdateMeters(EnergyPlusData &state, int TimeStamp); // Current TimeStamp (for max/min) @@ -664,20 +710,9 @@ namespace OutputProcessor { bool PrintTimeStampToSQL // Print Time Stamp to SQL file ); - void ReportHRMeters(EnergyPlusData &state, bool PrintTimeStampToSQL // Print Time Stamp to SQL file - ); - - void ReportDYMeters(EnergyPlusData &state, bool PrintTimeStampToSQL // Print Time Stamp to SQL file + void ReportMeters(EnergyPlusData &state, ReportFreq freq, bool PrintTimeStampToSQL // Print Time Stamp to SQL file ); - void ReportMNMeters(EnergyPlusData &state, bool PrintTimeStampToSQL // Print Time Stamp to SQL file - ); - - void ReportSMMeters(EnergyPlusData &state, bool PrintTimeStampToSQL // Print Time Stamp to SQL file - ); - - void ReportYRMeters(EnergyPlusData &state, bool PrintTimeStampToSQL); - void ReportForTabularReports(EnergyPlusData &state); std::string DateToStringWithMonth(int codedDate); // word containing encoded month, day, hour, minute @@ -688,128 +723,115 @@ namespace OutputProcessor { // End of routines for Energy Meters implementation in EnergyPlus. // ***************************************************************************** - void addEndUseSubcategory(EnergyPlusData &state, std::string const &EndUseName, std::string const &EndUseSubName); - - void addEndUseSpaceType(EnergyPlusData &state, std::string const &EndUseName, std::string const &EndUseSpTypeName); - void WriteTimeStampFormatData(EnergyPlusData &state, InputOutputFile &outputFile, - ReportingFrequency reportingInterval, // Reporting frequency. - int reportID, // The ID of the time stamp - std::string const &reportIDString, // The ID of the time stamp - std::string const &DayOfSimChr, // the number of days simulated so far - bool writeToSQL, // write to SQLite - ObjexxFCL::Optional_int_const Month = _, // the month of the reporting interval - ObjexxFCL::Optional_int_const DayOfMonth = _, // The day of the reporting interval - ObjexxFCL::Optional_int_const Hour = _, // The hour of the reporting interval - ObjexxFCL::Optional EndMinute = _, // The last minute in the reporting interval - ObjexxFCL::Optional StartMinute = _, // The starting minute of the reporting interval - ObjexxFCL::Optional_int_const DST = _, // A flag indicating whether daylight savings time is observed - ObjexxFCL::Optional_string_const DayType = _ // The day tied for the data (e.g., Monday) + ReportFreq freq, // Reporting frequency. + int reportID, // The ID of the time stamp + std::string const &DayOfSimChr, // the number of days simulated so far + bool writeToSQL, // write to SQLite + int const Month = -1, // the month of the reporting interval + int const DayOfMonth = -1, // The day of the reporting interval + int const Hour = -1, // The hour of the reporting interval + Real64 const EndMinute = -1.0, // The last minute in the reporting interval + Real64 const StartMinute = -1.0, // The starting minute of the reporting interval + int const DST = -1, // A flag indicating whether daylight savings time is observed + std::string_view const DayType = "" // The day tied for the data (e.g., Monday) ); void WriteYearlyTimeStamp(EnergyPlusData &state, InputOutputFile &outputFile, - std::string const &reportIDString, // The ID of the time stamp - std::string const &yearOfSimChr, // the year of the simulation + int reportID, + std::string const &yearOfSimChr, // the year of the simulation bool writeToSQL); void WriteReportVariableDictionaryItem(EnergyPlusData &state, - ReportingFrequency reportingInterval, // The reporting interval (e.g., hourly, daily) + ReportFreq freq, // The reporting interval (e.g., hourly, daily) StoreType storeType, int reportID, // The reporting ID for the data int indexGroupKey, // The reporting group (e.g., Zone, Plant Loop, etc.) std::string const &indexGroup, // The reporting group (e.g., Zone, Plant Loop, etc.) - std::string const &reportIDChr, // The reporting ID for the data std::string_view const keyedValue, // The key name for the data std::string_view const variableName, // The variable's actual name TimeStepType timeStepType, - OutputProcessor::Unit unitsForVar, // The variables units - ObjexxFCL::Optional_string_const customUnitName = _, + Constant::Units units, // The variables units + std::string_view const customUnitName = {}, std::string_view const ScheduleName = {}); void WriteMeterDictionaryItem(EnergyPlusData &state, - ReportingFrequency reportingInterval, // The reporting interval (e.g., hourly, daily) + ReportFreq freq, // The reporting interval (e.g., hourly, daily) StoreType storeType, - int reportID, // The reporting ID in for the variable - int indexGroupKey, // The reporting group for the variable - std::string const &indexGroup, // The reporting group for the variable - std::string const &reportIDChr, // The reporting ID in for the variable - std::string const &meterName, // The variable's meter name - OutputProcessor::Unit unit, // The variables units - bool cumulativeMeterFlag, // A flag indicating cumulative data - bool meterFileOnlyFlag // A flag indicating whether the data is to be written to standard output + int reportID, // The reporting ID in for the variable + int indexGroupKey, // The reporting group for the variable + std::string const &indexGroup, // The reporting group for the variable + std::string const &meterName, // The variable's meter name + Constant::Units unit, // The variables units + bool cumulativeMeterFlag, // A flag indicating cumulative data + bool meterFileOnlyFlag // A flag indicating whether the data is to be written to standard output ); void WriteRealVariableOutput(EnergyPlusData &state, - RealVariables &realVar, // Real variable to write out - ReportingFrequency reportType // The report type or interval (e.g., hourly) + OutVarReal *realVar, // Real variable to write out + ReportFreq freq // The report type or interval (e.g., hourly) ); void WriteReportRealData(EnergyPlusData &state, int reportID, - std::string const &creportID, Real64 repValue, StoreType storeType, Real64 numOfItemsStored, - ReportingFrequency reportingInterval, + ReportFreq freq, Real64 minValue, int minValueDate, Real64 MaxValue, int maxValueDate); void WriteCumulativeReportMeterData(EnergyPlusData &state, - int reportID, // The variable's report ID - std::string const &creportID, // variable ID in characters - Real64 repValue, // The variable's value - bool meterOnlyFlag // A flag that indicates if the data should be written to standard output + int reportID, // The variable's report ID + Real64 repValue, // The variable's value + bool meterOnlyFlag // A flag that indicates if the data should be written to standard output ); void WriteReportMeterData(EnergyPlusData &state, - int reportID, // The variable's report ID - std::string const &creportID, // variable ID in characters - Real64 repValue, // The variable's value - ReportingFrequency reportingInterval, // The variable's reporting interval (e.g., hourly) - Real64 minValue, // The variable's minimum value during the reporting interval - int minValueDate, // The date the minimum value occurred - Real64 MaxValue, // The variable's maximum value during the reporting interval - int maxValueDate, // The date of the maximum value - bool meterOnlyFlag // Indicates whether the data is for the meter file only + int reportID, // The variable's report ID + Real64 repValue, // The variable's value + ReportFreq freq, // The variable's reporting interval (e.g., hourly) + Real64 minValue, // The variable's minimum value during the reporting interval + int minValueDate, // The date the minimum value occurred + Real64 MaxValue, // The variable's maximum value during the reporting interval + int maxValueDate, // The date of the maximum value + bool meterOnlyFlag // Indicates whether the data is for the meter file only ); void WriteNumericData(EnergyPlusData &state, - int reportID, // The variable's reporting ID - std::string const &creportID, // variable ID in characters - Real64 repValue // The variable's value + int reportID, // The variable's reporting ID + Real64 repValue // The variable's value ); void WriteNumericData(EnergyPlusData &state, - int reportID, // The variable's reporting ID - std::string const &creportID, // variable ID in characters - int32_t repValue // The variable's value + int reportID, // The variable's reporting ID + int32_t repValue // The variable's value ); void WriteIntegerVariableOutput(EnergyPlusData &state, - IntegerVariables &intVar, // Integer variable to write out - ReportingFrequency reportType // The report type (i.e., the reporting interval) + OutVarInt *intVar, // Integer variable to write out + ReportFreq freq // The report type (i.e., the reporting interval) ); void WriteReportIntegerData(EnergyPlusData &state, - int reportID, // The variable's reporting ID - std::string const &reportIDString, // The variable's reporting ID (character) - Real64 repValue, // The variable's value - StoreType storeType, // Type of item (averaged or summed) - Real64 numOfItemsStored, // The number of items (hours or timesteps) of data stored - ReportingFrequency reportingInterval, // The reporting interval (e.g., monthly) - int minValue, // The variable's minimum value during the reporting interval - int minValueDate, // The date the minimum value occurred - int MaxValue, // The variable's maximum value during the reporting interval - int maxValueDate // The date the maximum value occurred + int reportID, // The variable's reporting ID + Real64 repValue, // The variable's value + StoreType storeType, // Type of item (averaged or summed) + Real64 numOfItemsStored, // The number of items (hours or timesteps) of data stored + ReportFreq freq, // The reporting interval (e.g., monthly) + int minValue, // The variable's minimum value during the reporting interval + int minValueDate, // The date the minimum value occurred + int MaxValue, // The variable's maximum value during the reporting interval + int maxValueDate // The date the maximum value occurred ); int DetermineIndexGroupKeyFromMeterName(EnergyPlusData &state, std::string const &meterName); // the meter name - std::string DetermineIndexGroupFromMeterGroup(MeterType const &meter); // the meter + std::string DetermineIndexGroupFromMeterGroup(Meter const *meter); // the meter void SetInternalVariableValue(EnergyPlusData &state, OutputProcessor::VariableType varType, // 1=integer, 2=real, 3=meter @@ -818,12 +840,6 @@ namespace OutputProcessor { int SetIntVal // integer value to set if type is integer ); - std::string unitEnumToStringBrackets(EnergyPlus::OutputProcessor::Unit unitIn); - - std::string unitEnumToString(OutputProcessor::Unit unitIn); - - OutputProcessor::Unit unitStringToEnum(std::string const &unitIn); - std::string unitStringFromDDitem(EnergyPlusData &state, int ddItemPtr // index provided for DDVariableTypes ); @@ -833,6 +849,9 @@ namespace OutputProcessor { std::string varKey; }; + std::string standardizeEndUseSub(SOVEndUseCat sovEndUseCat, std::string_view const endUseSub); + void addEndUseSubcategory(EnergyPlusData &state, SOVEndUseCat sovEndUseCat, std::string_view const endUseSubName); + void addEndUseSpaceType(EnergyPlusData &state, SOVEndUseCat sovEndUseCat, std::string_view const endUseSpTypeName); } // namespace OutputProcessor //============================================================================================== @@ -843,344 +862,54 @@ namespace OutputProcessor { // within the OutputProcessor. // ***************************************************************************** -enum class ReportFreqSOV -{ - EachCall = -1, // Write out each time UpdatedataandReport is called - Empty, - TimeStep, // Write out at 'EndTimeStepFlag' - Hourly, // Write out at 'EndHourFlag' - Daily, // Write out at 'EndDayFlag' - Monthly, // Write out at end of month (must be determined) - Simulation, // Write out once per environment 'EndEnvrnFlag' - Yearly, // Write out at 'EndYearFlag' - Num -}; -static constexpr std::array ReporFreqSOVNames = { - "", "TIMESTEP", "HOURLY", "DAILY", "MONTHLY", "SIMULATION", "YEARLY"}; - -enum class eResourceSOV -{ - Invalid = -1, - Empty, - Electricity, - NaturalGas, - Gasoline, - Diesel, - Coal, - Propane, - FuelOilNo1, - FuelOilNo2, - OtherFuel1, - OtherFuel2, - DistrictCooling, - DistrictHeatingWater, - DistrictHeatingSteam, - Water, - None, // used for OtherEquipment object - EnergyTransfer, - ElectricityProduced, - ElectricityPurchased, - ElectricitySurplusSold, - ElectricityNet, - SolarWater, - SolarAir, - CarbonEquivalent, - PlantLoopHeatingDemand, - PlantLoopCoolingDemand, - OnSiteWater, - MainsWater, - RainWater, - WellWater, - Condensate, - WaterEnvironmentalFactors, - Source, - Generic, // only used by custom meters - SO2, - NOx, - N2O, - PM, - PM2_5, - PM10, - CO, - CO2, - CH4, - NH3, - NMVOC, - Hg, - Pb, - NuclearHigh, - NuclearLow, - Num -}; -static constexpr std::array(eResourceSOV::Num)> eResourceSOVNames = {"", - "Electricity", - "NaturalGas", - "Gasoline", - "Diesel", - "Coal", - "Propane", - "FuelOilNo1", - "FuelOilNo2", - "OtherFuel1", - "OtherFuel2", - "DistrictCooling", - "DistrictHeatingWater", - "DistrictHeatingSteam", - "Water", - "None", - "EnergyTransfer", - "ElectricityProduced", - "ElectricityPurchased", - "ElectricitySurplusSold", - "ElectricityNet", - "SolarWater", - "SolarAir", - "Carbon Equivalent", - "PlantLoopHeatingDemand", - "PlantLoopCoolingDemand", - "OnSiteWater", - "MainsWater", - "RainWater", - "WellWater", - "Condensate", - "WaterEnvironmentalFactors", - "Source", - "Generic", - "SO2", - "NOx", - "N2O", - "PM", - "PM2.5", - "PM10", - "CO", - "CO2", - "CH4", - "NH3", - "NMVOC", - "Hg", - "Pb", - "Nuclear High", - "Nuclear Low"}; - -enum class EndUseCatSOV -{ - Invalid = -1, - Empty, - Heating, - Cooling, - InteriorLights, - ExteriorLights, - InteriorEquipment, - ExteriorEquipment, - Fans, - Pumps, - HeatRejection, - Humidification, - HeatRecovery, - WaterSystem, - Refrigeration, - Cogeneration, - Baseboard, - Boilers, - CarbonEquivalentEmissions, - Chillers, - CoalEmissions, - ColdStorageCharge, - ColdStorageDischarge, - Condensate, - CoolingCoils, - CoolingPanel, - DieselEmissions, - DistrictChilledWater, - DistrictHotWater, - ElectricityEmissions, - ElectricStorage, - Freecooling, - FuelOilNo1Emissions, - FuelOilNo2Emissions, - GasolineEmissions, - HeatingCoils, - HeatProduced, - HeatRecoveryForCooling, - HeatRecoveryForHeating, - LoopToLoop, - MainsWater, - NaturalGasEmissions, - OtherFuel1Emissions, - OtherFuel2Emissions, - Photovoltaic, - PowerConversion, - PropaneEmissions, - PurchasedElectricityEmissions, - Rainwater, - SoldElectricityEmissions, - Wellwater, - WindTurbine, - Num -}; -static constexpr std::array endUseCatSOVNames = { - "", - "HEATING", - "COOLING", - "INTERIORLIGHTS", - "EXTERIORLIGHTS", - "INTERIOREQUIPMENT", - "EXTERIOREQUIPMENT", - "FANS", - "PUMPS", - "HEATREJECTION", - "HUMIDIFIER", - "HEATRECOVERY", - "WATERSYSTEMS", - "REFRIGERATION", - "COGENERATION", - "BASEBOARD", - "BOILERS", - "CARBONEQUIVALENTEMISSIONS", - "CHILLERS", - "COALEMISSIONS", - "COLDSTORAGECHARGE", - "COLDSTORAGEDISCHARGE", - "CONDENSATE", - "COOLINGCOILS", - "COOLINGPANEL", - "DIESELEMISSIONS", - "DISTRICTCHILLEDWATER", - "DISTRICTHOTWATER", - "ELECTRICITYEMISSIONS", - "ELECTRICSTORAGE", - "FREECOOLING", - "FUELOILNO1EMISSIONS", - "FUELOILNO2EMISSIONS", - "GASOLINEEMISSIONS", - "HEATINGCOILS", - "HEATPRODUCED", - "HEATRECOVERYFORCOOLING", - "HEATRECOVERYFORHEATING", - "LOOPTOLOOP", - "MAINSWATER", - "NATURALGASEMISSIONS", - "OTHERFUEL1EMISSIONS", - "OTHERFUEL2EMISSIONS", - "PHOTOVOLTAIC", - "POWERCONVERSION", - "PROPANEEMISSIONS", - "PURCHASEDELECTRICITYEMISSIONS", - "RAINWATER", - "SOLDELECTRICITYEMISSIONS", - "WELLWATER", - "WINDTURBINE", -}; - -enum class GroupSOV -{ - Invalid = -1, - Empty, - Building, - HVAC, - Plant, - Num -}; -static constexpr std::array GroupSOVNames = {"", "Building", "HVAC", "Plant"}; - -void SetupOutputVariable(EnergyPlusData &state, - std::string_view const VariableName, // String Name of variable (with units) - OutputProcessor::Unit VariableUnit, // Actual units corresponding to the actual variable - Real64 &ActualVariable, // Actual Variable, used to set up pointer - OutputProcessor::SOVTimeStepType TimeStepTypeKey, // Zone, HeatBalance=1, HVAC, System, Plant=2 - OutputProcessor::SOVStoreType VariableTypeKey, // State, Average=1, NonState, Sum=2 - std::string_view const KeyedValue // Associated Key for this variable -); - -void SetupOutputVariable(EnergyPlusData &state, - std::string_view const VariableName, // String Name of variable (with units) - OutputProcessor::Unit VariableUnit, // Actual units corresponding to the actual variable - Real64 &ActualVariable, // Actual Variable, used to set up pointer - OutputProcessor::SOVTimeStepType TimeStepTypeKey, // Zone, HeatBalance=1, HVAC, System, Plant=2 - OutputProcessor::SOVStoreType VariableTypeKey, // State, Average=1, NonState, Sum=2 - std::string_view const KeyedValue, // Associated Key for this variable - ReportFreqSOV ReportFreq, // Internal use -- causes reporting at this freqency - eResourceSOV ResourceTypeKey = eResourceSOV::Empty, // Meter Resource Type (Electricity, Gas, etc) - EndUseCatSOV EndUseKey = EndUseCatSOV::Empty, // Meter End Use Key (Lights, Heating, Cooling, etc) - std::string_view const EndUseSubKey = {}, // Meter End Use Sub Key (General Lights, Task Lights, etc) - GroupSOV GroupKey = GroupSOV::Empty, // Meter Super Group Key (Building, System, Plant) - std::string_view const ZoneKey = {}, // Meter Zone Key (zone name) - int const ZoneMult = 1, // Zone Multiplier, defaults to 1 - int const ZoneListMult = 1, // Zone List Multiplier, defaults to 1 - int const indexGroupKey = -999, // Group identifier for SQL output - std::string_view const customUnitName = {}, // the custom name for the units from EMS definition of units - std::string_view const SpaceType = {} // Space type (applicable for Building group only) -); - -void SetupOutputVariable(EnergyPlusData &state, - std::string_view const VariableName, // String Name of variable (with units) - OutputProcessor::Unit VariableUnit, // Actual units corresponding to the actual variable - Real64 &ActualVariable, // Actual Variable, used to set up pointer - OutputProcessor::SOVTimeStepType TimeStepTypeKey, // Zone, HeatBalance=1, HVAC, System, Plant=2 - OutputProcessor::SOVStoreType VariableTypeKey, // State, Average=1, NonState, Sum=2 - std::string_view const KeyedValue, // Associated Key for this variable - std::string_view const ReportFreq, // Internal use -- causes reporting at this freqency - std::string_view const ResourceTypeKey = {}, // Meter Resource Type (Electricity, Gas, etc) - std::string_view const EndUseKey = {}, // Meter End Use Key (Lights, Heating, Cooling, etc) - std::string_view const EndUseSubKey = {}, // Meter End Use Sub Key (General Lights, Task Lights, etc) - std::string_view const GroupKey = {}, // Meter Super Group Key (Building, System, Plant) - std::string_view const ZoneKey = {}, // Meter Zone Key (zone name) - int const ZoneMult = 1, // Zone Multiplier, defaults to 1 - int const ZoneListMult = 1, // Zone List Multiplier, defaults to 1 - int const indexGroupKey = -999, // Group identifier for SQL output - std::string_view const customUnitName = {}, // the custom name for the units from EMS definition of units - std::string_view const SpaceType = {} // Space type (applicable for Building group only) +void SetupOutputVariable( + EnergyPlusData &state, + std::string_view const name, // String Name of variable (with units) + Constant::Units units, // Actual units corresponding to the actual variable + Real64 &ActualVariable, // Actual Variable, used to set up pointer + OutputProcessor::SOVTimeStepType timeStepType, // Zone, HeatBalance=1, HVAC, System, Plant=2 + OutputProcessor::SOVStoreType variableType, // State, Average=1, NonState, Sum=2 + std::string const &key, // Associated Key for this variable + Constant::eResource resource = Constant::eResource::Invalid, // Meter Resource Type (Electricity, Gas, etc) + OutputProcessor::SOVEndUseCat sovEndUseCat = OutputProcessor::SOVEndUseCat::Invalid, // Meter End Use Key (Lights, Heating, etc) + std::string_view const endUseSub = {}, // Meter End Use Sub Key (General Lights, Task Lights, etc) + OutputProcessor::SOVGroup sovGroup = OutputProcessor::SOVGroup::Invalid, // Meter Super Group Key (Building, System, Plant) + std::string const &zone = {}, // Meter Zone Key (zone name) + int const zoneMult = 1, // Zone Multiplier, defaults to 1 + int const zoneListMult = 1, // Zone List Multiplier, defaults to 1 + int const indexGroupKey = -999, // Group identifier for SQL output + std::string_view const customUnitName = {}, // the custom name for the units from EMS definition of units + std::string const &spaceType = {}, // Space type (applicable for Building group only) + OutputProcessor::ReportFreq reportFreq = OutputProcessor::ReportFreq::Hour // Internal use -- causes reporting at this freqency ); void SetupOutputVariable(EnergyPlusData &state, - std::string_view const VariableName, // String Name of variable - OutputProcessor::Unit VariableUnit, // Actual units corresponding to the actual variable - int &ActualVariable, // Actual Variable, used to set up pointer - OutputProcessor::SOVTimeStepType TimeStepTypeKey, // Zone, HeatBalance=1, HVAC, System, Plant=2 - OutputProcessor::SOVStoreType VariableTypeKey, // State, Average=1, NonState, Sum=2 - std::string_view const KeyedValue // Associated Key for this variable -); - -void SetupOutputVariable(EnergyPlusData &state, - std::string_view const VariableName, // String Name of variable - OutputProcessor::Unit VariableUnit, // Actual units corresponding to the actual variable - int &ActualVariable, // Actual Variable, used to set up pointer - OutputProcessor::SOVTimeStepType TimeStepTypeKey, // Zone, HeatBalance=1, HVAC, System, Plant=2 - OutputProcessor::SOVStoreType VariableTypeKey, // State, Average=1, NonState, Sum=2 - std::string_view const KeyedValue, // Associated Key for this variable - OutputProcessor::ReportingFrequency ReportFreq, // Internal use -- causes reporting at this freqency - int const indexGroupKey = -999 // Group identifier for SQL output -); - -void SetupOutputVariable(EnergyPlusData &state, - std::string_view const VariableName, // String Name of variable - OutputProcessor::Unit VariableUnit, // Actual units corresponding to the actual variable - int &ActualVariable, // Actual Variable, used to set up pointer - OutputProcessor::SOVTimeStepType TimeStepTypeKey, // Zone, HeatBalance=1, HVAC, System, Plant=2 - OutputProcessor::SOVStoreType VariableTypeKey, // State, Average=1, NonState, Sum=2 - std::string_view const KeyedValue, // Associated Key for this variable - std::string_view const ReportFreq, // Internal use -- causes reporting at this freqency - int const indexGroupKey = -999 // Group identifier for SQL output + std::string_view const VariableName, // String Name of variable + Constant::Units VariableUnit, // Actual units corresponding to the actual variable + int &ActualVariable, // Actual Variable, used to set up pointer + OutputProcessor::SOVTimeStepType TimeStepTypeKey, // Zone, HeatBalance=1, HVAC, System, Plant=2 + OutputProcessor::SOVStoreType VariableTypeKey, // State, Average=1, NonState, Sum=2 + std::string const &KeyedValue, // Associated Key for this variable + int const indexGroupKey = -999, // Group identifier for SQL output + OutputProcessor::ReportFreq freq = OutputProcessor::ReportFreq::Hour // Internal use -- causes reporting at this freqency ); void UpdateDataandReport(EnergyPlusData &state, OutputProcessor::TimeStepType TimeStepTypeKey); // What kind of data to update (Zone, HVAC) -void AssignReportNumber(EnergyPlusData &state, int &ReportNumber); - void GenOutputVariablesAuditReport(EnergyPlusData &state); void UpdateMeterReporting(EnergyPlusData &state); void SetInitialMeterReportingAndOutputNames(EnergyPlusData &state, - int WhichMeter, // Which meter number - bool MeterFileOnlyIndicator, // true if this is a meter file only reporting - OutputProcessor::ReportingFrequency FrequencyIndicator, // at what frequency is the meter reported - bool CumulativeIndicator // true if this is a Cumulative meter reporting + int WhichMeter, // Which meter number + bool MeterFileOnlyIndicator, // true if this is a meter file only reporting + OutputProcessor::ReportFreq freq, // at what frequency is the meter reported + bool CumulativeIndicator // true if this is a Cumulative meter reporting ); -int GetMeterIndex(EnergyPlusData &state, std::string_view const MeterName); +int GetMeterIndex(EnergyPlusData &state, std::string const &MeterName); -std::string GetMeterResourceType(EnergyPlusData &state, int MeterNumber); // Which Meter Number (from GetMeterIndex) +Constant::eResource GetMeterResourceType(EnergyPlusData &state, int MeterNumber); // Which Meter Number (from GetMeterIndex) Real64 GetCurrentMeterValue(EnergyPlusData &state, int MeterNumber); // Which Meter Number (from GetMeterIndex) @@ -1189,8 +918,6 @@ Real64 GetInstantMeterValue(EnergyPlusData &state, OutputProcessor::TimeStepType TimeStepType // Whether this is zone of HVAC ); -void IncrementInstMeterCache(EnergyPlusData &state); - Real64 GetInternalVariableValue(EnergyPlusData &state, OutputProcessor::VariableType varType, // 1=integer, 2=real, 3=meter int keyVarIndex // Array index @@ -1206,32 +933,9 @@ int GetNumMeteredVariables(EnergyPlusData &state, std::string const &ComponentName // Given Component Name (user defined) ); -void GetMeteredVariables(EnergyPlusData &state, - std::string const &ComponentType, // Given Component Type - std::string const &ComponentName, // Given Component Name (user defined) - Array1D_int &VarIndexes, // Variable Numbers - Array1D &VarTypes, // Variable Types (1=integer, 2=real, 3=meter) - Array1D &TimeStepTypes, // Variable Index Types (1=Zone,2=HVAC), - Array1D &unitsForVar, // units from enum for each variable - Array1D &ResourceTypes, // ResourceTypes for each variable - Array1D_string &EndUses, // EndUses for each variable - Array1D_string &Groups, // Groups for each variable - Array1D_string &Names, // Variable Names for each variable - int &NumFound // Number Found -); - -void GetMeteredVariables(EnergyPlusData &state, - std::string const &ComponentType, // Given Component Type - std::string const &ComponentName, // Given Component Name (user defined) - Array1D_int &VarIndexes, // Variable Numbers - Array1D &VarTypes, // Variable Types (1=integer, 2=real, 3=meter) - Array1D &TimeStepTypes, // Variable Index Types (1=Zone,2=HVAC), - Array1D &unitsForVar, // units from enum for each variable - Array1D &ResourceTypes, // ResourceTypes for each variable - Array1D_string &EndUses, // EndUses for each variable - Array1D_string &Groups, // Groups for each variable - Array1D_string &Names, // Variable Names for each variable - Array1D_int &VarIDs // Variable Report Numbers +int GetMeteredVariables(EnergyPlusData &state, + std::string const &ComponentName, // Given Component Name (user defined) + Array1D &meteredVars // Number Found ); void GetVariableKeyCountandType(EnergyPlusData &state, @@ -1240,87 +944,60 @@ void GetVariableKeyCountandType(EnergyPlusData &state, OutputProcessor::VariableType &varType, OutputProcessor::StoreType &varAvgSum, // Variable is Averaged=1 or Summed=2 OutputProcessor::TimeStepType &varStepType, // Variable time step is Zone=1 or HVAC=2 - OutputProcessor::Unit &varUnits // Units enumeration + Constant::Units &varUnits // Units enumeration ); void GetVariableKeys(EnergyPlusData &state, std::string const &varName, // Standard variable name OutputProcessor::VariableType varType, - Array1D_string &keyNames, // Specific key name - Array1D_int &keyVarIndexes // Array index for + Array1D_string &keyNames, + Array1D_int &keyVarNums // Array index for ); bool ReportingThisVariable(EnergyPlusData &state, std::string const &RepVarName); -void InitPollutionMeterReporting(EnergyPlusData &state, std::string const &ReportFreqName); +void InitPollutionMeterReporting(EnergyPlusData &state, OutputProcessor::ReportFreq freq); void ProduceRDDMDD(EnergyPlusData &state); -void AddToOutputVariableList(EnergyPlusData &state, - std::string_view const VarName, // Variable Name - OutputProcessor::TimeStepType TimeStepType, - OutputProcessor::StoreType StateType, - OutputProcessor::VariableType VariableType, - OutputProcessor::Unit unitsForVar, - std::string_view const customUnitName = {} // the custom name for the units from EMS definition of units +int AddDDOutVar(EnergyPlusData &state, + std::string_view const nameUC, // Variable Name + OutputProcessor::TimeStepType TimeStepType, + OutputProcessor::StoreType StateType, + OutputProcessor::VariableType VariableType, + Constant::Units unitsForVar, + std::string_view const customUnitName = {} // the custom name for the units from EMS definition of units ); int initErrorFile(EnergyPlusData &state); struct OutputProcessorData : BaseGlobalStruct { - - int InstMeterCacheSize = 1000; // the maximum size of the instant meter cache used in GetInstantMeterValue - int InstMeterCacheSizeInc = 1000; // the increment for the instant meter cache used in GetInstantMeterValue - Array1D_int InstMeterCache; // contains a list of RVariableTypes that make up a specific meter - int InstMeterCacheLastUsed = 0; // the last item in the instant meter cache used - int CurrentReportNumber = 0; int NumVariablesForOutput = 0; int MaxVariablesForOutput = 0; - int NumOfRVariable_Setup = 0; int NumTotalRVariable = 0; + int NumOfRVariable = 0; + int NumOfRVariable_Setup = 0; int NumOfRVariable_Sum = 0; int NumOfRVariable_Meter = 0; - int NumOfRVariable = 0; - int MaxRVariable = 0; + int NumOfIVariable = 0; int NumOfIVariable_Setup = 0; int NumTotalIVariable = 0; int NumOfIVariable_Sum = 0; - int NumOfIVariable = 0; - int MaxIVariable = 0; bool OutputInitialized = false; OutputProcessor::ReportVDD ProduceReportVDD = OutputProcessor::ReportVDD::No; int NumHoursInMonth = 0; int NumHoursInSim = 0; - Array1D_int ReportList; - int NumReportList = 0; - int NumExtraVars = 0; - int NumOfReqVariables = 0; // Current number of Requested Report Variables - int NumVarMeterArrays = 0; // Current number of Arrays pointing to meters - int NumEnergyMeters = 0; // Current number of Energy Meters - Array1D MeterValue; // This holds the current timestep value for each meter. - int TimeStepStampReportNbr = 0; // TimeStep and Hourly Report number - std::string TimeStepStampReportChr; // TimeStep and Hourly Report number (character -- for printing) - bool TrackingHourlyVariables = false; // Requested Hourly Report Variables - int DailyStampReportNbr = 0; // Daily Report number - std::string DailyStampReportChr; // Daily Report number (character -- for printing) - bool TrackingDailyVariables = false; // Requested Daily Report Variables - int MonthlyStampReportNbr = 0; // Monthly Report number - std::string MonthlyStampReportChr; // Monthly Report number (character -- for printing) - bool TrackingMonthlyVariables = false; // Requested Monthly Report Variables - int YearlyStampReportNbr = 0; // Yearly Report number - std::string YearlyStampReportChr; // Yearly Report number (character -- for printing) - bool TrackingYearlyVariables = false; // Requested Yearly Report Variables - int RunPeriodStampReportNbr; // RunPeriod Report number - std::string RunPeriodStampReportChr; // RunPeriod Report number (character -- for printing) - bool TrackingRunPeriodVariables = false; // Requested RunPeriod Report Variables - Real64 TimeStepZoneSec = 0; // Seconds from NumTimeStepInHour + std::vector meterValues; // This holds the current timestep value for each meter. + + std::array freqStampReportNums = {-1, -1, -1, -1, -1, -1, -1}; + std::array freqTrackingVariables = {false, false, false, false, false, false, false}; + + Real64 TimeStepZoneSec = 0; // Seconds from NumTimeStepInHour bool ErrorsLogged = false; - int MaxNumSubcategories = 1; - int maxNumEndUseSpaceTypes = 1; bool isFinalYear = false; bool GetOutputInputFlag = true; - OutputProcessor::ReportingFrequency minimumReportFrequency = OutputProcessor::ReportingFrequency::EachCall; + OutputProcessor::ReportFreq minimumReportFreq = OutputProcessor::ReportFreq::EachCall; std::vector apiVarRequests; int ReportNumberCounter = 0; // The report number is used in output reports as a key. int LHourP = -1; // Helps set hours for timestamp output @@ -1328,96 +1005,49 @@ struct OutputProcessorData : BaseGlobalStruct Real64 LEndMin = -1.0; // Helps set minutes for timestamp output bool GetMeterIndexFirstCall = true; // trigger setup in GetMeterIndex bool InitFlag = true; - Array1D_int keyVarIndexes; // Array index for specific key name - int curKeyVarIndexLimit = 0; // current limit for keyVarIndexes - Array1D_string varNames; // stored variable names - Array1D_int ivarNames; // pointers for sorted information - int numVarNames = 0; // number of variable names - std::map TimeValue; // Pointers to the actual TimeStep variables - Array1D RVariableTypes; // Variable Types structure (use NumOfRVariables to traverse) - Array1D IVariableTypes; // Variable Types structure (use NumOfIVariables to traverse) - Array1D DDVariableTypes; // Variable Types structure (use NumVariablesForOutput to traverse) - Array1D ReqRepVars; - Array1D VarMeterArrays; - Array1D EnergyMeters; - EPVector EndUseCategory; - std::unordered_map UniqueMeterNames; + + std::array TimeValue; // Pointers to the actual TimeStep variables + + std::vector outVars; // Variables array (use NumOfRVariables to traverse) + std::vector ddOutVars; // Variable Types structure (use NumVariablesForOutput to traverse) + std::map ddOutVarMap; + std::vector reqVars; + + std::vector meters; + std::map meterMap; + char stamp[OutputProcessor::N_WriteTimeStampFormatData]; - char s_WriteReportRealData[129]; - char s_WriteCumulativeReportMeterData[129]; - char s_WriteReportMeterData[129]; - char s_WriteNumericData[129]; bool Rept = false; bool OpaqSurfWarned = false; - Array1D_string ValidMeterNames; - Array1D_int iValidMeterNames; - int NumValidMeters = 0; - - // statics - - Real64 rDummy1TS = 0.0; - Real64 rDummy2TS = 0.0; - int iDummy1TS = 0; - int iDummy2TS = 0; - Real64 rDummy1 = 0.0; - Real64 rDummy2 = 0.0; - int iDummy1 = 0; - int iDummy2 = 0; - int indexGroupKey = -1; + + // End-use stuff + int MaxNumSubcategories = 1; + int maxNumEndUseSpaceTypes = 1; + EPVector EndUseCategory; void clear_state() override { - this->InstMeterCacheSize = 1000; - this->InstMeterCacheSizeInc = 1000; - this->InstMeterCache.deallocate(); - this->InstMeterCacheLastUsed = 0; - this->CurrentReportNumber = 0; this->NumVariablesForOutput = 0; this->MaxVariablesForOutput = 0; this->NumOfRVariable_Setup = 0; this->NumTotalRVariable = 0; this->NumOfRVariable_Sum = 0; this->NumOfRVariable_Meter = 0; - this->NumOfRVariable = 0; - this->MaxRVariable = 0; this->NumOfIVariable_Setup = 0; this->NumTotalIVariable = 0; this->NumOfIVariable_Sum = 0; - this->NumOfIVariable = 0; - this->MaxIVariable = 0; this->OutputInitialized = false; this->ProduceReportVDD = OutputProcessor::ReportVDD::No; this->NumHoursInMonth = 0; this->NumHoursInSim = 0; - this->ReportList.deallocate(); - this->NumReportList = 0; - this->NumExtraVars = 0; - this->NumOfReqVariables = 0; - this->NumVarMeterArrays = 0; - this->NumEnergyMeters = 0; - this->MeterValue.deallocate(); - this->TimeStepStampReportNbr = 0; - this->TimeStepStampReportChr.clear(); - this->TrackingHourlyVariables = false; - this->DailyStampReportNbr = 0; - this->DailyStampReportChr.clear(); - this->TrackingDailyVariables = false; - this->MonthlyStampReportNbr = 0; - this->MonthlyStampReportChr.clear(); - this->TrackingMonthlyVariables = false; - this->YearlyStampReportNbr = 0; - this->YearlyStampReportChr.clear(); - this->TrackingYearlyVariables = false; - this->RunPeriodStampReportNbr = 0; - this->RunPeriodStampReportChr.clear(); - this->TrackingRunPeriodVariables = false; + this->meterValues.clear(); + this->freqStampReportNums = {-1, -1, -1, -1, -1, -1, -1}; + this->freqTrackingVariables = {false}; this->TimeStepZoneSec = 0; this->ErrorsLogged = false; - this->MaxNumSubcategories = 1; - this->maxNumEndUseSpaceTypes = 1; this->isFinalYear = false; this->GetOutputInputFlag = true; - this->minimumReportFrequency = OutputProcessor::ReportingFrequency::EachCall; + this->minimumReportFreq = OutputProcessor::ReportFreq::EachCall; this->apiVarRequests.clear(); this->ReportNumberCounter = 0; this->LHourP = -1; @@ -1425,35 +1055,34 @@ struct OutputProcessorData : BaseGlobalStruct this->LEndMin = -1.0; this->GetMeterIndexFirstCall = true; this->InitFlag = true; - this->keyVarIndexes.deallocate(); - this->curKeyVarIndexLimit = 0; - this->varNames.deallocate(); - this->ivarNames.deallocate(); - this->numVarNames = 0; - this->TimeValue.clear(); - this->RVariableTypes.deallocate(); - this->IVariableTypes.deallocate(); - this->DDVariableTypes.deallocate(); - this->ReqRepVars.deallocate(); - this->VarMeterArrays.deallocate(); - this->EnergyMeters.deallocate(); - this->EndUseCategory.deallocate(); - this->UniqueMeterNames.clear(); - - this->rDummy1TS = 0.0; - this->rDummy2TS = 0.0; - this->iDummy1TS = 0; - this->iDummy2TS = 0; - this->rDummy1 = 0.0; - this->rDummy2 = 0.0; - this->iDummy1 = 0; - this->iDummy2 = 0; - this->indexGroupKey = -1; + + for (int i = 0; i < (int)OutputProcessor::TimeStepType::Num; ++i) + new (&this->TimeValue[i]) OutputProcessor::TimeSteps(); + + for (int i = 0; i < (int)this->outVars.size(); ++i) + delete this->outVars[i]; + this->outVars.clear(); + + for (int i = 0; i < (int)this->ddOutVars.size(); ++i) + delete this->ddOutVars[i]; + this->ddOutVars.clear(); + this->ddOutVarMap.clear(); + + for (int i = 0; i < (int)this->reqVars.size(); ++i) + delete this->reqVars[i]; + this->reqVars.clear(); + + for (int i = 0; i < (int)this->meters.size(); ++i) + delete this->meters[i]; + this->meters.clear(); + this->meterMap.clear(); + this->Rept = false; this->OpaqSurfWarned = false; - this->ValidMeterNames.clear(); - this->iValidMeterNames.clear(); - this->NumValidMeters = 0; + + this->MaxNumSubcategories = 1; + this->maxNumEndUseSpaceTypes = 1; + this->EndUseCategory.deallocate(); } }; diff --git a/src/EnergyPlus/OutputReportData.cc b/src/EnergyPlus/OutputReportData.cc index ed33886d90f..1393cbfb5b6 100644 --- a/src/EnergyPlus/OutputReportData.cc +++ b/src/EnergyPlus/OutputReportData.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -72,7 +72,7 @@ int AnnualFieldSet::getVariableKeyCountandTypeFromFldSt(EnergyPlusData &state, OutputProcessor::VariableType &typeVar, OutputProcessor::StoreType &avgSumVar, OutputProcessor::TimeStepType &stepTypeVar, - OutputProcessor::Unit &unitsVar) + Constant::Units &unitsVar) { int numkeys; GetVariableKeyCountandType( @@ -87,16 +87,16 @@ void AnnualFieldSet::getVariableKeysFromFldSt(EnergyPlusData &state, std::vector &indexesForKeyVar) { // this hides the Objexx arrays and returns regular vectors - Array1D_string tempNamesOfKeys; - Array1D_int tempIndexesForKeyVar; - tempNamesOfKeys.allocate(keyCount); - tempIndexesForKeyVar.allocate(keyCount); - GetVariableKeys(state, m_variMeter, typeVar, tempNamesOfKeys, tempIndexesForKeyVar); // call outputprocessor routine with member variable + Array1D_int tmpVarNums; + Array1D_string tmpVarNames; + tmpVarNums.allocate(keyCount); + tmpVarNames.allocate(keyCount); + GetVariableKeys(state, m_variMeter, typeVar, tmpVarNames, tmpVarNums); // call outputprocessor routine with member variable namesOfKeys.clear(); indexesForKeyVar.clear(); for (int iKey = 1; iKey <= keyCount; ++iKey) { - namesOfKeys.push_back(tempNamesOfKeys(iKey)); - indexesForKeyVar.push_back(tempIndexesForKeyVar(iKey)); + indexesForKeyVar.push_back(tmpVarNums(iKey)); + namesOfKeys.push_back(tmpVarNames(iKey)); } } diff --git a/src/EnergyPlus/OutputReportData.hh b/src/EnergyPlus/OutputReportData.hh index 35548592855..66c415079da 100644 --- a/src/EnergyPlus/OutputReportData.hh +++ b/src/EnergyPlus/OutputReportData.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -93,8 +93,8 @@ public: // default constructor AnnualFieldSet() - : m_variMeter(""), m_colHead(""), m_aggregate(sumOrAvg), m_varUnits(OutputProcessor::Unit::None), - m_typeOfVar(OutputProcessor::VariableType::NotFound), m_keyCount(0), m_varAvgSum(OutputProcessor::StoreType::Averaged), m_bottomBinValue(0), + : m_variMeter(""), m_colHead(""), m_aggregate(sumOrAvg), m_varUnits(Constant::Units::None), + m_typeOfVar(OutputProcessor::VariableType::Invalid), m_keyCount(0), m_varAvgSum(OutputProcessor::StoreType::Averaged), m_bottomBinValue(0), m_topBinValue(0) { } @@ -119,7 +119,7 @@ public: OutputProcessor::VariableType &typeVar, OutputProcessor::StoreType &avgSumVar, OutputProcessor::TimeStepType &stepTypeVar, - OutputProcessor::Unit &unitsVar); + Constant::Units &unitsVar); void getVariableKeysFromFldSt(EnergyPlusData &state, OutputProcessor::VariableType &typeVar, @@ -131,7 +131,7 @@ public: std::string m_colHead; // the column header to use instead of the variable name (only for predefined) AggregationKind m_aggregate; // the type of aggregation for the variable (see aggType parameters) int m_showDigits; // the number of digits to be shown - OutputProcessor::Unit m_varUnits; // Units sting, may be blank + Constant::Units m_varUnits; // Units sting, may be blank OutputProcessor::VariableType m_typeOfVar; // 0=not found, 1=integer, 2=real, 3=meter int m_keyCount; OutputProcessor::StoreType m_varAvgSum; // Variable is Averaged=1 or Summed=2 diff --git a/src/EnergyPlus/OutputReportPredefined.cc b/src/EnergyPlus/OutputReportPredefined.cc index 921721ac4b1..f16f54edba1 100644 --- a/src/EnergyPlus/OutputReportPredefined.cc +++ b/src/EnergyPlus/OutputReportPredefined.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutputReportPredefined.hh b/src/EnergyPlus/OutputReportPredefined.hh index b152abfd1cb..df7f4869b0f 100644 --- a/src/EnergyPlus/OutputReportPredefined.hh +++ b/src/EnergyPlus/OutputReportPredefined.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutputReportTabular.cc b/src/EnergyPlus/OutputReportTabular.cc index 2631d52cd88..39bc1d971cd 100644 --- a/src/EnergyPlus/OutputReportTabular.cc +++ b/src/EnergyPlus/OutputReportTabular.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -79,7 +79,6 @@ #include #include #include -#include #include #include #include @@ -94,6 +93,7 @@ #include #include #include +#include #include #include #include @@ -323,7 +323,7 @@ void GetInputTabularMonthly(EnergyPlusData &state) // SUBROUTINE LOCAL VARIABLE DECLARATIONS: auto &ort = state.dataOutRptTab; - if (!(state.files.outputControl.tabular || state.files.outputControl.sqlite)) { + if (!state.files.outputControl.writeTabular(state)) { ort->WriteTabularFiles = false; return; } @@ -366,7 +366,10 @@ void GetInputTabularMonthly(EnergyPlusData &state) int const curTable = AddMonthlyReport(state, AlphArray(1), int(NumArray(1))); for (int jField = 2; jField <= NumAlphas; jField += 2) { if (AlphArray(jField).empty()) { - ShowFatalError(state, "Blank report name in Output:Table:Monthly"); + ShowWarningError(state, + format("{}: Blank column specified in '{}', need to provide a variable or meter name ", + CurrentModuleObject, + ort->MonthlyInput(TabNum).name)); } std::string const curAggString = AlphArray(jField + 1); AggType curAggType; // kind of aggregation identified (see AggType parameters) @@ -402,7 +405,9 @@ void GetInputTabularMonthly(EnergyPlusData &state) ShowWarningError(state, format("{}={}, Variable name={}", CurrentModuleObject, ort->MonthlyInput(TabNum).name, AlphArray(jField))); ShowContinueError(state, format("Invalid aggregation type=\"{}\" Defaulting to SumOrAverage.", curAggString)); } - AddMonthlyFieldSetInput(state, curTable, AlphArray(jField), "", curAggType); + if (!AlphArray(jField).empty()) { + AddMonthlyFieldSetInput(state, curTable, AlphArray(jField), "", curAggType); + } } } } @@ -574,7 +579,7 @@ void InitializeTabularMonthly(EnergyPlusData &state) OutputProcessor::VariableType TypeVar; OutputProcessor::StoreType AvgSumVar; OutputProcessor::TimeStepType StepTypeVar; - OutputProcessor::Unit UnitsVar = OutputProcessor::Unit::None; // Units enum + Constant::Units UnitsVar = Constant::Units::None; // Units enum Array1D_string UniqueKeyNames; int found; auto &ort = state.dataOutRptTab; @@ -618,7 +623,7 @@ void InitializeTabularMonthly(EnergyPlusData &state) // call the key count function but only need count during this pass int KeyCount = 0; GetVariableKeyCountandType(state, curVariMeter, KeyCount, TypeVar, AvgSumVar, StepTypeVar, UnitsVar); - if (TypeVar == OutputProcessor::VariableType::NotFound) { + if (TypeVar == OutputProcessor::VariableType::NotFound) { // TODO: This NotFound thing has to go if (!ort->MonthlyInput(TabNum).isNamedMonthly) { ++state.dataOutRptTab->ErrCount1; } @@ -630,6 +635,19 @@ void InitializeTabularMonthly(EnergyPlusData &state) // ALLOCATE(NamesOfKeys(maxKeyCount)) // ALLOCATE(IndexesForKeyVar(maxKeyCount)) // ENDIF + + // save these values to use later -- noel + ort->MonthlyFieldSetInput(FirstColumn + colNum - 1).variMeterUpper = curVariMeter; + ort->MonthlyFieldSetInput(FirstColumn + colNum - 1).typeOfVar = TypeVar; + ort->MonthlyFieldSetInput(FirstColumn + colNum - 1).keyCount = KeyCount; + ort->MonthlyFieldSetInput(FirstColumn + colNum - 1).varAvgSum = AvgSumVar; + ort->MonthlyFieldSetInput(FirstColumn + colNum - 1).varStepType = StepTypeVar; + ort->MonthlyFieldSetInput(FirstColumn + colNum - 1).varUnits = UnitsVar; + + if (TypeVar == OutputProcessor::VariableType::Invalid) { + continue; + } + ort->MonthlyFieldSetInput(FirstColumn + colNum - 1).NamesOfKeys.allocate(KeyCount); ort->MonthlyFieldSetInput(FirstColumn + colNum - 1).IndexesForKeyVar.allocate(KeyCount); @@ -640,13 +658,6 @@ void InitializeTabularMonthly(EnergyPlusData &state) ort->MonthlyFieldSetInput(FirstColumn + colNum - 1).NamesOfKeys, ort->MonthlyFieldSetInput(FirstColumn + colNum - 1).IndexesForKeyVar); - // save these values to use later -- noel - ort->MonthlyFieldSetInput(FirstColumn + colNum - 1).variMeterUpper = curVariMeter; - ort->MonthlyFieldSetInput(FirstColumn + colNum - 1).typeOfVar = TypeVar; - ort->MonthlyFieldSetInput(FirstColumn + colNum - 1).keyCount = KeyCount; - ort->MonthlyFieldSetInput(FirstColumn + colNum - 1).varAvgSum = AvgSumVar; - ort->MonthlyFieldSetInput(FirstColumn + colNum - 1).varStepType = StepTypeVar; - ort->MonthlyFieldSetInput(FirstColumn + colNum - 1).varUnits = UnitsVar; // DO iKey = 1, KeyCount // MonthlyFieldSetInput(FirstColumn + ColNum - 1)%NamesOfKeys(iKey) = NamesOfKeys(iKey) !noel // MonthlyFieldSetInput(FirstColumn + ColNum - 1)%IndexesForKeyVar(iKey) = IndexesForKeyVar(iKey) !noel @@ -711,10 +722,10 @@ void InitializeTabularMonthly(EnergyPlusData &state) for (auto &e : ort->MonthlyColumns) { e.varName.clear(); e.varNum = 0; - e.typeOfVar = OutputProcessor::VariableType::NotFound; + e.typeOfVar = OutputProcessor::VariableType::Invalid; e.avgSum = OutputProcessor::StoreType::Averaged; e.stepType = OutputProcessor::TimeStepType::Zone; - e.units = OutputProcessor::Unit::None; + e.units = Constant::Units::None; e.aggType = AggType::Invalid; } for (int colNum = 1; colNum <= ort->MonthlyColumnsCount; ++colNum) { @@ -922,10 +933,10 @@ void InitializeTabularMonthly(EnergyPlusData &state) } ort->MonthlyColumns(mColumn).varName = curVariMeter; ort->MonthlyColumns(mColumn).varNum = 0; - ort->MonthlyColumns(mColumn).typeOfVar = OutputProcessor::VariableType::NotFound; + ort->MonthlyColumns(mColumn).typeOfVar = OutputProcessor::VariableType::Invalid; ort->MonthlyColumns(mColumn).avgSum = OutputProcessor::StoreType::Averaged; ort->MonthlyColumns(mColumn).stepType = OutputProcessor::TimeStepType::Zone; - ort->MonthlyColumns(mColumn).units = OutputProcessor::Unit::None; + ort->MonthlyColumns(mColumn).units = Constant::Units::None; ort->MonthlyColumns(mColumn).aggType = AggType::SumOrAvg; } // #ifdef ITM_KEYCACHE @@ -1042,11 +1053,12 @@ void GetInputTabularTimeBins(EnergyPlusData &state) int IOStat = -1; // IO Status when calling get input subroutine Real64 constexpr bigVal(0.0); // used with HUGE: Value doesn't matter, only type: Initialize so compiler doesn't warn about use uninitialized - Array1D_string objNames; Array1D_int objVarIDs; + Array1D_string objNames; + auto &ort = state.dataOutRptTab; - if (!(state.files.outputControl.tabular || state.files.outputControl.sqlite)) { + if (!state.files.outputControl.writeTabular(state)) { ort->WriteTabularFiles = false; return; } @@ -1135,7 +1147,7 @@ void GetInputTabularTimeBins(EnergyPlusData &state) ort->OutputTableBinned(iInObj).avgSum, ort->OutputTableBinned(iInObj).stepType, ort->OutputTableBinned(iInObj).units); - if (ort->OutputTableBinned(iInObj).typeOfVar == OutputProcessor::VariableType::NotFound) { + if (ort->OutputTableBinned(iInObj).typeOfVar == OutputProcessor::VariableType::Invalid) { ShowWarningError( state, format("{}: User specified meter or variable not found: {}", CurrentModuleObject, ort->OutputTableBinned(iInObj).varOrMeter)); } @@ -1159,16 +1171,18 @@ void GetInputTabularTimeBins(EnergyPlusData &state) for (int iInObj = 1; iInObj <= ort->OutputTableBinnedCount; ++iInObj) { int firstReport = ort->OutputTableBinned(iInObj).resIndex; // allocate the arrays to the number of objects - objNames.allocate(ort->OutputTableBinned(iInObj).numTables); objVarIDs.allocate(ort->OutputTableBinned(iInObj).numTables); + objNames.allocate(ort->OutputTableBinned(iInObj).numTables); GetVariableKeys(state, ort->OutputTableBinned(iInObj).varOrMeter, ort->OutputTableBinned(iInObj).typeOfVar, objNames, objVarIDs); + if (ort->OutputTableBinned(iInObj).keyValue == "*") { for (int iTable = 1; iTable <= ort->OutputTableBinned(iInObj).numTables; ++iTable) { int repIndex = firstReport + (iTable - 1); ort->BinObjVarID(repIndex).namesOfObj = objNames(iTable); ort->BinObjVarID(repIndex).varMeterNum = objVarIDs(iTable); // check if valid meter or number - if (objVarIDs(iTable) == 0) { + // Why is this here? + if (objVarIDs(iTable) == -1) { ShowWarningError(state, format("{}: Specified variable or meter not found: {}", CurrentModuleObject, objNames(iTable))); } } @@ -1400,20 +1414,11 @@ void GetInputTabularStyle(EnergyPlusData &state) UnitsStyle SetUnitsStyleFromString(std::string const &unitStringIn) { - UnitsStyle unitsStyleReturn; - if (Util::SameString(unitStringIn, "None")) { - unitsStyleReturn = UnitsStyle::None; - } else if (Util::SameString(unitStringIn, "JTOKWH")) { - unitsStyleReturn = UnitsStyle::JtoKWH; - } else if (Util::SameString(unitStringIn, "JTOMJ")) { - unitsStyleReturn = UnitsStyle::JtoMJ; - } else if (Util::SameString(unitStringIn, "JTOGJ")) { - unitsStyleReturn = UnitsStyle::JtoGJ; - } else if (Util::SameString(unitStringIn, "INCHPOUND")) { - unitsStyleReturn = UnitsStyle::InchPound; - } else { + UnitsStyle unitsStyleReturn = static_cast(getEnumValue(UnitsStyleNamesUC, Util::makeUPPER(unitStringIn))); + if (unitsStyleReturn == UnitsStyle::Invalid) { unitsStyleReturn = UnitsStyle::NotFound; } + return unitsStyleReturn; } @@ -1452,7 +1457,7 @@ void GetInputOutputTableSummaryReports(EnergyPlusData &state) auto &ort = state.dataOutRptTab; bool ErrorsFound = false; - if (!(state.files.outputControl.tabular || state.files.outputControl.sqlite)) { + if (!state.files.outputControl.writeTabular(state)) { ort->WriteTabularFiles = false; return; } @@ -1483,7 +1488,7 @@ void GetInputOutputTableSummaryReports(EnergyPlusData &state) for (int iReport = 1; iReport <= NumAlphas; ++iReport) { bool nameFound = false; if (AlphArray(iReport).empty()) { - ShowFatalError(state, "Blank report name in Output:Table:SummaryReports"); + ShowWarningError(state, "Blank report name in Output:Table:SummaryReports"); } else if (Util::SameString(AlphArray(iReport), "AnnualBuildingUtilityPerformanceSummary")) { ort->displayTabularBEPS = true; ort->WriteTabularFiles = true; @@ -1773,50 +1778,53 @@ void GetInputOutputTableSummaryReports(EnergyPlusData &state) ort->endUseNames(static_cast(Constant::EndUse::Refrigeration) + 1) = "Refrigeration"; ort->endUseNames(static_cast(Constant::EndUse::Cogeneration) + 1) = "Cogeneration"; + auto &op = state.dataOutputProcessor; // End use subs must be dynamically allocated to accomodate the end use with the most subcategories - ort->meterNumEndUseSubBEPS.allocate( - state.dataOutputProcessor->MaxNumSubcategories, static_cast(Constant::EndUse::Num), numResourceTypes); - ort->meterNumEndUseSpTypeBEPS.allocate( - state.dataOutputProcessor->maxNumEndUseSpaceTypes, static_cast(Constant::EndUse::Num), numResourceTypes); + ort->meterNumEndUseSubBEPS.allocate(op->MaxNumSubcategories, static_cast(Constant::EndUse::Num), numResourceTypes); + ort->meterNumEndUseSpTypeBEPS.allocate(op->maxNumEndUseSpaceTypes, static_cast(Constant::EndUse::Num), numResourceTypes); for (int endUse = 1; endUse <= static_cast(Constant::EndUse::Num); ++endUse) { for (int resType = 1; resType <= numResourceTypes; ++resType) { - for (int subCat = 1; subCat <= state.dataOutputProcessor->MaxNumSubcategories; ++subCat) { - ort->meterNumEndUseSubBEPS(subCat, endUse, resType) = 0; + for (int subCat = 1; subCat <= op->MaxNumSubcategories; ++subCat) { + ort->meterNumEndUseSubBEPS(subCat, endUse, resType) = -1; } - for (int spType = 1; spType <= state.dataOutputProcessor->maxNumEndUseSpaceTypes; ++spType) { - ort->meterNumEndUseSpTypeBEPS(spType, endUse, resType) = 0; + for (int spType = 1; spType <= op->maxNumEndUseSpaceTypes; ++spType) { + ort->meterNumEndUseSpTypeBEPS(spType, endUse, resType) = -1; } } } // loop through all of the resources and end uses and sub end uses for the entire facility for (int iResource = 1; iResource <= numResourceTypes; ++iResource) { - std::string meterName = ort->resourceTypeNames(iResource) + ":FACILITY"; - int meterNumber = GetMeterIndex(state, meterName); + std::string meterName = format("{}:FACILITY", ort->resourceTypeNames(iResource)); + int meterNumber = GetMeterIndex(state, Util::makeUPPER(meterName)); ort->meterNumTotalsBEPS(iResource) = meterNumber; for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { - meterName = ort->endUseNames(jEndUse) + ':' + ort->resourceTypeNames(iResource); //// ':FACILITY' - meterNumber = GetMeterIndex(state, meterName); + meterName = format("{}:{}", ort->endUseNames(jEndUse), ort->resourceTypeNames(iResource)); //// ':FACILITY' + meterNumber = GetMeterIndex(state, Util::makeUPPER(meterName)); ort->meterNumEndUseBEPS(iResource, jEndUse) = meterNumber; - for (int kEndUseSub = 1; kEndUseSub <= state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { - meterName = state.dataOutputProcessor->EndUseCategory(jEndUse).SubcategoryName(kEndUseSub) + ':' + ort->endUseNames(jEndUse) + - ':' + ort->resourceTypeNames(iResource); - meterNumber = GetMeterIndex(state, meterName); + for (int kEndUseSub = 1; kEndUseSub <= op->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { + meterName = format("{}:{}:{}", + op->EndUseCategory(jEndUse).SubcategoryName(kEndUseSub), + ort->endUseNames(jEndUse), + ort->resourceTypeNames(iResource)); + meterNumber = GetMeterIndex(state, Util::makeUPPER(meterName)); ort->meterNumEndUseSubBEPS(kEndUseSub, jEndUse, iResource) = meterNumber; } - for (int kEndUseSpType = 1; kEndUseSpType <= state.dataOutputProcessor->EndUseCategory(jEndUse).numSpaceTypes; ++kEndUseSpType) { - meterName = ort->endUseNames(jEndUse) + ':' + ort->resourceTypeNames(iResource) + - ":SpaceType:" + state.dataOutputProcessor->EndUseCategory(jEndUse).spaceTypeName(kEndUseSpType); - meterNumber = GetMeterIndex(state, meterName); + for (int kEndUseSpType = 1; kEndUseSpType <= op->EndUseCategory(jEndUse).numSpaceTypes; ++kEndUseSpType) { + meterName = format("{}:{}:SpaceType:{}", + ort->endUseNames(jEndUse), + ort->resourceTypeNames(iResource), + op->EndUseCategory(jEndUse).spaceTypeName(kEndUseSpType)); + meterNumber = GetMeterIndex(state, Util::makeUPPER(meterName)); ort->meterNumEndUseSpTypeBEPS(kEndUseSpType, jEndUse, iResource) = meterNumber; } } } for (int iResource = 1; iResource <= numSourceTypes; ++iResource) { - int const meterNumber = GetMeterIndex(state, ort->sourceTypeNames(iResource) + "Emissions:Source"); + int const meterNumber = GetMeterIndex(state, Util::makeUPPER(format("{}Emissions:Source", ort->sourceTypeNames(iResource)))); ort->meterNumTotalsSource(iResource) = meterNumber; } @@ -1828,33 +1836,30 @@ void GetInputOutputTableSummaryReports(EnergyPlusData &state) ort->gatherEndUseBEPS = 0.0; ort->gatherEndUseBySourceBEPS = 0.0; // End use subs must be dynamically allocated to accommodate the end use with the most subcategories - ort->gatherEndUseSubBEPS.allocate(state.dataOutputProcessor->MaxNumSubcategories, static_cast(Constant::EndUse::Num), numResourceTypes); + ort->gatherEndUseSubBEPS.allocate(op->MaxNumSubcategories, static_cast(Constant::EndUse::Num), numResourceTypes); ort->gatherEndUseSubBEPS = 0.0; - ort->gatherEndUseSpTypeBEPS.allocate( - state.dataOutputProcessor->maxNumEndUseSpaceTypes, static_cast(Constant::EndUse::Num), numResourceTypes); + ort->gatherEndUseSpTypeBEPS.allocate(op->maxNumEndUseSpaceTypes, static_cast(Constant::EndUse::Num), numResourceTypes); ort->gatherEndUseSpTypeBEPS = 0.0; - ort->gatherDemandEndUseSub.allocate( - state.dataOutputProcessor->MaxNumSubcategories, static_cast(Constant::EndUse::Num), numResourceTypes); + ort->gatherDemandEndUseSub.allocate(op->MaxNumSubcategories, static_cast(Constant::EndUse::Num), numResourceTypes); ort->gatherDemandEndUseSub = 0.0; - ort->gatherDemandIndEndUseSub.allocate( - state.dataOutputProcessor->MaxNumSubcategories, static_cast(Constant::EndUse::Num), numResourceTypes); + ort->gatherDemandIndEndUseSub.allocate(op->MaxNumSubcategories, static_cast(Constant::EndUse::Num), numResourceTypes); ort->gatherDemandIndEndUseSub = 0.0; // get meter numbers for other meters relating to electric load components - ort->meterNumPowerFuelFireGen = GetMeterIndex(state, "Cogeneration:ElectricityProduced"); - ort->meterNumPowerPV = GetMeterIndex(state, "Photovoltaic:ElectricityProduced"); - ort->meterNumPowerWind = GetMeterIndex(state, "WindTurbine:ElectricityProduced"); - ort->meterNumPowerHTGeothermal = GetMeterIndex(state, "HTGeothermal:ElectricityProduced"); - ort->meterNumElecStorage = GetMeterIndex(state, "ElectricStorage:ElectricityProduced"); - ort->meterNumPowerConversion = GetMeterIndex(state, "PowerConversion:ElectricityProduced"); - ort->meterNumElecProduced = GetMeterIndex(state, "ElectricityProduced:Facility"); - ort->meterNumElecPurchased = GetMeterIndex(state, "ElectricityPurchased:Facility"); - ort->meterNumElecSurplusSold = GetMeterIndex(state, "ElectricitySurplusSold:Facility"); + ort->meterNumPowerFuelFireGen = GetMeterIndex(state, "COGENERATION:ELECTRICITYPRODUCED"); + ort->meterNumPowerPV = GetMeterIndex(state, "PHOTOVOLTAIC:ELECTRICITYPRODUCED"); + ort->meterNumPowerWind = GetMeterIndex(state, "WINDTURBINE:ELECTRICITYPRODUCED"); + ort->meterNumPowerHTGeothermal = GetMeterIndex(state, "HTGEOTHERMAL:ELECTRICITYPRODUCED"); + ort->meterNumElecStorage = GetMeterIndex(state, "ELECTRICSTORAGE:ELECTRICITYPRODUCED"); + ort->meterNumPowerConversion = GetMeterIndex(state, "POWERCONVERSION:ELECTRICITYPRODUCED"); + ort->meterNumElecProduced = GetMeterIndex(state, "ELECTRICITYPRODUCED:FACILITY"); + ort->meterNumElecPurchased = GetMeterIndex(state, "ELECTRICITYPURCHASED:FACILITY"); + ort->meterNumElecSurplusSold = GetMeterIndex(state, "ELECTRICITYSURPLUSSOLD:FACILITY"); // if no ElectricityPurchased:Facility meter is defined then no electric load center // was created by the user and no power generation will occur in the plant. The amount // purchased would be the total end use. if (ort->meterNumElecPurchased == 0) { - ort->meterNumElecPurchased = GetMeterIndex(state, "Electricity:Facility"); + ort->meterNumElecPurchased = GetMeterIndex(state, "ELECTRICITY:FACILITY"); } // initialize the gathering variables for the electric load components @@ -1869,12 +1874,12 @@ void GetInputOutputTableSummaryReports(EnergyPlusData &state) ort->gatherPowerConversion = 0.0; // get meter numbers for onsite thermal components on BEPS report - ort->meterNumWaterHeatRecovery = GetMeterIndex(state, "HeatRecovery:EnergyTransfer"); - ort->meterNumAirHeatRecoveryCool = GetMeterIndex(state, "HeatRecoveryForCooling:EnergyTransfer"); - ort->meterNumAirHeatRecoveryHeat = GetMeterIndex(state, "HeatRecoveryForHeating:EnergyTransfer"); - ort->meterNumHeatHTGeothermal = GetMeterIndex(state, "HTGeothermal:HeatProduced"); - ort->meterNumHeatSolarWater = GetMeterIndex(state, "SolarWater:Facility"); - ort->meterNumHeatSolarAir = GetMeterIndex(state, "HeatProduced:SolarAir"); + ort->meterNumWaterHeatRecovery = GetMeterIndex(state, "HEATRECOVERY:ENERGYTRANSFER"); + ort->meterNumAirHeatRecoveryCool = GetMeterIndex(state, "HEATRECOVERYFORCOOLING:ENERGYTRANSFER"); + ort->meterNumAirHeatRecoveryHeat = GetMeterIndex(state, "HEATRECOVERYFORHEATING:ENERGYTRANSFER"); + ort->meterNumHeatHTGeothermal = GetMeterIndex(state, "HTGEOTHERMAL:HEATPRODUCED"); + ort->meterNumHeatSolarWater = GetMeterIndex(state, "SOLARWATER:FACILITY"); + ort->meterNumHeatSolarAir = GetMeterIndex(state, "HEATPRODUCED:SOLARAIR"); // initialize the gathering variables for onsite thermal components on BEPS report ort->gatherWaterHeatRecovery = 0.0; ort->gatherAirHeatRecoveryCool = 0.0; @@ -1884,11 +1889,11 @@ void GetInputOutputTableSummaryReports(EnergyPlusData &state) ort->gatherHeatSolarAir = 0.0; // get meter numbers for water components on BEPS report - ort->meterNumRainWater = GetMeterIndex(state, "Rainwater:OnSiteWater"); - ort->meterNumCondensate = GetMeterIndex(state, "Condensate:OnSiteWater"); - ort->meterNumGroundwater = GetMeterIndex(state, "Wellwater:OnSiteWater"); - ort->meterNumMains = GetMeterIndex(state, "MainsWater:Facility"); - ort->meterNumWaterEndUseTotal = GetMeterIndex(state, "Water:Facility"); + ort->meterNumRainWater = GetMeterIndex(state, "RAINWATER:ONSITEWATER"); + ort->meterNumCondensate = GetMeterIndex(state, "CONDENSATE:ONSITEWATER"); + ort->meterNumGroundwater = GetMeterIndex(state, "WELLWATER:ONSITEWATER"); + ort->meterNumMains = GetMeterIndex(state, "MAINSWATER:FACILITY"); + ort->meterNumWaterEndUseTotal = GetMeterIndex(state, "WATER:FACILITY"); // initialize the gathering variables for water components on BEPS report ort->gatherRainWater = 0.0; @@ -3340,13 +3345,16 @@ void WriteTableOfContents(EnergyPlusData &state) for (int jTable = 1; jTable <= ort->OutputTableBinned(iInput).numTables; ++jTable) { int const curTable = ort->OutputTableBinned(iInput).resIndex + (jTable - 1); std::string curName; - if (ort->unitsStyle == UnitsStyle::InchPound) { - std::string origName = - ort->OutputTableBinned(iInput).varOrMeter + unitEnumToStringBrackets(ort->OutputTableBinned(iInput).units); + if (ort->ip()) { + std::string origName = format("{} [{}]", + ort->OutputTableBinned(iInput).varOrMeter, + Constant::unitNames[(int)ort->OutputTableBinned(iInput).units]); [[maybe_unused]] int indexUnitConv = -1; LookupSItoIP(state, origName, indexUnitConv, curName); } else { - curName = ort->OutputTableBinned(iInput).varOrMeter + unitEnumToStringBrackets(ort->OutputTableBinned(iInput).units); + curName = format("{}[{}]", + ort->OutputTableBinned(iInput).varOrMeter, + Constant::unitNames[(int)ort->OutputTableBinned(iInput).units]); } if (ort->OutputTableBinned(iInput).scheduleIndex == 0) { tbl_stream << "BinObjVarID(curTable).namesOfObj) << "\">" @@ -3882,7 +3890,7 @@ void GatherBEPSResultsForTimestep(EnergyPlusData &state, OutputProcessor::TimeSt using DataStringGlobals::CharTab; auto &ort = state.dataOutRptTab; - + auto &op = state.dataOutputProcessor; // if no beps report is called then skip if ((ort->displayTabularBEPS || ort->displayLEEDSummary) && (t_timeStepType == OutputProcessor::TimeStepType::Zone)) { @@ -3901,27 +3909,27 @@ void GatherBEPSResultsForTimestep(EnergyPlusData &state, OutputProcessor::TimeSt // loop through all of the resources and end uses for the entire facility for (int iResource = 1; iResource <= numResourceTypes; ++iResource) { int curResMeterNumber = ort->meterNumTotalsBEPS(iResource); - if (curResMeterNumber > 0) { + if (curResMeterNumber > -1) { Real64 curResMeterValue = GetCurrentMeterValue(state, curResMeterNumber); ort->gatherTotalsBEPS(iResource) += curResMeterValue; } for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { int curEndUseMeterNumber = ort->meterNumEndUseBEPS(iResource, jEndUse); - if (curEndUseMeterNumber > 0) { + if (curEndUseMeterNumber > -1) { Real64 curEndUseMeterValue = GetCurrentMeterValue(state, curEndUseMeterNumber); ort->gatherEndUseBEPS(iResource, jEndUse) += curEndUseMeterValue; - for (int kEndUseSub = 1; kEndUseSub <= state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { + for (int kEndUseSub = 1; kEndUseSub <= op->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { int curSubMeterNumber = ort->meterNumEndUseSubBEPS(kEndUseSub, jEndUse, iResource); - if (curSubMeterNumber > 0) { + if (curSubMeterNumber > -1) { Real64 curSubMeterValue = GetCurrentMeterValue(state, curSubMeterNumber); ort->gatherEndUseSubBEPS(kEndUseSub, jEndUse, iResource) += curSubMeterValue; } } - for (int kEndUseSpType = 1; kEndUseSpType <= state.dataOutputProcessor->EndUseCategory(jEndUse).numSpaceTypes; ++kEndUseSpType) { + for (int kEndUseSpType = 1; kEndUseSpType <= op->EndUseCategory(jEndUse).numSpaceTypes; ++kEndUseSpType) { int curSpTypeMeterNumber = ort->meterNumEndUseSpTypeBEPS(kEndUseSpType, jEndUse, iResource); - if (curSpTypeMeterNumber > 0) { + if (curSpTypeMeterNumber > -1) { Real64 curSpTypeMeterValue = GetCurrentMeterValue(state, curSpTypeMeterNumber); ort->gatherEndUseSpTypeBEPS(kEndUseSpType, jEndUse, iResource) += curSpTypeMeterValue; } @@ -3932,7 +3940,7 @@ void GatherBEPSResultsForTimestep(EnergyPlusData &state, OutputProcessor::TimeSt for (int iResource = 1; iResource <= numSourceTypes; ++iResource) { int curResMeterNumber = ort->meterNumTotalsSource(iResource); - if (curResMeterNumber > 0) { + if (curResMeterNumber > -1) { Real64 curResMeterValue = GetCurrentMeterValue(state, curResMeterNumber); ort->gatherTotalsSource(iResource) += curResMeterValue; } @@ -4056,14 +4064,14 @@ void GatherSourceEnergyEndUseResultsForTimestep(EnergyPlusData &state, if (ort->ffSchedUsed(iResource)) { int const curMeterNumber = ort->meterNumTotalsBEPS(iResource); - if (curMeterNumber > 0) { + if (curMeterNumber > -1) { Real64 const curMeterValue = GetCurrentMeterValue(state, curMeterNumber) * GetCurrentScheduleValue(state, ort->ffSchedIndex(iResource)) * ort->SourceFactors(iResource); ort->gatherTotalsBySourceBEPS(iResource) += curMeterValue; } } else { int const curMeterNumber = ort->meterNumTotalsBEPS(iResource); - if (curMeterNumber > 0) { + if (curMeterNumber > -1) { Real64 const curMeterValue = GetCurrentMeterValue(state, curMeterNumber) * ort->SourceFactors(iResource); ort->gatherTotalsBySourceBEPS(iResource) += curMeterValue; } @@ -4072,14 +4080,14 @@ void GatherSourceEnergyEndUseResultsForTimestep(EnergyPlusData &state, for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { if (ort->ffSchedUsed(iResource)) { int const curMeterNumber = ort->meterNumEndUseBEPS(iResource, jEndUse); - if (curMeterNumber > 0) { + if (curMeterNumber > -1) { Real64 const curMeterValue = GetCurrentMeterValue(state, curMeterNumber) * GetCurrentScheduleValue(state, ort->ffSchedIndex(iResource)) * ort->SourceFactors(iResource); ort->gatherEndUseBySourceBEPS(iResource, jEndUse) += curMeterValue; } } else { int const curMeterNumber = ort->meterNumEndUseBEPS(iResource, jEndUse); - if (curMeterNumber > 0) { + if (curMeterNumber > -1) { Real64 const curMeterValue = GetCurrentMeterValue(state, curMeterNumber) * ort->SourceFactors(iResource); ort->gatherEndUseBySourceBEPS(iResource, jEndUse) += curMeterValue; } @@ -4164,12 +4172,13 @@ void GatherPeakDemandForTimestep(EnergyPlusData &state, OutputProcessor::TimeSte // SUBROUTINE LOCAL VARIABLE DECLARATIONS: assert(state.dataGlobal->TimeStepZoneSec > 0.0); auto &ort = state.dataOutRptTab; + auto &op = state.dataOutputProcessor; if ((ort->displayDemandEndUse) && (t_timeStepType == OutputProcessor::TimeStepType::Zone)) { // loop through all of the resources and end uses for the entire facility for (int iResource = 1; iResource <= numResourceTypes; ++iResource) { int curMeterNumber = ort->meterNumTotalsBEPS(iResource); - if (curMeterNumber > 0) { + if (curMeterNumber > -1) { Real64 curDemandValue = GetCurrentMeterValue(state, curMeterNumber) / state.dataGlobal->TimeStepZoneSec; // check if current value is greater than existing peak demand value if (curDemandValue > ort->gatherDemandTotal(iResource)) { @@ -4185,13 +4194,12 @@ void GatherPeakDemandForTimestep(EnergyPlusData &state, OutputProcessor::TimeSte // time to find the components of the peak demand for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { curMeterNumber = ort->meterNumEndUseBEPS(iResource, jEndUse); - if (curMeterNumber > 0) { + if (curMeterNumber > -1) { curDemandValue = GetCurrentMeterValue(state, curMeterNumber) / state.dataGlobal->TimeStepZoneSec; ort->gatherDemandEndUse(iResource, jEndUse) = curDemandValue; - for (int kEndUseSub = 1; kEndUseSub <= state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories; - ++kEndUseSub) { + for (int kEndUseSub = 1; kEndUseSub <= op->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { curMeterNumber = ort->meterNumEndUseSubBEPS(kEndUseSub, jEndUse, iResource); - if (curMeterNumber > 0) { + if (curMeterNumber > -1) { curDemandValue = GetCurrentMeterValue(state, curMeterNumber) / state.dataGlobal->TimeStepZoneSec; ort->gatherDemandEndUseSub(kEndUseSub, jEndUse, iResource) = curDemandValue; } @@ -4209,14 +4217,14 @@ void GatherPeakDemandForTimestep(EnergyPlusData &state, OutputProcessor::TimeSte for (int iResource = 1; iResource <= numResourceTypes; ++iResource) { for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { int curMeterNumber = ort->meterNumEndUseBEPS(iResource, jEndUse); - if (curMeterNumber > 0) { + if (curMeterNumber > -1) { Real64 curDemandValue = GetCurrentMeterValue(state, curMeterNumber) / state.dataGlobal->TimeStepZoneSec; if (curDemandValue > ort->gatherDemandIndEndUse(iResource, jEndUse)) { ort->gatherDemandIndEndUse(iResource, jEndUse) = curDemandValue; } - for (int kEndUseSub = 1; kEndUseSub <= state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { + for (int kEndUseSub = 1; kEndUseSub <= op->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { curMeterNumber = ort->meterNumEndUseSubBEPS(kEndUseSub, jEndUse, iResource); - if (curMeterNumber > 0) { + if (curMeterNumber > -1) { curDemandValue = GetCurrentMeterValue(state, curMeterNumber) / state.dataGlobal->TimeStepZoneSec; // check if current value is greater than existing peak demand value if (curDemandValue > ort->gatherDemandIndEndUseSub(kEndUseSub, jEndUse, iResource)) { @@ -5519,7 +5527,7 @@ void FillWeatherPredefinedEntries(EnergyPlusData &state) lnPtr = index(lineIn.substr(12), 'm'); if (lnPtr != std::string::npos) { curNameWithSIUnits = "Elevation (m) " + lineIn.substr(12 + lnPtr + 2); - if (ort->unitsStyle == UnitsStyle::InchPound) { + if (ort->ip()) { LookupSItoIP(state, curNameWithSIUnits, indexUnitConv, curNameAndUnits); PreDefTableEntry(state, state.dataOutRptPredefined->pdchWthrVal, @@ -5570,7 +5578,7 @@ void FillWeatherPredefinedEntries(EnergyPlusData &state) if (iscalc) { if (isASHRAE) { if (ashDesYear == "2001") { - if (ort->unitsStyle == UnitsStyle::InchPound) { + if (ort->ip()) { curNameWithSIUnits = "Heating Design Temperature 99.6% (C)"; LookupSItoIP(state, curNameWithSIUnits, indexUnitConv, curNameAndUnits); PreDefTableEntry(state, @@ -5592,7 +5600,7 @@ void FillWeatherPredefinedEntries(EnergyPlusData &state) GetColumnUsingTabs(lineIn, 3) + degChar); } } else { // 2005 and 2009 are the same - if (ort->unitsStyle == UnitsStyle::InchPound) { + if (ort->ip()) { curNameWithSIUnits = "Heating Design Temperature 99.6% (C)"; LookupSItoIP(state, curNameWithSIUnits, indexUnitConv, curNameAndUnits); PreDefTableEntry(state, @@ -5622,7 +5630,7 @@ void FillWeatherPredefinedEntries(EnergyPlusData &state) col1 = 4; col2 = 5; } - if (ort->unitsStyle == UnitsStyle::InchPound) { + if (ort->ip()) { curNameWithSIUnits = "Heating Design Temperature 99.6% (C)"; LookupSItoIP(state, curNameWithSIUnits, indexUnitConv, curNameAndUnits); PreDefTableEntry(state, @@ -5650,7 +5658,7 @@ void FillWeatherPredefinedEntries(EnergyPlusData &state) if (iscalc) { if (isASHRAE) { if (ashDesYear == "2001") { - if (ort->unitsStyle == UnitsStyle::InchPound) { + if (ort->ip()) { curNameWithSIUnits = "Cooling Design Temperature 0.4% (C)"; LookupSItoIP(state, curNameWithSIUnits, indexUnitConv, curNameAndUnits); PreDefTableEntry(state, @@ -5680,7 +5688,7 @@ void FillWeatherPredefinedEntries(EnergyPlusData &state) GetColumnUsingTabs(lineIn, 6) + degChar); } } else { // 2005 and 2009 are the same - if (ort->unitsStyle == UnitsStyle::InchPound) { + if (ort->ip()) { curNameWithSIUnits = "Cooling Design Temperature 0.4% (C)"; LookupSItoIP(state, curNameWithSIUnits, indexUnitConv, curNameAndUnits); PreDefTableEntry(state, @@ -5720,7 +5728,7 @@ void FillWeatherPredefinedEntries(EnergyPlusData &state) col2 = 5; col3 = 6; } - if (ort->unitsStyle == UnitsStyle::InchPound) { + if (ort->ip()) { curNameWithSIUnits = "Cooling Design Temperature 0.4% (C)"; LookupSItoIP(state, curNameWithSIUnits, indexUnitConv, curNameAndUnits); PreDefTableEntry(state, @@ -5769,7 +5777,7 @@ void FillWeatherPredefinedEntries(EnergyPlusData &state) eposlt -= 2; } if (sposlt != std::string::npos && eposlt != std::string::npos) { - if (ort->unitsStyle == UnitsStyle::InchPound) { + if (ort->ip()) { curNameWithSIUnits = "Maximum Dry Bulb Temperature (C)"; LookupSItoIP(state, curNameWithSIUnits, indexUnitConv, curNameAndUnits); PreDefTableEntry(state, @@ -5804,7 +5812,7 @@ void FillWeatherPredefinedEntries(EnergyPlusData &state) eposlt -= 2; } if (sposlt != std::string::npos && eposlt != std::string::npos) { - if (ort->unitsStyle == UnitsStyle::InchPound) { + if (ort->ip()) { curNameWithSIUnits = "Minimum Dry Bulb Temperature (C)"; LookupSItoIP(state, curNameWithSIUnits, indexUnitConv, curNameAndUnits); PreDefTableEntry(state, @@ -5839,7 +5847,7 @@ void FillWeatherPredefinedEntries(EnergyPlusData &state) eposlt -= 2; } if (sposlt != std::string::npos && eposlt != std::string::npos) { - if (ort->unitsStyle == UnitsStyle::InchPound) { + if (ort->ip()) { curNameWithSIUnits = "Maximum Dew Point Temperature (C)"; LookupSItoIP(state, curNameWithSIUnits, indexUnitConv, curNameAndUnits); PreDefTableEntry(state, @@ -5874,7 +5882,7 @@ void FillWeatherPredefinedEntries(EnergyPlusData &state) eposlt -= 2; } if (sposlt != std::string::npos && eposlt != std::string::npos) { - if (ort->unitsStyle == UnitsStyle::InchPound) { + if (ort->ip()) { curNameWithSIUnits = "Minimum Dew Point Temperature (C)"; LookupSItoIP(state, curNameWithSIUnits, indexUnitConv, curNameAndUnits); PreDefTableEntry(state, @@ -5943,7 +5951,7 @@ void FillWeatherPredefinedEntries(EnergyPlusData &state) } break; case StatLineType::WithHDDLine: { // - 1745 (wthr file) annual heating degree-days (10°C baseline) if (storeASHRAEHDD != "") { - if (ort->unitsStyle == UnitsStyle::InchPound) { + if (ort->ip()) { curNameWithSIUnits = "ASHRAE Handbook 2009 Heating Degree-Days - base 65°(C)"; LookupSItoIP(state, curNameWithSIUnits, indexUnitConv, curNameAndUnits); PreDefTableEntry(state, @@ -5955,7 +5963,7 @@ void FillWeatherPredefinedEntries(EnergyPlusData &state) state, state.dataOutRptPredefined->pdchWthrVal, "ASHRAE Handbook 2009 Heating Degree-Days (base 18.3°C)", storeASHRAEHDD); } } else { - if (ort->unitsStyle == UnitsStyle::InchPound) { + if (ort->ip()) { PreDefTableEntry( state, state.dataOutRptPredefined->pdchWthrVal, "ASHRAE Handbook 2009 Heating Degree-Days (base 65°F)", "not found"); } else { @@ -5963,7 +5971,7 @@ void FillWeatherPredefinedEntries(EnergyPlusData &state) state, state.dataOutRptPredefined->pdchWthrVal, "ASHRAE Handbook 2009 Heating Degree-Days (base 18.3°C)", "not found"); } } - if (ort->unitsStyle == UnitsStyle::InchPound) { + if (ort->ip()) { curNameWithSIUnits = "Weather File Heating Degree-Days - base 65°(C)"; LookupSItoIP(state, curNameWithSIUnits, indexUnitConv, curNameAndUnits); PreDefTableEntry(state, @@ -5982,7 +5990,7 @@ void FillWeatherPredefinedEntries(EnergyPlusData &state) } break; case StatLineType::WithCDDLine: { // - 464 (wthr file) annual cooling degree-days (18°C baseline) if (storeASHRAECDD != "") { - if (ort->unitsStyle == UnitsStyle::InchPound) { + if (ort->ip()) { curNameWithSIUnits = "ASHRAE Handbook 2009 Cooling Degree-Days - base 50°(C)"; LookupSItoIP(state, curNameWithSIUnits, indexUnitConv, curNameAndUnits); PreDefTableEntry(state, @@ -5994,7 +6002,7 @@ void FillWeatherPredefinedEntries(EnergyPlusData &state) state, state.dataOutRptPredefined->pdchWthrVal, "ASHRAE Handbook 2009 Cooling Degree-Days (base 10°C)", storeASHRAECDD); } } else { - if (ort->unitsStyle == UnitsStyle::InchPound) { + if (ort->ip()) { PreDefTableEntry( state, state.dataOutRptPredefined->pdchWthrVal, "ASHRAE Handbook 2009 Cooling Degree-Days (base 50°F)", "not found"); } else { @@ -6002,7 +6010,7 @@ void FillWeatherPredefinedEntries(EnergyPlusData &state) state, state.dataOutRptPredefined->pdchWthrVal, "ASHRAE Handbook 2009 Cooling Degree-Days (base 10°C)", "not found"); } } - if (ort->unitsStyle == UnitsStyle::InchPound) { + if (ort->ip()) { curNameWithSIUnits = "Weather File Cooling Degree-Days - base 50°(C)"; LookupSItoIP(state, curNameWithSIUnits, indexUnitConv, curNameAndUnits); PreDefTableEntry(state, @@ -6867,7 +6875,7 @@ void FillRemainingPredefinedEntries(EnergyPlusData &state) state.dataEnvrn->EnvironmentName + " ** " + state.dataEnvrn->WeatherFileLocationTitle); } - if (ort->unitsStyle == UnitsStyle::InchPound) { + if (ort->ip()) { PreDefTableEntry(state, state.dataOutRptPredefined->pdchLeedGenData, "Total gross floor area [ft2]", "-"); } else { PreDefTableEntry(state, state.dataOutRptPredefined->pdchLeedGenData, "Total gross floor area [m2]", "-"); @@ -7052,21 +7060,20 @@ void WriteMonthlyTables(EnergyPlusData &state) curAggString = " {" + stripped(curAggString) + '}'; } // do the unit conversions - if (unitsStyle_cur == UnitsStyle::InchPound) { - varNameWithUnits = ort->MonthlyColumns(curCol).varName + unitEnumToStringBrackets(ort->MonthlyColumns(curCol).units); + if (unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPound || + unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity) { + varNameWithUnits = + format("{} [{}]", ort->MonthlyColumns(curCol).varName, Constant::unitNames[(int)ort->MonthlyColumns(curCol).units]); LookupSItoIP(state, varNameWithUnits, indexUnitConv, curUnits); GetUnitConversion(state, indexUnitConv, curConversionFactor, state.dataOutRptTab->curConversionOffset, curUnits); - } else { // just do the Joule conversion - // if units is in Joules, convert if specified - if (Util::SameString(unitEnumToString(ort->MonthlyColumns(curCol).units), "J")) { - curUnits = energyUnitsString; - curConversionFactor = energyUnitsConversionFactor; - state.dataOutRptTab->curConversionOffset = 0.0; - } else { // if not joules don't perform conversion - curUnits = unitEnumToString(ort->MonthlyColumns(curCol).units); - curConversionFactor = 1.0; - state.dataOutRptTab->curConversionOffset = 0.0; - } + } else if (Util::SameString(Constant::unitNames[(int)ort->MonthlyColumns(curCol).units], "J")) { + curUnits = energyUnitsString; + curConversionFactor = energyUnitsConversionFactor; + state.dataOutRptTab->curConversionOffset = 0.0; + } else { // if not joules don't perform conversion + curUnits = Constant::unitNames[(int)ort->MonthlyColumns(curCol).units]; + curConversionFactor = 1.0; + state.dataOutRptTab->curConversionOffset = 0.0; } switch (ort->MonthlyColumns(curCol).aggType) { case AggType::SumOrAvg: @@ -7404,7 +7411,8 @@ void WriteTimeBinTables(EnergyPlusData &state) for (int iInObj = 1; iInObj <= ort->OutputTableBinnedCount; ++iInObj) { int const firstReport = ort->OutputTableBinned(iInObj).resIndex; - curNameWithSIUnits = ort->OutputTableBinned(iInObj).varOrMeter + unitEnumToStringBrackets(ort->OutputTableBinned(iInObj).units); + curNameWithSIUnits = + format("{} [{}]", ort->OutputTableBinned(iInObj).varOrMeter, Constant::unitNames[(int)ort->OutputTableBinned(iInObj).units]); Real64 curIntervalStart; Real64 curIntervalSize; int indexUnitConv = -1; @@ -7412,6 +7420,10 @@ void WriteTimeBinTables(EnergyPlusData &state) LookupSItoIP(state, curNameWithSIUnits, indexUnitConv, curNameAndUnits); curIntervalStart = ConvertIP(state, indexUnitConv, ort->OutputTableBinned(iInObj).intervalStart); curIntervalSize = ConvertIPdelta(state, indexUnitConv, ort->OutputTableBinned(iInObj).intervalSize); + } else if (unitsStyle_cur == UnitsStyle::InchPoundExceptElectricity) { + LookupSItoIP(state, curNameWithSIUnits, indexUnitConv, curNameAndUnits); + curIntervalStart = ConvertIP(state, indexUnitConv, ort->OutputTableBinned(iInObj).intervalStart); + curIntervalSize = ConvertIPdelta(state, indexUnitConv, ort->OutputTableBinned(iInObj).intervalSize); } else { curNameAndUnits = curNameWithSIUnits; curIntervalStart = ort->OutputTableBinned(iInObj).intervalStart; @@ -7550,7 +7562,8 @@ void WriteTimeBinTables(EnergyPlusData &state) repMean = ort->BinStatistics(repIndex).sum / ort->BinStatistics(repIndex).n; } - if (unitsStyle_cur == UnitsStyle::InchPound) { + if (unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPound || + unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity) { tableBodyStat(1, 1) = RealToStr(ConvertIP(state, indexUnitConv, ort->BinStatistics(repIndex).minimum), 2); tableBodyStat(1, 2) = RealToStr(ConvertIP(state, indexUnitConv, repMean - 2 * repStDev), 2); tableBodyStat(1, 3) = RealToStr(ConvertIP(state, indexUnitConv, repMean), 2); @@ -7622,6 +7635,7 @@ void WriteBEPSTable(EnergyPlusData &state) Real64 constexpr SmallValue(1.e-14); auto &ort = state.dataOutRptTab; + auto &op = state.dataOutputProcessor; if (!ort->displayTabularBEPS && !ort->displayLEEDSummary) { return; @@ -7633,7 +7647,6 @@ void WriteBEPSTable(EnergyPlusData &state) Array1D_string rowHead; Array2D_string tableBody; - // all arrays are in the format: (row, columnm) Array2D useVal(14, 15); Array2D normalVal(14, 4); Array1D collapsedTotal(14); @@ -7740,7 +7753,7 @@ void WriteBEPSTable(EnergyPlusData &state) } } for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { - for (int kEndUseSub = 1; kEndUseSub <= state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { + for (int kEndUseSub = 1; kEndUseSub <= op->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { collapsedEndUseSub(kEndUseSub, jEndUse, 1) = ort->gatherEndUseSubBEPS(kEndUseSub, jEndUse, 1); // electricity collapsedEndUseSub(kEndUseSub, jEndUse, 2) = ort->gatherEndUseSubBEPS(kEndUseSub, jEndUse, 2); // natural gas collapsedEndUseSub(kEndUseSub, jEndUse, 3) = ort->gatherEndUseSubBEPS(kEndUseSub, jEndUse, 6); // gasoline @@ -7759,7 +7772,7 @@ void WriteBEPSTable(EnergyPlusData &state) collapsedEndUseSub(kEndUseSub, jEndUse, 14) = ort->gatherEndUseSubBEPS(kEndUseSub, jEndUse, 7); // water } - for (int kEndUseSpType = 1; kEndUseSpType <= state.dataOutputProcessor->EndUseCategory(jEndUse).numSpaceTypes; ++kEndUseSpType) { + for (int kEndUseSpType = 1; kEndUseSpType <= op->EndUseCategory(jEndUse).numSpaceTypes; ++kEndUseSpType) { collapsedEndUseSpType(kEndUseSpType, jEndUse, 1) = ort->gatherEndUseSpTypeBEPS(kEndUseSpType, jEndUse, 1); // electricity collapsedEndUseSpType(kEndUseSpType, jEndUse, 2) = ort->gatherEndUseSpTypeBEPS(kEndUseSpType, jEndUse, 2); // natural gas collapsedEndUseSpType(kEndUseSpType, jEndUse, 3) = ort->gatherEndUseSpTypeBEPS(kEndUseSpType, jEndUse, 6); // gasoline @@ -7784,6 +7797,7 @@ void WriteBEPSTable(EnergyPlusData &state) Real64 kConversionFactor; Real64 waterConversionFactor; Real64 areaConversionFactor; + Real64 ipElectricityConversionFactor = 1.0; switch (unitsStyle_cur) { case UnitsStyle::JtoKWH: { largeConversionFactor = 3600000.0; @@ -7797,6 +7811,13 @@ void WriteBEPSTable(EnergyPlusData &state) waterConversionFactor = getSpecificUnitDivider(state, "m3", "gal"); // 0.003785413 m3 to gal areaConversionFactor = getSpecificUnitDivider(state, "m2", "ft2"); // 0.092893973 m2 to ft2 } break; + case UnitsStyle::InchPoundExceptElectricity: { + largeConversionFactor = getSpecificUnitDivider(state, "J", "kBtu"); // 1054351.84 J to kBtu + kConversionFactor = 1.0; + waterConversionFactor = getSpecificUnitDivider(state, "m3", "gal"); // 0.003785413 m3 to gal + areaConversionFactor = getSpecificUnitDivider(state, "m2", "ft2"); // 0.092893973 m2 to ft2 + ipElectricityConversionFactor = largeConversionFactor / (1000.0 * 3600.0); + } break; default: { largeConversionFactor = 1000000000.0; kConversionFactor = 1000.0; @@ -7807,16 +7828,17 @@ void WriteBEPSTable(EnergyPlusData &state) // convert units into GJ (divide by 1,000,000,000) if J otherwise kWh for (int iResource = 1; iResource <= 13; ++iResource) { // don't do water + Real64 ipElectricityAdjust = (iResource == 1) ? ipElectricityConversionFactor : 1.0; for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { - collapsedEndUse(iResource, jEndUse) /= largeConversionFactor; - for (int kEndUseSub = 1; kEndUseSub <= state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { - collapsedEndUseSub(kEndUseSub, jEndUse, iResource) /= largeConversionFactor; + collapsedEndUse(iResource, jEndUse) /= (largeConversionFactor / ipElectricityAdjust); + for (int kEndUseSub = 1; kEndUseSub <= op->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { + collapsedEndUseSub(kEndUseSub, jEndUse, iResource) /= (largeConversionFactor / ipElectricityAdjust); } - for (int kEndUseSpType = 1; kEndUseSpType <= state.dataOutputProcessor->EndUseCategory(jEndUse).numSpaceTypes; ++kEndUseSpType) { - collapsedEndUseSpType(kEndUseSpType, jEndUse, iResource) /= largeConversionFactor; + for (int kEndUseSpType = 1; kEndUseSpType <= op->EndUseCategory(jEndUse).numSpaceTypes; ++kEndUseSpType) { + collapsedEndUseSpType(kEndUseSpType, jEndUse, iResource) /= (largeConversionFactor / ipElectricityAdjust); } } - collapsedTotal(iResource) /= largeConversionFactor; + collapsedTotal(iResource) /= (largeConversionFactor / ipElectricityAdjust); } // do water for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { @@ -7851,14 +7873,15 @@ void WriteBEPSTable(EnergyPlusData &state) ort->gatherElecSurplusSold = gtElecSurplusSold; } // convert to GJ - ort->gatherPowerFuelFireGen /= largeConversionFactor; - ort->gatherPowerPV /= largeConversionFactor; - ort->gatherPowerWind /= largeConversionFactor; - ort->gatherPowerHTGeothermal /= largeConversionFactor; - ort->gatherPowerConversion /= largeConversionFactor; - ort->gatherElecProduced /= largeConversionFactor; - ort->gatherElecPurchased /= largeConversionFactor; - ort->gatherElecSurplusSold /= largeConversionFactor; + Real64 convFactorMulti = ipElectricityConversionFactor / largeConversionFactor; + ort->gatherPowerFuelFireGen *= convFactorMulti; + ort->gatherPowerPV *= convFactorMulti; + ort->gatherPowerWind *= convFactorMulti; + ort->gatherPowerHTGeothermal *= convFactorMulti; + ort->gatherPowerConversion *= convFactorMulti; + ort->gatherElecProduced *= convFactorMulti; + ort->gatherElecPurchased *= convFactorMulti; + ort->gatherElecSurplusSold *= convFactorMulti; // get change in overall state of charge for electrical storage devices. if (state.dataElectPwrSvcMgr->facilityElectricServiceObj->numElecStorageDevices > 0) { @@ -7866,7 +7889,7 @@ void WriteBEPSTable(EnergyPlusData &state) // necessary OverallNetEnergyFromStorage = ( sum( ElecStorage.StartingEnergyStored() ) - sum( // ElecStorage.ThisTimeStepStateOfCharge() ) ) + gatherElecStorage; ort->OverallNetEnergyFromStorage = ort->gatherElecStorage; - ort->OverallNetEnergyFromStorage /= largeConversionFactor; + ort->OverallNetEnergyFromStorage *= convFactorMulti; } else { ort->OverallNetEnergyFromStorage = 0.0; } @@ -7898,6 +7921,11 @@ void WriteBEPSTable(EnergyPlusData &state) columnHead(2) = "Energy Per Total Building Area [kBtu/ft2]"; columnHead(3) = "Energy Per Conditioned Building Area [kBtu/ft2]"; } break; + case UnitsStyle::InchPoundExceptElectricity: { + columnHead(1) = "Total Energy [kBtu]"; + columnHead(2) = "Energy Per Total Building Area [kBtu/ft2]"; + columnHead(3) = "Energy Per Conditioned Building Area [kBtu/ft2]"; + } break; default: { columnHead(1) = "Total Energy [GJ]"; columnHead(2) = "Energy Per Total Building Area [MJ/m2]"; @@ -8300,6 +8328,9 @@ void WriteBEPSTable(EnergyPlusData &state) case UnitsStyle::InchPound: { columnHead(1) = "Area [ft2]"; } break; + case UnitsStyle::InchPoundExceptElectricity: { + columnHead(1) = "Area [ft2]"; + } break; default: { columnHead(1) = "Area [m2]"; } break; @@ -8312,7 +8343,8 @@ void WriteBEPSTable(EnergyPlusData &state) tableBody = ""; tableBody(1, 1) = RealToStr(convBldgGrossFloorArea, 2); - if (unitsStyle_cur == UnitsStyle::InchPound) { + if (unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPound || + unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity) { if (produceTabular) { PreDefTableEntry( state, state.dataOutRptPredefined->pdchLeedGenData, "Total gross floor area [ft2]", RealToStr(convBldgGrossFloorArea, 2)); @@ -8410,6 +8442,22 @@ void WriteBEPSTable(EnergyPlusData &state) columnHead(13) = "District Heating Steam [kBtu]"; columnHead(14) = "Water [gal]"; } break; + case UnitsStyle::InchPoundExceptElectricity: { + columnHead(1) = "Electricity [kWh]"; + columnHead(2) = "Natural Gas [kBtu]"; + columnHead(3) = "Gasoline [kBtu]"; + columnHead(4) = "Diesel [kBtu]"; + columnHead(5) = "Coal [kBtu]"; + columnHead(6) = "Fuel Oil No 1 [kBtu]"; + columnHead(7) = "Fuel Oil No 2 [kBtu]"; + columnHead(8) = "Propane [kBtu]"; + columnHead(9) = "Other Fuel 1 [kBtu]"; + columnHead(10) = "Other Fuel 2 [kBtu]"; + columnHead(11) = "District Cooling [kBtu]"; + columnHead(12) = "District Heating Water [kBtu]"; + columnHead(13) = "District Heating Steam [kBtu]"; + columnHead(14) = "Water [gal]"; + } break; default: { columnHead(1) = "Electricity [GJ]"; columnHead(2) = "Natural Gas [GJ]"; @@ -8447,58 +8495,62 @@ void WriteBEPSTable(EnergyPlusData &state) } Real64 const unconvert = largeConversionFactor / 1000000000.0; // to avoid double converting, the values for the LEED report should be in GJ + Real64 const unconvert_ipExceptElec = (largeConversionFactor / ipElectricityConversionFactor) / + 1000000000.0; // to avoid double converting, the values for the LEED report should be in GJ + // Energy Use Intensities - Electricity if (ort->buildingGrossFloorArea > 0) { if (produceTabular) { PreDefTableEntry(state, state.dataOutRptPredefined->pdchLeedEuiElec, "Interior Lighting (All)", - unconvert * 1000 * useVal(colElectricity, 3) / ort->buildingGrossFloorArea, + unconvert_ipExceptElec * 1000 * useVal(colElectricity, 3) / ort->buildingGrossFloorArea, 2); PreDefTableEntry(state, state.dataOutRptPredefined->pdchLeedEuiElec, "Space Heating", - unconvert * 1000 * useVal(colElectricity, 1) / ort->buildingGrossFloorArea, + unconvert_ipExceptElec * 1000 * useVal(colElectricity, 1) / ort->buildingGrossFloorArea, 2); PreDefTableEntry(state, state.dataOutRptPredefined->pdchLeedEuiElec, "Space Cooling", - unconvert * 1000 * useVal(colElectricity, 2) / ort->buildingGrossFloorArea, + unconvert_ipExceptElec * 1000 * useVal(colElectricity, 2) / ort->buildingGrossFloorArea, 2); PreDefTableEntry(state, state.dataOutRptPredefined->pdchLeedEuiElec, "Fans (All)", - unconvert * 1000 * useVal(colElectricity, 7) / ort->buildingGrossFloorArea, + unconvert_ipExceptElec * 1000 * useVal(colElectricity, 7) / ort->buildingGrossFloorArea, 2); PreDefTableEntry(state, state.dataOutRptPredefined->pdchLeedEuiElec, "Service Water Heating", - unconvert * 1000 * useVal(colElectricity, 12) / ort->buildingGrossFloorArea, + unconvert_ipExceptElec * 1000 * useVal(colElectricity, 12) / ort->buildingGrossFloorArea, 2); PreDefTableEntry(state, state.dataOutRptPredefined->pdchLeedEuiElec, "Receptacle Equipment", - unconvert * 1000 * useVal(colElectricity, 5) / ort->buildingGrossFloorArea, + unconvert_ipExceptElec * 1000 * useVal(colElectricity, 5) / ort->buildingGrossFloorArea, 2); PreDefTableEntry(state, state.dataOutRptPredefined->pdchLeedEuiElec, "Miscellaneous (All)", - unconvert * 1000 * (useVal(colElectricity, 15)) / ort->buildingGrossFloorArea, + unconvert_ipExceptElec * 1000 * (useVal(colElectricity, 15)) / ort->buildingGrossFloorArea, 2); PreDefTableEntry(state, state.dataOutRptPredefined->pdchLeedEuiElec, "Subtotal", - unconvert * 1000 * useVal(colElectricity, 15) / ort->buildingGrossFloorArea, + unconvert_ipExceptElec * 1000 * useVal(colElectricity, 15) / ort->buildingGrossFloorArea, 2); } } if (produceTabular) { - PreDefTableEntry(state, state.dataOutRptPredefined->pdchLeedEusTotal, "Electricity", unconvert * useVal(colElectricity, 15), 2); + PreDefTableEntry( + state, state.dataOutRptPredefined->pdchLeedEusTotal, "Electricity", unconvert_ipExceptElec * useVal(colElectricity, 15), 2); PreDefTableEntry(state, state.dataOutRptPredefined->pdchLeedEusProc, "Electricity", - unconvert * (useVal(colElectricity, 5) + useVal(colElectricity, 13)), + unconvert_ipExceptElec * (useVal(colElectricity, 5) + useVal(colElectricity, 13)), 2); } @@ -8666,16 +8718,17 @@ void WriteBEPSTable(EnergyPlusData &state) PreDefTableEntry(state, state.dataOutRptPredefined->pdchLeedEusTotal, "Total", - unconvert * (useValColAddFuel15 + useVal(colPurchCool, 15) + useVal(colPurchHeatWtr, 15) + useVal(colPurchHeatSt, 15) + - useVal(colElectricity, 15) + useVal(colGas, 15)), + unconvert_ipExceptElec * useVal(colElectricity, 15) + + unconvert * (useValColAddFuel15 + useVal(colPurchCool, 15) + useVal(colPurchHeatWtr, 15) + + useVal(colPurchHeatSt, 15) + +useVal(colGas, 15)), 2); PreDefTableEntry(state, state.dataOutRptPredefined->pdchLeedEusProc, "Total", - unconvert * - (useValColAddFuel5 + useValColAddFuel13 + useVal(colPurchCool, 5) + useVal(colPurchCool, 13) + - useVal(colPurchHeatWtr, 5) + useVal(colPurchHeatWtr, 13) + useVal(colPurchHeatSt, 5) + useVal(colPurchHeatSt, 13) + - useVal(colElectricity, 5) + useVal(colElectricity, 13) + useVal(colGas, 5) + useVal(colGas, 13)), + unconvert_ipExceptElec * (useVal(colElectricity, 5) + useVal(colElectricity, 13)) + + unconvert * (useValColAddFuel5 + useValColAddFuel13 + useVal(colPurchCool, 5) + useVal(colPurchCool, 13) + + useVal(colPurchHeatWtr, 5) + useVal(colPurchHeatWtr, 13) + useVal(colPurchHeatSt, 5) + + useVal(colPurchHeatSt, 13) + +useVal(colGas, 5) + useVal(colGas, 13)), 2); } @@ -8781,15 +8834,16 @@ void WriteBEPSTable(EnergyPlusData &state) for (int iResource = 1; iResource <= 13; ++iResource) { int i = 1; + Real64 localUnconvert = (iResource == 1) ? unconvert_ipExceptElec : unconvert; for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { - if (state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories > 0) { - for (int kEndUseSub = 1; kEndUseSub <= state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { + if (op->EndUseCategory(jEndUse).NumSubcategories > 0) { + for (int kEndUseSub = 1; kEndUseSub <= op->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { if (produceTabular) { PreDefTableEntry(state, resource_entry_map(iResource), - state.dataOutputProcessor->EndUseCategory(jEndUse).DisplayName + " -- " + - state.dataOutputProcessor->EndUseCategory(jEndUse).SubcategoryName(kEndUseSub), - unconvert * collapsedEndUseSub(kEndUseSub, jEndUse, iResource)); + op->EndUseCategory(jEndUse).DisplayName + " -- " + + op->EndUseCategory(jEndUse).SubcategoryName(kEndUseSub), + localUnconvert * collapsedEndUseSub(kEndUseSub, jEndUse, iResource)); } ++i; } @@ -8798,8 +8852,8 @@ void WriteBEPSTable(EnergyPlusData &state) if (produceTabular) { PreDefTableEntry(state, resource_entry_map(iResource), - state.dataOutputProcessor->EndUseCategory(jEndUse).DisplayName + " -- Other", - unconvert * endUseSubOther(iResource, jEndUse)); + op->EndUseCategory(jEndUse).DisplayName + " -- Other", + localUnconvert * endUseSubOther(iResource, jEndUse)); } ++i; } @@ -8807,8 +8861,8 @@ void WriteBEPSTable(EnergyPlusData &state) if (produceTabular) { PreDefTableEntry(state, resource_entry_map(iResource), - state.dataOutputProcessor->EndUseCategory(jEndUse).DisplayName + " -- Not Subdivided", - unconvert * collapsedEndUse(iResource, jEndUse)); + op->EndUseCategory(jEndUse).DisplayName + " -- Not Subdivided", + localUnconvert * collapsedEndUse(iResource, jEndUse)); } ++i; } @@ -8891,6 +8945,22 @@ void WriteBEPSTable(EnergyPlusData &state) columnHead(13) = "District Heating Steam Intensity [kBtu/ft2]"; columnHead(14) = "Water Intensity [gal/ft2]"; } break; + case UnitsStyle::InchPoundExceptElectricity: { + columnHead(1) = "Electricity Intensity [kWh/ft2]"; + columnHead(2) = "Natural Gas Intensity [kBtu/ft2]"; + columnHead(3) = "Gasoline Intensity [kBtu/ft2]"; + columnHead(4) = "Diesel Intensity [kBtu/ft2]"; + columnHead(5) = "Coal Intensity [kBtu/ft2]"; + columnHead(6) = "Fuel Oil No 1 Intensity [kBtu/ft2]"; + columnHead(7) = "Fuel Oil No 2 Intensity [kBtu/ft2]"; + columnHead(8) = "Propane Intensity [kBtu/ft2]"; + columnHead(9) = "Other Fuel 1 Intensity [kBtu/ft2]"; + columnHead(10) = "Other Fuel 2 Intensity [kBtu/ft2]"; + columnHead(11) = "District Cooling Intensity [kBtu/ft2]"; + columnHead(12) = "District Heating Water Intensity [kBtu/ft2]"; + columnHead(13) = "District Heating Steam Intensity [kBtu/ft2]"; + columnHead(14) = "Water Intensity [gal/ft2]"; + } break; default: { columnHead(1) = "Electricity Intensity [MJ/m2]"; columnHead(2) = "Natural Gas Intensity [MJ/m2]"; @@ -9000,6 +9070,9 @@ void WriteBEPSTable(EnergyPlusData &state) case UnitsStyle::InchPound: { columnHead(1) = "Electricity [kBtu]"; } break; + case UnitsStyle::InchPoundExceptElectricity: { + columnHead(1) = "Electricity [kWh]"; + } break; default: { columnHead(1) = "Electricity [GJ]"; } break; @@ -9028,11 +9101,11 @@ void WriteBEPSTable(EnergyPlusData &state) tableBody(1, 2) = RealToStr(ort->gatherPowerHTGeothermal, 3); tableBody(1, 3) = RealToStr(ort->gatherPowerPV, 3); if (produceTabular) { - PreDefTableEntry(state, state.dataOutRptPredefined->pdchLeedRenAnGen, "Photovoltaic", unconvert * ort->gatherPowerPV, 2); + PreDefTableEntry(state, state.dataOutRptPredefined->pdchLeedRenAnGen, "Photovoltaic", unconvert_ipExceptElec * ort->gatherPowerPV, 2); } tableBody(1, 4) = RealToStr(ort->gatherPowerWind, 3); if (produceTabular) { - PreDefTableEntry(state, state.dataOutRptPredefined->pdchLeedRenAnGen, "Wind", unconvert * ort->gatherPowerWind, 2); + PreDefTableEntry(state, state.dataOutRptPredefined->pdchLeedRenAnGen, "Wind", unconvert_ipExceptElec * ort->gatherPowerWind, 2); } tableBody(1, 5) = RealToStr(ort->gatherPowerConversion, 3); tableBody(1, 6) = RealToStr(ort->OverallNetEnergyFromStorage, 3); @@ -9094,6 +9167,9 @@ void WriteBEPSTable(EnergyPlusData &state) case UnitsStyle::InchPound: { columnHead(1) = "Heat [kBtu]"; } break; + case UnitsStyle::InchPoundExceptElectricity: { + columnHead(1) = "Heat [kBtu]"; + } break; default: { columnHead(1) = "Heat [GJ]"; } break; @@ -9198,6 +9274,9 @@ void WriteBEPSTable(EnergyPlusData &state) case UnitsStyle::InchPound: { columnHead(1) = "Water [gal]"; } break; + case UnitsStyle::InchPoundExceptElectricity: { + columnHead(1) = "Water [gal]"; + } break; default: { columnHead(1) = "Water [m3]"; } break; @@ -9291,7 +9370,8 @@ void WriteBEPSTable(EnergyPlusData &state) } std::string const curNameWithSIUnits = "Degrees [deltaC]"; - if (unitsStyle_cur == UnitsStyle::InchPound) { + if (unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPound || + unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity) { int indexUnitConv = -1; std::string curNameAndUnits; LookupSItoIP(state, curNameWithSIUnits, indexUnitConv, curNameAndUnits); @@ -9303,7 +9383,8 @@ void WriteBEPSTable(EnergyPlusData &state) rowHead(1) = "Tolerance for Zone Heating Setpoint Not Met Time"; rowHead(2) = "Tolerance for Zone Cooling Setpoint Not Met Time"; - if (unitsStyle_cur != UnitsStyle::InchPound) { + if (!(unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPound || + unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity)) { tableBody(1, 1) = RealToStr(std::abs(state.dataHVACGlobal->deviationFromSetPtThresholdHtg), 2); tableBody(1, 2) = RealToStr(state.dataHVACGlobal->deviationFromSetPtThresholdClg, 2); } else { @@ -9422,6 +9503,7 @@ void writeBEPSEndUseBySubCatOrSpaceType(EnergyPlusData &state, const bool produceSQLite) { auto const &ort = state.dataOutRptTab; + auto &op = state.dataOutputProcessor; constexpr int numCol = 15; Array1D_string columnHead; Array1D_int columnWidth; @@ -9463,6 +9545,22 @@ void writeBEPSEndUseBySubCatOrSpaceType(EnergyPlusData &state, columnHead(14) = "District Heating Steam [kBtu]"; columnHead(15) = "Water [gal]"; } break; + case UnitsStyle::InchPoundExceptElectricity: { + columnHead(2) = "Electricity [kWh]"; + columnHead(3) = "Natural Gas [kBtu]"; + columnHead(4) = "Gasoline [kBtu]"; + columnHead(5) = "Diesel [kBtu]"; + columnHead(6) = "Coal [kBtu]"; + columnHead(7) = "Fuel Oil No 1 [kBtu]"; + columnHead(8) = "Fuel Oil No 2 [kBtu]"; + columnHead(9) = "Propane [kBtu]"; + columnHead(10) = "Other Fuel 1 [kBtu]"; + columnHead(11) = "Other Fuel 2 [kBtu]"; + columnHead(12) = "District Cooling [kBtu]"; + columnHead(13) = "District Heating Water [kBtu]"; + columnHead(14) = "District Heating Steam [kBtu]"; + columnHead(15) = "Water [gal]"; + } break; default: { columnHead(2) = "Electricity [GJ]"; columnHead(3) = "Natural Gas [GJ]"; @@ -9497,9 +9595,9 @@ void writeBEPSEndUseBySubCatOrSpaceType(EnergyPlusData &state, for (int iResource = 1; iResource <= 14; ++iResource) { for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { if (tableType == EndUseSubTableType::BySubCategory) { - numSubCatOrTypes = state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories; + numSubCatOrTypes = op->EndUseCategory(jEndUse).NumSubcategories; } else if (tableType == EndUseSubTableType::BySpaceType) { - numSubCatOrTypes = state.dataOutputProcessor->EndUseCategory(jEndUse).numSpaceTypes; + numSubCatOrTypes = op->EndUseCategory(jEndUse).numSpaceTypes; } if (numSubCatOrTypes > 0) { // set the value to the total for the end use @@ -9522,9 +9620,9 @@ void writeBEPSEndUseBySubCatOrSpaceType(EnergyPlusData &state, for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { if (tableType == EndUseSubTableType::BySubCategory) { - numSubCatOrTypes = state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories; + numSubCatOrTypes = op->EndUseCategory(jEndUse).NumSubcategories; } else if (tableType == EndUseSubTableType::BySpaceType) { - numSubCatOrTypes = state.dataOutputProcessor->EndUseCategory(jEndUse).numSpaceTypes; + numSubCatOrTypes = op->EndUseCategory(jEndUse).numSpaceTypes; } if (numSubCatOrTypes > 0) { for (int kEndUseSub = 1; kEndUseSub <= numSubCatOrTypes; ++kEndUseSub) { @@ -9554,17 +9652,17 @@ void writeBEPSEndUseBySubCatOrSpaceType(EnergyPlusData &state, int i = 1; for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { if (tableType == EndUseSubTableType::BySubCategory) { - numSubCatOrTypes = state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories; + numSubCatOrTypes = op->EndUseCategory(jEndUse).NumSubcategories; } else if (tableType == EndUseSubTableType::BySpaceType) { - numSubCatOrTypes = state.dataOutputProcessor->EndUseCategory(jEndUse).numSpaceTypes; + numSubCatOrTypes = op->EndUseCategory(jEndUse).numSpaceTypes; } - rowHead(i) = state.dataOutputProcessor->EndUseCategory(jEndUse).DisplayName; + rowHead(i) = op->EndUseCategory(jEndUse).DisplayName; if (numSubCatOrTypes > 0) { for (int kEndUseSub = 1; kEndUseSub <= numSubCatOrTypes; ++kEndUseSub) { if (tableType == EndUseSubTableType::BySubCategory) { - tableBody(1, i) = state.dataOutputProcessor->EndUseCategory(jEndUse).SubcategoryName(kEndUseSub); + tableBody(1, i) = op->EndUseCategory(jEndUse).SubcategoryName(kEndUseSub); } else if (tableType == EndUseSubTableType::BySpaceType) { - tableBody(1, i) = state.dataOutputProcessor->EndUseCategory(jEndUse).spaceTypeName(kEndUseSub); + tableBody(1, i) = op->EndUseCategory(jEndUse).spaceTypeName(kEndUseSub); } ++i; } @@ -9588,9 +9686,9 @@ void writeBEPSEndUseBySubCatOrSpaceType(EnergyPlusData &state, int i = 1; for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { if (tableType == EndUseSubTableType::BySubCategory) { - numSubCatOrTypes = state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories; + numSubCatOrTypes = op->EndUseCategory(jEndUse).NumSubcategories; } else if (tableType == EndUseSubTableType::BySpaceType) { - numSubCatOrTypes = state.dataOutputProcessor->EndUseCategory(jEndUse).numSpaceTypes; + numSubCatOrTypes = op->EndUseCategory(jEndUse).numSpaceTypes; } if (numSubCatOrTypes > 0) { for (int kEndUseSub = 1; kEndUseSub <= numSubCatOrTypes; ++kEndUseSub) { @@ -9737,6 +9835,7 @@ void WriteSourceEnergyEndUseSummary(EnergyPlusData &state) // unit conversion - all values are used as divisors Real64 largeConversionFactor; Real64 areaConversionFactor; + Real64 ipElectricityConversionFactor = 1.0; switch (unitsStyle_cur) { case UnitsStyle::JtoKWH: { largeConversionFactor = 3600000.0; @@ -9746,6 +9845,11 @@ void WriteSourceEnergyEndUseSummary(EnergyPlusData &state) largeConversionFactor = getSpecificUnitDivider(state, "J", "kBtu"); // 1054351.84 J to kBtu areaConversionFactor = getSpecificUnitDivider(state, "m2", "ft2"); // 0.092893973 m2 to ft2 } break; + case UnitsStyle::InchPoundExceptElectricity: { + largeConversionFactor = getSpecificUnitDivider(state, "J", "kBtu"); // 1054351.84 J to kBtu + areaConversionFactor = getSpecificUnitDivider(state, "m2", "ft2"); // 0.092893973 m2 to ft2 + ipElectricityConversionFactor = largeConversionFactor / (1000.0 * 3600.0); + } break; default: { largeConversionFactor = 1000000.0; // to MJ areaConversionFactor = 1.0; @@ -9754,10 +9858,11 @@ void WriteSourceEnergyEndUseSummary(EnergyPlusData &state) // convert units into MJ (divide by 1,000,000) if J otherwise kWh for (int iResource = 1; iResource <= 13; ++iResource) { // don't do water + Real64 ipElectricityAdjust = (iResource == 1) ? ipElectricityConversionFactor : 1.0; for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { - collapsedEndUse(iResource, jEndUse) /= largeConversionFactor; + collapsedEndUse(iResource, jEndUse) /= (largeConversionFactor / ipElectricityAdjust); } - collapsedTotal(iResource) /= largeConversionFactor; + collapsedTotal(iResource) /= (largeConversionFactor / ipElectricityAdjust); } rowHead.allocate(16); @@ -9822,6 +9927,21 @@ void WriteSourceEnergyEndUseSummary(EnergyPlusData &state) columnHead(12) = "Source District Heating Water [kBtu]"; columnHead(13) = "Source District Heating Steam [kBtu]"; } break; + case UnitsStyle::InchPoundExceptElectricity: { + columnHead(1) = "Source Electricity [kWh]"; + columnHead(2) = "Source Natural Gas [kBtu]"; + columnHead(3) = "Source Gasoline [kBtu]"; + columnHead(4) = "Source Diesel [kBtu]"; + columnHead(5) = "Source Coal [kBtu]"; + columnHead(6) = "Source Fuel Oil No 1 [kBtu]"; + columnHead(7) = "Source Fuel Oil No 2 [kBtu]"; + columnHead(8) = "Source Propane [kBtu]"; + columnHead(9) = "Source Other Fuel 1 [kBtu]"; + columnHead(10) = "Source Other Fuel 2 [kBtu]"; + columnHead(11) = "Source District Cooling [kBtu]"; + columnHead(12) = "Source District Heating Water [kBtu]"; + columnHead(13) = "Source District Heating Steam [kBtu]"; + } break; default: { columnHead(1) = "Source Electricity [GJ]"; columnHead(2) = "Source Natural Gas [GJ]"; @@ -9909,6 +10029,21 @@ void WriteSourceEnergyEndUseSummary(EnergyPlusData &state) columnHead(12) = "Source District Heating Water [kBtu/ft2]"; columnHead(13) = "Source District Heating Steam [kBtu/ft2]"; } break; + case UnitsStyle::InchPoundExceptElectricity: { + columnHead(1) = "Source Electricity [kWh/ft2]"; + columnHead(2) = "Source Natural Gas [kBtu/ft2]"; + columnHead(3) = "Source Gasoline [kBtu/ft2]"; + columnHead(4) = "Source Diesel [kBtu/ft2]"; + columnHead(5) = "Source Coal [kBtu/ft2]"; + columnHead(6) = "Source Fuel Oil No 1 [kBtu/ft2]"; + columnHead(7) = "Source Fuel Oil No 2 [kBtu/ft2]"; + columnHead(8) = "Source Propane [kBtu/ft2]"; + columnHead(9) = "Source Other Fuel 1 [kBtu/ft2]"; + columnHead(10) = "Source Other Fuel 2 [kBtu/ft2]"; + columnHead(11) = "Source District Cooling [kBtu/ft2]"; + columnHead(12) = "Source District Heating Water [kBtu/ft2]"; + columnHead(13) = "Source District Heating Steam [kBtu/ft2]"; + } break; default: { columnHead(1) = "Source Electricity [MJ/m2]"; columnHead(2) = "Source Natural Gas [MJ/m2]"; @@ -10033,6 +10168,7 @@ void WriteDemandEndUseSummary(EnergyPlusData &state) // its own call to WriteTable. auto &ort = state.dataOutRptTab; + auto &op = state.dataOutputProcessor; if (!ort->displayDemandEndUse) { return; @@ -10057,6 +10193,7 @@ void WriteDemandEndUseSummary(EnergyPlusData &state) // show the headers of the report WriteReportHeaders(state, "Demand End Use Components Summary", "Entire Facility", OutputProcessor::StoreType::Averaged); + Real64 ipElectricityConversion = 1.0; // declare here so that last one used is correct for LEEED section for (int iUnitSystem = 0; iUnitSystem <= 1; iUnitSystem++) { UnitsStyle unitsStyle_cur = ort->unitsStyle; bool produceTabular = true; @@ -10096,34 +10233,40 @@ void WriteDemandEndUseSummary(EnergyPlusData &state) Real64 powerConversion = 1.0; Real64 flowConversion = 1.0; + ipElectricityConversion = 1.0; // establish unit conversion factors if (unitsStyle_cur == UnitsStyle::InchPound) { powerConversion = getSpecificUnitMultiplier(state, "W", "kBtuh"); flowConversion = getSpecificUnitMultiplier(state, "m3/s", "gal/min"); + } else if (unitsStyle_cur == UnitsStyle::InchPoundExceptElectricity) { + powerConversion = getSpecificUnitMultiplier(state, "W", "kBtuh"); + flowConversion = getSpecificUnitMultiplier(state, "m3/s", "gal/min"); + ipElectricityConversion = powerConversion * 1000.0; // W to kW adjustment } // collapse the gatherEndUseBEPS array to the resource groups displayed collapsedEndUse = 0.0; for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { - collapsedEndUse(1, jEndUse) = ort->gatherDemandEndUse(1, jEndUse) * powerConversion; // electricity - collapsedEndUse(2, jEndUse) = ort->gatherDemandEndUse(2, jEndUse) * powerConversion; // natural gas - collapsedEndUse(3, jEndUse) = ort->gatherDemandEndUse(6, jEndUse) * powerConversion; // gasoline - collapsedEndUse(4, jEndUse) = ort->gatherDemandEndUse(8, jEndUse) * powerConversion; // diesel - collapsedEndUse(5, jEndUse) = ort->gatherDemandEndUse(9, jEndUse) * powerConversion; // coal - collapsedEndUse(6, jEndUse) = ort->gatherDemandEndUse(10, jEndUse) * powerConversion; // fuel oil no 1 - collapsedEndUse(7, jEndUse) = ort->gatherDemandEndUse(11, jEndUse) * powerConversion; // fuel oil no 2 - collapsedEndUse(8, jEndUse) = ort->gatherDemandEndUse(12, jEndUse) * powerConversion; // propane - collapsedEndUse(9, jEndUse) = ort->gatherDemandEndUse(13, jEndUse) * powerConversion; // otherfuel1 - collapsedEndUse(10, jEndUse) = ort->gatherDemandEndUse(14, jEndUse) * powerConversion; // otherfuel2 - collapsedEndUse(11, jEndUse) = ort->gatherDemandEndUse(3, jEndUse) * powerConversion; // purchased cooling - collapsedEndUse(12, jEndUse) = ort->gatherDemandEndUse(4, jEndUse) * powerConversion; // district heating water - collapsedEndUse(13, jEndUse) = ort->gatherDemandEndUse(5, jEndUse) * powerConversion; // district heating steam - collapsedEndUse(14, jEndUse) = ort->gatherDemandEndUse(7, jEndUse) * flowConversion; // water + collapsedEndUse(1, jEndUse) = ort->gatherDemandEndUse(1, jEndUse) * (powerConversion / ipElectricityConversion); // electricity + collapsedEndUse(2, jEndUse) = ort->gatherDemandEndUse(2, jEndUse) * powerConversion; // natural gas + collapsedEndUse(3, jEndUse) = ort->gatherDemandEndUse(6, jEndUse) * powerConversion; // gasoline + collapsedEndUse(4, jEndUse) = ort->gatherDemandEndUse(8, jEndUse) * powerConversion; // diesel + collapsedEndUse(5, jEndUse) = ort->gatherDemandEndUse(9, jEndUse) * powerConversion; // coal + collapsedEndUse(6, jEndUse) = ort->gatherDemandEndUse(10, jEndUse) * powerConversion; // fuel oil no 1 + collapsedEndUse(7, jEndUse) = ort->gatherDemandEndUse(11, jEndUse) * powerConversion; // fuel oil no 2 + collapsedEndUse(8, jEndUse) = ort->gatherDemandEndUse(12, jEndUse) * powerConversion; // propane + collapsedEndUse(9, jEndUse) = ort->gatherDemandEndUse(13, jEndUse) * powerConversion; // otherfuel1 + collapsedEndUse(10, jEndUse) = ort->gatherDemandEndUse(14, jEndUse) * powerConversion; // otherfuel2 + collapsedEndUse(11, jEndUse) = ort->gatherDemandEndUse(3, jEndUse) * powerConversion; // purchased cooling + collapsedEndUse(12, jEndUse) = ort->gatherDemandEndUse(4, jEndUse) * powerConversion; // district heating water + collapsedEndUse(13, jEndUse) = ort->gatherDemandEndUse(5, jEndUse) * powerConversion; // district heating steam + collapsedEndUse(14, jEndUse) = ort->gatherDemandEndUse(7, jEndUse) * flowConversion; // water } for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { - for (int kEndUseSub = 1; kEndUseSub <= state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { - collapsedEndUseSub(kEndUseSub, jEndUse, 1) = ort->gatherDemandEndUseSub(kEndUseSub, jEndUse, 1) * powerConversion; // electricity + for (int kEndUseSub = 1; kEndUseSub <= op->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { + collapsedEndUseSub(kEndUseSub, jEndUse, 1) = + ort->gatherDemandEndUseSub(kEndUseSub, jEndUse, 1) * (powerConversion / ipElectricityConversion); // electricity collapsedEndUseSub(kEndUseSub, jEndUse, 2) = ort->gatherDemandEndUseSub(kEndUseSub, jEndUse, 2) * powerConversion; // natural gas collapsedEndUseSub(kEndUseSub, jEndUse, 3) = ort->gatherDemandEndUseSub(kEndUseSub, jEndUse, 6) * powerConversion; // gasoline collapsedEndUseSub(kEndUseSub, jEndUse, 4) = ort->gatherDemandEndUseSub(kEndUseSub, jEndUse, 8) * powerConversion; // diesel @@ -10146,24 +10289,25 @@ void WriteDemandEndUseSummary(EnergyPlusData &state) // no unit conversion, it is done at the reporting stage if necessary collapsedIndEndUse = 0.0; for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { - collapsedIndEndUse(1, jEndUse) = ort->gatherDemandIndEndUse(1, jEndUse); // electricity - collapsedIndEndUse(2, jEndUse) = ort->gatherDemandIndEndUse(2, jEndUse); // natural gas - collapsedIndEndUse(3, jEndUse) = ort->gatherDemandIndEndUse(6, jEndUse); // gasoline - collapsedIndEndUse(4, jEndUse) = ort->gatherDemandIndEndUse(8, jEndUse); // diesel - collapsedIndEndUse(5, jEndUse) = ort->gatherDemandIndEndUse(9, jEndUse); // coal - collapsedIndEndUse(6, jEndUse) = ort->gatherDemandIndEndUse(10, jEndUse); // fuel oil no 1 - collapsedIndEndUse(7, jEndUse) = ort->gatherDemandIndEndUse(11, jEndUse); // fuel oil no 2 - collapsedIndEndUse(8, jEndUse) = ort->gatherDemandIndEndUse(12, jEndUse); // propane - collapsedIndEndUse(9, jEndUse) = ort->gatherDemandIndEndUse(13, jEndUse); // otherfuel1 - collapsedIndEndUse(10, jEndUse) = ort->gatherDemandIndEndUse(14, jEndUse); // otherfuel2 - collapsedIndEndUse(11, jEndUse) = ort->gatherDemandIndEndUse(3, jEndUse); // purchased cooling - collapsedIndEndUse(12, jEndUse) = ort->gatherDemandIndEndUse(4, jEndUse); // district heating water - collapsedIndEndUse(13, jEndUse) = ort->gatherDemandIndEndUse(5, jEndUse); // district heating steam - collapsedIndEndUse(14, jEndUse) = ort->gatherDemandIndEndUse(7, jEndUse); // water + collapsedIndEndUse(1, jEndUse) = ort->gatherDemandIndEndUse(1, jEndUse) * (1.0 / ipElectricityConversion); // electricity + collapsedIndEndUse(2, jEndUse) = ort->gatherDemandIndEndUse(2, jEndUse); // natural gas + collapsedIndEndUse(3, jEndUse) = ort->gatherDemandIndEndUse(6, jEndUse); // gasoline + collapsedIndEndUse(4, jEndUse) = ort->gatherDemandIndEndUse(8, jEndUse); // diesel + collapsedIndEndUse(5, jEndUse) = ort->gatherDemandIndEndUse(9, jEndUse); // coal + collapsedIndEndUse(6, jEndUse) = ort->gatherDemandIndEndUse(10, jEndUse); // fuel oil no 1 + collapsedIndEndUse(7, jEndUse) = ort->gatherDemandIndEndUse(11, jEndUse); // fuel oil no 2 + collapsedIndEndUse(8, jEndUse) = ort->gatherDemandIndEndUse(12, jEndUse); // propane + collapsedIndEndUse(9, jEndUse) = ort->gatherDemandIndEndUse(13, jEndUse); // otherfuel1 + collapsedIndEndUse(10, jEndUse) = ort->gatherDemandIndEndUse(14, jEndUse); // otherfuel2 + collapsedIndEndUse(11, jEndUse) = ort->gatherDemandIndEndUse(3, jEndUse); // purchased cooling + collapsedIndEndUse(12, jEndUse) = ort->gatherDemandIndEndUse(4, jEndUse); // district heating water + collapsedIndEndUse(13, jEndUse) = ort->gatherDemandIndEndUse(5, jEndUse); // district heating steam + collapsedIndEndUse(14, jEndUse) = ort->gatherDemandIndEndUse(7, jEndUse); // water } for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { - for (int kEndUseSub = 1; kEndUseSub <= state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { - collapsedIndEndUseSub(kEndUseSub, jEndUse, 1) = ort->gatherDemandIndEndUseSub(kEndUseSub, jEndUse, 1); // electricity + for (int kEndUseSub = 1; kEndUseSub <= op->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { + collapsedIndEndUseSub(kEndUseSub, jEndUse, 1) = + ort->gatherDemandIndEndUseSub(kEndUseSub, jEndUse, 1) * (1.0 / ipElectricityConversion); // electricity collapsedIndEndUseSub(kEndUseSub, jEndUse, 2) = ort->gatherDemandIndEndUseSub(kEndUseSub, jEndUse, 2); // natural gas collapsedIndEndUseSub(kEndUseSub, jEndUse, 3) = ort->gatherDemandIndEndUseSub(kEndUseSub, jEndUse, 6); // gasoline collapsedIndEndUseSub(kEndUseSub, jEndUse, 4) = ort->gatherDemandIndEndUseSub(kEndUseSub, jEndUse, 8); // diesel @@ -10181,20 +10325,20 @@ void WriteDemandEndUseSummary(EnergyPlusData &state) } // convert totals - collapsedTotal(1) *= powerConversion; // electricity - collapsedTotal(2) *= powerConversion; // natural gas - collapsedTotal(3) *= powerConversion; // gasoline - collapsedTotal(4) *= powerConversion; // diesel - collapsedTotal(5) *= powerConversion; // coal - collapsedTotal(6) *= powerConversion; // fuel oil no 1 - collapsedTotal(7) *= powerConversion; // fuel oil no 2 - collapsedTotal(8) *= powerConversion; // propane - collapsedTotal(9) *= powerConversion; // otherfuel1 - collapsedTotal(10) *= powerConversion; // otherfuel2 - collapsedTotal(11) *= powerConversion; // purchased cooling - collapsedTotal(12) *= powerConversion; // district heating water - collapsedTotal(13) *= powerConversion; // district heating steam - collapsedTotal(14) *= flowConversion; // water + collapsedTotal(1) *= (powerConversion / ipElectricityConversion); // electricity + collapsedTotal(2) *= powerConversion; // natural gas + collapsedTotal(3) *= powerConversion; // gasoline + collapsedTotal(4) *= powerConversion; // diesel + collapsedTotal(5) *= powerConversion; // coal + collapsedTotal(6) *= powerConversion; // fuel oil no 1 + collapsedTotal(7) *= powerConversion; // fuel oil no 2 + collapsedTotal(8) *= powerConversion; // propane + collapsedTotal(9) *= powerConversion; // otherfuel1 + collapsedTotal(10) *= powerConversion; // otherfuel2 + collapsedTotal(11) *= powerConversion; // purchased cooling + collapsedTotal(12) *= powerConversion; // district heating water + collapsedTotal(13) *= powerConversion; // district heating steam + collapsedTotal(14) *= flowConversion; // water //---- End Use Sub-Table rowHead.allocate(17); columnHead.allocate(14); @@ -10241,6 +10385,21 @@ void WriteDemandEndUseSummary(EnergyPlusData &state) columnHead(12) = "District Heating Water [kBtuh]"; columnHead(13) = "District Heating Steam [kBtuh]"; columnHead(14) = "Water [gal/min]"; + } else if (unitsStyle_cur == UnitsStyle::InchPoundExceptElectricity) { + columnHead(1) = "Electricity [kW]"; + columnHead(2) = "Natural Gas [kBtuh]"; + columnHead(3) = "Gasoline [kBtuh]"; + columnHead(4) = "Diesel [kBtuh]"; + columnHead(5) = "Coal [kBtuh]"; + columnHead(6) = "Fuel Oil No 1 [kBtuh]"; + columnHead(7) = "Fuel Oil No 2 [kBtuh]"; + columnHead(8) = "Propane [kBtuh]"; + columnHead(9) = "Other Fuel 1 [kBtuh]"; + columnHead(10) = "Other Fuel 2 [kBtuh]"; + columnHead(11) = "District Cooling [kBtuh]"; + columnHead(12) = "District Heating Water [kBtuh]"; + columnHead(13) = "District Heating Steam [kBtuh]"; + columnHead(14) = "Water [gal/min]"; } else { columnHead(1) = "Electricity [W]"; columnHead(2) = "Natural Gas [W]"; @@ -10289,8 +10448,8 @@ void WriteDemandEndUseSummary(EnergyPlusData &state) //---- End Uses By Subcategory Sub-Table int numRows = 0; for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { - if (state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories > 0) { - for (int kEndUseSub = 1; kEndUseSub <= state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { + if (op->EndUseCategory(jEndUse).NumSubcategories > 0) { + for (int kEndUseSub = 1; kEndUseSub <= op->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { ++numRows; } } else { @@ -10311,10 +10470,10 @@ void WriteDemandEndUseSummary(EnergyPlusData &state) { int i = 1; for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { - rowHead(i) = state.dataOutputProcessor->EndUseCategory(jEndUse).DisplayName; - if (state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories > 0) { - for (int kEndUseSub = 1; kEndUseSub <= state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { - tableBody(1, i) = state.dataOutputProcessor->EndUseCategory(jEndUse).SubcategoryName(kEndUseSub); + rowHead(i) = op->EndUseCategory(jEndUse).DisplayName; + if (op->EndUseCategory(jEndUse).NumSubcategories > 0) { + for (int kEndUseSub = 1; kEndUseSub <= op->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { + tableBody(1, i) = op->EndUseCategory(jEndUse).SubcategoryName(kEndUseSub); ++i; } } else { @@ -10340,6 +10499,22 @@ void WriteDemandEndUseSummary(EnergyPlusData &state) columnHead(13) = "District Heating Water [kBtuh]"; columnHead(14) = "District Heating Steam [kBtuh]"; columnHead(15) = "Water [gal/min]"; + } else if (unitsStyle_cur == UnitsStyle::InchPoundExceptElectricity) { + columnHead(1) = "Subcategory"; + columnHead(2) = "Electricity [kW]"; + columnHead(3) = "Natural Gas [kBtuh]"; + columnHead(4) = "Gasoline [kBtuh]"; + columnHead(5) = "Diesel [kBtuh]"; + columnHead(6) = "Coal [kBtuh]"; + columnHead(7) = "Fuel Oil No 1 [kBtuh]"; + columnHead(8) = "Fuel Oil No 2 [kBtuh]"; + columnHead(9) = "Propane [kBtuh]"; + columnHead(10) = "Other Fuel 1 [kBtuh]"; + columnHead(11) = "Other Fuel 2 [kBtuh]"; + columnHead(12) = "District Cooling [kBtuh]"; + columnHead(13) = "District Heating Water [kBtuh]"; + columnHead(14) = "District Heating Steam [kBtuh]"; + columnHead(15) = "Water [gal/min]"; } else { columnHead(1) = "Subcategory"; columnHead(2) = "Electricity [W]"; @@ -10361,8 +10536,8 @@ void WriteDemandEndUseSummary(EnergyPlusData &state) for (int iResource = 1; iResource <= 14; ++iResource) { int i = 1; for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { - if (state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories > 0) { - for (int kEndUseSub = 1; kEndUseSub <= state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { + if (op->EndUseCategory(jEndUse).NumSubcategories > 0) { + for (int kEndUseSub = 1; kEndUseSub <= op->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { tableBody(iResource + 1, i) = RealToStr(collapsedEndUseSub(kEndUseSub, jEndUse, iResource), 2); ++i; } @@ -10414,11 +10589,11 @@ void WriteDemandEndUseSummary(EnergyPlusData &state) for (int iResource = 1; iResource <= 14; ++iResource) { for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { if (ort->needOtherRowLEED45(jEndUse)) { - if (state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories == 0) { + if (op->EndUseCategory(jEndUse).NumSubcategories == 0) { endUseSubOther(iResource, jEndUse) = collapsedIndEndUse(iResource, jEndUse); // often the case that no subcategories are defined } else { Real64 sumOfSubcategories = 0.; - for (int kEndUseSub = 1; kEndUseSub <= state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { + for (int kEndUseSub = 1; kEndUseSub <= op->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { sumOfSubcategories += collapsedIndEndUseSub(kEndUseSub, jEndUse, iResource); } endUseSubOther(iResource, jEndUse) = collapsedIndEndUse(iResource, jEndUse) - sumOfSubcategories; @@ -10448,29 +10623,29 @@ void WriteDemandEndUseSummary(EnergyPlusData &state) for (int iResource = 1; iResource <= 13; ++iResource) { int i = 1; + Real64 localUnconvert = (iResource == 1) ? ipElectricityConversion : 1.0; for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { - if (state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories > 0) { - for (int kEndUseSub = 1; kEndUseSub <= state.dataOutputProcessor->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { + if (op->EndUseCategory(jEndUse).NumSubcategories > 0) { + for (int kEndUseSub = 1; kEndUseSub <= op->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { PreDefTableEntry(state, resource_entry_map(iResource), - state.dataOutputProcessor->EndUseCategory(jEndUse).DisplayName + " -- " + - state.dataOutputProcessor->EndUseCategory(jEndUse).SubcategoryName(kEndUseSub), - collapsedIndEndUseSub(kEndUseSub, jEndUse, iResource)); + op->EndUseCategory(jEndUse).DisplayName + " -- " + op->EndUseCategory(jEndUse).SubcategoryName(kEndUseSub), + localUnconvert * collapsedIndEndUseSub(kEndUseSub, jEndUse, iResource)); ++i; } // put other if (ort->needOtherRowLEED45(jEndUse)) { PreDefTableEntry(state, resource_entry_map(iResource), - state.dataOutputProcessor->EndUseCategory(jEndUse).DisplayName + " -- Other", - endUseSubOther(iResource, jEndUse)); + op->EndUseCategory(jEndUse).DisplayName + " -- Other", + localUnconvert * endUseSubOther(iResource, jEndUse)); ++i; } } else { PreDefTableEntry(state, resource_entry_map(iResource), - state.dataOutputProcessor->EndUseCategory(jEndUse).DisplayName + " -- Not Subdivided", - collapsedIndEndUse(iResource, jEndUse)); + op->EndUseCategory(jEndUse).DisplayName + " -- Not Subdivided", + localUnconvert * collapsedIndEndUse(iResource, jEndUse)); ++i; } } @@ -10557,7 +10732,8 @@ void WriteCompCostTable(EnergyPlusData &state) rowHead(7) = "Permits, Bonds, Insurance (~~$~~)"; rowHead(8) = "Commissioning (~~$~~)"; rowHead(9) = "Cost Estimate Total (~~$~~)"; - if (unitsStyle_cur == UnitsStyle::InchPound) { + if (unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPound || + unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity) { std::string const SIunit = "[m2]"; std::string m2_unitName; LookupSItoIP(state, SIunit, state.dataOutRptTab->unitConvIndexWCCT, m2_unitName); @@ -10692,7 +10868,8 @@ void WriteCompCostTable(EnergyPlusData &state) for (int item = 1; item <= (int)state.dataCostEstimateManager->CostLineItem.size(); ++item) { tableBody(1, item) = fmt::to_string(state.dataCostEstimateManager->CostLineItem(item).LineNumber); tableBody(2, item) = state.dataCostEstimateManager->CostLineItem(item).LineName; - if (unitsStyle_cur == UnitsStyle::InchPound) { + if (unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPound || + unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity) { std::string IPunitName; LookupSItoIP(state, state.dataCostEstimateManager->CostLineItem(item).Units, state.dataOutRptTab->unitConvIndexWCCT, IPunitName); if (state.dataOutRptTab->unitConvIndexWCCT != 0) { @@ -10861,6 +11038,21 @@ void WriteVeriSumTable(EnergyPlusData &state) SIunit = "[W/m2]"; LookupSItoIP(state, SIunit, state.dataOutRptTab->unitConvIndexWVST, state.dataOutRptTab->Wm2_unitName); state.dataOutRptTab->Wm2_unitConv = ConvertIP(state, state.dataOutRptTab->unitConvIndexWVST, 1.0); + } else if (unitsStyle_cur == UnitsStyle::InchPoundExceptElectricity) { + std::string SIunit; + SIunit = "[m]"; + LookupSItoIP(state, SIunit, state.dataOutRptTab->unitConvIndexWVST, state.dataOutRptTab->m_unitName); + state.dataOutRptTab->m_unitConv = ConvertIP(state, state.dataOutRptTab->unitConvIndexWVST, 1.0); + SIunit = "[m2]"; + LookupSItoIP(state, SIunit, state.dataOutRptTab->unitConvIndexWVST, state.dataOutRptTab->m2_unitName); + state.dataOutRptTab->m2_unitConvWVST = ConvertIP(state, state.dataOutRptTab->unitConvIndexWVST, 1.0); + SIunit = "[m3]"; + LookupSItoIP(state, SIunit, state.dataOutRptTab->unitConvIndexWVST, state.dataOutRptTab->m3_unitName); + state.dataOutRptTab->m3_unitConv = ConvertIP(state, state.dataOutRptTab->unitConvIndexWVST, 1.0); + SIunit = "[W/m2]"; + // LookupSItoIP(state, SIunit, state.dataOutRptTab->unitConvIndexWVST, state.dataOutRptTab->Wm2_unitName); + state.dataOutRptTab->Wm2_unitName = "[W/ft2]"; + state.dataOutRptTab->Wm2_unitConv = 0.3048 * 0.3048; // ConvertIP(state, state.dataOutRptTab->unitConvIndexWVST, 1.0); } else { state.dataOutRptTab->m_unitName = "[m]"; state.dataOutRptTab->m_unitConv = 1.0; @@ -12137,7 +12329,8 @@ void WriteThermalResilienceTablesRepPeriod(EnergyPlusData &state, int const peri Real64 degreeHourConversion; UnitsStyle unitsStyle_cur = ort->unitsStyle; - if (unitsStyle_cur == UnitsStyle::InchPound) { + if (unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPound || + unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity) { degreeHourConversion = getSpecificUnitMultiplier(state, "°C·hr", "°F·hr"); } else { degreeHourConversion = 1.0; @@ -12152,7 +12345,8 @@ void WriteThermalResilienceTablesRepPeriod(EnergyPlusData &state, int const peri columnWidth.allocate(columnNum); columnWidth = 10; Array1D_string columnHead(5); - if (unitsStyle_cur == UnitsStyle::InchPound) { + if (unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPound || + unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity) { columnHead(1) = "Safe (≤ 80.1°F) [hr]"; columnHead(2) = "Caution (> 80.1°F, ≤ 90.0°F) [hr]"; columnHead(3) = "Extreme Caution (> 90.0°F, ≤ 102.9°F) [hr]"; @@ -12283,7 +12477,8 @@ void WriteThermalResilienceTablesRepPeriod(EnergyPlusData &state, int const peri columnHead(4) = "Longest SET ≤ 12.2°C Duration for Occupied Period [hr]"; columnHead(5) = "Start Time of the Longest SET ≤ 12.2°C Duration for Occupied Period "; - if (unitsStyle_cur == UnitsStyle::InchPound) { + if (unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPound || + unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity) { columnHead(1) = "SET ≤ 54.0°F Degree-Hours [°F·hr]"; columnHead(2) = "SET ≤ 54.0°F Occupant-Weighted Degree-Hours [°F·hr]"; columnHead(3) = "SET ≤ 54.0°F Occupied Degree-Hours [°F·hr]"; @@ -12314,7 +12509,8 @@ void WriteThermalResilienceTablesRepPeriod(EnergyPlusData &state, int const peri tableBodySET, degreeHourConversion); - if (unitsStyle_cur == UnitsStyle::InchPound) { + if (unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPound || + unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity) { columnHead(1) = "SET > 86°F Degree-Hours [°F·hr]"; columnHead(2) = "SET > 86°F Occupant-Weighted Degree-Hours [°F·hr]"; columnHead(3) = "SET > 86°F Occupied Degree-Hours [°F·hr]"; @@ -12387,7 +12583,8 @@ void WriteThermalResilienceTablesRepPeriod(EnergyPlusData &state, int const peri columnHeadUnmetDegHr(6) = "Heating Setpoint Unmet Occupied Degree-Hours [°C·hr]"; tableName = "Unmet Degree-Hours"; - if (unitsStyle_cur == UnitsStyle::InchPound) { + if (unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPound || + unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity) { int indexUnitConv; std::string curUnits; for (int i = 1; i < columnNumUnmetDegHr; i++) { @@ -12905,7 +13102,8 @@ void WriteThermalResilienceTables(EnergyPlusData &state) Real64 degreeHourConversion; UnitsStyle unitsStyle_cur = ort->unitsStyle; - if (unitsStyle_cur == UnitsStyle::InchPound) { + if (unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPound || + unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity) { degreeHourConversion = getSpecificUnitMultiplier(state, "°C·hr", "°F·hr"); } else { degreeHourConversion = 1.0; @@ -12922,7 +13120,8 @@ void WriteThermalResilienceTables(EnergyPlusData &state) tableBody.allocate(numColumnThermalTbl, state.dataGlobal->NumOfZones + 4); Array1D_string columnHeadStr(numColumnThermalTbl); - if (unitsStyle_cur == UnitsStyle::InchPound) { + if (unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPound || + unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity) { columnHeadStr(1) = "Safe (≤ 80.1°F) [hr]"; columnHeadStr(2) = "Caution (> 80.1°F, ≤ 90.0°F) [hr]"; columnHeadStr(3) = "Extreme Caution (> 90.0°F, ≤ 102.9°F) [hr]"; @@ -12993,7 +13192,8 @@ void WriteThermalResilienceTables(EnergyPlusData &state) } if (hasPierceSET) { - if (unitsStyle_cur == UnitsStyle::InchPound) { + if (unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPound || + unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity) { columnHeadStr(1) = "SET > 86°F Degree-Hours [°F·hr]"; columnHeadStr(2) = "SET > 86°F Occupant-Weighted Degree-Hours [°F·hr]"; columnHeadStr(3) = "SET > 86°F Occupied Degree-Hours [°F·hr]"; @@ -13060,6 +13260,13 @@ void WriteThermalResilienceTables(EnergyPlusData &state) LookupSItoIP(state, columnHeadUnmetDegHr(i), indexUnitConv, curUnits); columnHeadUnmetDegHr(i) = curUnits; } + } else if (unitsStyle_cur == UnitsStyle::InchPoundExceptElectricity) { + int indexUnitConv; + std::string curUnits; + for (int i = 1; i < numColumnUnmetDegreeHourTbl; i++) { + LookupSItoIP(state, columnHeadUnmetDegHr(i), indexUnitConv, curUnits); + columnHeadUnmetDegHr(i) = curUnits; + } } std::array DataHeatBalance::ZoneResilience::*ptrUnmetDegreeHourBins = @@ -13190,7 +13397,7 @@ void WriteCO2ResilienceTablesRepPeriod(EnergyPlusData &state, const int periodId void WriteVisualResilienceTables(EnergyPlusData &state) { for (int ZoneNum = 1; ZoneNum <= state.dataGlobal->NumOfZones; ++ZoneNum) { - if (state.dataDaylightingData->ZoneDaylight(ZoneNum).totRefPts == 0) { + if (state.dataDayltg->ZoneDaylight(ZoneNum).totRefPts == 0) { if (state.dataOutRptTab->displayVisualResilienceSummaryExplicitly) { ShowWarningError(state, format("Writing Annual Visual Resilience Summary - Lighting Level Hours reports: Zone Average Daylighting Reference " @@ -13321,7 +13528,8 @@ void WriteHeatEmissionTable(EnergyPlusData &state) tableBody.allocate(6, 1); Real64 energyconversion = 1.0; - if (unitsStyle_cur == UnitsStyle::InchPound) { + if (unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPound || + unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity) { rowHead(1) = "Heat Emissions [kBtu]"; energyconversion = 1.0 / getSpecificUnitDivider(state, "GJ", "kBtu"); // 1054351.84 J to kBtu } else if (unitsStyle_cur == UnitsStyle::JtoGJ) { @@ -13519,6 +13727,9 @@ void WritePredefinedTables(EnergyPlusData &state) if (unitsStyle_cur == UnitsStyle::InchPound) { LookupSItoIP(state, colTagWithSI, indexUnitConv, curColTag); colUnitConv(countColumn) = indexUnitConv; + } else if (unitsStyle_cur == UnitsStyle::InchPoundExceptElectricity) { + LookupSItoIP(state, colTagWithSI, indexUnitConv, curColTag); + colUnitConv(countColumn) = indexUnitConv; } else if (unitsStyle_cur == UnitsStyle::JtoKWH) { LookupJtokWH(state, colTagWithSI, indexUnitConv, curColTag); colUnitConv(countColumn) = indexUnitConv; @@ -13551,10 +13762,13 @@ void WritePredefinedTables(EnergyPlusData &state) } } // finally assign the entry to the place in the table body - if (unitsStyle_cur == UnitsStyle::InchPound || unitsStyle_cur == UnitsStyle::JtoKWH) { + if (unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPound || + unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity || + unitsStyle_cur == UnitsStyle::JtoKWH) { int columnUnitConv = colUnitConv(colCurrent); if (Util::SameString(state.dataOutRptPredefined->subTable(jSubTable).name, "SizingPeriod:DesignDay") && - unitsStyle_cur == UnitsStyle::InchPound) { + (unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPound || + unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity)) { if (Util::SameString(columnHead(colCurrent), "Humidity Value")) { std::string repTableTag; LookupSItoIP(state, @@ -13759,6 +13973,10 @@ void WriteComponentSizing(EnergyPlusData &state) LookupSItoIP( state, state.dataOutRptTab->curColHeadWithSI, state.dataOutRptTab->indexUnitConvWCS, state.dataOutRptTab->curColHead); colUnitConv(jUnique) = state.dataOutRptTab->indexUnitConvWCS; + } else if (unitsStyle_cur == UnitsStyle::InchPoundExceptElectricity) { + LookupSItoIP( + state, state.dataOutRptTab->curColHeadWithSI, state.dataOutRptTab->indexUnitConvWCS, state.dataOutRptTab->curColHead); + colUnitConv(jUnique) = state.dataOutRptTab->indexUnitConvWCS; } else { state.dataOutRptTab->curColHead = state.dataOutRptTab->curColHeadWithSI; colUnitConv(jUnique) = 0; @@ -13796,6 +14014,12 @@ void WriteComponentSizing(EnergyPlusData &state) } else { state.dataOutRptTab->curValueWCS = state.dataOutRptTab->curValueSIWCS; } + } else if (unitsStyle_cur == UnitsStyle::InchPoundExceptElectricity) { + if (colUnitConv(foundDesc) != 0) { + state.dataOutRptTab->curValueWCS = ConvertIP(state, colUnitConv(foundDesc), state.dataOutRptTab->curValueSIWCS); + } else { + state.dataOutRptTab->curValueWCS = state.dataOutRptTab->curValueSIWCS; + } } else { state.dataOutRptTab->curValueWCS = state.dataOutRptTab->curValueSIWCS; } @@ -14098,7 +14322,9 @@ void WriteEioTables(EnergyPlusData &state) std::vector dataFields = splitCommaString(bodyLine); rowHead(rowNum) = fmt::to_string(rowNum); for (int iCol = 1; iCol <= numCols && iCol < int(dataFields.size()); ++iCol) { - if (unitsStyle_cur == UnitsStyle::InchPound || unitsStyle_cur == UnitsStyle::JtoKWH) { + if (unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPound || + unitsStyle_cur == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity || + unitsStyle_cur == UnitsStyle::JtoKWH) { if (isNumber(dataFields[iCol]) && colUnitConv(iCol) > 0) { // if it is a number that has a conversion int numDecimalDigits = digitsAferDecimal(dataFields[iCol]); Real64 convertedVal = ConvertIP(state, colUnitConv(iCol), StrToReal(dataFields[iCol])); @@ -14158,6 +14384,8 @@ int unitsFromHeading(EnergyPlusData &state, std::string &heading) int unitConv = 0; if (ort->unitsStyle == UnitsStyle::InchPound) { LookupSItoIP(state, heading, unitConv, curHeading); + } else if (ort->unitsStyle == UnitsStyle::InchPoundExceptElectricity) { + LookupSItoIP(state, heading, unitConv, curHeading); } else if (ort->unitsStyle == UnitsStyle::JtoKWH) { LookupJtokWH(state, heading, unitConv, curHeading); } else { @@ -14176,6 +14404,8 @@ int unitsFromHeading(EnergyPlusData &state, std::string &heading, UnitsStyle uni int unitConv = 0; if (unitsStyle_para == UnitsStyle::InchPound) { LookupSItoIP(state, heading, unitConv, curHeading); + } else if (unitsStyle_para == UnitsStyle::InchPoundExceptElectricity) { + LookupSItoIP(state, heading, unitConv, curHeading); } else if (unitsStyle_para == UnitsStyle::JtoKWH) { LookupJtokWH(state, heading, unitConv, curHeading); } else { @@ -16125,7 +16355,7 @@ void LoadSummaryUnitConversion(EnergyPlusData &state, CompLoadTablesType &compLo { auto const &ort = state.dataOutRptTab; - if (ort->unitsStyle != UnitsStyle::InchPound) { + if (!ort->ip()) { return; } @@ -16184,7 +16414,8 @@ void LoadSummaryUnitConversion(EnergyPlusData &state, CompLoadTablesType &compLo // apply unit conversions to the load components summary tables void LoadSummaryUnitConversion(EnergyPlusData &state, CompLoadTablesType &compLoadTotal, UnitsStyle unitsStyle_para) { - if (unitsStyle_para == UnitsStyle::InchPound) { + if (unitsStyle_para == OutputReportTabular::UnitsStyle::InchPound || + unitsStyle_para == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity) { Real64 powerConversion = getSpecificUnitMultiplier(state, "W", "Btu/h"); Real64 areaConversion = getSpecificUnitMultiplier(state, "m2", "ft2"); Real64 powerPerAreaConversion = getSpecificUnitMultiplier(state, "W/m2", "Btu/h-ft2"); @@ -16357,7 +16588,8 @@ void OutputCompLoadSummary(EnergyPlusData &state, rowHead(LoadCompRow::GrdTot) = "Grand Total"; columnHead.allocate(LoadCompCol::PerArea); - if (unitsStyle_para != UnitsStyle::InchPound) { + if (!(unitsStyle_para == OutputReportTabular::UnitsStyle::InchPound || + unitsStyle_para == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity)) { columnHead(LoadCompCol::SensInst) = "Sensible - Instant [W]"; columnHead(LoadCompCol::SensDelay) = "Sensible - Delayed [W]"; columnHead(LoadCompCol::SensRA) = "Sensible - Return Air [W]"; @@ -16406,7 +16638,8 @@ void OutputCompLoadSummary(EnergyPlusData &state, tableBody = ""; columnHead(1) = "Value"; - if (unitsStyle_para != UnitsStyle::InchPound) { + if (!(unitsStyle_para == OutputReportTabular::UnitsStyle::InchPound || + unitsStyle_para == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity)) { rowHead(1) = "Time of Peak Load"; rowHead(2) = "Outside Dry Bulb Temperature [C]"; rowHead(3) = "Outside Wet Bulb Temperature [C]"; @@ -16495,7 +16728,8 @@ void OutputCompLoadSummary(EnergyPlusData &state, tableBody = ""; columnHead(1) = "Value"; - if (unitsStyle_para != UnitsStyle::InchPound) { + if (!(unitsStyle_para == OutputReportTabular::UnitsStyle::InchPound || + unitsStyle_para == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity)) { rowHead(1) = "Outside Air Fraction [fraction]"; rowHead(2) = "Airflow per Floor Area [m3/s-m2]"; rowHead(3) = "Airflow per Total Capacity [m3/s-W]"; @@ -17317,12 +17551,12 @@ std::string ConvertToEscaped(std::string const &inString, bool isXML) // Input S s += "<"; } else if (c == '>') { s += ">"; - } else if (c == char(176)) { + } else if (c == char(176) && !isXML) { s += "°"; - } else if (c == char(226) && char(inString[index]) == char(137) && char(inString[index + 1]) == char(164)) { // ≤ + } else if (c == char(226) && char(inString[index]) == char(137) && char(inString[index + 1]) == char(164) && !isXML) { // ≤ s += "≤"; index += 2; - } else if (c == char(226) && char(inString[index]) == char(137) && char(inString[index + 1]) == char(165)) { // ≥ + } else if (c == char(226) && char(inString[index]) == char(137) && char(inString[index + 1]) == char(165) && !isXML) { // ≥ s += "≥"; index += 2; } else if (c == '\xC2') { @@ -17330,14 +17564,14 @@ std::string ConvertToEscaped(std::string const &inString, bool isXML) // Input S s += '\xC2'; } else { c = inString[index++]; - if (c == '\xB0') { + if (c == '\xB0' && !isXML) { s += "°"; } else { s += '\xC2'; s += c; } } - } else if (c == '\xB0') { + } else if (c == '\xB0' && !isXML) { s += "°"; } else if (c == '\\') { if (index == inputSize) { @@ -17359,7 +17593,7 @@ std::string ConvertToEscaped(std::string const &inString, bool isXML) // Input S index += 2; } std::string const unicodeString = ConvertUnicodeToUTF8(codePoint); - if (unicodeString == "\xC2\xB0") { // only check for degree at this point + if (unicodeString == "\xC2\xB0" && !isXML) { // only check for degree at this point s += "°"; } else { s += unicodeString; diff --git a/src/EnergyPlus/OutputReportTabular.hh b/src/EnergyPlus/OutputReportTabular.hh index c713c1a65e8..1396d191af1 100644 --- a/src/EnergyPlus/OutputReportTabular.hh +++ b/src/EnergyPlus/OutputReportTabular.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -120,9 +120,12 @@ namespace OutputReportTabular { JtoMJ, JtoGJ, InchPound, + InchPoundExceptElectricity, NotFound, Num }; + constexpr std::array(UnitsStyle::Num) - 1> UnitsStyleNamesUC{ + "NONE", "JTOKWH", "JTOMJ", "JTOGJ", "INCHPOUND", "INCHPOUNDEXCEPTELECTRICITY"}; enum class EndUseSubTableType { @@ -265,7 +268,7 @@ namespace OutputReportTabular { OutputProcessor::VariableType typeOfVar = OutputProcessor::VariableType::NotFound; OutputProcessor::StoreType avgSum = OutputProcessor::StoreType::Averaged; // Variable is Averaged=1 or Summed=2 OutputProcessor::TimeStepType stepType = OutputProcessor::TimeStepType::Zone; // Variable time step is Zone=1 or HVAC=2 - OutputProcessor::Unit units = OutputProcessor::Unit::Invalid; // the units enumeration + Constant::Units units = Constant::Units::Invalid; // the units enumeration std::string ScheduleName; // the name of the schedule int scheduleIndex = 0; // index to the schedule specified - if no schedule use zero }; @@ -336,11 +339,11 @@ namespace OutputReportTabular { struct MonthlyFieldSetInputType { // Members - std::string variMeter; // the name of the variable or meter - std::string colHead; // the column header to use instead of the variable name (only for predefined) - AggType aggregate; // the type of aggregation for the variable (see aggType parameters) - OutputProcessor::Unit varUnits; // Units enumeration - std::string variMeterUpper; // the name of the variable or meter uppercased + std::string variMeter; // the name of the variable or meter + std::string colHead; // the column header to use instead of the variable name (only for predefined) + AggType aggregate; // the type of aggregation for the variable (see aggType parameters) + Constant::Units varUnits; // Units enumeration + std::string variMeterUpper; // the name of the variable or meter uppercased OutputProcessor::VariableType typeOfVar; int keyCount; // noel OutputProcessor::StoreType varAvgSum; // Variable is Averaged=1 or Summed=2 @@ -350,7 +353,7 @@ namespace OutputReportTabular { // Default Constructor MonthlyFieldSetInputType() - : aggregate(AggType::Invalid), varUnits(OutputProcessor::Unit::None), typeOfVar(OutputProcessor::VariableType::NotFound), keyCount(0), + : aggregate(AggType::Invalid), varUnits(Constant::Units::None), typeOfVar(OutputProcessor::VariableType::Invalid), keyCount(0), varAvgSum(OutputProcessor::StoreType::Averaged), varStepType(OutputProcessor::TimeStepType::Zone) { } @@ -378,7 +381,7 @@ namespace OutputReportTabular { OutputProcessor::VariableType typeOfVar; // 0=not found, 1=integer, 2=real, 3=meter OutputProcessor::StoreType avgSum; // Variable is Averaged=1 or Summed=2 OutputProcessor::TimeStepType stepType; // Variable time step is Zone=1 or HVAC=2 - OutputProcessor::Unit units; // the units string, may be blank + Constant::Units units; // the units string, may be blank AggType aggType; // index to the type of aggregation (see list of parameters) Array1D reslt; // monthly results Array1D duration; // the time during which results are summed for use in averages @@ -388,8 +391,8 @@ namespace OutputReportTabular { // Default Constructor MonthlyColumnsType() - : varNum(0), typeOfVar(OutputProcessor::VariableType::NotFound), avgSum(OutputProcessor::StoreType::Averaged), - stepType(OutputProcessor::TimeStepType::Zone), units(OutputProcessor::Unit::None), aggType(AggType::Invalid), reslt(12, 0.0), + : varNum(0), typeOfVar(OutputProcessor::VariableType::Invalid), avgSum(OutputProcessor::StoreType::Averaged), + stepType(OutputProcessor::TimeStepType::Zone), units(Constant::Units::None), aggType(AggType::Invalid), reslt(12, 0.0), duration(12, 0.0), timeStamp(12, 0), aggForStep(0.0) { } @@ -970,6 +973,11 @@ struct OutputReportTabularData : BaseGlobalStruct { OutputReportTabular::UnitsStyle unitsStyle = OutputReportTabular::UnitsStyle::None; + bool ip() const + { + return this->unitsStyle == OutputReportTabular::UnitsStyle::InchPound || + this->unitsStyle == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity; + } OutputReportTabular::UnitsStyle unitsStyle_SQLite = OutputReportTabular::UnitsStyle::NotFound; int OutputTableBinnedCount = 0; int BinResultsTableCount = 0; @@ -1029,14 +1037,15 @@ struct OutputReportTabularData : BaseGlobalStruct // BEPS Report Related Variables // From Report:Table:Predefined - BEPS // arrays that hold the meter numbers that are initialized at get input - Array1D_int meterNumTotalsBEPS = Array1D_int(OutputReportTabular::numResourceTypes, 0); - Array1D_int meterNumTotalsSource = Array1D_int(OutputReportTabular::numSourceTypes, 0); + + Array1D_int meterNumTotalsBEPS = Array1D_int(OutputReportTabular::numResourceTypes, -1); + Array1D_int meterNumTotalsSource = Array1D_int(OutputReportTabular::numSourceTypes, -1); Array1D_bool fuelfactorsused = Array1D_bool(OutputReportTabular::numSourceTypes, false); Array1D_bool ffUsed = Array1D_bool(OutputReportTabular::numResourceTypes, false); Array1D SourceFactors = Array1D(OutputReportTabular::numResourceTypes, 0.0); Array1D_bool ffSchedUsed = Array1D_bool(OutputReportTabular::numResourceTypes, false); Array1D_int ffSchedIndex = Array1D_int(OutputReportTabular::numResourceTypes, 0); - Array2D_int meterNumEndUseBEPS = Array2D_int(OutputReportTabular::numResourceTypes, static_cast(Constant::EndUse::Num), 0); + Array2D_int meterNumEndUseBEPS = Array2D_int(OutputReportTabular::numResourceTypes, static_cast(Constant::EndUse::Num), -1); Array3D_int meterNumEndUseSubBEPS; Array3D_int meterNumEndUseSpTypeBEPS; // arrays that hold the names of the resource and end uses diff --git a/src/EnergyPlus/OutputReportTabularAnnual.cc b/src/EnergyPlus/OutputReportTabularAnnual.cc index 048a847edbc..208e778b7a9 100644 --- a/src/EnergyPlus/OutputReportTabularAnnual.cc +++ b/src/EnergyPlus/OutputReportTabularAnnual.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -130,7 +130,10 @@ void GetInputTabularAnnual(EnergyPlusData &state) for (jAlpha = 4; jAlpha <= numAlphas; jAlpha += 2) { curVarMtr = alphArray(jAlpha); if (curVarMtr.empty()) { - ShowFatalError(state, "Blank report name in Output:Table:Annual"); + ShowWarningError(state, + format("{}: Blank column specified in '{}', need to provide a variable or meter or EMS variable name ", + currentModuleObject, + alphArray(1))); } if (jAlpha <= numAlphas) { std::string aggregationString = alphArray(jAlpha + 1); @@ -144,7 +147,9 @@ void GetInputTabularAnnual(EnergyPlusData &state) } else { curNumDgts = 2; } - annualTables.back().addFieldSet(curVarMtr, curAgg, curNumDgts); + if (!curVarMtr.empty()) { + annualTables.back().addFieldSet(curVarMtr, curAgg, curNumDgts); + } } annualTables.back().setupGathering(state); } else { @@ -176,10 +181,10 @@ void AnnualTable::setupGathering(EnergyPlusData &state) // input fields, and ems variables are gathered. { int keyCount = 0; - OutputProcessor::VariableType typeVar = OutputProcessor::VariableType::NotFound; + OutputProcessor::VariableType typeVar = OutputProcessor::VariableType::Invalid; OutputProcessor::StoreType avgSumVar; OutputProcessor::TimeStepType stepTypeVar; - OutputProcessor::Unit unitsVar = OutputProcessor::Unit::None; + Constant::Units unitsVar = Constant::Units::None; Array1D_string namesOfKeys; // keyNames Array1D_int indexesForKeyVar; // keyVarIndexes std::list allKeys; @@ -347,7 +352,7 @@ void AnnualTable::gatherForTimestep(EnergyPlusData &state, OutputProcessor::Time if (curStepType == kindOfTimeStep) // this is a much simpler conditional than the code in monthly gathering { int curVarNum = fldStIt->m_cell[row].indexesForKeyVar; - if (curVarNum > 0) { + if (curVarNum > -1) { Real64 curValue = GetInternalVariableValue(state, curTypeOfVar, curVarNum); // Get the value from the result array Real64 oldResultValue = fldStIt->m_cell[row].result; @@ -505,7 +510,7 @@ void AnnualTable::gatherForTimestep(EnergyPlusData &state, OutputProcessor::Time OutputProcessor::VariableType scanTypeOfVar = fldStRemainIt->m_typeOfVar; // int scanStepType = fldStRemainIt->m_varStepType; int scanVarNum = fldStRemainIt->m_cell[row].indexesForKeyVar; - if (scanVarNum > 0) { + if (scanVarNum > -1) { Real64 scanValue = GetInternalVariableValue(state, scanTypeOfVar, scanVarNum); // When a summed variable is used divide it by the length of the time step if (fldStRemainIt->m_varAvgSum == OutputProcessor::StoreType::Summed) { // if it is a summed variable @@ -526,7 +531,7 @@ void AnnualTable::gatherForTimestep(EnergyPlusData &state, OutputProcessor::Time // int scanStepType = fldStRemainIt->m_varStepType; int scanVarNum = fldStRemainIt->m_cell[row].indexesForKeyVar; Real64 oldScanValue = fldStRemainIt->m_cell[row].result; - if (scanVarNum > 0) { + if (scanVarNum > -1) { Real64 scanValue = GetInternalVariableValue(state, scanTypeOfVar, scanVarNum); if (fldStRemainIt->m_aggregate == AnnualFieldSet::AggregationKind::hoursZero || fldStRemainIt->m_aggregate == AnnualFieldSet::AggregationKind::hoursNonZero || @@ -718,18 +723,18 @@ void AnnualTable::writeTable(EnergyPlusData &state, OutputReportTabular::UnitsSt curAggString = " {" + trim(curAggString) + '}'; } // do the unit conversions - if (unitsStyle == OutputReportTabular::UnitsStyle::InchPound) { - varNameWithUnits = fldStIt->m_variMeter + unitEnumToStringBrackets(fldStIt->m_varUnits); + if (unitsStyle == OutputReportTabular::UnitsStyle::InchPound || unitsStyle == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity) { + varNameWithUnits = format("{} [{}]", fldStIt->m_variMeter, Constant::unitNames[(int)fldStIt->m_varUnits]); OutputReportTabular::LookupSItoIP(state, varNameWithUnits, indexUnitConv, curUnits); OutputReportTabular::GetUnitConversion(state, indexUnitConv, curConversionFactor, curConversionOffset, curUnits); } else { // just do the Joule conversion // if units is in Joules, convert if specified - if (fldStIt->m_varUnits == OutputProcessor::Unit::J) { + if (fldStIt->m_varUnits == Constant::Units::J) { curUnits = energyUnitsString; curConversionFactor = energyUnitsConversionFactor; curConversionOffset = 0.0; } else { // if not joules don't perform conversion - curUnits = unitEnumToString(fldStIt->m_varUnits); + curUnits = Constant::unitNames[(int)fldStIt->m_varUnits]; curConversionFactor = 1.0; curConversionOffset = 0.0; } @@ -1297,18 +1302,18 @@ void AnnualTable::convertUnitForDeferredResults(EnergyPlusData &state, Real64 curIP; Real64 energyUnitsConversionFactor = AnnualTable::setEnergyUnitStringAndFactor(unitsStyle, energyUnitsString); // do the unit conversions - if (unitsStyle == OutputReportTabular::UnitsStyle::InchPound) { - varNameWithUnits = fldStIt->m_variMeter + " [" + unitEnumToString(fldStIt->m_varUnits) + ']'; + if (unitsStyle == OutputReportTabular::UnitsStyle::InchPound || unitsStyle == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity) { + varNameWithUnits = format("{} [{}]", fldStIt->m_variMeter, Constant::unitNames[(int)fldStIt->m_varUnits]); OutputReportTabular::LookupSItoIP(state, varNameWithUnits, indexUnitConv, curUnits); OutputReportTabular::GetUnitConversion(state, indexUnitConv, curConversionFactor, curConversionOffset, curUnits); } else { // just do the Joule conversion // if units is in Joules, convert if specified - if (fldStIt->m_varUnits == OutputProcessor::Unit::J) { + if (fldStIt->m_varUnits == Constant::Units::J) { curUnits = energyUnitsString; curConversionFactor = energyUnitsConversionFactor; curConversionOffset = 0.0; } else { // if not joules don't perform conversion - curUnits = unitEnumToString(fldStIt->m_varUnits); + curUnits = Constant::unitNames[(int)fldStIt->m_varUnits]; curConversionFactor = 1.0; curConversionOffset = 0.0; } @@ -1353,7 +1358,9 @@ std::vector AnnualTable::calculateBins(int const numberOfBins, } else { // determine which bin the results are in binNum = int((*valueIt - bottomOfBins) / intervalSize); - returnBins[binNum] += *elapsedTimeIt; + if (binNum < numberOfBins && binNum >= 0) { + returnBins[binNum] += *elapsedTimeIt; + } } ++elapsedTimeIt; } @@ -1368,9 +1375,9 @@ void AnnualTable::columnHeadersToTitleCase(EnergyPlusData &state) if (fldStIt->m_indexesForKeyVar.size() > 0) { int varNum = fldStIt->m_indexesForKeyVar[0]; if (fldStIt->m_typeOfVar == OutputProcessor::VariableType::Real) { - fldStIt->m_colHead = state.dataOutputProcessor->RVariableTypes(varNum).VarNameOnly; + fldStIt->m_colHead = state.dataOutputProcessor->outVars[varNum]->name; } else if (fldStIt->m_typeOfVar == OutputProcessor::VariableType::Meter) { - fldStIt->m_colHead = state.dataOutputProcessor->EnergyMeters(varNum).Name; + fldStIt->m_colHead = state.dataOutputProcessor->meters[varNum]->Name; } } } @@ -1407,17 +1414,17 @@ std::vector AnnualTable::inspectTableFieldSets(int fldIndex) fldSt = m_annualFields[fldIndex]; ret.push_back(fldSt.m_colHead); ret.push_back(fldSt.m_variMeter); - ret.push_back(unitEnumToString(fldSt.m_varUnits)); + ret.push_back(std::string(Constant::unitNames[(int)fldSt.m_varUnits])); std::string outStr = std::to_string(fldSt.m_showDigits); // ints ret.push_back(outStr); - outStr = std::to_string(static_cast(fldSt.m_typeOfVar)); + outStr = std::to_string((int)fldSt.m_typeOfVar); ret.push_back(outStr); outStr = std::to_string(fldSt.m_keyCount); ret.push_back(outStr); - outStr = std::to_string(static_cast(fldSt.m_varAvgSum)); + outStr = std::to_string((int)fldSt.m_varAvgSum); ret.push_back(outStr); - outStr = std::to_string(static_cast(fldSt.m_varStepType)); + outStr = std::to_string((int)fldSt.m_varStepType); ret.push_back(outStr); outStr = std::to_string(fldSt.m_aggregate); ret.push_back(outStr); diff --git a/src/EnergyPlus/OutputReportTabularAnnual.hh b/src/EnergyPlus/OutputReportTabularAnnual.hh index 9f0dce0dcad..dbca139f56b 100644 --- a/src/EnergyPlus/OutputReportTabularAnnual.hh +++ b/src/EnergyPlus/OutputReportTabularAnnual.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutputReports.cc b/src/EnergyPlus/OutputReports.cc index 0560a8967da..e8876f46e42 100644 --- a/src/EnergyPlus/OutputReports.cc +++ b/src/EnergyPlus/OutputReports.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -57,12 +57,12 @@ #include #include #include -#include #include #include #include #include #include +#include #include #include #include @@ -418,9 +418,9 @@ static void DXFDaylightingReferencePoints(EnergyPlusData &state, InputOutputFile static constexpr std::string_view Format_709(" 0\nCIRCLE\n 8\n{}\n 62\n{:3}\n 10\n{:15.5F}\n 20\n{:15.5F}\n 30\n{:15.5F}\n 40\n{:15.5F}\n"); // Do any daylighting reference points on layer for zone - if ((int)state.dataDaylightingData->DaylRefPt.size() > 0) { - for (int daylightCtrlNum = 1; daylightCtrlNum <= (int)state.dataDaylightingData->daylightControl.size(); ++daylightCtrlNum) { - auto &thisDaylightControl = state.dataDaylightingData->daylightControl(daylightCtrlNum); + if ((int)state.dataDayltg->DaylRefPt.size() > 0) { + for (int daylightCtrlNum = 1; daylightCtrlNum <= (int)state.dataDayltg->daylightControl.size(); ++daylightCtrlNum) { + auto &thisDaylightControl = state.dataDayltg->daylightControl(daylightCtrlNum); DataSurfaceColors::ColorNo curcolorno = DataSurfaceColors::ColorNo::DaylSensor1; std::string refPtType; if (thisDaylightControl.DaylightMethod == Dayltg::DaylightingMethod::DElight) { @@ -429,19 +429,15 @@ static void DXFDaylightingReferencePoints(EnergyPlusData &state, InputOutputFile refPtType = "DayRefPt"; } - for (int refpt = 1; refpt <= thisDaylightControl.TotalDaylRefPoints; ++refpt) { - print(of, - "999\n{}:{}:{}\n", - thisDaylightControl.ZoneName, - refPtType, - state.dataDaylightingData->DaylRefPt(thisDaylightControl.DaylRefPtNum(refpt)).Name); + for (auto const &refPt : thisDaylightControl.refPts) { + print(of, "999\n{}:{}:{}\n", thisDaylightControl.ZoneName, refPtType, state.dataDayltg->DaylRefPt(refPt.num).Name); print(of, Format_709, normalizeName(thisDaylightControl.ZoneName), state.dataSurfColor->DXFcolorno[static_cast(curcolorno)], - thisDaylightControl.DaylRefPtAbsCoord(refpt).x, - thisDaylightControl.DaylRefPtAbsCoord(refpt).y, - thisDaylightControl.DaylRefPtAbsCoord(refpt).z, + refPt.absCoords.x, + refPt.absCoords.y, + refPt.absCoords.z, 0.2); curcolorno = DataSurfaceColors::ColorNo::DaylSensor2; // ref pts 2 and later are this color } @@ -530,7 +526,7 @@ void DXFOut(EnergyPlusData &state, print(dxffile, Format_708, "Program Version", ",", state.dataStrGlobals->VerStringVar); if (PolygonAction.empty()) { - print(dxffile, Format_708, "Polygon Action", ",", "ThickPolyline"); + print(dxffile, Format_708, "Polygon Action", ",", "Triangulate3DFace"); } else { print(dxffile, Format_708, "Polygon Action", ",", PolygonAction); } @@ -626,14 +622,10 @@ void DXFOut(EnergyPlusData &state, if (thisSurface.Class == DataSurfaces::SurfaceClass::Floor) colorindex = DataSurfaceColors::ColorNo::Floor; if (thisSurface.Class == DataSurfaces::SurfaceClass::Door) colorindex = DataSurfaceColors::ColorNo::Door; if (thisSurface.Class == DataSurfaces::SurfaceClass::Window) { - if (state.dataSurface->SurfWinOriginalClass(surf) == DataSurfaces::SurfaceClass::Window) - colorindex = DataSurfaceColors::ColorNo::Window; - if (state.dataSurface->SurfWinOriginalClass(surf) == DataSurfaces::SurfaceClass::GlassDoor) - colorindex = DataSurfaceColors::ColorNo::GlassDoor; - if (state.dataSurface->SurfWinOriginalClass(surf) == DataSurfaces::SurfaceClass::TDD_Dome) - colorindex = DataSurfaceColors::ColorNo::TDDDome; - if (state.dataSurface->SurfWinOriginalClass(surf) == DataSurfaces::SurfaceClass::TDD_Diffuser) - colorindex = DataSurfaceColors::ColorNo::TDDDiffuser; + if (thisSurface.OriginalClass == DataSurfaces::SurfaceClass::Window) colorindex = DataSurfaceColors::ColorNo::Window; + if (thisSurface.OriginalClass == DataSurfaces::SurfaceClass::GlassDoor) colorindex = DataSurfaceColors::ColorNo::GlassDoor; + if (thisSurface.OriginalClass == DataSurfaces::SurfaceClass::TDD_Dome) colorindex = DataSurfaceColors::ColorNo::TDDDome; + if (thisSurface.OriginalClass == DataSurfaces::SurfaceClass::TDD_Diffuser) colorindex = DataSurfaceColors::ColorNo::TDDDiffuser; } if (state.dataSurface->SurfIsPV(surf)) colorindex = DataSurfaceColors::ColorNo::PV; @@ -776,17 +768,18 @@ void DXFOut(EnergyPlusData &state, for (int zones = 1; zones <= state.dataGlobal->NumOfZones; ++zones) { const DataSurfaceColors::ColorNo curcolorno = DataSurfaceColors::ColorNo::DaylSensor1; - for (int mapnum = 1; mapnum <= (int)state.dataDaylightingData->IllumMap.size(); ++mapnum) { - if (state.dataDaylightingData->IllumMapCalc(mapnum).zoneIndex != zones) continue; - for (int refpt = 1; refpt <= state.dataDaylightingData->IllumMapCalc(mapnum).TotalMapRefPoints; ++refpt) { - print(dxffile, Format_710, format("{}:MapRefPt:{}", state.dataHeatBal->Zone(zones).Name, refpt)); + for (auto const &illumMap : state.dataDayltg->illumMaps) { + if (illumMap.zoneIndex != zones) continue; + int numRefPt = 0; + for (auto const &refPt : illumMap.refPts) { + print(dxffile, Format_710, format("{}:MapRefPt:{}", state.dataHeatBal->Zone(zones).Name, ++numRefPt)); print(dxffile, Format_709, normalizeName(state.dataHeatBal->Zone(zones).Name), DXFcolorno[static_cast(curcolorno)], - state.dataDaylightingData->IllumMapCalc(mapnum).MapRefPtAbsCoord(refpt).x, - state.dataDaylightingData->IllumMapCalc(mapnum).MapRefPtAbsCoord(refpt).y, - state.dataDaylightingData->IllumMapCalc(mapnum).MapRefPtAbsCoord(refpt).z, + refPt.absCoords.x, + refPt.absCoords.y, + refPt.absCoords.z, 0.05); } } @@ -886,14 +879,10 @@ void DXFOutWireFrame(EnergyPlusData &state, std::string const &ColorScheme) if (thisSurface.Class == DataSurfaces::SurfaceClass::Floor) colorindex = DataSurfaceColors::ColorNo::Floor; if (thisSurface.Class == DataSurfaces::SurfaceClass::Door) colorindex = DataSurfaceColors::ColorNo::Door; if (thisSurface.Class == DataSurfaces::SurfaceClass::Window) { - if (state.dataSurface->SurfWinOriginalClass(surf) == DataSurfaces::SurfaceClass::Window) - colorindex = DataSurfaceColors::ColorNo::Window; - if (state.dataSurface->SurfWinOriginalClass(surf) == DataSurfaces::SurfaceClass::GlassDoor) - colorindex = DataSurfaceColors::ColorNo::GlassDoor; - if (state.dataSurface->SurfWinOriginalClass(surf) == DataSurfaces::SurfaceClass::TDD_Dome) - colorindex = DataSurfaceColors::ColorNo::TDDDome; - if (state.dataSurface->SurfWinOriginalClass(surf) == DataSurfaces::SurfaceClass::TDD_Diffuser) - colorindex = DataSurfaceColors::ColorNo::TDDDiffuser; + if (thisSurface.OriginalClass == DataSurfaces::SurfaceClass::Window) colorindex = DataSurfaceColors::ColorNo::Window; + if (thisSurface.OriginalClass == DataSurfaces::SurfaceClass::GlassDoor) colorindex = DataSurfaceColors::ColorNo::GlassDoor; + if (thisSurface.OriginalClass == DataSurfaces::SurfaceClass::TDD_Dome) colorindex = DataSurfaceColors::ColorNo::TDDDome; + if (thisSurface.OriginalClass == DataSurfaces::SurfaceClass::TDD_Diffuser) colorindex = DataSurfaceColors::ColorNo::TDDDiffuser; } if (state.dataSurface->SurfIsPV(surf)) colorindex = DataSurfaceColors::ColorNo::PV; ++surfcount; diff --git a/src/EnergyPlus/OutputReports.hh b/src/EnergyPlus/OutputReports.hh index be350d38b22..b2083ee8b43 100644 --- a/src/EnergyPlus/OutputReports.hh +++ b/src/EnergyPlus/OutputReports.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutsideEnergySources.cc b/src/EnergyPlus/OutsideEnergySources.cc index 798c9e61b02..ee91dab4bc7 100644 --- a/src/EnergyPlus/OutsideEnergySources.cc +++ b/src/EnergyPlus/OutsideEnergySources.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -541,53 +541,53 @@ void OutsideEnergySourceSpecs::oneTimeInit_new(EnergyPlusData &state) PlantUtilities::RegisterPlantCompDesignFlow(state, this->InletNodeNum, loop.MaxVolFlowRate); std::string reportVarPrefix = "District Heating Water "; - std::string heatingOrCooling = "Heating"; - std::string_view meterTypeKey = "DistrictHeatingWater"; + OutputProcessor::SOVEndUseCat heatingOrCooling = OutputProcessor::SOVEndUseCat::Heating; + Constant::eResource meterTypeKey = Constant::eResource::DistrictHeatingWater; + if (this->EnergyType == DataPlant::PlantEquipmentType::PurchChilledWater) { reportVarPrefix = "District Cooling Water "; - heatingOrCooling = "Cooling"; - meterTypeKey = "DistrictCooling"; + heatingOrCooling = OutputProcessor::SOVEndUseCat::Cooling; + meterTypeKey = Constant::eResource::DistrictCooling; } else if (this->EnergyType == DataPlant::PlantEquipmentType::PurchSteam) { reportVarPrefix = "District Heating Steam "; - heatingOrCooling = "Heating"; - meterTypeKey = "DistrictHeatingSteam"; + heatingOrCooling = OutputProcessor::SOVEndUseCat::Heating; + meterTypeKey = Constant::eResource::DistrictHeatingSteam; } SetupOutputVariable(state, format("{}Energy", reportVarPrefix), - OutputProcessor::Unit::J, + Constant::Units::J, this->EnergyTransfer, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, meterTypeKey, heatingOrCooling, {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, format("{}Rate", reportVarPrefix), - OutputProcessor::Unit::W, + Constant::Units::W, this->EnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, format("{}Inlet Temperature", reportVarPrefix), - OutputProcessor::Unit::C, + Constant::Units::C, this->InletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, format("{}Outlet Temperature", reportVarPrefix), - OutputProcessor::Unit::C, + Constant::Units::C, this->OutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, format("{}Mass Flow Rate", reportVarPrefix), - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->MassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/OutsideEnergySources.hh b/src/EnergyPlus/OutsideEnergySources.hh index 9089b5ecfce..49eae57b030 100644 --- a/src/EnergyPlus/OutsideEnergySources.hh +++ b/src/EnergyPlus/OutsideEnergySources.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PVWatts.cc b/src/EnergyPlus/PVWatts.cc index 240bd7b0ef2..d152071b31b 100644 --- a/src/EnergyPlus/PVWatts.cc +++ b/src/EnergyPlus/PVWatts.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -175,40 +175,39 @@ namespace PVWatts { // Set up output variables SetupOutputVariable(state, "Generator Produced DC Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, outputDCPower_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Generator Produced DC Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, outputDCEnergy_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, name_, + Constant::eResource::ElectricityProduced, + OutputProcessor::SOVEndUseCat::Photovoltaic, {}, - "ElectricityProduced", - "Photovoltaics", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Generator PV Cell Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, cellTemperature_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Plane of Array Irradiance", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, planeOfArrayIrradiance_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name_); SetupOutputVariable(state, "Shaded Percent", - OutputProcessor::Unit::Perc, + Constant::Units::Perc, shadedPercent_, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/PVWatts.hh b/src/EnergyPlus/PVWatts.hh index 14f0dc689aa..672c06f9707 100644 --- a/src/EnergyPlus/PVWatts.hh +++ b/src/EnergyPlus/PVWatts.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PackagedThermalStorageCoil.cc b/src/EnergyPlus/PackagedThermalStorageCoil.cc index 187ac9aab94..752ea691d6e 100644 --- a/src/EnergyPlus/PackagedThermalStorageCoil.cc +++ b/src/EnergyPlus/PackagedThermalStorageCoil.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -1588,7 +1588,7 @@ void GetTESCoilInput(EnergyPlusData &state) SetupOutputVariable(state, "Cooling Coil Operating Mode Index", - OutputProcessor::Unit::None, + Constant::Units::None, thisTESCoil.curControlModeReport, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1597,93 +1597,90 @@ void GetTESCoilInput(EnergyPlusData &state) // cCurrentModuleObject = "Coil:Cooling:DX:SingleSpeed:ThermalStorage" SetupOutputVariable(state, "Cooling Coil Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisTESCoil.EvapTotCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisTESCoil.Name); SetupOutputVariable(state, "Cooling Coil Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisTESCoil.EvapTotCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisTESCoil.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "ENERGYTRANSFER", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisTESCoil.EvapSensCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisTESCoil.Name); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisTESCoil.EvapSensCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisTESCoil.Name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisTESCoil.EvapLatCoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisTESCoil.Name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisTESCoil.EvapLatCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisTESCoil.Name); SetupOutputVariable(state, "Cooling Coil Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisTESCoil.ElecCoolingPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisTESCoil.Name); SetupOutputVariable(state, "Cooling Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisTESCoil.ElecCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisTESCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, thisTESCoil.RuntimeFraction, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisTESCoil.Name); SetupOutputVariable(state, "Cooling Coil Cold Weather Protection Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisTESCoil.ElectColdWeatherEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisTESCoil.Name, - {}, - "Electricity", - "COOLING", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, "Thermal Protection", - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Cold Weather Protection Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisTESCoil.ElectColdWeatherPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1691,7 +1688,7 @@ void GetTESCoilInput(EnergyPlusData &state) SetupOutputVariable(state, "Cooling Coil Thermal Storage Mechanical Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisTESCoil.QdotTES, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1699,7 +1696,7 @@ void GetTESCoilInput(EnergyPlusData &state) SetupOutputVariable(state, "Cooling Coil Thermal Storage Mechanical Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisTESCoil.Q_TES, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1707,7 +1704,7 @@ void GetTESCoilInput(EnergyPlusData &state) SetupOutputVariable(state, "Cooling Coil Thermal Storage Ambient Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisTESCoil.QdotAmbient, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1715,7 +1712,7 @@ void GetTESCoilInput(EnergyPlusData &state) SetupOutputVariable(state, "Cooling Coil Thermal Storage Ambient Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisTESCoil.Q_Ambient, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1724,14 +1721,14 @@ void GetTESCoilInput(EnergyPlusData &state) if (thisTESCoil.TESPlantConnectionAvailable) { SetupOutputVariable(state, "Cooling Coil Thermal Storage Plant Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisTESCoil.QdotPlant, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisTESCoil.Name); SetupOutputVariable(state, "Cooling Coil Thermal Storage Plant Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisTESCoil.Q_Plant, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1741,7 +1738,7 @@ void GetTESCoilInput(EnergyPlusData &state) if (thisTESCoil.CondenserType == TESCondenserType::Evap) { SetupOutputVariable(state, "Cooling Coil Condenser Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisTESCoil.CondInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1750,106 +1747,99 @@ void GetTESCoilInput(EnergyPlusData &state) if (thisTESCoil.EvapWaterSupplyMode == EvapWaterSupply::WaterSupplyFromMains) { SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisTESCoil.EvapWaterConsump, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisTESCoil.Name, + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Water", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Mains Supply Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisTESCoil.EvapWaterConsump, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisTESCoil.Name, + Constant::eResource::MainsWater, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "MainsWater", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } else if (thisTESCoil.EvapWaterSupplyMode == EvapWaterSupply::WaterSupplyFromTank) { SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Storage Tank Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisTESCoil.EvapWaterConsump, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisTESCoil.Name, + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Water", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Starved Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisTESCoil.EvapWaterStarvMakup, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisTESCoil.Name, + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Water", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Starved Mains Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisTESCoil.EvapWaterStarvMakup, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisTESCoil.Name, + Constant::eResource::MainsWater, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "MainsWater", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisTESCoil.EvapCondPumpElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisTESCoil.Name); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisTESCoil.EvapCondPumpElecConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisTESCoil.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Basin Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisTESCoil.ElectEvapCondBasinHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisTESCoil.Name); SetupOutputVariable(state, "Cooling Coil Basin Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisTESCoil.ElectEvapCondBasinHeaterEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisTESCoil.Name, - {}, - "Electricity", - "COOLING", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, "Thermal Protection", - "System"); + OutputProcessor::SOVGroup::HVAC); } switch (thisTESCoil.StorageMedia) { @@ -1857,7 +1847,7 @@ void GetTESCoilInput(EnergyPlusData &state) case MediaType::UserDefindFluid: SetupOutputVariable(state, "Cooling Coil Fluid Thermal Storage End Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisTESCoil.FluidTankTempFinal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1866,7 +1856,7 @@ void GetTESCoilInput(EnergyPlusData &state) case MediaType::Ice: SetupOutputVariable(state, "Cooling Coil Ice Thermal Storage End Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, thisTESCoil.IceFracRemain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/PackagedThermalStorageCoil.hh b/src/EnergyPlus/PackagedThermalStorageCoil.hh index 21f277d1d5b..be8fab4a709 100644 --- a/src/EnergyPlus/PackagedThermalStorageCoil.hh +++ b/src/EnergyPlus/PackagedThermalStorageCoil.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PhaseChangeModeling/HysteresisModel.cc b/src/EnergyPlus/PhaseChangeModeling/HysteresisModel.cc index 4094b42a302..10d8cd3072f 100644 --- a/src/EnergyPlus/PhaseChangeModeling/HysteresisModel.cc +++ b/src/EnergyPlus/PhaseChangeModeling/HysteresisModel.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -165,14 +165,14 @@ namespace HysteresisPhaseChange { phaseChangeState = PhaseChangeStates::FREEZING; this->enthNew = this->getEnthalpy(updatedTempTDT, this->peakTempFreezing, this->deltaTempFreezingLow, this->deltaTempFreezingHigh); - } else if (this->enthNew < this->enthalpyF && this->enthNew > this->enthalpyM) { + } else if ((this->enthNew < this->enthalpyF) && (this->enthNew > this->enthalpyM)) { phaseChangeState = PhaseChangeStates::TRANSITION; this->enthNew = (this->specHeatTransition * updatedTempTDT) + (this->enthOld - (this->specHeatTransition * prevTempTD)); - } else if (this->enthNew < this->enthalpyF && updatedTempTDT > phaseChangeTempReverse) { + } else if ((this->enthNew < this->enthalpyF) && (updatedTempTDT > phaseChangeTempReverse)) { phaseChangeState = PhaseChangeStates::TRANSITION; this->enthNew = (this->specHeatTransition * updatedTempTDT) + (this->enthRev - (this->specHeatTransition * phaseChangeTempReverse)); - } else if (this->enthNew <= this->enthalpyM && updatedTempTDT <= phaseChangeTempReverse) { + } else if ((this->enthNew <= this->enthalpyM) && (updatedTempTDT <= phaseChangeTempReverse)) { phaseChangeState = PhaseChangeStates::TRANSITION; this->enthNew = (this->specHeatTransition * updatedTempTDT) + (this->enthRev - (this->specHeatTransition * phaseChangeTempReverse)); @@ -191,11 +191,11 @@ namespace HysteresisPhaseChange { this->enthNew = (this->specHeatTransition * updatedTempTDT) + (this->enthOld - (this->specHeatTransition * prevTempTD)); this->enthalpyM = this->getEnthalpy(updatedTempTDT, this->peakTempMelting, this->deltaTempMeltingLow, this->deltaTempMeltingHigh); this->enthalpyF = this->getEnthalpy(updatedTempTDT, this->peakTempMelting, this->deltaTempMeltingLow, this->deltaTempMeltingHigh); - if (updatedTempTDT < phaseChangeTempReverse && this->enthNew > this->enthalpyF) { + if ((updatedTempTDT < phaseChangeTempReverse) && (this->enthNew > this->enthalpyF)) { phaseChangeState = PhaseChangeStates::FREEZING; this->enthNew = this->getEnthalpy(updatedTempTDT, this->peakTempFreezing, this->deltaTempFreezingLow, this->deltaTempFreezingHigh); - } else if (this->enthNew < this->enthalpyF && this->enthNew > this->enthalpyM && + } else if ((this->enthNew < this->enthalpyF) && (this->enthNew > this->enthalpyM) && (updatedTempTDT < prevTempTD || updatedTempTDT > prevTempTD)) { phaseChangeState = PhaseChangeStates::TRANSITION; this->enthNew = @@ -211,7 +211,7 @@ namespace HysteresisPhaseChange { this->enthNew = (this->specHeatTransition * updatedTempTDT) + (this->enthRev - (this->specHeatTransition * phaseChangeTempReverse)); this->enthalpyM = this->getEnthalpy(updatedTempTDT, this->peakTempMelting, this->deltaTempMeltingLow, this->deltaTempMeltingHigh); this->enthalpyF = this->getEnthalpy(updatedTempTDT, this->peakTempFreezing, this->deltaTempFreezingLow, this->deltaTempFreezingHigh); - if (this->enthNew < this->enthalpyF && this->enthNew > this->enthalpyM) { + if ((this->enthNew < this->enthalpyF) && (this->enthNew > this->enthalpyM)) { phaseChangeState = PhaseChangeStates::TRANSITION; this->enthNew = (this->specHeatTransition * updatedTempTDT) + (this->enthRev - (this->specHeatTransition * phaseChangeTempReverse)); @@ -223,14 +223,14 @@ namespace HysteresisPhaseChange { this->enthNew = (this->specHeatTransition * updatedTempTDT) + (this->enthOld - (this->specHeatTransition * prevTempTD)); this->enthalpyM = this->getEnthalpy(updatedTempTDT, this->peakTempMelting, this->deltaTempMeltingLow, this->deltaTempMeltingHigh); this->enthalpyF = this->getEnthalpy(updatedTempTDT, this->peakTempFreezing, this->deltaTempFreezingLow, this->deltaTempFreezingHigh); - if (this->enthNew < this->enthOld && updatedTempTDT < prevTempTD) { + if ((this->enthNew < this->enthOld) && (updatedTempTDT < prevTempTD)) { phaseChangeState = PhaseChangeStates::TRANSITION; this->enthNew = (this->specHeatTransition * updatedTempTDT) + (this->enthOld - (this->specHeatTransition * prevTempTD)); - } else if (this->enthNew < this->enthalpyF && this->enthNew > this->enthalpyM && updatedTempTDT < prevTempTD) { + } else if ((this->enthNew < this->enthalpyF) && (this->enthNew > this->enthalpyM) && (updatedTempTDT < prevTempTD)) { phaseChangeState = PhaseChangeStates::TRANSITION; this->enthNew = (this->specHeatTransition * updatedTempTDT) + (this->enthRev - (this->specHeatTransition * phaseChangeTempReverse)); - } else if (this->enthNew >= this->enthalpyF && updatedTempTDT <= phaseChangeTempReverse) { + } else if ((this->enthNew >= this->enthalpyF) && (updatedTempTDT <= phaseChangeTempReverse)) { phaseChangeState = PhaseChangeStates::TRANSITION; this->enthNew = (this->specHeatTransition * updatedTempTDT) + (this->enthRev - (this->specHeatTransition * phaseChangeTempReverse)); diff --git a/src/EnergyPlus/PhaseChangeModeling/HysteresisModel.hh b/src/EnergyPlus/PhaseChangeModeling/HysteresisModel.hh index 1586193c6c4..0e414ca269b 100644 --- a/src/EnergyPlus/PhaseChangeModeling/HysteresisModel.hh +++ b/src/EnergyPlus/PhaseChangeModeling/HysteresisModel.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc index 8b52a07f65d..221fc6d04ce 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -530,7 +530,7 @@ namespace PhotovoltaicThermalCollectors { { SetupOutputVariable(state, "Generator Produced Thermal Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.ThermPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -539,34 +539,32 @@ namespace PhotovoltaicThermalCollectors { if (this->WorkingFluidType == WorkingFluidEnum::LIQUID) { SetupOutputVariable(state, "Generator Produced Thermal Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.ThermEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::SolarWater, + OutputProcessor::SOVEndUseCat::HeatProduced, {}, - "SolarWater", - "HeatProduced", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } else if (this->WorkingFluidType == WorkingFluidEnum::AIR) { SetupOutputVariable(state, "Generator Produced Thermal Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.ThermEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::SolarAir, + OutputProcessor::SOVEndUseCat::HeatProduced, {}, - "SolarAir", - "HeatProduced", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Generator PVT Fluid Bypass Status", - OutputProcessor::Unit::None, + Constant::Units::None, this->Report.BypassStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -575,7 +573,7 @@ namespace PhotovoltaicThermalCollectors { SetupOutputVariable(state, "Generator PVT Fluid Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.TinletWorkFluid, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -583,7 +581,7 @@ namespace PhotovoltaicThermalCollectors { SetupOutputVariable(state, "Generator PVT Fluid Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.ToutletWorkFluid, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -591,7 +589,7 @@ namespace PhotovoltaicThermalCollectors { SetupOutputVariable(state, "Generator PVT Fluid Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->Report.MdotWorkFluid, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.hh b/src/EnergyPlus/PhotovoltaicThermalCollectors.hh index 1e801a1a031..e906f5e319f 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.hh +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Photovoltaics.cc b/src/EnergyPlus/Photovoltaics.cc index ddf708c366a..46cbee821b3 100644 --- a/src/EnergyPlus/Photovoltaics.cc +++ b/src/EnergyPlus/Photovoltaics.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -683,26 +683,25 @@ namespace Photovoltaics { // set up report variables CurrentModuleObject='Photovoltaics' SetupOutputVariable(state, "Generator Produced DC Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataPhotovoltaic->PVarray(PVnum).Report.DCPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataPhotovoltaic->PVarray(PVnum).Name); SetupOutputVariable(state, "Generator Produced DC Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataPhotovoltaic->PVarray(PVnum).Report.DCEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataPhotovoltaic->PVarray(PVnum).Name, + Constant::eResource::ElectricityProduced, + OutputProcessor::SOVEndUseCat::Photovoltaic, {}, - "ElectricityProduced", - "Photovoltaics", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Generator PV Array Efficiency", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataPhotovoltaic->PVarray(PVnum).Report.ArrayEfficiency, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -713,21 +712,21 @@ namespace Photovoltaics { (state.dataPhotovoltaic->PVarray(PVnum).PVModelType == PVModel::Sandia)) { SetupOutputVariable(state, "Generator PV Cell Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataPhotovoltaic->PVarray(PVnum).Report.CellTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataPhotovoltaic->PVarray(PVnum).Name); SetupOutputVariable(state, "Generator PV Short Circuit Current", - OutputProcessor::Unit::A, + Constant::Units::A, state.dataPhotovoltaic->PVarray(PVnum).Report.ArrayIsc, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataPhotovoltaic->PVarray(PVnum).Name); SetupOutputVariable(state, "Generator PV Open Circuit Voltage", - OutputProcessor::Unit::V, + Constant::Units::V, state.dataPhotovoltaic->PVarray(PVnum).Report.ArrayVoc, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/Photovoltaics.hh b/src/EnergyPlus/Photovoltaics.hh index df0792ac124..a6a644125aa 100644 --- a/src/EnergyPlus/Photovoltaics.hh +++ b/src/EnergyPlus/Photovoltaics.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PierceSurface.hh b/src/EnergyPlus/PierceSurface.hh index 6b474c2815d..9c07e476352 100644 --- a/src/EnergyPlus/PierceSurface.hh +++ b/src/EnergyPlus/PierceSurface.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -85,9 +85,8 @@ namespace EnergyPlus { -inline void PierceSurface_Triangular(DataSurfaces::Surface2D const &s2d, // 2D surface - Vector2 const &h2d, // 2D hit point - bool &hit // Ray intersects surface? +inline bool PierceSurface_Triangular(DataSurfaces::Surface2D const &s2d, // 2D surface + Vector2 const &h2d // 2D hit point ) { // Purpose: Check if a 2D hit point is in a triangular 2D surface @@ -103,15 +102,14 @@ inline void PierceSurface_Triangular(DataSurfaces::Surface2D const &s2d, // 2D s using DataSurfaces::Surface2D; Surface2D::Vertices const &vs(s2d.vertices); // 2D surface vertices Surface2D::Vectors const &es(s2d.edges); // 2D surface edge vectors - if (es[0].cross(h2d - vs[0]) < 0.0) return; - if (es[1].cross(h2d - vs[1]) < 0.0) return; - if (es[2].cross(h2d - vs[2]) < 0.0) return; - hit = true; -} + if (es[0].cross(h2d - vs[0]) < 0.0) return false; + if (es[1].cross(h2d - vs[1]) < 0.0) return false; + if (es[2].cross(h2d - vs[2]) < 0.0) return false; + return true; +} // PierceSurface_Triangular() -inline void PierceSurface_Convex(DataSurfaces::Surface2D const &s2d, // 2D surface - Vector2 const &h2d, // 2D hit point - bool &hit // Ray intersects surface? +inline bool PierceSurface_Convex(DataSurfaces::Surface2D const &s2d, // 2D surface + Vector2 const &h2d // 2D hit point ) { // Purpose: Check if a 2D hit point is in a convex 2D surface @@ -133,53 +131,50 @@ inline void PierceSurface_Convex(DataSurfaces::Surface2D const &s2d, // 2D surfa switch (n) { case 8: if (es[7].cross(h2d - vs[7]) < 0.0) { - return; + return false; } // fallthrough case 7: if (es[6].cross(h2d - vs[6]) < 0.0) { - return; + return false; } // fallthrough case 6: if (es[5].cross(h2d - vs[5]) < 0.0) { - return; + return false; } // fallthrough case 5: if (es[4].cross(h2d - vs[4]) < 0.0) { - return; + return false; } // fallthrough case 4: if (es[3].cross(h2d - vs[3]) < 0.0) { - return; + return false; } // fallthrough case 3: if (es[2].cross(h2d - vs[2]) < 0.0) { - return; + return false; } if (es[1].cross(h2d - vs[1]) < 0.0) { - return; + return false; } if (es[0].cross(h2d - vs[0]) < 0.0) { - return; + return false; } - hit = true; - return; + return true; default: for (Surface2D::Vertices::size_type i = 0; i < n; ++i) { - if (es[i].cross(h2d - vs[i]) < 0.0) return; + if (es[i].cross(h2d - vs[i]) < 0.0) return false; } - hit = true; - return; + return true; } -} +} // PierceSurface_Convex() -inline void PierceSurface_Nonconvex(DataSurfaces::Surface2D const &s2d, // 2D surface - Vector2 const &h2d, // 2D hit point - bool &hit // Ray intersects surface? +inline bool PierceSurface_Nonconvex(DataSurfaces::Surface2D const &s2d, // 2D surface + Vector2 const &h2d // 2D hit point ) { // Purpose: Check if a 2D hit point is in a 2D possibly nonconvex surface @@ -212,8 +207,8 @@ inline void PierceSurface_Nonconvex(DataSurfaces::Surface2D const &s2d, // 2D su Slab const &slab(slabs[iSlab]); // Check hit point within slab bounding box x range - Real64 const xHit(h2d.x); // Hit point x coordinate - if ((xHit < slab.xl) || (xHit > slab.xu)) return; // Hit point outside slab bounding box + Real64 const xHit(h2d.x); // Hit point x coordinate + if ((xHit < slab.xl) || (xHit > slab.xu)) return false; // Hit point outside slab bounding box // Find edge pair surrounding hit point Slab::Edges const &slabEdges(slab.edges); @@ -226,14 +221,14 @@ inline void PierceSurface_Nonconvex(DataSurfaces::Surface2D const &s2d, // 2D su Vertex2D v0(s2d.vertices[se0]); Surface2D::Edge e0(s2d.edges[se0]); Real64 const x0(v0.x + (yHit - v0.y) * eXY0); - if (xHit < x0) return; // Hit point x is left of left edge + if (xHit < x0) return false; // Hit point x is left of left edge Slab::Edge const se1(slabEdges[1]); Slab::EdgeXY const eXY1(slabEdgesXY[1]); Vertex2D v1(s2d.vertices[se1]); Surface2D::Edge e1(s2d.edges[se1]); Real64 const x1(v1.x + (yHit - v1.y) * eXY1); - if (x1 < xHit) return; // Hit point is right of right edge - } else { // 4+ edges: Binary search for edges surrounding hit point + if (x1 < xHit) return false; // Hit point is right of right edge + } else { // 4+ edges: Binary search for edges surrounding hit point assert(nEdges >= 4u); assert(nEdges % 2 == 0u); size_type l(0u), u(nEdges - 1); @@ -242,13 +237,13 @@ inline void PierceSurface_Nonconvex(DataSurfaces::Surface2D const &s2d, // 2D su Vertex2D const &vl(s2d.vertices[il]); Surface2D::Edge const el(s2d.edges[il]); Real64 const xl(vl.x + (yHit - vl.y) * eXYl); - if (xHit < xl) return; // Hit point x is left of leftmost edge + if (xHit < xl) return false; // Hit point x is left of leftmost edge Slab::Edge const iu(slabEdges[u]); Slab::EdgeXY const eXYu(slabEdgesXY[u]); Vertex2D const &vu(s2d.vertices[iu]); Surface2D::Edge const eu(s2d.edges[iu]); Real64 const xu(vu.x + (yHit - vu.y) * eXYu); - if (xu < xHit) return; // Hit point is right of rightmost edge + if (xu < xHit) return false; // Hit point is right of rightmost edge while (u - l > 1u) { size_type const m((l + u) / 2); Slab::Edge const im(slabEdges[m]); @@ -263,15 +258,14 @@ inline void PierceSurface_Nonconvex(DataSurfaces::Surface2D const &s2d, // 2D su } } assert(u - l == 1u); - if (u % 2 == 0u) return; // Outside of nonconvex surface polygon + if (u % 2 == 0u) return false; // Outside of nonconvex surface polygon } - hit = true; -} + return true; +} // PierceSurface_nonconvex() ALWAYS_INLINE -void PierceSurface_polygon(DataSurfaces::SurfaceData const &surface, // Surface - Vector3 const &hitPt, // Ray-plane intersection point - bool &hit // Ray intersects surface? +bool PierceSurface_polygon(DataSurfaces::SurfaceData const &surface, // Surface + Vector3 const &hitPt // Ray-plane intersection point ) { // Purpose: Check if hit point on surface plane is in surface polygon @@ -286,32 +280,33 @@ void PierceSurface_polygon(DataSurfaces::SurfaceData const &surface, // Surface using Vertex2D = Vector2; Surface2D const &s2d(surface.surface2d); int const axis(s2d.axis); - Vertex2D const h2d(axis == 0 ? hitPt.y : hitPt.x, axis == 2 ? hitPt.y : hitPt.z); // Hit point in 2D surface's plane - if ((h2d.x < s2d.vl.x) || (s2d.vu.x < h2d.x) || (h2d.y < s2d.vl.y) || (s2d.vu.y < h2d.y)) return; // Misses 2D surface bounding box + Vertex2D const h2d(axis == 0 ? hitPt.y : hitPt.x, axis == 2 ? hitPt.y : hitPt.z); // Hit point in 2D surface's plane + if ((h2d.x < s2d.vl.x) || (s2d.vu.x < h2d.x) || (h2d.y < s2d.vl.y) || (s2d.vu.y < h2d.y)) return false; // Misses 2D surface bounding box ShapeCat const shapeCat(surface.shapeCat); if (shapeCat == ShapeCat::Rectangular) { // Rectangular is most common: Special case algorithm is faster but assumes these are really rectangular Vertex2D const v0h(h2d - s2d.vertices[0]); Real64 const he1(v0h.dot(s2d.edges[0])); - if ((he1 < 0.0) || (he1 > s2d.s1)) return; + if ((he1 < 0.0) || (he1 > s2d.s1)) return false; Real64 const he3(-v0h.dot(s2d.edges[3])); - if ((he3 < 0.0) || (he3 > s2d.s3)) return; - hit = true; + if ((he3 < 0.0) || (he3 > s2d.s3)) return false; + return true; } else if (shapeCat == ShapeCat::Triangular) { // Cross products all nonnegative <=> Hit point in triangle - PierceSurface_Triangular(s2d, h2d, hit); + return PierceSurface_Triangular(s2d, h2d); } else if ((shapeCat == ShapeCat::Nonconvex) || (s2d.vertices.size() >= nVerticesBig)) { // O( log n ) algorithm for nonconvex and many-vertex convex surfaces - PierceSurface_Nonconvex(s2d, h2d, hit); + return PierceSurface_Nonconvex(s2d, h2d); } else if (shapeCat == ShapeCat::Convex) { // O( n ) algorithm for convex surface without too many vertices - PierceSurface_Convex(s2d, h2d, hit); + return PierceSurface_Convex(s2d, h2d); + } else { + return false; // Should we assert here also? } -} +} // PierceSurface_Polygon() ALWAYS_INLINE -void PierceSurface(DataSurfaces::SurfaceData const &surface, // Surface +bool PierceSurface(DataSurfaces::SurfaceData const &surface, // Surface Vector3 const &rayOri, // Ray origin point Vector3 const &rayDir, // Ray direction vector - Vector3 &hitPt, // Ray-plane intersection point - bool &hit // Ray intersects surface? + Vector3 &hitPt // Ray-plane intersection point ) { // Purpose: Check if a ray hits a surface and return the point of intersection @@ -324,16 +319,15 @@ void PierceSurface(DataSurfaces::SurfaceData const &surface, // Surface // Jan 2016: Initial release // Find ray intersection with surface plane - hit = false; DataSurfaces::SurfaceData::Plane const &plane(surface.plane); Real64 const den((plane.x * rayDir.x) + (plane.y * rayDir.y) + (plane.z * rayDir.z)); if (den == 0.0) { // Ray is parallel to plane: This not treated as piercing even if ray lies in plane - return; + return false; } else { // Ray's line intersects plane Real64 const num(-((plane.x * rayOri.x) + (plane.y * rayOri.y) + (plane.z * rayOri.z) + plane.w)); if (num * den <= 0.0) { // Ray points away from surface or ray origin is on surface: This looks odd but is fast way to check for different signs - return; + return false; } else { // Ray points toward surface: Compute hit point Real64 const t(num / den); // Ray parameter at plane intersection: hitPt = rayOri + t * rayDir hitPt.x = rayOri.x + (t * rayDir.x); // Compute by coordinate to avoid Vertex temporaries @@ -343,16 +337,15 @@ void PierceSurface(DataSurfaces::SurfaceData const &surface, // Surface } // Check if hit point is in surface polygon - PierceSurface_polygon(surface, hitPt, hit); -} + return PierceSurface_polygon(surface, hitPt); +} // PierceSurface() ALWAYS_INLINE -void PierceSurface(EnergyPlusData &state, +bool PierceSurface(EnergyPlusData &state, int const iSurf, // Surface index Vector3 const &rayOri, // Ray origin point Vector3 const &rayDir, // Ray direction vector - Vector3 &hitPt, // Ray-plane intersection point - bool &hit // Ray intersects surface? + Vector3 &hitPt // Ray-plane intersection point ) { // Purpose: Overload taking surface index instead of surface @@ -362,16 +355,15 @@ void PierceSurface(EnergyPlusData &state, // History: // Jan 2016: Initial release - PierceSurface(state.dataSurface->Surface(iSurf), rayOri, rayDir, hitPt, hit); -} + return PierceSurface(state.dataSurface->Surface(iSurf), rayOri, rayDir, hitPt); +} // PierceSurface() ALWAYS_INLINE -void PierceSurface(DataSurfaces::SurfaceData const &surface, // Surface +bool PierceSurface(DataSurfaces::SurfaceData const &surface, // Surface Vector3 const &rayOri, // Ray origin point Vector3 const &rayDir, // Ray direction unit vector Real64 const dMax, // Max distance from rayOri to hit point - Vector3 &hitPt, // Ray-plane intersection point - bool &hit // Ray intersects surface? + Vector3 &hitPt // Ray-plane intersection point ) { // Purpose: Check if a ray hits a surface and return the point of intersection @@ -390,19 +382,18 @@ void PierceSurface(DataSurfaces::SurfaceData const &surface, // Surface assert(dMax >= 0.0); // Distance must be nonnegative // Find ray intersection with surface plane - hit = false; DataSurfaces::SurfaceData::Plane const &plane(surface.plane); Real64 const den((plane.x * rayDir.x) + (plane.y * rayDir.y) + (plane.z * rayDir.z)); if (den == 0.0) { // Ray is parallel to plane: This not treated as piercing even if ray lies in plane - return; + return false; } else { // Ray's line intersects plane Real64 const num(-((plane.x * rayOri.x) + (plane.y * rayOri.y) + (plane.z * rayOri.z) + plane.w)); if (num * den <= 0.0) { // Ray points away from surface or ray origin is on surface: This looks odd but is fast way to check for different signs - return; + return false; } else { // Ray points toward surface: Compute hit point Real64 const t(num / den); // Ray parameter at plane intersection: hitPt = rayOri + t * rayDir - if (t > dMax) return; // Hit point exceeds distance from rayOri limit + if (t > dMax) return false; // Hit point exceeds distance from rayOri limit hitPt.x = rayOri.x + (t * rayDir.x); // Compute by coordinate to avoid Vertex temporaries hitPt.y = rayOri.y + (t * rayDir.y); hitPt.z = rayOri.z + (t * rayDir.z); @@ -410,17 +401,16 @@ void PierceSurface(DataSurfaces::SurfaceData const &surface, // Surface } // Check if hit point is in surface polygon - PierceSurface_polygon(surface, hitPt, hit); -} + return PierceSurface_polygon(surface, hitPt); +} // PierceSurface() ALWAYS_INLINE -void PierceSurface(EnergyPlusData &state, +bool PierceSurface(EnergyPlusData &state, int const iSurf, // Surface index Vector3 const &rayOri, // Ray origin point Vector3 const &rayDir, // Ray direction unit vector Real64 const dMax, // Max distance from rayOri to hit point - Vector3 &hitPt, // Ray-plane intersection point - bool &hit // Ray intersects surface? + Vector3 &hitPt // Ray-plane intersection point ) { // Purpose: Overload taking surface index instead of surface @@ -430,7 +420,7 @@ void PierceSurface(EnergyPlusData &state, // History: // Jan 2016: Initial release - PierceSurface(state.dataSurface->Surface(iSurf), rayOri, rayDir, dMax, hitPt, hit); + return PierceSurface(state.dataSurface->Surface(iSurf), rayOri, rayDir, dMax, hitPt); } } // namespace EnergyPlus diff --git a/src/EnergyPlus/PipeHeatTransfer.cc b/src/EnergyPlus/PipeHeatTransfer.cc index b5284efeac9..26ec094ee87 100644 --- a/src/EnergyPlus/PipeHeatTransfer.cc +++ b/src/EnergyPlus/PipeHeatTransfer.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -751,14 +751,14 @@ void GetPipesHeatTransfer(EnergyPlusData &state) SetupOutputVariable(state, "Pipe Fluid Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataPipeHT->PipeHT(Item).FluidHeatLossRate, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, state.dataPipeHT->PipeHT(Item).Name); SetupOutputVariable(state, "Pipe Fluid Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataPipeHT->PipeHT(Item).FluidHeatLossEnergy, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Summed, @@ -767,14 +767,14 @@ void GetPipesHeatTransfer(EnergyPlusData &state) if (state.dataPipeHT->PipeHT(Item).EnvironmentPtr == EnvrnPtr::ZoneEnv) { SetupOutputVariable(state, "Pipe Ambient Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataPipeHT->PipeHT(Item).EnvironmentHeatLossRate, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, state.dataPipeHT->PipeHT(Item).Name); SetupOutputVariable(state, "Pipe Ambient Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataPipeHT->PipeHT(Item).EnvHeatLossEnergy, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Summed, @@ -789,28 +789,28 @@ void GetPipesHeatTransfer(EnergyPlusData &state) SetupOutputVariable(state, "Pipe Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataPipeHT->PipeHT(Item).MassFlowRate, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, state.dataPipeHT->PipeHT(Item).Name); SetupOutputVariable(state, "Pipe Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataPipeHT->PipeHT(Item).VolumeFlowRate, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, state.dataPipeHT->PipeHT(Item).Name); SetupOutputVariable(state, "Pipe Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataPipeHT->PipeHT(Item).FluidInletTemp, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, state.dataPipeHT->PipeHT(Item).Name); SetupOutputVariable(state, "Pipe Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataPipeHT->PipeHT(Item).FluidOutletTemp, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/PipeHeatTransfer.hh b/src/EnergyPlus/PipeHeatTransfer.hh index d557b10d0a2..a37b23dfcde 100644 --- a/src/EnergyPlus/PipeHeatTransfer.hh +++ b/src/EnergyPlus/PipeHeatTransfer.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Pipes.cc b/src/EnergyPlus/Pipes.cc index 79f07af908c..e5c2dc3de54 100644 --- a/src/EnergyPlus/Pipes.cc +++ b/src/EnergyPlus/Pipes.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Pipes.hh b/src/EnergyPlus/Pipes.hh index 6e7277c25dc..23584b54b5a 100644 --- a/src/EnergyPlus/Pipes.hh +++ b/src/EnergyPlus/Pipes.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/Branch.cc b/src/EnergyPlus/Plant/Branch.cc index cdc737485e2..40faec31643 100644 --- a/src/EnergyPlus/Plant/Branch.cc +++ b/src/EnergyPlus/Plant/Branch.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/Branch.hh b/src/EnergyPlus/Plant/Branch.hh index 4e381308f11..6722f7240a3 100644 --- a/src/EnergyPlus/Plant/Branch.hh +++ b/src/EnergyPlus/Plant/Branch.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/CallingOrder.hh b/src/EnergyPlus/Plant/CallingOrder.hh index 6b2f524bc4c..e7e6ebe9f15 100644 --- a/src/EnergyPlus/Plant/CallingOrder.hh +++ b/src/EnergyPlus/Plant/CallingOrder.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -49,7 +49,6 @@ #define PlantOperationCallingOrder_hh_INCLUDED #include -#include namespace EnergyPlus { namespace DataPlant { diff --git a/src/EnergyPlus/Plant/Component.cc b/src/EnergyPlus/Plant/Component.cc index 9aa69082445..54837093f9b 100644 --- a/src/EnergyPlus/Plant/Component.cc +++ b/src/EnergyPlus/Plant/Component.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/Component.hh b/src/EnergyPlus/Plant/Component.hh index 91f7de78bb1..f86542cde55 100644 --- a/src/EnergyPlus/Plant/Component.hh +++ b/src/EnergyPlus/Plant/Component.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/ConnectedLoopData.hh b/src/EnergyPlus/Plant/ConnectedLoopData.hh index 9150ffa83c7..dc9d8a94f70 100644 --- a/src/EnergyPlus/Plant/ConnectedLoopData.hh +++ b/src/EnergyPlus/Plant/ConnectedLoopData.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/Connection.hh b/src/EnergyPlus/Plant/Connection.hh index 7527218f258..90b54226ead 100644 --- a/src/EnergyPlus/Plant/Connection.hh +++ b/src/EnergyPlus/Plant/Connection.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/DataPlant.hh b/src/EnergyPlus/Plant/DataPlant.hh index fd059021da9..237c07fec1c 100644 --- a/src/EnergyPlus/Plant/DataPlant.hh +++ b/src/EnergyPlus/Plant/DataPlant.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -60,7 +60,6 @@ #include #include #include -#include #include #include #include diff --git a/src/EnergyPlus/Plant/Enums.hh b/src/EnergyPlus/Plant/Enums.hh index c35c9a03175..7a04605d850 100644 --- a/src/EnergyPlus/Plant/Enums.hh +++ b/src/EnergyPlus/Plant/Enums.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/EquipAndOperations.cc b/src/EnergyPlus/Plant/EquipAndOperations.cc index 9f692e66fc1..308f382765c 100644 --- a/src/EnergyPlus/Plant/EquipAndOperations.cc +++ b/src/EnergyPlus/Plant/EquipAndOperations.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -74,7 +74,7 @@ namespace DataPlant { SetupOutputVariable(state, "Supervisory Plant Heat Pump Operation Mode", - OutputProcessor::Unit::unknown, + Constant::Units::unknown, this->Report.AirSourcePlant_OpMode, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -82,35 +82,35 @@ namespace DataPlant { SetupOutputVariable(state, "Supervisory Plant Auxiliary Boiler Mode", - OutputProcessor::Unit::unknown, + Constant::Units::unknown, this->Report.BoilerAux_OpMode, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Supervisory Plant Operation Polled Building Heating Load", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.BuildingPolledHeatingLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Supervisory Plant Operation Polled Building Cooling Load", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.BuildingPolledCoolingLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Supervisory Plant Operation Primary Plant Heating Load", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.PrimaryPlantHeatingLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Supervisory Plant Operation Primary Plant Cooling Load", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.PrimaryPlantCoolingLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -786,21 +786,21 @@ namespace DataPlant { this->PlantOps.DedicatedHR_Present = true; SetupOutputVariable(state, "Supervisory Plant Heat Recovery Operation Mode", - OutputProcessor::Unit::unknown, + Constant::Units::unknown, this->Report.DedicHR_OpMode, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Supervisory Plant Operation Secondary Plant Heating Load", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.SecondaryPlantHeatingLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Supervisory Plant Operation Secondary Plant Cooling Load", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.SecondaryPlantCoolingLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/Plant/EquipAndOperations.hh b/src/EnergyPlus/Plant/EquipAndOperations.hh index 89bdf0be5dc..281bf5a2ba6 100644 --- a/src/EnergyPlus/Plant/EquipAndOperations.hh +++ b/src/EnergyPlus/Plant/EquipAndOperations.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/Loop.cc b/src/EnergyPlus/Plant/Loop.cc index f6ae39c6e98..e897248a8dd 100644 --- a/src/EnergyPlus/Plant/Loop.cc +++ b/src/EnergyPlus/Plant/Loop.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/Loop.hh b/src/EnergyPlus/Plant/Loop.hh index 6b5f09cb429..42f449607fb 100644 --- a/src/EnergyPlus/Plant/Loop.hh +++ b/src/EnergyPlus/Plant/Loop.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/LoopSide.cc b/src/EnergyPlus/Plant/LoopSide.cc index 47c3a8498c4..a9a16fcdb93 100644 --- a/src/EnergyPlus/Plant/LoopSide.cc +++ b/src/EnergyPlus/Plant/LoopSide.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/LoopSide.hh b/src/EnergyPlus/Plant/LoopSide.hh index 619a7f5dec8..28e363f0fdb 100644 --- a/src/EnergyPlus/Plant/LoopSide.hh +++ b/src/EnergyPlus/Plant/LoopSide.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/LoopSidePumpInformation.hh b/src/EnergyPlus/Plant/LoopSidePumpInformation.hh index 2cc715aaa87..864b38441e4 100644 --- a/src/EnergyPlus/Plant/LoopSidePumpInformation.hh +++ b/src/EnergyPlus/Plant/LoopSidePumpInformation.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/MeterData.hh b/src/EnergyPlus/Plant/MeterData.hh index fe9bccbcc61..6b376797980 100644 --- a/src/EnergyPlus/Plant/MeterData.hh +++ b/src/EnergyPlus/Plant/MeterData.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -58,7 +58,7 @@ namespace DataPlant { { // Members std::string ReportVarName; - OutputProcessor::Unit ReportVarUnits; + Constant::Units ReportVarUnits; Constant::eResource ResourceType = Constant::eResource::Invalid; std::string EndUse; SystemReports::EndUseType EndUse_CompMode; @@ -70,8 +70,8 @@ namespace DataPlant { // Default Constructor MeterData() - : ReportVarUnits(OutputProcessor::Unit::None), EndUse_CompMode(SystemReports::EndUseType::NoHeatNoCool), ReportVarIndex(0), - ReportVarIndexType(OutputProcessor::TimeStepType::Zone), ReportVarType(OutputProcessor::VariableType::NotFound), CurMeterReading(0.0) + : ReportVarUnits(Constant::Units::Invalid), EndUse_CompMode(SystemReports::EndUseType::NoHeatNoCool), ReportVarIndex(0), + ReportVarIndexType(OutputProcessor::TimeStepType::Zone), ReportVarType(OutputProcessor::VariableType::Invalid), CurMeterReading(0.0) { } }; diff --git a/src/EnergyPlus/Plant/MixerData.hh b/src/EnergyPlus/Plant/MixerData.hh index 6c9122e1651..db140efcb83 100644 --- a/src/EnergyPlus/Plant/MixerData.hh +++ b/src/EnergyPlus/Plant/MixerData.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/PlantAvailManager.hh b/src/EnergyPlus/Plant/PlantAvailManager.hh index a4a18fd8e64..ec5c7ad23dc 100644 --- a/src/EnergyPlus/Plant/PlantAvailManager.hh +++ b/src/EnergyPlus/Plant/PlantAvailManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/PlantConvergencePoint.hh b/src/EnergyPlus/Plant/PlantConvergencePoint.hh index b776790bad8..906a7ef4fa8 100644 --- a/src/EnergyPlus/Plant/PlantConvergencePoint.hh +++ b/src/EnergyPlus/Plant/PlantConvergencePoint.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/PlantLocation.hh b/src/EnergyPlus/Plant/PlantLocation.hh index 371b8fd4ce6..860a0580c78 100644 --- a/src/EnergyPlus/Plant/PlantLocation.hh +++ b/src/EnergyPlus/Plant/PlantLocation.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/PlantManager.cc b/src/EnergyPlus/Plant/PlantManager.cc index 0d4f8fae868..7a841a988a3 100644 --- a/src/EnergyPlus/Plant/PlantManager.cc +++ b/src/EnergyPlus/Plant/PlantManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -737,7 +737,7 @@ void GetPlantLoopData(EnergyPlusData &state) SetupOutputVariable(state, "Plant System Cycle On Off Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataPlnt->PlantAvailMgr(LoopNum).AvailStatus, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, @@ -1917,21 +1917,21 @@ void SetupReports(EnergyPlusData &state) // CurrentModuleObject='Plant/Condenser Loop' SetupOutputVariable(state, "Plant Supply Side Cooling Demand Rate", - OutputProcessor::Unit::W, + Constant::Units::W, loop.CoolingDemand, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataPlnt->PlantLoop(LoopNum).Name); SetupOutputVariable(state, "Plant Supply Side Heating Demand Rate", - OutputProcessor::Unit::W, + Constant::Units::W, loop.HeatingDemand, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataPlnt->PlantLoop(LoopNum).Name); SetupOutputVariable(state, "Plant Supply Side Inlet Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, loop.InletNodeFlowrate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1939,14 +1939,14 @@ void SetupReports(EnergyPlusData &state) SetupOutputVariable(state, "Plant Supply Side Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, loop.InletNodeTemperature, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataPlnt->PlantLoop(LoopNum).Name); SetupOutputVariable(state, "Plant Supply Side Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, loop.OutletNodeTemperature, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1954,28 +1954,28 @@ void SetupReports(EnergyPlusData &state) SetupOutputVariable(state, "Plant Supply Side Not Distributed Demand Rate", - OutputProcessor::Unit::W, + Constant::Units::W, loop.DemandNotDispatched, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataPlnt->PlantLoop(LoopNum).Name); SetupOutputVariable(state, "Plant Supply Side Unmet Demand Rate", - OutputProcessor::Unit::W, + Constant::Units::W, loop.UnmetDemand, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataPlnt->PlantLoop(LoopNum).Name); SetupOutputVariable(state, "Debug Plant Loop Bypass Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, loop.BypassFrac, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataPlnt->PlantLoop(LoopNum).Name); SetupOutputVariable(state, "Debug Plant Last Simulated Loop Side", - OutputProcessor::Unit::None, + Constant::Units::None, loop.LastLoopSideSimulated, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1988,56 +1988,56 @@ void SetupReports(EnergyPlusData &state) for (LoopNum = 1; LoopNum <= state.dataPlnt->TotNumLoops; ++LoopNum) { SetupOutputVariable(state, "Plant Demand Side Lumped Capacitance Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideLocation::Demand).LoopSideInlet_TankTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataPlnt->PlantLoop(LoopNum).Name); SetupOutputVariable(state, "Plant Supply Side Lumped Capacitance Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideLocation::Supply).LoopSideInlet_TankTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataPlnt->PlantLoop(LoopNum).Name); SetupOutputVariable(state, "Plant Demand Side Lumped Capacitance Heat Transport Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideLocation::Demand).LoopSideInlet_MdotCpDeltaT, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataPlnt->PlantLoop(LoopNum).Name); SetupOutputVariable(state, "Plant Supply Side Lumped Capacitance Heat Transport Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideLocation::Supply).LoopSideInlet_MdotCpDeltaT, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataPlnt->PlantLoop(LoopNum).Name); SetupOutputVariable(state, "Plant Demand Side Lumped Capacitance Heat Storage Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideLocation::Demand).LoopSideInlet_McpDTdt, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataPlnt->PlantLoop(LoopNum).Name); SetupOutputVariable(state, "Plant Supply Side Lumped Capacitance Heat Storage Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideLocation::Supply).LoopSideInlet_McpDTdt, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataPlnt->PlantLoop(LoopNum).Name); SetupOutputVariable(state, "Plant Demand Side Lumped Capacitance Excessive Storage Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideLocation::Demand).LoopSideInlet_CapExcessStorageTimeReport, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataPlnt->PlantLoop(LoopNum).Name); SetupOutputVariable(state, "Plant Supply Side Lumped Capacitance Excessive Storage Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideLocation::Supply).LoopSideInlet_CapExcessStorageTimeReport, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -2050,7 +2050,7 @@ void SetupReports(EnergyPlusData &state) OpScheme::Demand) { SetupOutputVariable(state, "Plant Component Distributed Demand Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Branch(BranchNum).Comp(CompNum).MyLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/Plant/PlantManager.hh b/src/EnergyPlus/Plant/PlantManager.hh index 54cf76cb184..f1896467fb5 100644 --- a/src/EnergyPlus/Plant/PlantManager.hh +++ b/src/EnergyPlus/Plant/PlantManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/ReportBranchData.hh b/src/EnergyPlus/Plant/ReportBranchData.hh index da1e6d64f6a..b7e16a3b809 100644 --- a/src/EnergyPlus/Plant/ReportBranchData.hh +++ b/src/EnergyPlus/Plant/ReportBranchData.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/ReportCompData.hh b/src/EnergyPlus/Plant/ReportCompData.hh index 98bc837a02f..6721be90215 100644 --- a/src/EnergyPlus/Plant/ReportCompData.hh +++ b/src/EnergyPlus/Plant/ReportCompData.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -49,7 +49,6 @@ #define PlantReportingReportCompData_hh_INCLUDED #include -#include #include namespace EnergyPlus { @@ -72,8 +71,8 @@ namespace DataPlant { Real64 TotPlantSupplyGas; Real64 TotPlantSupplyPurch; Real64 TotPlantSupplyOther; - PlantConnection ConnectPlant; // Index of energy output report data - Array1D MeteredVar; // Index of energy output report data + PlantConnection ConnectPlant; // Index of energy output report data + Array1D MeteredVar; // Index of energy output report data Array1D SubComp; // Default Constructor diff --git a/src/EnergyPlus/Plant/ReportLoopData.hh b/src/EnergyPlus/Plant/ReportLoopData.hh index bde038b10ec..90c6e227612 100644 --- a/src/EnergyPlus/Plant/ReportLoopData.hh +++ b/src/EnergyPlus/Plant/ReportLoopData.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/SplitterData.hh b/src/EnergyPlus/Plant/SplitterData.hh index b3e236939f9..994e5576a2b 100644 --- a/src/EnergyPlus/Plant/SplitterData.hh +++ b/src/EnergyPlus/Plant/SplitterData.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/Subcomponents.hh b/src/EnergyPlus/Plant/Subcomponents.hh index bc854a19bb3..77df0390d82 100644 --- a/src/EnergyPlus/Plant/Subcomponents.hh +++ b/src/EnergyPlus/Plant/Subcomponents.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -48,7 +48,7 @@ #ifndef PlantTopologySubcomponents_hh_INCLUDED #define PlantTopologySubcomponents_hh_INCLUDED -#include +#include namespace EnergyPlus { namespace DataPlant { @@ -82,8 +82,8 @@ namespace DataPlant { Real64 Capacity; Real64 Efficiency; int OpMode; - Array1D MeteredVar; // Index of energy output report data - int AirSysToPlantPtr; // 0=No plant connection, >0 = index to AirSysToPlant array + Array1D MeteredVar; // Index of energy output report data + int AirSysToPlantPtr; // 0=No plant connection, >0 = index to AirSysToPlant array // Default Constructor SubSubcomponentData() @@ -128,8 +128,8 @@ namespace DataPlant { Real64 PeakPlantSupplyOtherEff; int AirSysToPlantPtr; // 0=No plant connection, >0 = index to AirSysToPlant array Real64 LoopLoadFrac; - Array1D MeteredVar; // Index of energy output report data - Array1D SubSubComp; // Component list + Array1D MeteredVar; // Index of energy output report data + Array1D SubSubComp; // Component list // Default Constructor SubcomponentData() diff --git a/src/EnergyPlus/PlantCentralGSHP.cc b/src/EnergyPlus/PlantCentralGSHP.cc index a386d8d401f..881d9de1fd6 100644 --- a/src/EnergyPlus/PlantCentralGSHP.cc +++ b/src/EnergyPlus/PlantCentralGSHP.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -802,33 +802,31 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) { SetupOutputVariable(state, "Chiller Heater System Cooling Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.TotElecCooling, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "ELECTRICITY", - "Cooling", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Heater System Heating Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.TotElecHeating, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "ELECTRICITY", - "Heating", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Heater System Cooling Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.TotElecCoolingPwr, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -836,7 +834,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater System Heating Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.TotElecHeatingPwr, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -844,46 +842,43 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater System Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.CoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Chillers, {}, - "ENERGYTRANSFER", - "CHILLERS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Heater System Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.HeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Boilers, {}, - "ENERGYTRANSFER", - "BOILER", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Heater System Source Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Report.GLHEEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "ENERGYTRANSFER", - "HEATREJECTION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Heater System Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.CoolingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -891,7 +886,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater System Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.HeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -899,7 +894,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater System Source Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Report.GLHERate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -907,7 +902,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater System Cooling Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->Report.CHWmdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -915,7 +910,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater System Heating Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->Report.HWmdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -923,7 +918,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater System Source Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->Report.GLHEmdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -931,7 +926,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater System Cooling Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.CHWInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -939,7 +934,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater System Heating Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.HWInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -947,7 +942,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater System Source Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.GLHEInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -955,7 +950,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater System Cooling Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.CHWOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -963,7 +958,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater System Heating Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.HWOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -971,7 +966,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Chiller Heater System Source Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->Report.GLHEOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -983,7 +978,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater Operation Mode Unit {}", ChillerHeaterNum), - OutputProcessor::Unit::None, + Constant::Units::None, this->ChillerHeater(ChillerHeaterNum).Report.CurrentMode, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -991,7 +986,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater Part Load Ratio Unit {}", ChillerHeaterNum), - OutputProcessor::Unit::None, + Constant::Units::None, this->ChillerHeater(ChillerHeaterNum).Report.ChillerPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -999,7 +994,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater Cycling Ratio Unit {}", ChillerHeaterNum), - OutputProcessor::Unit::None, + Constant::Units::None, this->ChillerHeater(ChillerHeaterNum).Report.ChillerCyclingRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1007,7 +1002,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater Cooling Electricity Rate Unit {}", ChillerHeaterNum), - OutputProcessor::Unit::W, + Constant::Units::W, this->ChillerHeater(ChillerHeaterNum).Report.CoolingPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1015,7 +1010,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater Heating Electricity Rate Unit {}", ChillerHeaterNum), - OutputProcessor::Unit::W, + Constant::Units::W, this->ChillerHeater(ChillerHeaterNum).Report.HeatingPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1023,7 +1018,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater Cooling Electricity Energy Unit {}", ChillerHeaterNum), - OutputProcessor::Unit::J, + Constant::Units::J, this->ChillerHeater(ChillerHeaterNum).Report.CoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1031,7 +1026,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater Heating Electricity Energy Unit {}", ChillerHeaterNum), - OutputProcessor::Unit::J, + Constant::Units::J, this->ChillerHeater(ChillerHeaterNum).Report.HeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1039,7 +1034,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater Cooling Rate Unit {}", ChillerHeaterNum), - OutputProcessor::Unit::W, + Constant::Units::W, this->ChillerHeater(ChillerHeaterNum).Report.QEvap, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1047,7 +1042,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater Cooling Energy Unit {}", ChillerHeaterNum), - OutputProcessor::Unit::J, + Constant::Units::J, this->ChillerHeater(ChillerHeaterNum).Report.EvapEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1055,7 +1050,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater False Load Heat Transfer Rate Unit {}", ChillerHeaterNum), - OutputProcessor::Unit::W, + Constant::Units::W, this->ChillerHeater(ChillerHeaterNum).Report.ChillerFalseLoadRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1063,7 +1058,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater False Load Heat Transfer Energy Unit {}", ChillerHeaterNum), - OutputProcessor::Unit::J, + Constant::Units::J, this->ChillerHeater(ChillerHeaterNum).Report.ChillerFalseLoad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1071,7 +1066,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater Evaporator Inlet Temperature Unit {}", ChillerHeaterNum), - OutputProcessor::Unit::C, + Constant::Units::C, this->ChillerHeater(ChillerHeaterNum).Report.EvapInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1079,7 +1074,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater Evaporator Outlet Temperature Unit {}", ChillerHeaterNum), - OutputProcessor::Unit::C, + Constant::Units::C, this->ChillerHeater(ChillerHeaterNum).Report.EvapOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1087,7 +1082,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater Evaporator Mass Flow Rate Unit {}", ChillerHeaterNum), - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->ChillerHeater(ChillerHeaterNum).Report.Evapmdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1095,7 +1090,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater Condenser Heat Transfer Rate Unit {}", ChillerHeaterNum), - OutputProcessor::Unit::W, + Constant::Units::W, this->ChillerHeater(ChillerHeaterNum).Report.QCond, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1103,7 +1098,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater Condenser Heat Transfer Energy Unit {}", ChillerHeaterNum), - OutputProcessor::Unit::J, + Constant::Units::J, this->ChillerHeater(ChillerHeaterNum).Report.CondEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1111,7 +1106,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater COP Unit {}", ChillerHeaterNum), - OutputProcessor::Unit::W_W, + Constant::Units::W_W, this->ChillerHeater(ChillerHeaterNum).Report.ActualCOP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1119,7 +1114,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater Capacity Temperature Modifier Multiplier Unit {}", ChillerHeaterNum), - OutputProcessor::Unit::None, + Constant::Units::None, this->ChillerHeater(ChillerHeaterNum).Report.ChillerCapFT, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1127,7 +1122,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater EIR Temperature Modifier Multiplier Unit {}", ChillerHeaterNum), - OutputProcessor::Unit::None, + Constant::Units::None, this->ChillerHeater(ChillerHeaterNum).Report.ChillerEIRFT, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1135,7 +1130,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater EIR Part Load Modifier Multiplier Unit {}", ChillerHeaterNum), - OutputProcessor::Unit::None, + Constant::Units::None, this->ChillerHeater(ChillerHeaterNum).Report.ChillerEIRFPLR, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1143,7 +1138,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater Condenser Inlet Temperature Unit {}", ChillerHeaterNum), - OutputProcessor::Unit::C, + Constant::Units::C, this->ChillerHeater(ChillerHeaterNum).Report.CondInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1151,7 +1146,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater Condenser Outlet Temperature Unit {}", ChillerHeaterNum), - OutputProcessor::Unit::C, + Constant::Units::C, this->ChillerHeater(ChillerHeaterNum).Report.CondOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1159,7 +1154,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Chiller Heater Condenser Mass Flow Rate Unit {}", ChillerHeaterNum), - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->ChillerHeater(ChillerHeaterNum).Report.Condmdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/PlantCentralGSHP.hh b/src/EnergyPlus/PlantCentralGSHP.hh index a1a4acf270e..8e4a119884c 100644 --- a/src/EnergyPlus/PlantCentralGSHP.hh +++ b/src/EnergyPlus/PlantCentralGSHP.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantChillers.cc b/src/EnergyPlus/PlantChillers.cc index 7e7264af2df..8d7665cf67e 100644 --- a/src/EnergyPlus/PlantChillers.cc +++ b/src/EnergyPlus/PlantChillers.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -619,93 +619,90 @@ namespace PlantChillers { { SetupOutputVariable(state, "Chiller Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - "ELECTRICITY", - "Cooling", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, this->EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Evaporator Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QEvaporator, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Evaporator Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->EvaporatorEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Chillers, {}, - "ENERGYTRANSFER", - "CHILLERS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Evaporator Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->EvapInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Evaporator Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->EvapOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Evaporator Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->EvapMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Condenser Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QCondenser, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Condenser Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->CondenserEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "ENERGYTRANSFER", - "HEATREJECTION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller COP", - OutputProcessor::Unit::W_W, + Constant::Units::W_W, this->ActualCOP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Condenser Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->CondInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -715,14 +712,14 @@ namespace PlantChillers { if (this->CondenserType == DataPlant::CondenserType::WaterCooled) { SetupOutputVariable(state, "Chiller Condenser Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->CondOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Condenser Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->CondMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -732,23 +729,22 @@ namespace PlantChillers { if (this->BasinHeaterPowerFTempDiff > 0.0) { SetupOutputVariable(state, "Chiller Basin Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->BasinHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Basin Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->BasinHeaterConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Chillers, {}, - "Electricity", - "CHILLERS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } } @@ -756,47 +752,46 @@ namespace PlantChillers { if (this->HeatRecActive) { SetupOutputVariable(state, "Chiller Total Recovered Heat Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QHeatRecovery, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Total Recovered Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->EnergyHeatRecovery, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRecovery, {}, - "ENERGYTRANSFER", - "HEATRECOVERY", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Heat Recovery Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->HeatRecInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Heat Recovery Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->HeatRecOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Heat Recovery Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->HeatRecMdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Effective Heat Rejection Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->ChillerCondAvgTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -2652,81 +2647,79 @@ namespace PlantChillers { { SetupOutputVariable(state, "Chiller Drive Shaft Power", - OutputProcessor::Unit::W, + Constant::Units::W, this->Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Drive Shaft Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name); SetupOutputVariable(state, "Chiller Evaporator Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QEvaporator, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Evaporator Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->EvaporatorEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Chillers, {}, - "ENERGYTRANSFER", - "CHILLERS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Evaporator Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->EvapInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Evaporator Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->EvapOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Evaporator Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->EvapMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Condenser Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QCondenser, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Condenser Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->CondenserEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "ENERGYTRANSFER", - "HEATREJECTION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Condenser Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->CondInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -2736,14 +2729,14 @@ namespace PlantChillers { if (this->CondenserType == DataPlant::CondenserType::WaterCooled) { SetupOutputVariable(state, "Chiller Condenser Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->CondOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Condenser Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->CondMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -2753,71 +2746,69 @@ namespace PlantChillers { if (this->BasinHeaterPowerFTempDiff > 0.0) { SetupOutputVariable(state, "Chiller Basin Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->BasinHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Basin Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->BasinHeaterConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Chillers, {}, - "Electricity", - "CHILLERS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } } std::string_view const sFuelType = Constant::eFuelNames[static_cast(this->FuelType)]; SetupOutputVariable(state, format("Chiller {} Rate", sFuelType), - OutputProcessor::Unit::W, + Constant::Units::W, this->FuelEnergyUseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, format("Chiller {} Energy", sFuelType), - OutputProcessor::Unit::J, + Constant::Units::J, this->FuelEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eFuel2eResource[(int)this->FuelType], + OutputProcessor::SOVEndUseCat::Cooling, {}, - sFuelType, - "Cooling", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller COP", - OutputProcessor::Unit::W_W, + Constant::Units::W_W, this->FuelCOP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, format("Chiller {} Mass Flow Rate", sFuelType), - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->FuelMdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Exhaust Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->ExhaustStackTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Heat Recovery Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->HeatRecMdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -2827,88 +2818,85 @@ namespace PlantChillers { // need to only report if heat recovery active SetupOutputVariable(state, "Chiller Jacket Recovered Heat Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QJacketRecovered, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Jacket Recovered Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->JacketEnergyRec, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRecovery, {}, - "ENERGYTRANSFER", - "HEATRECOVERY", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Lube Recovered Heat Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QLubeOilRecovered, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Lube Recovered Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->LubeOilEnergyRec, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRecovery, {}, - "ENERGYTRANSFER", - "HEATRECOVERY", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Exhaust Recovered Heat Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QExhaustRecovered, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Exhaust Recovered Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->ExhaustEnergyRec, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRecovery, {}, - "ENERGYTRANSFER", - "HEATRECOVERY", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Total Recovered Heat Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QTotalHeatRecovered, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Total Recovered Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->TotalHeatEnergyRec, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name); SetupOutputVariable(state, "Chiller Heat Recovery Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->HeatRecInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Heat Recovery Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->HeatRecOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -4698,81 +4686,79 @@ namespace PlantChillers { { SetupOutputVariable(state, "Chiller Drive Shaft Power", - OutputProcessor::Unit::W, + Constant::Units::W, this->Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Drive Shaft Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name); SetupOutputVariable(state, "Chiller Evaporator Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QEvaporator, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Evaporator Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->EvaporatorEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Chillers, {}, - "ENERGYTRANSFER", - "CHILLERS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Evaporator Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->EvapInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Evaporator Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->EvapOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Evaporator Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->EvapMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Condenser Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QCondenser, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Condenser Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->CondenserEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "ENERGYTRANSFER", - "HEATREJECTION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Condenser Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->CondInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -4782,14 +4768,14 @@ namespace PlantChillers { if (this->CondenserType == DataPlant::CondenserType::WaterCooled) { SetupOutputVariable(state, "Chiller Condenser Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->CondOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Condenser Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->CondMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -4799,50 +4785,48 @@ namespace PlantChillers { if (this->BasinHeaterPowerFTempDiff > 0.0) { SetupOutputVariable(state, "Chiller Basin Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->BasinHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Basin Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->BasinHeaterConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Chillers, {}, - "Electricity", - "CHILLERS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } } SetupOutputVariable(state, "Chiller Lube Recovered Heat Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->HeatRecLubeRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Lube Recovered Heat Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->HeatRecLubeEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRecovery, {}, - "ENERGYTRANSFER", - "HeatRecovery", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); std::string_view const sFuelType = Constant::eFuelNames[static_cast(this->FuelType)]; SetupOutputVariable(state, format("Chiller {} Rate", sFuelType), - OutputProcessor::Unit::W, + Constant::Units::W, this->FuelEnergyUsedRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -4850,62 +4834,61 @@ namespace PlantChillers { SetupOutputVariable(state, format("Chiller {} Energy", sFuelType), - OutputProcessor::Unit::J, + Constant::Units::J, this->FuelEnergyUsed, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eFuel2eResource[(int)this->FuelType], + OutputProcessor::SOVEndUseCat::Cooling, {}, - sFuelType, - "Cooling", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, format("Chiller {} Mass Flow Rate", sFuelType), - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->FuelMassUsedRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, format("Chiller {} Mass", sFuelType), - OutputProcessor::Unit::kg, + Constant::Units::kg, this->FuelMassUsed, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name); SetupOutputVariable(state, "Chiller Exhaust Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->ExhaustStackTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Heat Recovery Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->HeatRecInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Heat Recovery Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->HeatRecOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Heat Recovery Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->HeatRecMdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller COP", - OutputProcessor::Unit::W_W, + Constant::Units::W_W, this->FuelCOP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -6563,93 +6546,90 @@ namespace PlantChillers { { SetupOutputVariable(state, "Chiller Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "ELECTRICITY", - "Cooling", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Evaporator Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QEvaporator, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Evaporator Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->EvaporatorEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Chillers, {}, - "ENERGYTRANSFER", - "CHILLERS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Evaporator Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->EvapInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Evaporator Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->EvapOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Evaporator Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->EvapMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller COP", - OutputProcessor::Unit::W_W, + Constant::Units::W_W, this->ActualCOP, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Condenser Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->QCondenser, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Condenser Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->CondenserEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatRejection, {}, - "ENERGYTRANSFER", - "HEATREJECTION", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Chiller Condenser Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->CondInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -6659,14 +6639,14 @@ namespace PlantChillers { if (this->CondenserType == DataPlant::CondenserType::WaterCooled) { SetupOutputVariable(state, "Chiller Condenser Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->CondOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Condenser Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->CondMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -6676,23 +6656,22 @@ namespace PlantChillers { if (this->BasinHeaterPowerFTempDiff > 0.0) { SetupOutputVariable(state, "Chiller Basin Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->BasinHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chiller Basin Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->BasinHeaterConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Chillers, {}, - "Electricity", - "CHILLERS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } } if (state.dataGlobal->AnyEnergyManagementSystemInModel) { diff --git a/src/EnergyPlus/PlantChillers.hh b/src/EnergyPlus/PlantChillers.hh index efc497fc926..b501800f07d 100644 --- a/src/EnergyPlus/PlantChillers.hh +++ b/src/EnergyPlus/PlantChillers.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantComponent.hh b/src/EnergyPlus/PlantComponent.hh index fec2efff74a..b282ef9a3c9 100644 --- a/src/EnergyPlus/PlantComponent.hh +++ b/src/EnergyPlus/PlantComponent.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantComponentTemperatureSources.cc b/src/EnergyPlus/PlantComponentTemperatureSources.cc index 9acd8599553..c6aec4daa8b 100644 --- a/src/EnergyPlus/PlantComponentTemperatureSources.cc +++ b/src/EnergyPlus/PlantComponentTemperatureSources.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -208,42 +208,42 @@ namespace PlantComponentTemperatureSources { SetupOutputVariable(state, "Plant Temperature Source Component Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->MassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Plant Temperature Source Component Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->InletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Plant Temperature Source Component Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->OutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Plant Temperature Source Component Source Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->BoundaryTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Plant Temperature Source Component Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->HeatRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Plant Temperature Source Component Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->HeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, diff --git a/src/EnergyPlus/PlantComponentTemperatureSources.hh b/src/EnergyPlus/PlantComponentTemperatureSources.hh index cf4139e9b73..21911ecca02 100644 --- a/src/EnergyPlus/PlantComponentTemperatureSources.hh +++ b/src/EnergyPlus/PlantComponentTemperatureSources.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantCondLoopOperation.cc b/src/EnergyPlus/PlantCondLoopOperation.cc index b92334143e1..8531068038c 100644 --- a/src/EnergyPlus/PlantCondLoopOperation.cc +++ b/src/EnergyPlus/PlantCondLoopOperation.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantCondLoopOperation.hh b/src/EnergyPlus/PlantCondLoopOperation.hh index 2b72fc754dd..7cbdcf72593 100644 --- a/src/EnergyPlus/PlantCondLoopOperation.hh +++ b/src/EnergyPlus/PlantCondLoopOperation.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc index 9b5c299f0a2..e92b4c2defa 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -447,7 +447,23 @@ void GetFluidHeatExchangerInput(EnergyPlusData &state) state.dataPlantHXFluidToFluid->FluidHX(CompLoop).TempControlTol = 0.01; } - state.dataPlantHXFluidToFluid->FluidHX(CompLoop).HeatTransferMeteringEndUse = cAlphaArgs(10); + std::string endUseCat = Util::makeUPPER(cAlphaArgs(10)); + if (endUseCat == "FREECOOLING") + state.dataPlantHXFluidToFluid->FluidHX(CompLoop).HeatTransferMeteringEndUse = OutputProcessor::SOVEndUseCat::FreeCooling; + else if (endUseCat == "HEATREJECTION") + state.dataPlantHXFluidToFluid->FluidHX(CompLoop).HeatTransferMeteringEndUse = OutputProcessor::SOVEndUseCat::HeatRejection; + else if (endUseCat == "HEATRECOVERYFORCOOLING") + state.dataPlantHXFluidToFluid->FluidHX(CompLoop).HeatTransferMeteringEndUse = OutputProcessor::SOVEndUseCat::HeatRecoveryForCooling; + else if (endUseCat == "HEATRECOVERYFORCOOLING") + state.dataPlantHXFluidToFluid->FluidHX(CompLoop).HeatTransferMeteringEndUse = OutputProcessor::SOVEndUseCat::HeatRecoveryForHeating; + else if (endUseCat == "LOOPTOLOOP") + state.dataPlantHXFluidToFluid->FluidHX(CompLoop).HeatTransferMeteringEndUse = OutputProcessor::SOVEndUseCat::LoopToLoop; + else { + ShowWarningError( + state, + format("{} = {}, {} is an invalid value for {}", cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(10), cAlphaFieldNames(10))); + ErrorsFound = true; + } if (!lAlphaFieldBlanks(11)) { state.dataPlantHXFluidToFluid->FluidHX(CompLoop).OtherCompSupplySideLoop.inletNodeNum = @@ -532,7 +548,7 @@ void HeatExchangerStruct::setupOutputVars(EnergyPlusData &state) { SetupOutputVariable(state, "Fluid Heat Exchanger Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->HeatTransferRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -540,20 +556,19 @@ void HeatExchangerStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Fluid Heat Exchanger Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->HeatTransferEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - "ENERGYTRANSFER", + Constant::eResource::EnergyTransfer, this->HeatTransferMeteringEndUse, {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Fluid Heat Exchanger Loop Supply Side Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->SupplySideLoop.InletMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -561,7 +576,7 @@ void HeatExchangerStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Fluid Heat Exchanger Loop Supply Side Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->SupplySideLoop.InletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -569,7 +584,7 @@ void HeatExchangerStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Fluid Heat Exchanger Loop Supply Side Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->SupplySideLoop.OutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -577,7 +592,7 @@ void HeatExchangerStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Fluid Heat Exchanger Loop Demand Side Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->DemandSideLoop.InletMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -585,7 +600,7 @@ void HeatExchangerStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Fluid Heat Exchanger Loop Demand Side Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->DemandSideLoop.InletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -593,7 +608,7 @@ void HeatExchangerStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Fluid Heat Exchanger Loop Demand Side Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->DemandSideLoop.OutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -601,7 +616,7 @@ void HeatExchangerStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Fluid Heat Exchanger Operation Status", - OutputProcessor::Unit::None, + Constant::Units::None, this->OperationStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -609,7 +624,7 @@ void HeatExchangerStruct::setupOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Fluid Heat Exchanger Effectiveness", - OutputProcessor::Unit::None, + Constant::Units::None, this->Effectiveness, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh index 77e908d8023..65e09c7c1d4 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -166,7 +166,7 @@ namespace PlantHeatExchangerFluidToFluid { Real64 MaxOperationTemp; PlantConnectionStruct DemandSideLoop; // plant connections and data for the side of HX connected to demand side PlantConnectionStruct SupplySideLoop; - std::string HeatTransferMeteringEndUse; + OutputProcessor::SOVEndUseCat HeatTransferMeteringEndUse = OutputProcessor::SOVEndUseCat::Invalid; std::string ComponentUserName; // user name for control-associated component DataPlant::PlantEquipmentType ComponentType; PlantLocatorStruct OtherCompSupplySideLoop; diff --git a/src/EnergyPlus/PlantLoadProfile.cc b/src/EnergyPlus/PlantLoadProfile.cc index 9acaec05da9..ec6ed91e518 100644 --- a/src/EnergyPlus/PlantLoadProfile.cc +++ b/src/EnergyPlus/PlantLoadProfile.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -515,7 +515,7 @@ void GetPlantProfileInput(EnergyPlusData &state) // Setup report variables SetupOutputVariable(state, "Plant Load Profile Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataPlantLoadProfile->PlantProfile(ProfileNum).MassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -523,7 +523,7 @@ void GetPlantProfileInput(EnergyPlusData &state) SetupOutputVariable(state, "Plant Load Profile Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataPlantLoadProfile->PlantProfile(ProfileNum).Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -531,42 +531,39 @@ void GetPlantProfileInput(EnergyPlusData &state) SetupOutputVariable(state, "Plant Load Profile Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataPlantLoadProfile->PlantProfile(ProfileNum).Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataPlantLoadProfile->PlantProfile(ProfileNum).Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Heating, {}, - "ENERGYTRANSFER", - "Heating", - {}, - "Plant"); // is EndUseKey right? + OutputProcessor::SOVGroup::Plant); // is EndUseKey right? SetupOutputVariable(state, "Plant Load Profile Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataPlantLoadProfile->PlantProfile(ProfileNum).HeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataPlantLoadProfile->PlantProfile(ProfileNum).Name, + Constant::eResource::PlantLoopHeatingDemand, + OutputProcessor::SOVEndUseCat::Heating, {}, - "PLANTLOOPHEATINGDEMAND", - "Heating", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Plant Load Profile Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataPlantLoadProfile->PlantProfile(ProfileNum).CoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataPlantLoadProfile->PlantProfile(ProfileNum).Name, + Constant::eResource::PlantLoopCoolingDemand, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "PLANTLOOPCOOLINGDEMAND", - "Cooling", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); if (state.dataGlobal->AnyEnergyManagementSystemInModel) { SetupEMSActuator(state, @@ -588,7 +585,7 @@ void GetPlantProfileInput(EnergyPlusData &state) if (state.dataPlantLoadProfile->PlantProfile(ProfileNum).FluidType == PlantLoopFluidType::Steam) { SetupOutputVariable(state, "Plant Load Profile Steam Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataPlantLoadProfile->PlantProfile(ProfileNum).OutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/PlantLoadProfile.hh b/src/EnergyPlus/PlantLoadProfile.hh index ce03d4219c8..1f5789aaa72 100644 --- a/src/EnergyPlus/PlantLoadProfile.hh +++ b/src/EnergyPlus/PlantLoadProfile.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantLoopHeatPumpEIR.cc b/src/EnergyPlus/PlantLoopHeatPumpEIR.cc index 6bba4901573..cee513ad547 100644 --- a/src/EnergyPlus/PlantLoopHeatPumpEIR.cc +++ b/src/EnergyPlus/PlantLoopHeatPumpEIR.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -382,7 +382,7 @@ void EIRPlantLoopHeatPump::doPhysics(EnergyPlusData &state, Real64 currentLoad) // check to see if souce side outlet temp exceeds limit and reduce PLR if necessary auto &thisSourcePlantLoop = state.dataPlnt->PlantLoop(this->sourceSidePlantLoc.loopNum); Real64 const CpSrc = FluidProperties::GetSpecificHeatGlycol( - state, thisSourcePlantLoop.FluidName, this->sourceSideInletTemp, thisSourcePlantLoop.FluidIndex, "PLHPEIR::simulate()"); + state, thisSourcePlantLoop.FluidName, this->sourceSideInletTemp, thisSourcePlantLoop.FluidIndex, "EIRPlantLoopHeatPump::doPhysics()"); Real64 const sourceMCp = this->sourceSideMassFlowRate * CpSrc; Real64 const tempSourceOutletTemp = this->calcSourceOutletTemp(this->sourceSideInletTemp, (availableCapacity * partLoadRatio) / sourceMCp); @@ -514,7 +514,7 @@ void EIRPlantLoopHeatPump::doPhysics(EnergyPlusData &state, Real64 currentLoad) thisLoadPlantLoop.FluidName, state.dataLoopNodes->Node(this->loadSideNodes.inlet).Temp, thisLoadPlantLoop.FluidIndex, - "PLHPEIR::simulate()"); + "EIRPlantLoopHeatPump::doPhysics()"); this->loadSideHeatTransfer = availableCapacity * operatingPLR; this->loadSideEnergy = this->loadSideHeatTransfer * reportingInterval; @@ -580,7 +580,7 @@ void EIRPlantLoopHeatPump::doPhysics(EnergyPlusData &state, Real64 currentLoad) if (this->waterSource) { auto &thisSourcePlantLoop = state.dataPlnt->PlantLoop(this->sourceSidePlantLoc.loopNum); CpSrc = FluidProperties::GetSpecificHeatGlycol( - state, thisSourcePlantLoop.FluidName, this->sourceSideInletTemp, thisSourcePlantLoop.FluidIndex, "PLHPEIR::simulate()"); + state, thisSourcePlantLoop.FluidName, this->sourceSideInletTemp, thisSourcePlantLoop.FluidIndex, "EIRPlantLoopHeatPump::doPhysics()"); } else { CpSrc = Psychrometrics::PsyCpAirFnW(state.dataEnvrn->OutHumRat); } @@ -702,12 +702,12 @@ void EIRPlantLoopHeatPump::sizeLoadSide(EnergyPlusData &state) state.dataPlnt->PlantLoop(this->loadSidePlantLoc.loopNum).FluidName, loadSideInitTemp, state.dataPlnt->PlantLoop(this->loadSidePlantLoc.loopNum).FluidIndex, - "EIRPlantLoopHeatPump::size()"); + "EIRPlantLoopHeatPump::sizeLoadSide()"); Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, state.dataPlnt->PlantLoop(this->loadSidePlantLoc.loopNum).FluidName, loadSideInitTemp, state.dataPlnt->PlantLoop(this->loadSidePlantLoc.loopNum).FluidIndex, - "EIRPlantLoopHeatPump::size()"); + "EIRPlantLoopHeatPump::sizeLoadSide()"); int pltLoadSizNum = state.dataPlnt->PlantLoop(this->loadSidePlantLoc.loopNum).PlantSizNum; if (pltLoadSizNum > 0) { @@ -735,13 +735,13 @@ void EIRPlantLoopHeatPump::sizeLoadSide(EnergyPlusData &state) state.dataPlnt->PlantLoop(compLoopNum).FluidName, this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpEIRCooling ? Constant::HWInitConvTemp : Constant::CWInitConvTemp, state.dataPlnt->PlantLoop(compLoopNum).FluidIndex, - "EIRPlantLoopHeatPump::size()"); + "EIRPlantLoopHeatPump::sizeLoadSide()"); compCp = FluidProperties::GetSpecificHeatGlycol( state, state.dataPlnt->PlantLoop(compLoopNum).FluidName, this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpEIRCooling ? Constant::HWInitConvTemp : Constant::CWInitConvTemp, state.dataPlnt->PlantLoop(compLoopNum).FluidIndex, - "EIRPlantLoopHeatPump::size()"); + "EIRPlantLoopHeatPump::sizeLoadSide()"); compDeltaT = state.dataSize->PlantSizData(compLoopNum).DeltaT; } if (this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpEIRCooling) { @@ -790,12 +790,12 @@ void EIRPlantLoopHeatPump::sizeLoadSide(EnergyPlusData &state) state.dataPlnt->PlantLoop(compLoopNum).FluidName, compLoadSideInitTemp, state.dataPlnt->PlantLoop(compLoopNum).FluidIndex, - "EIRPlantLoopHeatPump::size()"); + "EIRPlantLoopHeatPump::sizeLoadSide()"); Real64 const compCp = FluidProperties::GetSpecificHeatGlycol(state, state.dataPlnt->PlantLoop(compLoopNum).FluidName, Constant::CWInitConvTemp, state.dataPlnt->PlantLoop(compLoopNum).FluidIndex, - "EIRPlantLoopHeatPump::size()"); + "EIRPlantLoopHeatPump::sizeLoadSide()"); rho = compRho; Cp = compCp; } @@ -969,12 +969,12 @@ void EIRPlantLoopHeatPump::sizeSrcSideWSHP(EnergyPlusData &state) state.dataPlnt->PlantLoop(this->loadSidePlantLoc.loopNum).FluidName, sourceSideInitTemp, state.dataPlnt->PlantLoop(this->loadSidePlantLoc.loopNum).FluidIndex, - "EIRPlantLoopHeatPump::size()"); + "EIRPlantLoopHeatPump::sizeSrcSideWSHP()"); Real64 const CpSrc = FluidProperties::GetSpecificHeatGlycol(state, state.dataPlnt->PlantLoop(this->loadSidePlantLoc.loopNum).FluidName, sourceSideInitTemp, state.dataPlnt->PlantLoop(this->loadSidePlantLoc.loopNum).FluidIndex, - "EIRPlantLoopHeatPump::size()"); + "EIRPlantLoopHeatPump::sizeSrcSideWSHP()"); // To start we need to override the calculated load side flow // rate if it was actually hard-sized @@ -987,7 +987,12 @@ void EIRPlantLoopHeatPump::sizeSrcSideWSHP(EnergyPlusData &state) // First the definition of COP: COP = Qload/Power, therefore Power = Qload/COP // Then the energy balance: Qsrc = Qload + Power // Substituting for Power: Qsrc = Qload + Qload/COP, therefore Qsrc = Qload (1 + 1/COP) - Real64 const designSourceSideHeatTransfer = tmpCapacity * (1 + 1 / this->referenceCOP); + Real64 designSourceSideHeatTransfer = 0.0; + if (this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpEIRHeating) { + designSourceSideHeatTransfer = tmpCapacity * (1 - 1 / this->referenceCOP); + } else { + designSourceSideHeatTransfer = tmpCapacity * (1 + 1 / this->referenceCOP); + } // To get the design source flow rate, just apply the sensible heat rate equation: // Qsrc = rho_src * Vdot_src * Cp_src * DeltaT_src // Vdot_src = Q_src / (rho_src * Cp_src * DeltaT_src) @@ -1099,7 +1104,12 @@ void EIRPlantLoopHeatPump::sizeSrcSideASHP(EnergyPlusData &state) // First the definition of COP: COP = Qload/Power, therefore Power = Qload/COP // Then the energy balance: Qsrc = Qload + Power // Substituting for Power: Qsrc = Qload + Qload/COP, therefore Qsrc = Qload (1 + 1/COP) - Real64 const designSourceSideHeatTransfer = tmpCapacity * (1 + 1 / this->referenceCOP); + Real64 designSourceSideHeatTransfer = 0.0; + if (this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpEIRHeating) { + designSourceSideHeatTransfer = tmpCapacity * (1 - 1 / this->referenceCOP); + } else { + designSourceSideHeatTransfer = tmpCapacity * (1 + 1 / this->referenceCOP); + } // To get the design source flow rate, just apply the sensible heat rate equation: // Qsrc = rho_src * Vdot_src * Cp_src * DeltaT_src // Vdot_src = Q_src / (rho_src * Cp_src * DeltaT_src) @@ -1590,82 +1600,81 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) // setup output variables SetupOutputVariable(state, "Heat Pump Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->partLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Heat Pump Cycling Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->cyclingRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Heat Pump Load Side Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->loadSideHeatTransfer, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Heat Pump Load Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->loadSideEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Invalid, // a {} parameter turns into 0 which is SOVEndUseCat::Heating {}, - "ENERGYTRANSFER", - {}, - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Heat Pump Source Side Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->sourceSideHeatTransfer, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Heat Pump Source Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->sourceSideEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->name); SetupOutputVariable(state, "Heat Pump Load Side Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->loadSideInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Heat Pump Load Side Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->loadSideOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Heat Pump Source Side Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->sourceSideInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Heat Pump Source Side Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->sourceSideOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Heat Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->powerUsage, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1673,75 +1682,72 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) if (this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpEIRCooling) { // energy from HeatPump:PlantLoop:EIR:Cooling object SetupOutputVariable(state, "Heat Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->powerEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->name, - {}, - "Electricity", - "Cooling", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, "Heat Pump", - "Plant"); + OutputProcessor::SOVGroup::Plant); } else if (this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpEIRHeating) { // energy from HeatPump:PlantLoop:EIR:Heating object SetupOutputVariable(state, "Heat Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->powerEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->name, - {}, - "Electricity", - "Heating", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, "Heat Pump", - "Plant"); + OutputProcessor::SOVGroup::Plant); if (this->defrostAvailable) { SetupOutputVariable(state, "Heat Pump Load Due To Defrost", - OutputProcessor::Unit::W, + Constant::Units::W, this->loadDueToDefrost, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Heat Pump Fractioal Defrost Time", - OutputProcessor::Unit::W, + Constant::Units::W, this->fractionalDefrostTime, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Heat Pump Defrost Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->defrostEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Heat Pump Defrost Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->defrostEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->name, - {}, - "Electricity", - "HEATING", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, "Heat Pump", - "Plant"); + OutputProcessor::SOVGroup::Plant); } } SetupOutputVariable(state, "Heat Pump Load Side Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->loadSideMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Heat Pump Source Side Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->sourceSideMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1750,7 +1756,7 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) // added spaces to SetupOutputVariable to avoid issue with variable parsing script // Setup Output Variable(state, // "Heat Pump Source Side Specific Heat", - // OutputProcessor::Unit::J_kgK, + // Constant::Units::J_kgK, // this->sourceSideCp, // OutputProcessor::SOVTimeStepType::System, // OutputProcessor::SOVStoreType::Average, @@ -2847,75 +2853,74 @@ void EIRFuelFiredHeatPump::oneTimeInit(EnergyPlusData &state) // setup output variables SetupOutputVariable(state, "Fuel-fired Absorption HeatPump Load Side Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->loadSideHeatTransfer, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Fuel-fired Absorption HeatPump Load Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->loadSideEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Invalid, // a {} parameter turns into 0 which is SOVEndUseCat::Heating {}, - "ENERGYTRANSFER", - {}, - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); // Setup Output Variable(state, // "Fuel-fired Absorption Heat Pump Source Side Heat Transfer Rate", - // OutputProcessor::Unit::W, + // Constant::Units::W, // this->sourceSideHeatTransfer, // OutputProcessor::SOVTimeStepType::System, // OutputProcessor::SOVStoreType::Average, // this->name); // Setup Output Variable(state, // "Fuel-fired Absorption Heat Pump Source Side Heat Transfer Energy", - // OutputProcessor::Unit::J, + // Constant::Units::J, // this->sourceSideEnergy, // OutputProcessor::SOVTimeStepType::System, // OutputProcessor::SOVStoreType::Summed, // this->name); SetupOutputVariable(state, "Fuel-fired Absorption HeatPump Inlet Temperature", // "Heat Pump Load Side Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->loadSideInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Fuel-fired Absorption HeatPump Outlet Temperature", // "Heat Pump Load Side Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->loadSideOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); // Setup Output Variable(state, // "Fuel-fired Absorption Heat Pump Source Side Inlet Temperature", - // OutputProcessor::Unit::C, + // Constant::Units::C, // this->sourceSideInletTemp, // OutputProcessor::SOVTimeStepType::System, // OutputProcessor::SOVStoreType::Average, // this->name); // Setup Output Variable(state, // "Heat Pump Source Side Outlet Temperature", - // OutputProcessor::Unit::C, + // Constant::Units::C, // this->sourceSideOutletTemp, // OutputProcessor::SOVTimeStepType::System, // OutputProcessor::SOVStoreType::Average, // this->name); SetupOutputVariable(state, "Fuel-fired Absorption HeatPump Fuel Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->fuelRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Fuel-fired Absorption HeatPump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->powerUsage, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -2923,65 +2928,61 @@ void EIRFuelFiredHeatPump::oneTimeInit(EnergyPlusData &state) if (this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpFuelFiredCooling) { // energy from HeatPump:AirToWater:FuelFired:Cooling object SetupOutputVariable(state, "Fuel-fired Absorption HeatPump Fuel Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->fuelEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->name, - {}, - Constant::eFuelNames[static_cast(this->fuelType)], - "Cooling", + Constant::eFuel2eResource[(int)this->fuelType], + OutputProcessor::SOVEndUseCat::Cooling, this->endUseSubcat, //"Heat Pump", - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Fuel-fired Absorption HeatPump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->powerEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->name, - {}, - "Electricity", - "Cooling", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, this->endUseSubcat, // "Heat Pump", - "Plant"); + OutputProcessor::SOVGroup::Plant); } else if (this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpFuelFiredHeating) { // energy from HeatPump:AirToWater:FuelFired:Heating object SetupOutputVariable(state, "Fuel-fired Absorption HeatPump Fuel Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->fuelEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->name, - {}, - Constant::eFuelNames[static_cast(this->fuelType)], - "Heating", + Constant::eFuel2eResource[(int)this->fuelType], + OutputProcessor::SOVEndUseCat::Heating, this->endUseSubcat, // "Heat Pump", - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Fuel-fired Absorption HeatPump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->powerEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->name, - {}, - "Electricity", - "Heating", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, this->endUseSubcat, // "Heat Pump", - "Plant"); + OutputProcessor::SOVGroup::Plant); } SetupOutputVariable(state, "Fuel-fired Absorption HeatPump Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->loadSideMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->name); SetupOutputVariable(state, "Fuel-fired Absorption HeatPump Volumetric Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->loadSideVolumeFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/PlantLoopHeatPumpEIR.hh b/src/EnergyPlus/PlantLoopHeatPumpEIR.hh index dfafa4c87bd..970987c95bf 100644 --- a/src/EnergyPlus/PlantLoopHeatPumpEIR.hh +++ b/src/EnergyPlus/PlantLoopHeatPumpEIR.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantPipingSystemsManager.cc b/src/EnergyPlus/PlantPipingSystemsManager.cc index b0f0a2d0a19..992490136e2 100644 --- a/src/EnergyPlus/PlantPipingSystemsManager.cc +++ b/src/EnergyPlus/PlantPipingSystemsManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -1927,14 +1927,14 @@ namespace PlantPipingSystemsManager { SetupOutputVariable(state, "Pipe Segment Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisSegment.InletTemperature, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, thisSegment.Name); SetupOutputVariable(state, "Pipe Segment Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisSegment.OutletTemperature, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, @@ -1942,7 +1942,7 @@ namespace PlantPipingSystemsManager { SetupOutputVariable(state, "Pipe Segment Fluid Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisSegment.FluidHeatLoss, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, @@ -1956,7 +1956,7 @@ namespace PlantPipingSystemsManager { SetupOutputVariable(state, "Pipe Circuit Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisCircuit.CurCircuitFlowRate, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, @@ -1964,14 +1964,14 @@ namespace PlantPipingSystemsManager { SetupOutputVariable(state, "Pipe Circuit Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisCircuit.InletTemperature, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, thisCircuit.Name); SetupOutputVariable(state, "Pipe Circuit Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisCircuit.OutletTemperature, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, @@ -1979,7 +1979,7 @@ namespace PlantPipingSystemsManager { SetupOutputVariable(state, "Pipe Circuit Fluid Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCircuit.FluidHeatLoss, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, @@ -1989,7 +1989,7 @@ namespace PlantPipingSystemsManager { SetupOutputVariable(state, "Ground Heat Exchanger Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisCircuit.CurCircuitFlowRate, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, @@ -1997,14 +1997,14 @@ namespace PlantPipingSystemsManager { SetupOutputVariable(state, "Ground Heat Exchanger Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisCircuit.InletTemperature, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, thisCircuit.Name); SetupOutputVariable(state, "Ground Heat Exchanger Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisCircuit.OutletTemperature, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, @@ -2012,7 +2012,7 @@ namespace PlantPipingSystemsManager { SetupOutputVariable(state, "Ground Heat Exchanger Fluid Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCircuit.FluidHeatLoss, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, @@ -2034,14 +2034,14 @@ namespace PlantPipingSystemsManager { // Zone-coupled slab outputs SetupOutputVariable(state, "GroundDomain Slab Zone Coupled Surface Heat Flux", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, this->HeatFlux, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "GroundDomain Slab Zone Coupled Surface Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->ZoneCoupledSurfaceTemp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -2050,14 +2050,14 @@ namespace PlantPipingSystemsManager { // Zone-coupled basement wall outputs SetupOutputVariable(state, "GroundDomain Basement Wall Interface Heat Flux", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, this->WallHeatFlux, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "GroundDomain Basement Wall Interface Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->BasementWallTemp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -2065,14 +2065,14 @@ namespace PlantPipingSystemsManager { // Zone-coupled basement floor outputs SetupOutputVariable(state, "GroundDomain Basement Floor Interface Heat Flux", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, this->FloorHeatFlux, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "GroundDomain Basement Floor Interface Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->BasementFloorTemp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/PlantPipingSystemsManager.hh b/src/EnergyPlus/PlantPipingSystemsManager.hh index a0d4cdea217..a55bada670c 100644 --- a/src/EnergyPlus/PlantPipingSystemsManager.hh +++ b/src/EnergyPlus/PlantPipingSystemsManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantPressureSystem.cc b/src/EnergyPlus/PlantPressureSystem.cc index 5bf74dc9ff6..eea24aa266a 100644 --- a/src/EnergyPlus/PlantPressureSystem.cc +++ b/src/EnergyPlus/PlantPressureSystem.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -196,7 +196,7 @@ void InitPressureDrop(EnergyPlusData &state, int const LoopNum, bool const First // Setup output variable SetupOutputVariable(state, "Plant Branch Pressure Difference", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, branch.PressureDrop, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, @@ -210,7 +210,7 @@ void InitPressureDrop(EnergyPlusData &state, int const LoopNum, bool const First SetupOutputVariable(state, "Plant Demand Side Loop Pressure Difference", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, loop_side.PressureDrop, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, @@ -220,7 +220,7 @@ void InitPressureDrop(EnergyPlusData &state, int const LoopNum, bool const First SetupOutputVariable(state, "Plant Supply Side Loop Pressure Difference", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, loop_side.PressureDrop, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, @@ -237,7 +237,7 @@ void InitPressureDrop(EnergyPlusData &state, int const LoopNum, bool const First SetupOutputVariable(state, "Plant Loop Pressure Difference", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, loop.PressureDrop, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/PlantPressureSystem.hh b/src/EnergyPlus/PlantPressureSystem.hh index 5de7c6991b5..3cf4a26eb0b 100644 --- a/src/EnergyPlus/PlantPressureSystem.hh +++ b/src/EnergyPlus/PlantPressureSystem.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantUtilities.cc b/src/EnergyPlus/PlantUtilities.cc index 7a6a2b81ed1..3d442924399 100644 --- a/src/EnergyPlus/PlantUtilities.cc +++ b/src/EnergyPlus/PlantUtilities.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantUtilities.hh b/src/EnergyPlus/PlantUtilities.hh index f679af25eb7..7ee5d31baf3 100644 --- a/src/EnergyPlus/PlantUtilities.hh +++ b/src/EnergyPlus/PlantUtilities.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantValves.cc b/src/EnergyPlus/PlantValves.cc index b4293199039..010e4ae08f4 100644 --- a/src/EnergyPlus/PlantValves.cc +++ b/src/EnergyPlus/PlantValves.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -231,7 +231,7 @@ namespace PlantValves { SetupOutputVariable(state, "Tempering Valve Flow Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataPlantValves->TemperValve(Item).FlowDivFract, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/PlantValves.hh b/src/EnergyPlus/PlantValves.hh index 23fe9c011a5..4d54ff86a23 100644 --- a/src/EnergyPlus/PlantValves.hh +++ b/src/EnergyPlus/PlantValves.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Platform.hh b/src/EnergyPlus/Platform.hh index 01e4bf613ff..dce875bf2a4 100644 --- a/src/EnergyPlus/Platform.hh +++ b/src/EnergyPlus/Platform.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PluginManager.cc b/src/EnergyPlus/PluginManager.cc index dc55cf482d2..c5921c5b042 100644 --- a/src/EnergyPlus/PluginManager.cc +++ b/src/EnergyPlus/PluginManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -57,17 +57,49 @@ #include #include +#if LINK_WITH_PYTHON +#include +namespace fmt { +template <> struct formatter +{ + // parse is inherited from formatter. + constexpr auto parse(format_parse_context &ctx) -> format_parse_context::iterator + { + return ctx.begin(); + } + + auto format(const PyStatus &status, format_context &ctx) const -> format_context::iterator + { + if (!PyStatus_Exception(status)) { + return ctx.out(); + } + if (PyStatus_IsExit(status)) { + return fmt::format_to(ctx.out(), "Exited with code {}", status.exitcode); + } + if (PyStatus_IsError(status)) { + auto it = ctx.out(); + it = fmt::format_to(it, "Fatal Python error: "); + if (status.func) { + it = fmt::format_to(it, "{}: ", status.func); + } + it = fmt::format_to(it, "{}", status.err_msg); + return it; + } + return ctx.out(); + } +}; +} // namespace fmt +#endif + namespace EnergyPlus::PluginManagement { PluginTrendVariable::PluginTrendVariable(EnergyPlusData &state, std::string _name, int _numValues, int _indexOfPluginVariable) : name(std::move(_name)), numValues(_numValues), indexOfPluginVariable(_indexOfPluginVariable) { - // initialize the deque so it can be queried immediately, even with just zeroes + // initialize the deque, so it can be queried immediately, even with just zeroes for (int i = 1; i <= this->numValues; i++) { this->values.push_back(0); - } - for (int loop = 1; loop <= _numValues; ++loop) { - this->times.push_back(-loop * state.dataGlobal->TimeStepZone); + this->times.push_back(-i * state.dataGlobal->TimeStepZone); } } @@ -76,6 +108,13 @@ void registerNewCallback(EnergyPlusData &state, EMSManager::EMSCallFrom iCalledF state.dataPluginManager->callbacks[iCalledFrom].push_back(f); } +void registerUserDefinedCallback(EnergyPlusData &state, const std::function &f, const std::string &programNameInInputFile) +{ + // internally, E+ will UPPER the program name; we should upper the passed in registration name so it matches + state.dataPluginManager->userDefinedCallbackNames.push_back(Util::makeUPPER(programNameInInputFile)); + state.dataPluginManager->userDefinedCallbacks.push_back(f); +} + void onBeginEnvironment(EnergyPlusData &state) { // reset vars and trends -- sensors and actuators are reset by EMS @@ -90,13 +129,16 @@ void onBeginEnvironment(EnergyPlusData &state) int PluginManager::numActiveCallbacks(EnergyPlusData &state) { - return (int)state.dataPluginManager->callbacks.size(); + return (int)state.dataPluginManager->callbacks.size() + (int)state.dataPluginManager->userDefinedCallbacks.size(); } void runAnyRegisteredCallbacks(EnergyPlusData &state, EMSManager::EMSCallFrom iCalledFrom, bool &anyRan) { if (state.dataGlobal->KickOffSimulation) return; for (auto const &cb : state.dataPluginManager->callbacks[iCalledFrom]) { + if (iCalledFrom == EMSManager::EMSCallFrom::UserDefinedComponentModel) { + continue; // these are called -intentionally- using the runSingleUserDefinedCallback method + } cb((void *)&state); anyRan = true; } @@ -176,16 +218,16 @@ void PluginManager::setupOutputVariables([[maybe_unused]] EnergyPlusData &state) if (updateFreq == "SYSTEMTIMESTEP") { sUpdateFreq = OutputProcessor::SOVTimeStepType::System; } - OutputProcessor::Unit thisUnit = OutputProcessor::Unit::None; + Constant::Units thisUnit = Constant::Units::None; if (!units.empty()) { - thisUnit = OutputProcessor::unitStringToEnum(units); - if (thisUnit == OutputProcessor::Unit::unknown) { - thisUnit = OutputProcessor::Unit::customEMS; + thisUnit = static_cast(getEnumValue(Constant::unitNamesUC, Util::makeUPPER(units))); + if (thisUnit == Constant::Units::Invalid) { + thisUnit = Constant::Units::customEMS; } } if (!isMetered) { // regular output variable, ignore the meter/resource stuff and register the variable - if (thisUnit != OutputProcessor::Unit::customEMS) { + if (thisUnit != Constant::Units::customEMS) { SetupOutputVariable(state, sOutputVariable, thisUnit, @@ -201,12 +243,11 @@ void PluginManager::setupOutputVariables([[maybe_unused]] EnergyPlusData &state) sUpdateFreq, sAvgOrSum, thisObjectName, - {}, - {}, - {}, - {}, - {}, - {}, + Constant::eResource::Invalid, + OutputProcessor::SOVEndUseCat::Invalid, + {}, // EndUseSub + OutputProcessor::SOVGroup::Invalid, + {}, // Zone 1, 1, -999, @@ -223,32 +264,29 @@ void PluginManager::setupOutputVariables([[maybe_unused]] EnergyPlusData &state) EnergyPlus::ShowFatalError(state, "Input error on PythonPlugin:OutputVariable causes program termination"); } std::string const resourceType = EnergyPlus::Util::makeUPPER(fields.at("resource_type").get()); - std::string sResourceType; + Constant::eResource resource = static_cast(getEnumValue(Constant::eResourceNamesUC, resourceType)); if (resourceType == "WATERUSE") { - sResourceType = "Water"; + resource = Constant::eResource::Water; } else if (resourceType == "ONSITEWATERPRODUCED") { - sResourceType = "OnSiteWater"; + resource = Constant::eResource::OnSiteWater; } else if (resourceType == "MAINSWATERSUPPLY") { - sResourceType = "MainsWater"; + resource = Constant::eResource::MainsWater; } else if (resourceType == "RAINWATERCOLLECTED") { - sResourceType = "RainWater"; + resource = Constant::eResource::RainWater; } else if (resourceType == "WELLWATERDRAWN") { - sResourceType = "WellWater"; + resource = Constant::eResource::WellWater; } else if (resourceType == "CONDENSATEWATERCOLLECTED") { - sResourceType = "Condensate"; + resource = Constant::eResource::Condensate; } else if (resourceType == "ELECTRICITYPRODUCEDONSITE") { - sResourceType = "ElectricityProduced"; + resource = Constant::eResource::ElectricityProduced; } else if (resourceType == "SOLARWATERHEATING") { - sResourceType = "SolarWater"; + resource = Constant::eResource::SolarWater; } else if (resourceType == "SOLARAIRHEATING") { - sResourceType = "SolarAir"; - } else { - if (static_cast(getEnumValue(Constant::eResourceNamesUC, resourceType)) != Constant::eResource::Invalid) { - sResourceType = Constant::eResourceNames[getEnumValue(Constant::eResourceNamesUC, resourceType)]; - } else { - ShowSevereError(state, format("Invalid input for PythonPlugin:OutputVariable, unexpected Resource Type = {}", resourceType)); - ShowFatalError(state, "Python plugin output variable input problem causes program termination"); - } + resource = Constant::eResource::SolarAir; + } else if ((resource = static_cast(getEnumValue(Constant::eResourceNamesUC, resourceType))) == + Constant::eResource::Invalid) { + ShowSevereError(state, format("Invalid input for PythonPlugin:OutputVariable, unexpected Resource Type = {}", resourceType)); + ShowFatalError(state, "Python plugin output variable input problem causes program termination"); } // Group Type @@ -260,16 +298,9 @@ void PluginManager::setupOutputVariables([[maybe_unused]] EnergyPlusData &state) EnergyPlus::ShowFatalError(state, "Input error on PythonPlugin:OutputVariable causes program termination"); } std::string const groupType = EnergyPlus::Util::makeUPPER(fields.at("group_type").get()); - std::string sGroupType; - if (groupType == "BUILDING") { - sGroupType = "Building"; - } else if (groupType == "HVAC") { - sGroupType = "HVAC"; - } else if (groupType == "PLANT") { - sGroupType = "Plant"; - } else if (groupType == "SYSTEM") { - sGroupType = "System"; - } else { + OutputProcessor::SOVGroup sovGroup = + static_cast(getEnumValue(OutputProcessor::sovGroupNamesUC, groupType)); + if (sovGroup == OutputProcessor::SOVGroup::Invalid) { ShowSevereError(state, format("Invalid input for PythonPlugin:OutputVariable, unexpected Group Type = {}", groupType)); ShowFatalError(state, "Python plugin output variable input problem causes program termination"); } @@ -283,62 +314,25 @@ void PluginManager::setupOutputVariables([[maybe_unused]] EnergyPlusData &state) EnergyPlus::ShowFatalError(state, "Input error on PythonPlugin:OutputVariable causes program termination"); } std::string const endUse = EnergyPlus::Util::makeUPPER(fields.at("end_use_category").get()); - std::string sEndUse; - if (endUse == "HEATING") { - sEndUse = "Heating"; - } else if (endUse == "COOLING") { - sEndUse = "Cooling"; - } else if (endUse == "INTERIORLIGHTS") { - sEndUse = "InteriorLights"; - } else if (endUse == "EXTERIORLIGHTS") { - sEndUse = "ExteriorLights"; - } else if (endUse == "INTERIOREQUIPMENT") { - sEndUse = "InteriorEquipment"; - } else if (endUse == "EXTERIOREQUIPMENT") { - sEndUse = "ExteriorEquipment"; - } else if (endUse == "FANS") { - sEndUse = "Fans"; - } else if (endUse == "PUMPS") { - sEndUse = "Pumps"; - } else if (endUse == "HEATREJECTION") { - sEndUse = "HeatRejection"; - } else if (endUse == "HUMIDIFIER") { - sEndUse = "Humidifier"; - } else if (endUse == "HEATRECOVERY") { - sEndUse = "HeatRecovery"; - } else if (endUse == "WATERSYSTEMS") { - sEndUse = "WaterSystems"; - } else if (endUse == "REFRIGERATION") { - sEndUse = "Refrigeration"; - } else if (endUse == "ONSITEGENERATION") { - sEndUse = "Cogeneration"; - } else if (endUse == "HEATINGCOILS") { - sEndUse = "HeatingCoils"; - } else if (endUse == "COOLINGCOILS") { - sEndUse = "CoolingCoils"; - } else if (endUse == "CHILLERS") { - sEndUse = "Chillers"; - } else if (endUse == "BOILERS") { - sEndUse = "Boilers"; - } else if (endUse == "BASEBOARD") { - sEndUse = "Baseboard"; - } else if (endUse == "HEATRECOVERYFORCOOLING") { - sEndUse = "HeatRecoveryForCooling"; - } else if (endUse == "HEATRECOVERYFORHEATING") { - sEndUse = "HeatRecoveryForHeating"; - } else { - ShowSevereError(state, format("Invalid input for PythonPlugin:OutputVariable, unexpected End-use Subcategory = {}", groupType)); + OutputProcessor::SOVEndUseCat sovEndUseCat = + static_cast(getEnumValue(OutputProcessor::sovEndUseCatNamesUC, endUse)); + + if (sovEndUseCat == OutputProcessor::SOVEndUseCat::Invalid) { + ShowSevereError(state, format("Invalid input for PythonPlugin:OutputVariable, unexpected End-use Subcategory = {}", endUse)); ShowFatalError(state, "Python plugin output variable input problem causes program termination"); } // Additional End Use Types Only Used for EnergyTransfer - if ((sResourceType != "EnergyTransfer") && - (sEndUse == "HeatingCoils" || sEndUse == "CoolingCoils" || sEndUse == "Chillers" || sEndUse == "Boilers" || - sEndUse == "Baseboard" || sEndUse == "HeatRecoveryForCooling" || sEndUse == "HeatRecoveryForHeating")) { + if ((resource != Constant::eResource::EnergyTransfer) && + (sovEndUseCat == OutputProcessor::SOVEndUseCat::HeatingCoils || sovEndUseCat == OutputProcessor::SOVEndUseCat::CoolingCoils || + sovEndUseCat == OutputProcessor::SOVEndUseCat::Chillers || sovEndUseCat == OutputProcessor::SOVEndUseCat::Boilers || + sovEndUseCat == OutputProcessor::SOVEndUseCat::Baseboard || + sovEndUseCat == OutputProcessor::SOVEndUseCat::HeatRecoveryForCooling || + sovEndUseCat == OutputProcessor::SOVEndUseCat::HeatRecoveryForHeating)) { ShowWarningError(state, format("Inconsistent resource type input for PythonPlugin:OutputVariable = {}", thisObjectName)); - ShowContinueError(state, format("For end use subcategory = {}, resource type must be EnergyTransfer", sEndUse)); + ShowContinueError(state, format("For end use subcategory = {}, resource type must be EnergyTransfer", endUse)); ShowContinueError(state, "Resource type is being reset to EnergyTransfer and the simulation continues..."); - sResourceType = "EnergyTransfer"; + resource = Constant::eResource::EnergyTransfer; } std::string sEndUseSubcategory; @@ -354,11 +348,10 @@ void PluginManager::setupOutputVariables([[maybe_unused]] EnergyPlusData &state) sUpdateFreq, sAvgOrSum, thisObjectName, + resource, + sovEndUseCat, {}, - sResourceType, - sEndUse, - {}, - sGroupType); + sovGroup); } else { // has subcategory SetupOutputVariable(state, sOutputVariable, @@ -367,17 +360,104 @@ void PluginManager::setupOutputVariables([[maybe_unused]] EnergyPlusData &state) sUpdateFreq, sAvgOrSum, thisObjectName, - {}, - sResourceType, - sEndUse, + resource, + sovEndUseCat, sEndUseSubcategory, - sGroupType); + sovGroup); } } + } // for (instance) + } // if (OutputVarInstances > 0) +#endif +} // setupOutputVariables() + +#if LINK_WITH_PYTHON +void initPython(EnergyPlusData &state, fs::path const &pathToPythonPackages) +{ + PyStatus status; + + // first pre-config Python so that it can speak UTF-8 + PyPreConfig preConfig; + // This is the other related line that caused Decent CI to start having trouble. I'm putting it back to + // PyPreConfig_InitPythonConfig, even though I think it should be isolated. Will deal with this after IO freeze. + PyPreConfig_InitPythonConfig(&preConfig); + // PyPreConfig_InitIsolatedConfig(&preConfig); + preConfig.utf8_mode = 1; + status = Py_PreInitialize(&preConfig); + if (PyStatus_Exception(status)) { + ShowFatalError(state, fmt::format("Could not pre-initialize Python to speak UTF-8... {}", status)); + } + + PyConfig config; + PyConfig_InitIsolatedConfig(&config); + config.isolated = 1; + + status = PyConfig_SetBytesString(&config, &config.program_name, PluginManagement::programName); + if (PyStatus_Exception(status)) { + ShowFatalError(state, fmt::format("Could not initialize program_name on PyConfig... {}", status)); + } + + status = PyConfig_Read(&config); + if (PyStatus_Exception(status)) { + ShowFatalError(state, fmt::format("Could not read back the PyConfig... {}", status)); + } + + if constexpr (std::is_same_v) { + // PyConfig_SetString copies the wide character string str into *config_str. + std::wstring const ws = pathToPythonPackages.generic_wstring(); + const wchar_t *wcharPath = ws.c_str(); + + status = PyConfig_SetString(&config, &config.home, wcharPath); + if (PyStatus_Exception(status)) { + ShowFatalError(state, fmt::format("Could not set home to {} on PyConfig... {}", pathToPythonPackages.generic_string(), status)); + } + status = PyConfig_SetString(&config, &config.base_prefix, wcharPath); + if (PyStatus_Exception(status)) { + ShowFatalError(state, fmt::format("Could not set base_prefix to {} on PyConfig... {}", pathToPythonPackages.generic_string(), status)); } + config.module_search_paths_set = 1; + status = PyWideStringList_Append(&config.module_search_paths, wcharPath); + if (PyStatus_Exception(status)) { + ShowFatalError(state, + fmt::format("Could not add {} to module_search_paths on PyConfig... {}", pathToPythonPackages.generic_string(), status)); + } + + } else { + // PyConfig_SetBytesString takes a `const char * str` and decodes str using Py_DecodeLocale() and set the result into *config_str + // But we want to avoid doing it three times, so we PyDecodeLocale manually + // Py_DecodeLocale can be called because Python has been PreInitialized. + wchar_t *wcharPath = Py_DecodeLocale(pathToPythonPackages.generic_string().c_str(), nullptr); // This allocates! + + status = PyConfig_SetString(&config, &config.home, wcharPath); + if (PyStatus_Exception(status)) { + ShowFatalError(state, fmt::format("Could not set home to {} on PyConfig... {}", pathToPythonPackages.generic_string(), status)); + } + status = PyConfig_SetString(&config, &config.base_prefix, wcharPath); + if (PyStatus_Exception(status)) { + ShowFatalError(state, fmt::format("Could not set base_prefix to {} on PyConfig... {}", pathToPythonPackages.generic_string(), status)); + } + config.module_search_paths_set = 1; + status = PyWideStringList_Append(&config.module_search_paths, wcharPath); + if (PyStatus_Exception(status)) { + ShowFatalError(state, + fmt::format("Could not add {} to module_search_paths on PyConfig... {}", pathToPythonPackages.generic_string(), status)); + } + + PyMem_RawFree(wcharPath); } -#endif + + // This was Py_InitializeFromConfig(&config), but was giving a seg fault when running inside + // another Python instance, for example as part of an API run. Per the example here: + // https://docs.python.org/3/c-api/init_config.html#preinitialize-python-with-pypreconfig + // It looks like we don't need to initialize from config again, it should be all set up with + // the init calls above, so just initialize and move on. + // UPDATE: This worked happily for me on Linux, and also when I build locally on Windows, but not on Decent CI + // I suspect a difference in behavior for Python versions. I'm going to temporarily revert this back to initialize + // with config and get IO freeze going, then get back to solving it. + // Py_Initialize(); + Py_InitializeFromConfig(&config); } +#endif // LINK_WITH_PYTHON PluginManager::PluginManager(EnergyPlusData &state) : eplusRunningViaPythonAPI(state.dataPluginManager->eplusRunningViaPythonAPI) { @@ -390,9 +470,6 @@ PluginManager::PluginManager(EnergyPlusData &state) : eplusRunningViaPythonAPI(s } #if LINK_WITH_PYTHON - // this frozen flag tells Python that the package and library have been frozen for embedding, so it shouldn't warn about missing prefixes - Py_FrozenFlag = 1; - // we'll need the program directory for a few things so get it once here at the top and sanitize it fs::path programDir; if (state.dataGlobal->installRootOverride) { @@ -400,34 +477,9 @@ PluginManager::PluginManager(EnergyPlusData &state) : eplusRunningViaPythonAPI(s } else { programDir = FileSystem::getParentDirectoryPath(FileSystem::getAbsolutePath(FileSystem::getProgramPath())); } - - // I think we need to set the python path before initializing the library - // make this relative to the binary fs::path const pathToPythonPackages = programDir / "python_standard_lib"; - if constexpr (std::is_same_v) { - std::wstring const ws = pathToPythonPackages.generic_wstring(); - Py_SetPath(ws.c_str()); - Py_SetPythonHome(ws.c_str()); - } else { - // TODO: Py_DecodeLocale shouldn't be called before Python is PreInitialized. Also, this should be replaced by PyConfig - wchar_t *a = Py_DecodeLocale(pathToPythonPackages.generic_string().c_str(), nullptr); // This allocates! - Py_SetPath(a); - Py_SetPythonHome(a); - PyMem_RawFree(a); - } - // must be called before Py_Initialize - // tells the interpreter the value of argv[0] to the main() function - // used by some functions to find run-time libraries relative to the interpreter executable - Py_SetProgramName((wchar_t *)programName); - - // now that we have set the path, we can initialize python - // from https://docs.python.org/3/c-api/init.html - // If arg 0, it skips init registration of signal handlers, which might be useful when Python is embedded. - bool alreadyInitialized = (Py_IsInitialized() != 0); - if (!alreadyInitialized) { - Py_InitializeEx(0); - } + initPython(state, pathToPythonPackages); // Take control of the global interpreter lock while we are here, make sure to release it... PyGILState_STATE gil = PyGILState_Ensure(); @@ -690,7 +742,7 @@ void PluginInstance::reportPythonError([[maybe_unused]] EnergyPlusData &state) return; } - unsigned long numVals = PyList_Size(pyth_val); + Py_ssize_t numVals = PyList_Size(pyth_val); if (numVals == 0) { EnergyPlus::ShowContinueError(state, "No traceback available"); return; @@ -700,7 +752,7 @@ void PluginInstance::reportPythonError([[maybe_unused]] EnergyPlusData &state) EnergyPlus::ShowContinueError(state, "```"); - for (unsigned long itemNum = 0; itemNum < numVals; itemNum++) { + for (Py_ssize_t itemNum = 0; itemNum < numVals; itemNum++) { PyObject *item = PyList_GetItem(pyth_val, itemNum); if (PyUnicode_Check(item)) { // NOLINT(hicpp-signed-bitwise) -- something inside Python code causes warning std::string traceback_line = PyUnicode_AsUTF8(item); @@ -769,16 +821,14 @@ void PluginInstance::setup([[maybe_unused]] EnergyPlusData &state) // import from database or something ShowFatalError(state, "Could not get full path"); } else { - PyObject *pStrObj = PyUnicode_AsUTF8String(pFullPath); - char *zStr = PyBytes_AsString(pStrObj); - std::string s(zStr); - Py_DECREF(pStrObj); // PyUnicode_AsUTF8String returns a new reference, decrement it - ShowMessage(state, format("PythonPlugin: Class {} imported from: {}", className, s)); + const char *zStr = PyUnicode_AsUTF8(pFullPath); + std::string sHere(zStr); + ShowMessage(state, format("PythonPlugin: Class {} imported from: {}", className, sHere)); } PyObject *pClass = PyDict_GetItemString(pModuleDict, className.c_str()); // Py_DECREF(pModuleDict); // PyModule_GetDict returns a borrowed reference, DO NOT decrement if (!pClass) { - EnergyPlus::ShowSevereError(state, format("Failed to get class type \"{}\" from module \"{}\"", className, modulePath.generic_string())); + EnergyPlus::ShowSevereError(state, format(R"(Failed to get class type "{}" from module "{}")", className, modulePath.generic_string())); if (PyErr_Occurred()) { PluginInstance::reportPythonError(state); } else { @@ -816,7 +866,7 @@ void PluginInstance::setup([[maybe_unused]] EnergyPlusData &state) PyObject *detectFunction = PyObject_GetAttrString(this->pClassInstance, detectOverriddenFunctionName.c_str()); if (!detectFunction || !PyCallable_Check(detectFunction)) { EnergyPlus::ShowSevereError(state, - format("Could not find or call function \"{}\" on class \"{}.{}\"", + format(R"(Could not find or call function "{}" on class "{}.{}")", detectOverriddenFunctionName, this->modulePath.generic_string(), this->className)); @@ -841,14 +891,14 @@ void PluginInstance::setup([[maybe_unused]] EnergyPlusData &state) if (!PyList_Check(pFunctionResponse)) { // NOLINT(hicpp-signed-bitwise) EnergyPlus::ShowFatalError(state, format("Invalid return from _detect_overridden() on class \"{}\", this is weird", this->stringIdentifier)); } - unsigned long numVals = PyList_Size(pFunctionResponse); + Py_ssize_t numVals = PyList_Size(pFunctionResponse); // at this point we know which base class methods are being overridden by the derived class // we can loop over them and based on the name check the appropriate flag and assign the function pointer if (numVals == 0) { EnergyPlus::ShowFatalError( state, format("Python plugin \"{}\" did not override any base class methods; must override at least one", this->stringIdentifier)); } - for (unsigned long itemNum = 0; itemNum < numVals; itemNum++) { + for (Py_ssize_t itemNum = 0; itemNum < numVals; itemNum++) { PyObject *item = PyList_GetItem(pFunctionResponse, itemNum); if (PyUnicode_Check(item)) { // NOLINT(hicpp-signed-bitwise) -- something inside Python code causes warning std::string functionName = PyUnicode_AsUTF8(item); @@ -1067,7 +1117,7 @@ bool PluginInstance::run(EnergyPlusData &state, EMSManager::EMSCallFrom iCalledF format("Program terminates after call to {}() on {} failed!", functionNameAsString, this->stringIdentifier)); } if (PyLong_Check(pFunctionResponse)) { // NOLINT(hicpp-signed-bitwise) - int exitCode = PyLong_AsLong(pFunctionResponse); + long exitCode = PyLong_AsLong(pFunctionResponse); if (exitCode == 0) { // success } else if (exitCode == 1) { @@ -1102,9 +1152,9 @@ bool PluginInstance::run([[maybe_unused]] EnergyPlusData &state, [[maybe_unused] std::vector PluginManager::currentPythonPath() { PyObject *sysPath = PySys_GetObject("path"); // Borrowed reference - size_t const n = PyList_Size(sysPath); // Py_ssize_t + Py_ssize_t const n = PyList_Size(sysPath); // Py_ssize_t std::vector pathLibs(n); - for (size_t i = 0; i < n; ++i) { + for (Py_ssize_t i = 0; i < n; ++i) { PyObject *element = PyList_GetItem(sysPath, i); // Borrowed reference pathLibs[i] = std::string{PyUnicode_AsUTF8(element)}; } @@ -1180,16 +1230,17 @@ void PluginManager::addGlobalVariable([[maybe_unused]] EnergyPlusData &state, [[ int PluginManager::getGlobalVariableHandle(EnergyPlusData &state, const std::string &name, bool const suppress_warning) { // note zero is a valid handle std::string const varNameUC = EnergyPlus::Util::makeUPPER(name); - auto const it = std::find(state.dataPluginManager->globalVariableNames.begin(), state.dataPluginManager->globalVariableNames.end(), varNameUC); - if (it != state.dataPluginManager->globalVariableNames.end()) { - return std::distance(state.dataPluginManager->globalVariableNames.begin(), it); + auto const &gVarNames = state.dataPluginManager->globalVariableNames; + auto const it = std::find(gVarNames.begin(), gVarNames.end(), varNameUC); + if (it != gVarNames.end()) { + return static_cast(std::distance(gVarNames.begin(), it)); } else { if (suppress_warning) { return -1; } else { EnergyPlus::ShowSevereError(state, "Tried to retrieve handle for a nonexistent plugin global variable"); EnergyPlus::ShowContinueError(state, format("Name looked up: \"{}\", available names: ", varNameUC)); - for (auto const &gvName : state.dataPluginManager->globalVariableNames) { + for (auto const &gvName : gVarNames) { EnergyPlus::ShowContinueError(state, format(" \"{}\"", gvName)); } EnergyPlus::ShowFatalError(state, "Plugin global variable problem causes program termination"); @@ -1213,7 +1264,7 @@ int PluginManager::getTrendVariableHandle(EnergyPlusData &state, const std::stri for (size_t i = 0; i < state.dataPluginManager->trends.size(); i++) { auto &thisTrend = state.dataPluginManager->trends[i]; if (thisTrend.name == varNameUC) { - return i; + return static_cast(i); } } return -1; @@ -1407,7 +1458,7 @@ int PluginManager::getLocationOfUserDefinedPlugin(EnergyPlusData &state, std::st for (size_t handle = 0; handle < state.dataPluginManager->plugins.size(); handle++) { auto const &thisPlugin = state.dataPluginManager->plugins[handle]; if (Util::makeUPPER(thisPlugin.emsAlias) == Util::makeUPPER(_programName)) { - return handle; + return static_cast(handle); } } return -1; @@ -1430,6 +1481,22 @@ void PluginManager::runSingleUserDefinedPlugin([[maybe_unused]] EnergyPlusData & } #endif +int PluginManager::getUserDefinedCallbackIndex(EnergyPlusData &state, const std::string &callbackProgramName) +{ + for (int i = 0; i < state.dataPluginManager->userDefinedCallbackNames.size(); i++) { + if (state.dataPluginManager->userDefinedCallbackNames[i] == callbackProgramName) { + return i; + } + } + return -1; +} + +void PluginManager::runSingleUserDefinedCallback(EnergyPlusData &state, int index) +{ + if (state.dataGlobal->KickOffSimulation) return; // Maybe? + state.dataPluginManager->userDefinedCallbacks[index]((void *)&state); // Check Index first +} + #if LINK_WITH_PYTHON bool PluginManager::anyUnexpectedPluginObjects(EnergyPlusData &state) { diff --git a/src/EnergyPlus/PluginManager.hh b/src/EnergyPlus/PluginManager.hh index 34cf2084174..6bf6366ebdc 100644 --- a/src/EnergyPlus/PluginManager.hh +++ b/src/EnergyPlus/PluginManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -83,6 +83,8 @@ namespace PluginManagement { constexpr const char *programName = "python"; void registerNewCallback(EnergyPlusData &state, EMSManager::EMSCallFrom iCalledFrom, const std::function &f); + void registerUserDefinedCallback(EnergyPlusData &state, const std::function &f, const std::string &programNameInInputFile); + void runAnyRegisteredCallbacks(EnergyPlusData &state, EMSManager::EMSCallFrom iCalledFrom, bool &anyRan); void onBeginEnvironment(EnergyPlusData &state); std::string pythonStringForUsage(EnergyPlusData &state); @@ -206,7 +208,9 @@ namespace PluginManagement { static void updatePluginValues(EnergyPlusData &state); static int getLocationOfUserDefinedPlugin(EnergyPlusData &state, std::string const &_programName); + static int getUserDefinedCallbackIndex(EnergyPlusData &state, const std::string &callbackProgramName); static void runSingleUserDefinedPlugin(EnergyPlusData &state, int index); + static void runSingleUserDefinedCallback(EnergyPlusData &state, int index); static bool anyUnexpectedPluginObjects(EnergyPlusData &state); bool eplusRunningViaPythonAPI = false; @@ -237,6 +241,8 @@ namespace PluginManagement { struct PluginManagerData : BaseGlobalStruct { std::map>> callbacks; + std::vector userDefinedCallbackNames; + std::vector> userDefinedCallbacks; std::unique_ptr pluginManager; std::vector trends; std::vector plugins; @@ -253,6 +259,8 @@ struct PluginManagerData : BaseGlobalStruct void clear_state() override { callbacks.clear(); + userDefinedCallbackNames.clear(); + userDefinedCallbacks.clear(); #if LINK_WITH_PYTHON for (auto &plugin : plugins) { plugin.shutdown(); // clear unmanaged memory first diff --git a/src/EnergyPlus/PollutionModule.cc b/src/EnergyPlus/PollutionModule.cc index 1e8735b6304..0c534ac3bbf 100644 --- a/src/EnergyPlus/PollutionModule.cc +++ b/src/EnergyPlus/PollutionModule.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -172,11 +172,17 @@ void SetupPollutionCalculations(EnergyPlusData &state) // Call this routine in the Output Processor to setup the correct Facility energy meters that are // necessary to make sure that the Meter file is opened and written to by the OP so that time stamps // and the like are happening as expected. - if (!state.dataIPShortCut->lAlphaFieldBlanks(1)) { - InitPollutionMeterReporting(state, state.dataIPShortCut->cAlphaArgs(1)); - } else { - InitPollutionMeterReporting(state, "RunPeriod"); + OutputProcessor::ReportFreq freq = OutputProcessor::ReportFreq::Simulation; + + if (!state.dataIPShortCut->lAlphaFieldBlanks(1) && + (freq = static_cast( + getEnumValue(OutputProcessor::reportFreqNamesUC, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(1))))) == + OutputProcessor::ReportFreq::Invalid) { + ShowSevereError(state, format("Invalid reporting frequency {}", state.dataIPShortCut->cAlphaArgs(1))); + continue; } + + InitPollutionMeterReporting(state, freq); } } @@ -338,10 +344,6 @@ void GetPollutionFactorInput(EnergyPlusData &state) } // End of the NumEnergyTypes Do Loop - for (int iMeter = 0; iMeter < (int)PollFacilityMeter::Num; ++iMeter) { - pm->facilityMeterNums[iMeter] = GetMeterIndex(state, pollFacilityMeterNames[iMeter]); - } - if (pm->PollutionReportSetup) { // only do this if reporting on the pollution // Need to go through all of the Fuel Types and make sure a Fuel Factor was found for each type of energy being simulated // Check for Electricity @@ -442,33 +444,49 @@ void SetupPollutionMeterReporting(EnergyPlusData &state) Constant::eFuel fuel = pollFuel2fuel[(int)pollFuel]; + constexpr std::array fuel2sovEndUseCat = { + OutputProcessor::SOVEndUseCat::ElectricityEmissions, + OutputProcessor::SOVEndUseCat::NaturalGasEmissions, + OutputProcessor::SOVEndUseCat::GasolineEmissions, + OutputProcessor::SOVEndUseCat::DieselEmissions, + OutputProcessor::SOVEndUseCat::CoalEmissions, + OutputProcessor::SOVEndUseCat::PropaneEmissions, + OutputProcessor::SOVEndUseCat::FuelOilNo1Emissions, + OutputProcessor::SOVEndUseCat::FuelOilNo2Emissions, + OutputProcessor::SOVEndUseCat::OtherFuel1Emissions, + OutputProcessor::SOVEndUseCat::OtherFuel2Emissions, + OutputProcessor::SOVEndUseCat::Invalid, + OutputProcessor::SOVEndUseCat::Invalid, + OutputProcessor::SOVEndUseCat::Invalid, + OutputProcessor::SOVEndUseCat::Invalid, + OutputProcessor::SOVEndUseCat::Invalid // used for OtherEquipment object + }; + // Need to check whether this fuel is used? SetupOutputVariable(state, format("Environmental Impact {} Source Energy", Constant::eFuelNames[(int)fuel]), - OutputProcessor::Unit::J, + Constant::Units::J, pollComp.sourceVal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, "Site", + Constant::eResource::Source, + fuel2sovEndUseCat[(int)fuel], {}, - "Source", - format("{}Emissions", Constant::eFuelNames[(int)fuel]), - {}, - ""); + OutputProcessor::SOVGroup::Invalid); for (int iPollutant = 0; iPollutant < (int)Pollutant::Num; ++iPollutant) { SetupOutputVariable(state, format("Environmental Impact {} {}", Constant::eFuelNames[(int)fuel], poll2outVarStrs[iPollutant]), - poll2Units[iPollutant], + pollUnits[iPollutant], pollComp.pollutantVals[iPollutant], OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, "Site", + poll2Resource[iPollutant], + fuel2sovEndUseCat[(int)fuel], {}, - poll2Names[iPollutant], - format("{}Emissions", Constant::eFuelNames[(int)fuel]), - {}, - ""); + OutputProcessor::SOVGroup::Invalid); } if (fuel == Constant::eFuel::Electricity) { @@ -476,28 +494,26 @@ void SetupPollutionMeterReporting(EnergyPlusData &state) // Doing this here as opposed to outside the outer loop to preserve meter order and reduce ordering diffs SetupOutputVariable(state, "Environmental Impact Purchased Electricity Source Energy", - OutputProcessor::Unit::J, + Constant::Units::J, pm->pollComps[(int)PollFuelComponent::ElectricityPurchased].sourceVal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, "Site", + Constant::eResource::Source, + OutputProcessor::SOVEndUseCat::PurchasedElectricityEmissions, {}, - "Source", - "PurchasedElectricityEmissions", - {}, - ""); + OutputProcessor::SOVGroup::Invalid); SetupOutputVariable(state, "Environmental Impact Surplus Sold Electricity Source", - OutputProcessor::Unit::J, + Constant::Units::J, pm->pollComps[(int)PollFuelComponent::ElectricitySurplusSold].sourceVal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, "Site", + Constant::eResource::Source, + OutputProcessor::SOVEndUseCat::SoldElectricityEmissions, {}, - "Source", - "SoldElectricityEmissions", - {}, - ""); + OutputProcessor::SOVGroup::Invalid); } } // End of the NumEnergyTypes Do Loop @@ -505,40 +521,42 @@ void SetupPollutionMeterReporting(EnergyPlusData &state) // And Total Carbon Equivalent variables SetupOutputVariable(state, "Environmental Impact Total N2O Emissions Carbon Equivalent Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, pm->TotCarbonEquivFromN2O, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, "Site", + Constant::eResource::CarbonEquivalent, + OutputProcessor::SOVEndUseCat::CarbonEquivalentEmissions, {}, - "Carbon Equivalent", - "CarbonEquivalentEmissions", - {}, - ""); + OutputProcessor::SOVGroup::Invalid); SetupOutputVariable(state, "Environmental Impact Total CH4 Emissions Carbon Equivalent Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, pm->TotCarbonEquivFromCH4, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, "Site", + Constant::eResource::CarbonEquivalent, + OutputProcessor::SOVEndUseCat::CarbonEquivalentEmissions, {}, - "Carbon Equivalent", - "CarbonEquivalentEmissions", - {}, - ""); + OutputProcessor::SOVGroup::Invalid); SetupOutputVariable(state, "Environmental Impact Total CO2 Emissions Carbon Equivalent Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, pm->TotCarbonEquivFromCO2, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, "Site", + Constant::eResource::CarbonEquivalent, + OutputProcessor::SOVEndUseCat::CarbonEquivalentEmissions, {}, - "Carbon Equivalent", - "CarbonEquivalentEmissions", - {}, - ""); + OutputProcessor::SOVGroup::Invalid); + + // Connect pollution meters to energy meters + for (int iMeter = 0; iMeter < (int)PollFacilityMeter::Num; ++iMeter) { + pm->facilityMeterNums[iMeter] = GetMeterIndex(state, Util::makeUPPER(pollFacilityMeterNames[iMeter])); + } } void CheckPollutionMeterReporting(EnergyPlusData &state) diff --git a/src/EnergyPlus/PollutionModule.hh b/src/EnergyPlus/PollutionModule.hh index ff3ddac623a..ee9083e5037 100644 --- a/src/EnergyPlus/PollutionModule.hh +++ b/src/EnergyPlus/PollutionModule.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -83,40 +83,57 @@ namespace Pollution { Num }; - constexpr std::array poll2Names = {"CO2", - "CO", - "CH4", - "NOx", - "N2O", - "SO2", - "PM", - "PM10", - "PM2.5", - "NH3", - "NMVOC", - "Hg", - "Pb", - "WaterEnvironmentalFactors", - "Nuclear High", - "Nuclear Low"}; - - constexpr std::array poll2Units = { - OutputProcessor::Unit::kg, // CO2 - OutputProcessor::Unit::kg, // CO - OutputProcessor::Unit::kg, // CH4 - OutputProcessor::Unit::kg, // NOx - OutputProcessor::Unit::kg, // N2O - OutputProcessor::Unit::kg, // SO2 - OutputProcessor::Unit::kg, // PM - OutputProcessor::Unit::kg, // PM10 - OutputProcessor::Unit::kg, // PM2_5 - OutputProcessor::Unit::kg, // NH3 - OutputProcessor::Unit::kg, // NMVOC - OutputProcessor::Unit::kg, // Hg - OutputProcessor::Unit::kg, // Pb - OutputProcessor::Unit::L, // Water - OutputProcessor::Unit::kg, // NuclearHigh - OutputProcessor::Unit::m3, // NuclearLow + constexpr std::array pollNames = {"CO2", + "CO", + "CH4", + "NOx", + "N2O", + "SO2", + "PM", + "PM10", + "PM2.5", + "NH3", + "NMVOC", + "Hg", + "Pb", + "WaterEnvironmentalFactors", + "Nuclear High", + "Nuclear Low"}; + + constexpr std::array poll2Resource = {Constant::eResource::CO2, + Constant::eResource::CO, + Constant::eResource::CH4, + Constant::eResource::NOx, + Constant::eResource::N2O, + Constant::eResource::SO2, + Constant::eResource::PM, + Constant::eResource::PM10, + Constant::eResource::PM2_5, + Constant::eResource::NH3, + Constant::eResource::NMVOC, + Constant::eResource::Hg, + Constant::eResource::Pb, + Constant::eResource::WaterEnvironmentalFactors, + Constant::eResource::NuclearHigh, + Constant::eResource::NuclearLow}; + + constexpr std::array pollUnits = { + Constant::Units::kg, // CO2 + Constant::Units::kg, // CO + Constant::Units::kg, // CH4 + Constant::Units::kg, // NOx + Constant::Units::kg, // N2O + Constant::Units::kg, // SO2 + Constant::Units::kg, // PM + Constant::Units::kg, // PM10 + Constant::Units::kg, // PM2_5 + Constant::Units::kg, // NH3 + Constant::Units::kg, // NMVOC + Constant::Units::kg, // Hg + Constant::Units::kg, // Pb + Constant::Units::L, // Water + Constant::Units::kg, // NuclearHigh + Constant::Units::m3, // NuclearLow }; constexpr std::array poll2outVarStrs = { diff --git a/src/EnergyPlus/PondGroundHeatExchanger.cc b/src/EnergyPlus/PondGroundHeatExchanger.cc index aa6e4bc2f15..5659aac8f89 100644 --- a/src/EnergyPlus/PondGroundHeatExchanger.cc +++ b/src/EnergyPlus/PondGroundHeatExchanger.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -349,42 +349,42 @@ void PondGroundHeatExchangerData::setupOutputVars(EnergyPlusData &state) { SetupOutputVariable(state, "Pond Heat Exchanger Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->HeatTransferRate, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Pond Heat Exchanger Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Energy, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Summed, this->Name); SetupOutputVariable(state, "Pond Heat Exchanger Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->MassFlowRate, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Pond Heat Exchanger Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->InletTemp, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Pond Heat Exchanger Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->OutletTemp, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Pond Heat Exchanger Bulk Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->PondTemp, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/PondGroundHeatExchanger.hh b/src/EnergyPlus/PondGroundHeatExchanger.hh index 37f43b066d1..e3f81a1674d 100644 --- a/src/EnergyPlus/PondGroundHeatExchanger.hh +++ b/src/EnergyPlus/PondGroundHeatExchanger.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PoweredInductionUnits.cc b/src/EnergyPlus/PoweredInductionUnits.cc index fbd68daec25..06d85ef9aae 100644 --- a/src/EnergyPlus/PoweredInductionUnits.cc +++ b/src/EnergyPlus/PoweredInductionUnits.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -741,42 +741,42 @@ void GetPIUs(EnergyPlusData &state) // Setup Report variables for the PIUs SetupOutputVariable(state, "Zone Air Terminal Primary Damper Position", - OutputProcessor::Unit::None, + Constant::Units::None, thisPIU.PriDamperPosition, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisPIU.Name); SetupOutputVariable(state, "Zone Air Terminal Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisPIU.HeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisPIU.Name); SetupOutputVariable(state, "Zone Air Terminal Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisPIU.HeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisPIU.Name); SetupOutputVariable(state, "Zone Air Terminal Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisPIU.SensCoolRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisPIU.Name); SetupOutputVariable(state, "Zone Air Terminal Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisPIU.SensCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisPIU.Name); SetupOutputVariable(state, "Zone Air Terminal Outdoor Air Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, thisPIU.OutdoorAirFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/PoweredInductionUnits.hh b/src/EnergyPlus/PoweredInductionUnits.hh index 0e8beca99f2..17864229955 100644 --- a/src/EnergyPlus/PoweredInductionUnits.hh +++ b/src/EnergyPlus/PoweredInductionUnits.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PsychCacheData.hh b/src/EnergyPlus/PsychCacheData.hh index d8f5c174817..8fcc5e11901 100644 --- a/src/EnergyPlus/PsychCacheData.hh +++ b/src/EnergyPlus/PsychCacheData.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Psychrometrics.cc b/src/EnergyPlus/Psychrometrics.cc index f6dd0315fd9..b1698cc608d 100644 --- a/src/EnergyPlus/Psychrometrics.cc +++ b/src/EnergyPlus/Psychrometrics.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Psychrometrics.hh b/src/EnergyPlus/Psychrometrics.hh index ad8b6b6d3f9..c6e6e8a8342 100644 --- a/src/EnergyPlus/Psychrometrics.hh +++ b/src/EnergyPlus/Psychrometrics.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Pumps.cc b/src/EnergyPlus/Pumps.cc index c229f23b58c..b1b8e41eb70 100644 --- a/src/EnergyPlus/Pumps.cc +++ b/src/EnergyPlus/Pumps.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -1120,54 +1120,53 @@ void GetPumpInput(EnergyPlusData &state) SetupOutputVariable(state, "Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisPump.Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisPump.Name, - {}, - "Electricity", - "Pumps", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Pumps, thisPump.EndUseSubcategoryName, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisPump.Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisPump.Name); SetupOutputVariable(state, "Pump Shaft Power", - OutputProcessor::Unit::W, + Constant::Units::W, thisPumpRep.ShaftPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisPump.Name); SetupOutputVariable(state, "Pump Fluid Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisPumpRep.PumpHeattoFluid, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisPump.Name); SetupOutputVariable(state, "Pump Fluid Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisPumpRep.PumpHeattoFluidEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisPump.Name); SetupOutputVariable(state, "Pump Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisPumpRep.OutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisPump.Name); SetupOutputVariable(state, "Pump Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisPumpRep.PumpMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1179,61 +1178,60 @@ void GetPumpInput(EnergyPlusData &state) SetupOutputVariable(state, "Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisPump.Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisPump.Name, - {}, - "Electricity", - "Pumps", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Pumps, thisPump.EndUseSubcategoryName, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisPump.Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisPump.Name); SetupOutputVariable(state, "Pump Shaft Power", - OutputProcessor::Unit::W, + Constant::Units::W, thisPumpRep.ShaftPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisPump.Name); SetupOutputVariable(state, "Pump Fluid Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisPumpRep.PumpHeattoFluid, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisPump.Name); SetupOutputVariable(state, "Pump Fluid Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisPumpRep.PumpHeattoFluidEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisPump.Name); SetupOutputVariable(state, "Pump Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisPumpRep.OutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisPump.Name); SetupOutputVariable(state, "Pump Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisPumpRep.PumpMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisPump.Name); SetupOutputVariable(state, "Pump Operating Pumps Count", - OutputProcessor::Unit::None, + Constant::Units::None, thisPumpRep.NumPumpsOperating, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1256,28 +1254,28 @@ void GetPumpInput(EnergyPlusData &state) // setup skin loss output vars SetupOutputVariable(state, "Pump Zone Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisPumpRep.ZoneTotalGainRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisPump.Name); SetupOutputVariable(state, "Pump Zone Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisPumpRep.ZoneTotalGainEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, thisPump.Name); SetupOutputVariable(state, "Pump Zone Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisPumpRep.ZoneConvGainRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisPump.Name); SetupOutputVariable(state, "Pump Zone Radiative Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisPumpRep.ZoneRadGainRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/Pumps.hh b/src/EnergyPlus/Pumps.hh index d6aa4651075..8945761343d 100644 --- a/src/EnergyPlus/Pumps.hh +++ b/src/EnergyPlus/Pumps.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PurchasedAirManager.cc b/src/EnergyPlus/PurchasedAirManager.cc index 12df3567f09..162961ae20f 100644 --- a/src/EnergyPlus/PurchasedAirManager.cc +++ b/src/EnergyPlus/PurchasedAirManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -677,178 +677,176 @@ void GetPurchasedAir(EnergyPlusData &state) // energy variables SetupOutputVariable(state, "Zone Ideal Loads Supply Air Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).SenHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Supply Air Latent Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).LatHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Supply Air Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).TotHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name, + Constant::eResource::DistrictHeatingWater, + OutputProcessor::SOVEndUseCat::Heating, {}, - "DISTRICTHEATINGWATER", - "Heating", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Zone Ideal Loads Supply Air Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).SenCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Supply Air Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).LatCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Supply Air Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).TotCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name, + Constant::eResource::DistrictCooling, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "DISTRICTCOOLING", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Zone Ideal Loads Zone Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).ZoneSenHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Zone Latent Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).ZoneLatHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Zone Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).ZoneTotHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Zone Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).ZoneSenCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Zone Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).ZoneLatCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Zone Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).ZoneTotCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Outdoor Air Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).OASenHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Outdoor Air Latent Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).OALatHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Outdoor Air Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).OATotHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Outdoor Air Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).OASenCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Outdoor Air Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).OALatCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Outdoor Air Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).OATotCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Heat Recovery Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).HtRecSenHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Heat Recovery Latent Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).HtRecLatHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Heat Recovery Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).HtRecTotHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Heat Recovery Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).HtRecSenCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Heat Recovery Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).HtRecLatCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Heat Recovery Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PurchAir(PurchAirNum).HtRecTotCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -857,168 +855,168 @@ void GetPurchasedAir(EnergyPlusData &state) // rate variables SetupOutputVariable(state, "Zone Ideal Loads Supply Air Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).SenHeatRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Supply Air Latent Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).LatHeatRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Supply Air Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).TotHeatRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Supply Air Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).SenCoolRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Supply Air Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).LatCoolRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Supply Air Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).TotCoolRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Zone Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).ZoneSenHeatRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Zone Latent Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).ZoneLatHeatRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Zone Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).ZoneTotHeatRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Zone Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).ZoneSenCoolRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Zone Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).ZoneLatCoolRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Zone Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).ZoneTotCoolRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Outdoor Air Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).OASenHeatRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Outdoor Air Latent Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).OALatHeatRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Outdoor Air Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).OATotHeatRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Outdoor Air Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).OASenCoolRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Outdoor Air Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).OALatCoolRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Outdoor Air Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).OATotCoolRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Heat Recovery Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).HtRecSenHeatRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Heat Recovery Latent Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).HtRecLatHeatRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Heat Recovery Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).HtRecTotHeatRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Heat Recovery Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).HtRecSenCoolRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Heat Recovery Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).HtRecLatCoolRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Heat Recovery Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, PurchAir(PurchAirNum).HtRecTotCoolRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1026,14 +1024,14 @@ void GetPurchasedAir(EnergyPlusData &state) SetupOutputVariable(state, "Zone Ideal Loads Economizer Active Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, PurchAir(PurchAirNum).TimeEconoActive, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Heat Recovery Active Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, PurchAir(PurchAirNum).TimeHtRecActive, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1041,7 +1039,7 @@ void GetPurchasedAir(EnergyPlusData &state) SetupOutputVariable(state, "Zone Ideal Loads Hybrid Ventilation Available Status", - OutputProcessor::Unit::None, + Constant::Units::None, PurchAir(PurchAirNum).AvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1050,28 +1048,28 @@ void GetPurchasedAir(EnergyPlusData &state) // air flows SetupOutputVariable(state, "Zone Ideal Loads Outdoor Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, PurchAir(PurchAirNum).OutdoorAirMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Outdoor Air Standard Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, PurchAir(PurchAirNum).OutdoorAirVolFlowRateStdRho, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Supply Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, PurchAir(PurchAirNum).SupplyAirMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, PurchAir(PurchAirNum).Name); SetupOutputVariable(state, "Zone Ideal Loads Supply Air Standard Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, PurchAir(PurchAirNum).SupplyAirVolFlowRateStdRho, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1080,7 +1078,7 @@ void GetPurchasedAir(EnergyPlusData &state) // Supply Air temperature SetupOutputVariable(state, "Zone Ideal Loads Supply Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, PurchAir(PurchAirNum).SupplyTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1088,7 +1086,7 @@ void GetPurchasedAir(EnergyPlusData &state) // Supply Air Humidity Ratio SetupOutputVariable(state, "Zone Ideal Loads Supply Air Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, PurchAir(PurchAirNum).SupplyHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1097,7 +1095,7 @@ void GetPurchasedAir(EnergyPlusData &state) // Mixed Air temperature SetupOutputVariable(state, "Zone Ideal Loads Mixed Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, PurchAir(PurchAirNum).MixedAirTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1105,7 +1103,7 @@ void GetPurchasedAir(EnergyPlusData &state) // Mixed Air Humidity Ratio SetupOutputVariable(state, "Zone Ideal Loads Mixed Air Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, PurchAir(PurchAirNum).MixedAirHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/PurchasedAirManager.hh b/src/EnergyPlus/PurchasedAirManager.hh index 3496ade62c2..d2351e18c95 100644 --- a/src/EnergyPlus/PurchasedAirManager.hh +++ b/src/EnergyPlus/PurchasedAirManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index f10d40e98d4..25ad29fb738 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -7448,48 +7448,47 @@ void SetupReportInput(EnergyPlusData &state) if (thisCase.NumSysAttach == 1) { SetupOutputVariable(state, "Refrigeration Case Evaporator Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCase.TotalCoolingLoad, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, thisCase.Name); SetupOutputVariable(state, "Refrigeration Case Evaporator Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCase.TotalCoolingEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, thisCase.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Refrigeration, {}, - "ENERGYTRANSFER", - "REFRIGERATION", - {}, - "Building", + OutputProcessor::SOVGroup::Building, thisCase.ZoneName); SetupOutputVariable(state, "Refrigeration Case Evaporator Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCase.SensCoolingEnergyRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, thisCase.Name); SetupOutputVariable(state, "Refrigeration Case Evaporator Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCase.SensCoolingEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, thisCase.Name); SetupOutputVariable(state, "Refrigeration Case Evaporator Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCase.LatCoolingEnergyRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, thisCase.Name); SetupOutputVariable(state, "Refrigeration Case Evaporator Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCase.LatCoolingEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -7497,28 +7496,28 @@ void SetupReportInput(EnergyPlusData &state) SetupOutputVariable(state, "Refrigeration Case Zone Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCase.SensZoneCreditCoolRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, thisCase.Name); SetupOutputVariable(state, "Refrigeration Case Zone Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCase.SensZoneCreditCool, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, thisCase.Name); SetupOutputVariable(state, "Refrigeration Case Zone Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCase.SensZoneCreditHeatRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, thisCase.Name); SetupOutputVariable(state, "Refrigeration Case Zone Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCase.SensZoneCreditHeat, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -7526,14 +7525,14 @@ void SetupReportInput(EnergyPlusData &state) SetupOutputVariable(state, "Refrigeration Case Zone Latent Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCase.LatZoneCreditRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, thisCase.Name); SetupOutputVariable(state, "Refrigeration Case Zone Latent Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCase.LatZoneCredit, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -7541,28 +7540,28 @@ void SetupReportInput(EnergyPlusData &state) SetupOutputVariable(state, "Refrigeration Case Return Air Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCase.SensHVACCreditCoolRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, thisCase.Name); SetupOutputVariable(state, "Refrigeration Case Return Air Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCase.SensHVACCreditCool, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, thisCase.Name); SetupOutputVariable(state, "Refrigeration Case Return Air Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCase.SensHVACCreditHeatRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, thisCase.Name); SetupOutputVariable(state, "Refrigeration Case Return Air Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCase.SensHVACCreditHeat, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -7570,14 +7569,14 @@ void SetupReportInput(EnergyPlusData &state) SetupOutputVariable(state, "Refrigeration Case Return Air Latent Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCase.LatHVACCreditRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, thisCase.Name); SetupOutputVariable(state, "Refrigeration Case Return Air Latent Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCase.LatHVACCredit, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -7585,50 +7584,48 @@ void SetupReportInput(EnergyPlusData &state) SetupOutputVariable(state, "Refrigeration Case Evaporator Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCase.ElecFanPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, thisCase.Name); SetupOutputVariable(state, "Refrigeration Case Evaporator Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCase.ElecFanConsumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, thisCase.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, "General", - "Building", + OutputProcessor::SOVGroup::Building, thisCase.ZoneName); SetupOutputVariable(state, "Refrigeration Case Lighting Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCase.ElecLightingPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, thisCase.Name); SetupOutputVariable(state, "Refrigeration Case Lighting Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCase.ElecLightingConsumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, thisCase.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, "General", - "Building", + OutputProcessor::SOVGroup::Building, thisCase.ZoneName); // Report defrost energy curve value only for cases having electric or hot-gas defrost with temperature termination if (thisCase.defrostType == RefCaseDefrostType::ElectricTerm || thisCase.defrostType == RefCaseDefrostType::HotFluidTerm) { SetupOutputVariable(state, "Refrigeration Case Defrost Energy Correction Curve Value", - OutputProcessor::Unit::None, + Constant::Units::None, thisCase.DefEnergyCurveValue, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -7637,7 +7634,7 @@ void SetupReportInput(EnergyPlusData &state) SetupOutputVariable(state, "Refrigeration Case Latent Credit Curve Value", - OutputProcessor::Unit::None, + Constant::Units::None, thisCase.LatEnergyCurveValue, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -7647,23 +7644,22 @@ void SetupReportInput(EnergyPlusData &state) if (thisCase.AntiSweatControlType > ASHtrCtrlType::None) { SetupOutputVariable(state, "Refrigeration Case Anti Sweat Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCase.ElecAntiSweatPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, thisCase.Name); SetupOutputVariable(state, "Refrigeration Case Anti Sweat Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCase.ElecAntiSweatConsumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, thisCase.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, "General", - "Building", + OutputProcessor::SOVGroup::Building, thisCase.ZoneName); } @@ -7673,23 +7669,22 @@ void SetupReportInput(EnergyPlusData &state) thisCase.defrostType == RefCaseDefrostType::ElectricTerm) { SetupOutputVariable(state, "Refrigeration Case Defrost Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, thisCase.ElecDefrostPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, thisCase.Name); SetupOutputVariable(state, "Refrigeration Case Defrost Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisCase.ElecDefrostConsumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, thisCase.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, "General", - "Building", + OutputProcessor::SOVGroup::Building, thisCase.ZoneName); } @@ -7720,139 +7715,135 @@ void SetupReportInput(EnergyPlusData &state) if (walkin.NumSysAttach == 1) { // ensure no unuseds reported SetupOutputVariable(state, "Refrigeration Walk In Evaporator Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, walkin.TotalCoolingLoad, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, walkin.Name); SetupOutputVariable(state, "Refrigeration Walk In Evaporator Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, walkin.TotalCoolingEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, walkin.Name); SetupOutputVariable(state, "Refrigeration Walk In Evaporator Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, walkin.TotSensCoolingEnergyRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, walkin.Name); SetupOutputVariable(state, "Refrigeration Walk In Evaporator Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, walkin.TotSensCoolingEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, walkin.Name); SetupOutputVariable(state, "Refrigeration Walk In Evaporator Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, walkin.TotLatCoolingEnergyRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, walkin.Name); SetupOutputVariable(state, "Refrigeration Walk In Evaporator Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, walkin.TotLatCoolingEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, walkin.Name); SetupOutputVariable(state, "Refrigeration Walk In Ancillary Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, walkin.TotalElecPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, walkin.Name); SetupOutputVariable(state, "Refrigeration Walk In Ancillary Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, walkin.TotalElecConsumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, walkin.Name); SetupOutputVariable(state, "Refrigeration Walk In Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, walkin.ElecFanPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, walkin.Name); SetupOutputVariable(state, "Refrigeration Walk In Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, walkin.ElecFanConsumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, walkin.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, "General", - "Building"); + OutputProcessor::SOVGroup::Building); SetupOutputVariable(state, "Refrigeration Walk In Lighting Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, walkin.ElecLightingPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, walkin.Name); SetupOutputVariable(state, "Refrigeration Walk In Lighting Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, walkin.ElecLightingConsumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, walkin.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, "General", - "Building"); + OutputProcessor::SOVGroup::Building); SetupOutputVariable(state, "Refrigeration Walk In Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, walkin.ElecHeaterPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, walkin.Name); SetupOutputVariable(state, "Refrigeration Walk In Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, walkin.ElecHeaterConsumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, walkin.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, "General", - "Building"); + OutputProcessor::SOVGroup::Building); // Report only for WalkIns using electric defrost if (walkin.defrostType == WalkinClrDefrostType::Elec) { SetupOutputVariable(state, "Refrigeration Walk In Defrost Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, walkin.ElecDefrostPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, walkin.Name); SetupOutputVariable(state, "Refrigeration Walk In Defrost Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, walkin.ElecDefrostConsumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, walkin.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, "General", - "Building"); + OutputProcessor::SOVGroup::Building); } // Report walkin variables that are specified for each zone exposed to the walkin @@ -7865,42 +7856,42 @@ void SetupReportInput(EnergyPlusData &state) SetupOutputVariable(state, "Refrigeration Walk In Zone Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, walkin.SensZoneCreditCoolRate(zoneId), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, Walkin_and_zone_name); SetupOutputVariable(state, "Refrigeration Walk In Zone Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, walkin.SensZoneCreditCool(zoneId), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, Walkin_and_zone_name); SetupOutputVariable(state, "Refrigeration Walk In Zone Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, walkin.SensZoneCreditHeatRate(zoneId), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, Walkin_and_zone_name); SetupOutputVariable(state, "Refrigeration Walk In Zone Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, walkin.SensZoneCreditHeat(zoneId), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, Walkin_and_zone_name); SetupOutputVariable(state, "Refrigeration Walk In Zone Latent Rate", - OutputProcessor::Unit::W, + Constant::Units::W, walkin.LatZoneCreditRate(zoneId), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, Walkin_and_zone_name); SetupOutputVariable(state, "Refrigeration Walk In Zone Latent Energy", - OutputProcessor::Unit::J, + Constant::Units::J, walkin.LatZoneCredit(zoneId), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -7929,157 +7920,155 @@ void SetupReportInput(EnergyPlusData &state) if (coil.NumSysAttach == 1) { // ensure no unuseds reported SetupOutputVariable(state, "Refrigeration Zone Air Chiller Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, coil.TotalCoolingLoad, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, coil.Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, coil.TotalCoolingEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, coil.Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, coil.SensCoolingEnergyRate, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, coil.Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, coil.SensCoolingEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, coil.Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, coil.LatCreditRate, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, coil.Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, coil.LatCreditEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, coil.Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Water Removed Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, coil.LatKgPerS_ToZone, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, coil.Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Total Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, coil.TotalElecPower, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, coil.Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Total Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, coil.TotalElecConsumption, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, coil.Name); // components are metered seperately SetupOutputVariable(state, "Refrigeration Zone Air Chiller Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, coil.ElecFanPower, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, coil.Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Fan Electric Energy", - OutputProcessor::Unit::J, + Constant::Units::J, coil.ElecFanConsumption, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, coil.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, "General", - "Building"); + OutputProcessor::SOVGroup::Building); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, coil.ElecHeaterPower, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, coil.Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, coil.ElecHeaterConsumption, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, coil.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, "General", - "Building"); + OutputProcessor::SOVGroup::Building); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Sensible Heat Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, coil.SensHeatRatio, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, coil.Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Frost Accumulation Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, coil.KgFrost, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, coil.Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Zone Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, coil.ReportTotalCoolCreditRate, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, coil.Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Zone Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, coil.ReportTotalCoolCreditEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, coil.Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Zone Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, coil.ReportSensCoolCreditRate, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, coil.Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Zone Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, coil.ReportSensCoolCreditEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, coil.Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Zone Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, coil.ReportHeatingCreditRate, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, coil.Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Zone Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, coil.ReportHeatingCreditEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -8089,23 +8078,22 @@ void SetupReportInput(EnergyPlusData &state) if (coil.defrostType == DefrostType::Elec) { SetupOutputVariable(state, "Refrigeration Zone Air Chiller Defrost Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, coil.ElecDefrostPower, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, coil.Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Defrost Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, coil.ElecDefrostConsumption, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, coil.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, "General", - "Building"); + OutputProcessor::SOVGroup::Building); } // electric defrost coil } //(.NOT. coil%unusedWarehouseCoil) } // NumSimulationWarehouseCoils @@ -8122,84 +8110,84 @@ void SetupReportInput(EnergyPlusData &state) if (state.dataRefrigCase->HaveCasesOrWalkins) { SetupOutputVariable(state, "Refrigeration Zone Case and Walk In Total Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->RefrigCaseCredit(zoneID).SenCaseCreditToZone, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneID).Name); SetupOutputVariable(state, "Refrigeration Zone Case and Walk In Total Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, CaseWIZoneReport(zoneID).SenCaseCreditToZoneEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneID).Name); SetupOutputVariable(state, "Refrigeration Zone Case and Walk In Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, CaseWIZoneReport(zoneID).HeatingToZoneRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneID).Name); SetupOutputVariable(state, "Refrigeration Zone Case and Walk In Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, CaseWIZoneReport(zoneID).HeatingToZoneEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneID).Name); SetupOutputVariable(state, "Refrigeration Zone Case and Walk In Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, CaseWIZoneReport(zoneID).SenCoolingToZoneRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneID).Name); SetupOutputVariable(state, "Refrigeration Zone Case and Walk In Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, CaseWIZoneReport(zoneID).SenCoolingToZoneEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneID).Name); SetupOutputVariable(state, "Refrigeration Zone Case and Walk In Total Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, CaseWIZoneReport(zoneID).LatCoolingToZoneRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneID).Name); SetupOutputVariable(state, "Refrigeration Zone Case and Walk In Total Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, CaseWIZoneReport(zoneID).LatCoolingToZoneEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneID).Name); SetupOutputVariable(state, "Refrigeration Zone Case and Walk In Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, CaseWIZoneReport(zoneID).TotCoolingToZoneRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneID).Name); SetupOutputVariable(state, "Refrigeration Zone Case and Walk In Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, CaseWIZoneReport(zoneID).TotCoolingToZoneEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneID).Name); SetupOutputVariable(state, "Refrigeration Zone Case and Walk In Total Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, CaseWIZoneReport(zoneID).TotHtXferToZoneRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneID).Name); SetupOutputVariable(state, "Refrigeration Zone Case and Walk In Total Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, CaseWIZoneReport(zoneID).TotHtXferToZoneEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -8209,77 +8197,77 @@ void SetupReportInput(EnergyPlusData &state) if (state.dataRefrigCase->HaveChillers) { SetupOutputVariable(state, "Refrigeration Zone Air Chiller Sensible Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, CoilSysCredit(zoneID).SenCreditToZoneRate, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneID).Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Sensible Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, CoilSysCredit(zoneID).SenCreditToZoneEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneID).Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, CoilSysCredit(zoneID).ReportSenCoolingToZoneRate, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneID).Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, CoilSysCredit(zoneID).ReportSenCoolingToZoneEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneID).Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, CoilSysCredit(zoneID).ReportLatCreditToZoneRate, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneID).Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, CoilSysCredit(zoneID).ReportLatCreditToZoneEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneID).Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Water Removed Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, CoilSysCredit(zoneID).ReportH2ORemovedKgPerS_FromZoneRate, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneID).Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, CoilSysCredit(zoneID).ReportTotCoolingToZoneRate, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneID).Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, CoilSysCredit(zoneID).ReportTotCoolingToZoneEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(zoneID).Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, CoilSysCredit(zoneID).ReportHeatingToZoneRate, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(zoneID).Name); SetupOutputVariable(state, "Refrigeration Zone Air Chiller Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, CoilSysCredit(zoneID).ReportHeatingToZoneEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -8296,89 +8284,88 @@ void SetupReportInput(EnergyPlusData &state) if (secondary.CoilFlag) { // secondary system serves chillers and is solved on HVAC time step SetupOutputVariable(state, "Refrigeration Air Chiller Secondary Loop Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, secondary.PumpPowerTotal, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, secondary.Name); SetupOutputVariable(state, "Refrigeration Air Chiller Secondary Loop Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, secondary.PumpElecEnergyTotal, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, secondary.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, secondary.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Refrigeration Air Chiller Secondary Loop Load Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, secondary.TotalRefrigLoad, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, secondary.Name); SetupOutputVariable(state, "Refrigeration Air Chiller Secondary Loop Load Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, secondary.TotalRefrigEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, secondary.Name); SetupOutputVariable(state, "Refrigeration Air Chiller Secondary Loop Total Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, secondary.TotalCoolingLoad, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, secondary.Name); SetupOutputVariable(state, "Refrigeration Air Chiller Secondary Loop Total Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, secondary.TotalCoolingEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, secondary.Name); SetupOutputVariable(state, "Refrigeration Air Chiller Secondary Loop Estimated Refrigerant Inventory Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, secondary.RefInventory, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, secondary.Name); SetupOutputVariable(state, "Refrigeration Air Chiller Secondary Loop Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, secondary.FlowVolActual, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, secondary.Name); SetupOutputVariable(state, "Refrigeration Air Chiller Secondary Loop Pipe Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, secondary.DistPipeHeatGain, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, secondary.Name); SetupOutputVariable(state, "Refrigeration Air Chiller Secondary Loop Pipe Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, secondary.DistPipeHeatGainEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, secondary.Name); SetupOutputVariable(state, "Refrigeration Air Chiller Secondary Loop Receiver Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, secondary.ReceiverHeatGain, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, secondary.Name); SetupOutputVariable(state, "Refrigeration Air Chiller Secondary Loop Receiver Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, secondary.ReceiverHeatGainEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -8386,89 +8373,88 @@ void SetupReportInput(EnergyPlusData &state) } else { // Secondary loop serves cases and walk-ins on zone(load) time step SetupOutputVariable(state, "Refrigeration Secondary Loop Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, secondary.PumpPowerTotal, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, secondary.Name); SetupOutputVariable(state, "Refrigeration Secondary Loop Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, secondary.PumpElecEnergyTotal, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, secondary.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, secondary.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Refrigeration Secondary Loop Load Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, secondary.TotalRefrigLoad, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, secondary.Name); SetupOutputVariable(state, "Refrigeration Secondary Loop Load Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, secondary.TotalRefrigEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, secondary.Name); SetupOutputVariable(state, "Refrigeration Secondary Loop Total Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, secondary.TotalCoolingLoad, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, secondary.Name); SetupOutputVariable(state, "Refrigeration Secondary Loop Total Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, secondary.TotalCoolingEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, secondary.Name); SetupOutputVariable(state, "Refrigeration Secondary Loop Estimated Refrigerant Inventory Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, secondary.RefInventory, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, secondary.Name); SetupOutputVariable(state, "Refrigeration Secondary Loop Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, secondary.FlowVolActual, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, secondary.Name); SetupOutputVariable(state, "Refrigeration Secondary Loop Pipe Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, secondary.DistPipeHeatGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, secondary.Name); SetupOutputVariable(state, "Refrigeration Secondary Loop Pipe Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, secondary.DistPipeHeatGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, secondary.Name); SetupOutputVariable(state, "Refrigeration Secondary Loop Receiver Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, secondary.ReceiverHeatGain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, secondary.Name); SetupOutputVariable(state, "Refrigeration Secondary Loop Receiver Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, secondary.ReceiverHeatGainEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -8500,64 +8486,61 @@ void SetupReportInput(EnergyPlusData &state) if (rack.CoilFlag) { // rack serves chillers and is solved on HVAC time step SetupOutputVariable(state, "Refrigeration Air Chiller Compressor Rack Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, rack.RackCompressorPower, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, rack.Name); SetupOutputVariable(state, "Refrigeration Air Chiller Compressor Rack Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, rack.RackElecConsumption, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, rack.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, rack.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Refrigeration Air Chiller Compressor Rack Condenser Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, rack.ActualCondenserFanPower, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, rack.Name); SetupOutputVariable(state, "Refrigeration Air Chiller Compressor Rack Condenser Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, rack.CondenserFanConsumption, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, rack.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, rack.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Refrigeration Air Chiller Compressor Rack Total Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, rack.RackCapacity, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, rack.Name); SetupOutputVariable(state, "Refrigeration Air Chiller Compressor Rack Total Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, rack.RackCoolingEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, rack.Name, - {}, - "ENERGYTRANSFER", - "REFRIGERATION", + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Refrigeration, rack.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Refrigeration Air Chiller Compressor Rack COP", - OutputProcessor::Unit::W_W, + Constant::Units::W_W, rack.RackCompressorCOP, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, @@ -8566,74 +8549,71 @@ void SetupReportInput(EnergyPlusData &state) if (rack.CondenserType == DataHeatBalance::RefrigCondenserType::Evap) { SetupOutputVariable(state, "Refrigeration Air Chiller Compressor Rack Evaporative Condenser Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, rack.ActualEvapPumpPower, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, rack.Name); SetupOutputVariable(state, "Refrigeration Air Chiller Compressor Rack Evaporative Condenser Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, rack.EvapPumpConsumption, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, rack.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, rack.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Refrigeration Air Chiller Compressor Rack Evaporative Condenser Basin Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, rack.BasinHeaterPower, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, rack.Name); SetupOutputVariable(state, "Refrigeration Air Chiller Compressor Rack Evaporative Condenser Basin Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, rack.BasinHeaterConsumption, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, rack.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, rack.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Refrigeration Air Chiller Compressor Rack Evaporative Condenser Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, rack.EvapWaterConsumpRate, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, rack.Name); SetupOutputVariable(state, "Refrigeration Air Chiller Compressor Rack Evaporative Condenser Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, rack.EvapWaterConsumption, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, rack.Name, - {}, - "Water", - "REFRIGERATION", + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::Refrigeration, rack.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); } // Evap condenser if (rack.HeatRejectionLocation == HeatRejLocation::Zone) { SetupOutputVariable(state, "Refrigeration Air Chiller Compressor Rack Zone Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, rack.SensZoneCreditHeatRate, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, rack.Name); SetupOutputVariable(state, "Refrigeration Air Chiller Compressor Rack Zone Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, rack.SensZoneCreditHeat, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -8641,14 +8621,14 @@ void SetupReportInput(EnergyPlusData &state) SetupOutputVariable(state, "Refrigeration Air Chiller Compressor Rack Return Air Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, rack.SensHVACCreditHeatRate, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, rack.Name); SetupOutputVariable(state, "Refrigeration Air Chiller Compressor Rack Return Air Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, rack.SensHVACCreditHeat, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -8667,64 +8647,61 @@ void SetupReportInput(EnergyPlusData &state) SetupOutputVariable(state, "Refrigeration Compressor Rack Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, rack.RackCompressorPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, rack.Name); SetupOutputVariable(state, "Refrigeration Compressor Rack Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, rack.RackElecConsumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, rack.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, rack.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Refrigeration Compressor Rack Condenser Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, rack.ActualCondenserFanPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, rack.Name); SetupOutputVariable(state, "Refrigeration Compressor Rack Condenser Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, rack.CondenserFanConsumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, rack.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, rack.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Refrigeration Compressor Rack Total Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, rack.RackCapacity, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, rack.Name); SetupOutputVariable(state, "Refrigeration Compressor Rack Total Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, rack.RackCoolingEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, rack.Name, - {}, - "ENERGYTRANSFER", - "REFRIGERATION", + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Refrigeration, rack.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Refrigeration Compressor Rack COP", - OutputProcessor::Unit::W_W, + Constant::Units::W_W, rack.RackCompressorCOP, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -8733,74 +8710,71 @@ void SetupReportInput(EnergyPlusData &state) if (rack.CondenserType == DataHeatBalance::RefrigCondenserType::Evap) { SetupOutputVariable(state, "Refrigeration Compressor Rack Evaporative Condenser Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, rack.ActualEvapPumpPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, rack.Name); SetupOutputVariable(state, "Refrigeration Compressor Rack Evaporative Condenser Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, rack.EvapPumpConsumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, rack.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, rack.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Refrigeration Compressor Rack Evaporative Condenser Basin Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, rack.BasinHeaterPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, rack.Name); SetupOutputVariable(state, "Refrigeration Compressor Rack Evaporative Condenser Basin Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, rack.BasinHeaterConsumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, rack.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, rack.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Refrigeration Compressor Rack Evaporative Condenser Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, rack.EvapWaterConsumpRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, rack.Name); SetupOutputVariable(state, "Refrigeration Compressor Rack Evaporative Condenser Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, rack.EvapWaterConsumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, rack.Name, - {}, - "Water", - "REFRIGERATION", + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::Refrigeration, rack.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); } // condenser evap if (rack.HeatRejectionLocation == HeatRejLocation::Zone) { SetupOutputVariable(state, "Refrigeration Compressor Rack Zone Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, rack.SensZoneCreditHeatRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, rack.Name); SetupOutputVariable(state, "Refrigeration Compressor Rack Zone Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, rack.SensZoneCreditHeat, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -8808,14 +8782,14 @@ void SetupReportInput(EnergyPlusData &state) SetupOutputVariable(state, "Refrigeration Compressor Rack Return Air Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, rack.SensHVACCreditHeatRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, rack.Name); SetupOutputVariable(state, "Refrigeration Compressor Rack Return Air Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, rack.SensHVACCreditHeat, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -8833,7 +8807,7 @@ void SetupReportInput(EnergyPlusData &state) if (rack.CondenserType == DataHeatBalance::RefrigCondenserType::Water) { // on HVAC time step no matter what SetupOutputVariable(state, "Refrigeration Compressor Rack Condenser Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, rack.MassFlowRate, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, @@ -8841,7 +8815,7 @@ void SetupReportInput(EnergyPlusData &state) SetupOutputVariable(state, "Refrigeration Compressor Rack Condenser Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, rack.CondLoad, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, @@ -8849,16 +8823,15 @@ void SetupReportInput(EnergyPlusData &state) SetupOutputVariable(state, "Refrigeration Compressor Rack Condenser Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, rack.CondEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, rack.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Heating, {}, - "ENERGYTRANSFER", - "Heating", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } // Condenser cooling water } // Refrigerated Racks @@ -8872,14 +8845,14 @@ void SetupReportInput(EnergyPlusData &state) if (sys.NumStages == 1) { SetupOutputVariable(state, "Refrigeration Air Chiller System Total Compressor Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.TotCompPower, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Total Compressor Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotCompElecConsump, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -8887,35 +8860,35 @@ void SetupReportInput(EnergyPlusData &state) } else if (sys.NumStages == 2) { SetupOutputVariable(state, "Refrigeration Air Chiller System Total Low Stage Compressor Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.TotCompPower, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Total Low Stage Compressor Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotCompElecConsump, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, sys.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Total High Stage Compressor Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.TotHiStageCompPower, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Total High Stage Compressor Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotHiStageCompElecConsump, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, sys.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Total Low and High Stage Compressor Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotCompElecConsumpTwoStage, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -8923,49 +8896,49 @@ void SetupReportInput(EnergyPlusData &state) } // NumStages SetupOutputVariable(state, "Refrigeration Air Chiller System Average Compressor COP", - OutputProcessor::Unit::W_W, + Constant::Units::W_W, sys.AverageCompressorCOP, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Total Air Chiller Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.TotalCoolingLoad, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Total Case and Walk In Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotalCoolingEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, sys.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Total Transferred Load Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.TotTransferLoad, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Total Transferred Load Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotTransferEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, sys.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Total Suction Pipe Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.PipeHeatLoad, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Total Suction Pipe Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.PipeHeatEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -8973,14 +8946,14 @@ void SetupReportInput(EnergyPlusData &state) if (sys.NumStages == 1) { SetupOutputVariable(state, "Refrigeration Air Chiller System Total Compressor Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.TotCompCapacity, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Total Compressor Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotCompCoolingEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -8988,28 +8961,28 @@ void SetupReportInput(EnergyPlusData &state) } else if (sys.NumStages == 2) { SetupOutputVariable(state, "Refrigeration Air Chiller System Total Low Stage Compressor Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.TotCompCapacity, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Total Low Stage Compressor Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotCompCoolingEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, sys.Name); // indiv compressors go to meter, not system sum SetupOutputVariable(state, "Refrigeration Air Chiller System Total High Stage Compressor Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.TotHiStageCompCapacity, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Total High Stage Compressor Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotHiStageCompCoolingEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -9017,21 +8990,21 @@ void SetupReportInput(EnergyPlusData &state) } // NumStages SetupOutputVariable(state, "Refrigeration Air Chiller System Net Rejected Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.NetHeatRejectLoad, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Net Rejected Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.NetHeatRejectEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, sys.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Estimated Refrigerant Inventory Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, sys.RefInventory, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, @@ -9039,7 +9012,7 @@ void SetupReportInput(EnergyPlusData &state) if (sys.NumStages == 1) { SetupOutputVariable(state, "Refrigeration Air Chiller System Estimated Refrigerant Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, sys.RefMassFlowComps, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, @@ -9047,14 +9020,14 @@ void SetupReportInput(EnergyPlusData &state) } else if (sys.NumStages == 2) { SetupOutputVariable(state, "Refrigeration Air Chiller System Estimated Low Stage Refrigerant Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, sys.RefMassFlowComps, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Estimated High Stage Refrigerant Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, sys.RefMassFlowHiStageComps, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, @@ -9063,14 +9036,14 @@ void SetupReportInput(EnergyPlusData &state) if (sys.NumStages == 2) { SetupOutputVariable(state, "Refrigeration Air Chiller System Intercooler Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, sys.TIntercooler, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Intercooler Pressure", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, sys.PIntercooler, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, @@ -9078,42 +9051,42 @@ void SetupReportInput(EnergyPlusData &state) } SetupOutputVariable(state, "Refrigeration Air Chiller System Condensing Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, sys.TCondense, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Evaporating Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, sys.TEvapNeeded, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Suction Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, sys.TCompIn, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System TXV Liquid Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, sys.TLiqInActual, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Liquid Suction Subcooler Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.LSHXTrans, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Liquid Suction Subcooler Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.LSHXTransEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -9122,14 +9095,14 @@ void SetupReportInput(EnergyPlusData &state) if (sys.NumStages == 1) { SetupOutputVariable(state, "Refrigeration System Total Compressor Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.TotCompPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration System Total Compressor Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotCompElecConsump, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -9137,35 +9110,35 @@ void SetupReportInput(EnergyPlusData &state) } else if (sys.NumStages == 2) { SetupOutputVariable(state, "Refrigeration System Total Low Stage Compressor Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.TotCompPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration System Total Low Stage Compressor Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotCompElecConsump, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, sys.Name); SetupOutputVariable(state, "Refrigeration System Total High Stage Compressor Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.TotHiStageCompPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration System Total High Stage Compressor Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotHiStageCompElecConsump, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, sys.Name); SetupOutputVariable(state, "Refrigeration System Total Low and High Stage Compressor Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotCompElecConsumpTwoStage, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -9173,49 +9146,49 @@ void SetupReportInput(EnergyPlusData &state) } // NumStages SetupOutputVariable(state, "Refrigeration System Average Compressor COP", - OutputProcessor::Unit::W_W, + Constant::Units::W_W, sys.AverageCompressorCOP, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration System Total Cases and Walk Ins Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.TotalCoolingLoad, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration System Total Cases and Walk Ins Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotalCoolingEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, sys.Name); SetupOutputVariable(state, "Refrigeration System Total Transferred Load Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.TotTransferLoad, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration System Total Transferred Load Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotTransferEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, sys.Name); SetupOutputVariable(state, "Refrigeration System Total Suction Pipe Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.PipeHeatLoad, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration System Total Suction Pipe Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.PipeHeatEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -9223,14 +9196,14 @@ void SetupReportInput(EnergyPlusData &state) if (sys.NumStages == 1) { SetupOutputVariable(state, "Refrigeration System Total Compressor Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.TotCompCapacity, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration System Total Compressor Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotCompCoolingEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -9238,28 +9211,28 @@ void SetupReportInput(EnergyPlusData &state) } else if (sys.NumStages == 2) { SetupOutputVariable(state, "Refrigeration System Total Low Stage Compressor Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.TotCompCapacity, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration System Total Low Stage Compressor Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotCompCoolingEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, sys.Name); // indiv compressors go to meter, not system sum SetupOutputVariable(state, "Refrigeration System Total High Stage Compressor Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.TotHiStageCompCapacity, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration System Total High Stage Compressor Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotHiStageCompCoolingEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -9267,21 +9240,21 @@ void SetupReportInput(EnergyPlusData &state) } // NumStages SetupOutputVariable(state, "Refrigeration System Net Rejected Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.NetHeatRejectLoad, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration System Net Rejected Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.NetHeatRejectEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, sys.Name); SetupOutputVariable(state, "Refrigeration System Estimated Refrigerant Inventory Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, sys.RefInventory, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -9289,7 +9262,7 @@ void SetupReportInput(EnergyPlusData &state) if (sys.NumStages == 1) { SetupOutputVariable(state, "Refrigeration System Estimated Refrigerant Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, sys.RefMassFlowComps, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -9297,14 +9270,14 @@ void SetupReportInput(EnergyPlusData &state) } else if (sys.NumStages == 2) { SetupOutputVariable(state, "Refrigeration System Estimated Low Stage Refrigerant Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, sys.RefMassFlowComps, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration System Estimated High Stage Refrigerant Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, sys.RefMassFlowHiStageComps, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -9313,14 +9286,14 @@ void SetupReportInput(EnergyPlusData &state) if (sys.NumStages == 2) { SetupOutputVariable(state, "Refrigeration System Intercooler Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, sys.TIntercooler, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration System Intercooler Pressure", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, sys.PIntercooler, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -9328,42 +9301,42 @@ void SetupReportInput(EnergyPlusData &state) } SetupOutputVariable(state, "Refrigeration System Condensing Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, sys.TCondense, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration System Evaporating Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, sys.TEvapNeeded, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration System Suction Pipe Suction Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, sys.TCompIn, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration System Thermostatic Expansion Valve Liquid Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, sys.TLiqInActual, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration System Liquid Suction Subcooler Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.LSHXTrans, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration System Liquid Suction Subcooler Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.LSHXTransEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -9395,40 +9368,39 @@ void SetupReportInput(EnergyPlusData &state) if (comp.CoilFlag) { // Compressor serving system with chillers on HVAC time step SetupOutputVariable(state, "Refrigeration Air Chiller System Compressor Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, comp.Power, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, comp.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Compressor Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, comp.ElecConsumption, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, comp.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, comp.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Refrigeration Air Chiller System Compressor Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, comp.Capacity, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, comp.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Compressor Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, comp.CoolingEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, comp.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Compressor Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, comp.LoadFactor, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, @@ -9436,40 +9408,39 @@ void SetupReportInput(EnergyPlusData &state) } else { // serve cases/walkins on zone time step SetupOutputVariable(state, "Refrigeration Compressor Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, comp.Power, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, comp.Name); SetupOutputVariable(state, "Refrigeration Compressor Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, comp.ElecConsumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, comp.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, comp.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Refrigeration Compressor Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, comp.Capacity, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, comp.Name); SetupOutputVariable(state, "Refrigeration Compressor Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, comp.CoolingEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, comp.Name); SetupOutputVariable(state, "Refrigeration Compressor Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, comp.LoadFactor, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -9485,14 +9456,14 @@ void SetupReportInput(EnergyPlusData &state) if (cond.CoilFlag) { // Condenser serving system with chillers on HVAC time step SetupOutputVariable(state, "Refrigeration Air Chiller System Condenser Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, cond.CondLoad, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, cond.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Condenser Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, cond.CondEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -9501,42 +9472,42 @@ void SetupReportInput(EnergyPlusData &state) if (cond.CondenserType != DataHeatBalance::RefrigCondenserType::Cascade) { SetupOutputVariable(state, "Refrigeration Air Chiller System Condenser Total Recovered Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, cond.TotalHeatRecoveredLoad, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, cond.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Condenser Total Recovered Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, cond.TotalHeatRecoveredEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, cond.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Condenser Non Refrigeration Recovered Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, cond.ExternalHeatRecoveredLoad, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, cond.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Condenser Non Refrigeration Recovered Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, cond.ExternalEnergyRecovered, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, cond.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Condenser Defrost Recovered Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, cond.InternalHeatRecoveredLoad, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, cond.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Condenser Defrost Recovered Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, cond.InternalEnergyRecovered, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -9546,108 +9517,103 @@ void SetupReportInput(EnergyPlusData &state) if (cond.CondenserType == DataHeatBalance::RefrigCondenserType::Air) { SetupOutputVariable(state, "Refrigeration Air Chiller System Condenser Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, cond.ActualFanPower, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, cond.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Condenser Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, cond.FanElecEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, cond.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, cond.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); } // Air cooled if (cond.CondenserType == DataHeatBalance::RefrigCondenserType::Evap) { SetupOutputVariable(state, "Refrigeration Air Chiller System Condenser Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, cond.ActualFanPower, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, cond.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Condenser Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, cond.FanElecEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, cond.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, cond.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Refrigeration Air Chiller System Condenser Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, cond.ActualEvapPumpPower, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, cond.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Condenser Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, cond.EvapPumpConsumption, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, cond.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, cond.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Refrigeration Air Chiller System Condenser Basin Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, cond.BasinHeaterPower, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, cond.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Condenser Basin Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, cond.BasinHeaterConsumption, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, cond.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, cond.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Refrigeration Air Chiller System Condenser Evaporated Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, cond.EvapWaterConsumpRate, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, cond.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Condenser Evaporated Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, cond.EvapWaterConsumption, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, cond.Name, - {}, - "Water", - "REFRIGERATION", + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::Refrigeration, cond.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); } // Evaporative Condenser Variables if (cond.CondenserType == DataHeatBalance::RefrigCondenserType::Water) { SetupOutputVariable(state, "Refrigeration Air Chiller System Condenser Fluid Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, cond.MassFlowRate, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, @@ -9659,14 +9625,14 @@ void SetupReportInput(EnergyPlusData &state) SetupOutputVariable(state, "Refrigeration System Condenser Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, cond.CondLoad, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, cond.Name); SetupOutputVariable(state, "Refrigeration System Condenser Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, cond.CondEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -9675,42 +9641,42 @@ void SetupReportInput(EnergyPlusData &state) if (cond.CondenserType != DataHeatBalance::RefrigCondenserType::Cascade) { SetupOutputVariable(state, "Refrigeration System Condenser Total Recovered Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, cond.TotalHeatRecoveredLoad, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, cond.Name); SetupOutputVariable(state, "Refrigeration System Condenser Total Recovered Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, cond.TotalHeatRecoveredEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, cond.Name); SetupOutputVariable(state, "Refrigeration System Condenser Non Refrigeration Recovered Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, cond.ExternalHeatRecoveredLoad, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, cond.Name); SetupOutputVariable(state, "Refrigeration System Condenser Non Refrigeration Recovered Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, cond.ExternalEnergyRecovered, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, cond.Name); SetupOutputVariable(state, "Refrigeration System Condenser Defrost Recovered Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, cond.InternalHeatRecoveredLoad, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, cond.Name); SetupOutputVariable(state, "Refrigeration System Condenser Defrost Recovered Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, cond.InternalEnergyRecovered, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -9720,108 +9686,103 @@ void SetupReportInput(EnergyPlusData &state) if (cond.CondenserType == DataHeatBalance::RefrigCondenserType::Air) { SetupOutputVariable(state, "Refrigeration System Condenser Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, cond.ActualFanPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, cond.Name); SetupOutputVariable(state, "Refrigeration System Condenser Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, cond.FanElecEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, cond.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, cond.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); } // Air cooled if (cond.CondenserType == DataHeatBalance::RefrigCondenserType::Evap) { SetupOutputVariable(state, "Refrigeration System Condenser Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, cond.ActualFanPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, cond.Name); SetupOutputVariable(state, "Refrigeration System Condenser Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, cond.FanElecEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, cond.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, cond.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Refrigeration System Condenser Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, cond.ActualEvapPumpPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, cond.Name); SetupOutputVariable(state, "Refrigeration System Condenser Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, cond.EvapPumpConsumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, cond.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, cond.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Refrigeration System Condenser Basin Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, cond.BasinHeaterPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, cond.Name); SetupOutputVariable(state, "Refrigeration System Condenser Basin Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, cond.BasinHeaterConsumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, cond.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, cond.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Refrigeration System Condenser Evaporated Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, cond.EvapWaterConsumpRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, cond.Name); SetupOutputVariable(state, "Refrigeration System Condenser Evaporated Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, cond.EvapWaterConsumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, cond.Name, - {}, - "Water", - "REFRIGERATION", + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::Refrigeration, cond.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); } // Evaporative Condenser Variables if (cond.CondenserType == DataHeatBalance::RefrigCondenserType::Water) { SetupOutputVariable(state, "Refrigeration System Condenser Water Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, cond.MassFlowRate, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, @@ -9839,14 +9800,14 @@ void SetupReportInput(EnergyPlusData &state) if (cooler.subcoolerType == SubcoolerType::Mechanical) { SetupOutputVariable(state, "Refrigeration Air Chiller System Mechanical Subcooler Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, cooler.MechSCTransLoad, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, cooler.Name); SetupOutputVariable(state, "Refrigeration Air Chiller System Mechanical Subcooler Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, cooler.MechSCTransEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -9856,14 +9817,14 @@ void SetupReportInput(EnergyPlusData &state) if (cooler.subcoolerType == SubcoolerType::Mechanical) { SetupOutputVariable(state, "Refrigeration System Mechanical Subcooler Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, cooler.MechSCTransLoad, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, cooler.Name); SetupOutputVariable(state, "Refrigeration System Mechanical Subcooler Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, cooler.MechSCTransEnergy, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -9882,119 +9843,119 @@ void SetupReportInput(EnergyPlusData &state) // for both SingleStage and TwoStage systems (medium temperature loads present) SetupOutputVariable(state, "Refrigeration Transcritical System Total High Pressure Compressor Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.TotCompPowerHP, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Total High Pressure Compressor Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotCompElecConsumpHP, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, sys.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Total Compressor Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotCompElecConsump, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, sys.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Average COP", - OutputProcessor::Unit::W_W, + Constant::Units::W_W, sys.AverageCompressorCOP, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Medium Temperature Cases and Walk Ins Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.TotalCoolingLoadMT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Medium Temperature Cases and Walk Ins Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotalCoolingEnergyMT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, sys.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Total Cases and Walk Ins Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotalCoolingEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, sys.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Medium Temperature Suction Pipe Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.PipeHeatLoadMT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Medium Temperature Suction Pipe Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.PipeHeatEnergyMT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, sys.Name); SetupOutputVariable(state, "Refrigeration Transcritical System High Pressure Compressor Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.TotCompCapacityHP, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Transcritical System High Pressure Compressor Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotCompCoolingEnergyHP, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, sys.Name); // indiv compressors go to meter, not system sum SetupOutputVariable(state, "Refrigeration Transcritical System Net Rejected Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.NetHeatRejectLoad, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Net Rejected Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.NetHeatRejectEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, sys.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Estimated Refrigerant Inventory Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, sys.RefInventory, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Refrigerant Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, sys.RefMassFlowComps, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Medium Temperature Evaporating Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, sys.TEvapNeededMT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Medium Temperature Suction Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, sys.TCompInHP, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -10002,70 +9963,70 @@ void SetupReportInput(EnergyPlusData &state) if (sys.TransSysType == 2) { // for TwoStage system only (low temperature loads present) SetupOutputVariable(state, "Refrigeration Transcritical System Low Pressure Compressor Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.TotCompPowerLP, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Low Pressure Compressor Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotCompElecConsumpLP, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, sys.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Low Temperature Cases and Walk Ins Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.TotalCoolingLoadLT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Low Temperature Cases and Walk Ins Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotalCoolingEnergyLT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, sys.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Low Temperature Suction Pipe Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.PipeHeatLoadLT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Low Temperature Suction Pipe Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.PipeHeatEnergyLT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, sys.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Low Pressure Compressor Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, sys.TotCompCapacityLP, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Low Pressure Compressor Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, sys.TotCompCoolingEnergyLP, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, sys.Name); // indiv compressors go to meter, not system sum SetupOutputVariable(state, "Refrigeration Transcritical System Low Temperature Evaporating Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, sys.TEvapNeededLT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, sys.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Low Temperature Suction Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, sys.TCompInLP, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -10103,40 +10064,39 @@ void SetupReportInput(EnergyPlusData &state) if (Compressor(compNum).NumSysAttach == 1) { // only set up reports for compressors that are used once and only once SetupOutputVariable(state, "Refrigeration Compressor Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, Compressor(compNum).Power, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, Compressor(compNum).Name); SetupOutputVariable(state, "Refrigeration Compressor Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, Compressor(compNum).ElecConsumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, Compressor(compNum).Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, Compressor(compNum).EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Refrigeration Compressor Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, Compressor(compNum).Capacity, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, Compressor(compNum).Name); SetupOutputVariable(state, "Refrigeration Compressor Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, Compressor(compNum).CoolingEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, Compressor(compNum).Name); SetupOutputVariable(state, "Refrigeration Compressor Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, Compressor(compNum).LoadFactor, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -10151,40 +10111,39 @@ void SetupReportInput(EnergyPlusData &state) if (Compressor(compNum).NumSysAttach == 1) { // only set up reports for compressors that are used once and only once SetupOutputVariable(state, "Refrigeration Compressor Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, Compressor(compNum).Power, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, Compressor(compNum).Name); SetupOutputVariable(state, "Refrigeration Compressor Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, Compressor(compNum).ElecConsumption, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, Compressor(compNum).Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, Compressor(compNum).EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Refrigeration Compressor Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, Compressor(compNum).Capacity, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, Compressor(compNum).Name); SetupOutputVariable(state, "Refrigeration Compressor Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, Compressor(compNum).CoolingEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, Compressor(compNum).Name); SetupOutputVariable(state, "Refrigeration Compressor Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, Compressor(compNum).LoadFactor, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -10201,61 +10160,60 @@ void SetupReportInput(EnergyPlusData &state) // CurrentModuleObject='Refrigeration:GasCooler:AirCooled' SetupOutputVariable(state, "Refrigeration Transcritical System Gas Cooler Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, cooler.GasCoolerLoad, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, cooler.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Gas Cooler Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, cooler.GasCoolerEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, cooler.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Gas Cooler Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, cooler.ActualFanPower, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, cooler.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Gas Cooler Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, cooler.FanElecEnergy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, cooler.Name, - {}, - "ELECTRICITY", - "REFRIGERATION", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Refrigeration, cooler.EndUseSubcategory, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Refrigeration Transcritical System Gas Cooler Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, cooler.TGasCoolerOut, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, cooler.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Gas Cooler Outlet Pressure", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, cooler.PGasCoolerOut, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, cooler.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Gas Cooler Defrost Recovered Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, cooler.InternalHeatRecoveredLoad, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, cooler.Name); SetupOutputVariable(state, "Refrigeration Transcritical System Gas Cooler Defrost Recovered Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, cooler.InternalEnergyRecovered, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, diff --git a/src/EnergyPlus/RefrigeratedCase.hh b/src/EnergyPlus/RefrigeratedCase.hh index eedfa417959..f005f7bbfd5 100644 --- a/src/EnergyPlus/RefrigeratedCase.hh +++ b/src/EnergyPlus/RefrigeratedCase.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ReportCoilSelection.cc b/src/EnergyPlus/ReportCoilSelection.cc index d8945992ddc..515c5748730 100644 --- a/src/EnergyPlus/ReportCoilSelection.cc +++ b/src/EnergyPlus/ReportCoilSelection.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -50,6 +50,7 @@ #include // EnergyPlus Headers +#include #include #include #include @@ -149,7 +150,9 @@ void ReportCoilSelection::writeCoilSelectionOutput(EnergyPlusData &state) OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchHeatCoilAirloopName, c->coilName_, - c->airloopNum > 0 ? state.dataAirSystemsData->PrimaryAirSystems(c->airloopNum).Name : "N/A"); + c->airloopNum > 0 && c->airloopNum <= state.dataHVACGlobal->NumPrimaryAirSys + ? state.dataAirSystemsData->PrimaryAirSystems(c->airloopNum).Name + : "N/A"); OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchHeatCoilPlantloopName, c->coilName_, @@ -248,7 +251,9 @@ void ReportCoilSelection::writeCoilSelectionOutput(EnergyPlusData &state) OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchCoilAirloopName_CCs, c->coilName_, - c->airloopNum > 0 ? state.dataAirSystemsData->PrimaryAirSystems(c->airloopNum).Name : "N/A"); + c->airloopNum > 0 && c->airloopNum <= state.dataHVACGlobal->NumPrimaryAirSys + ? state.dataAirSystemsData->PrimaryAirSystems(c->airloopNum).Name + : "N/A"); OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchCoilPlantloopName_CCs, c->coilName_, c->plantLoopName); // end of std 229 New coil connections table entries @@ -543,7 +548,7 @@ void ReportCoilSelection::doAirLoopSetup(EnergyPlusData &state, int const coilVe { // this routine sets up some things for central air systems, needs to follow setting of an airloop num auto &c(coilSelectionDataObjs[coilVecIndex]); - if (c->airloopNum > 0 && allocated(state.dataAirSystemsData->PrimaryAirSystems)) { + if (c->airloopNum > 0 && c->airloopNum <= int(state.dataAirSystemsData->PrimaryAirSystems.size())) { // see if there is an OA controller if (state.dataAirSystemsData->PrimaryAirSystems(c->airloopNum).OASysExists) { // loop over OA controllers and match node num ? @@ -735,7 +740,12 @@ void ReportCoilSelection::doFinalProcessingOfCoilData(EnergyPlusData &state) } // if (zoneEquipList.numOfEquipTypes > 0) } // if (c->ZoneEqNum > 0) - if (c->airloopNum > 0 && c->zoneEqNum == 0) { + if (c->airloopNum > state.dataHVACGlobal->NumPrimaryAirSys && c->oASysNum > 0) { + c->coilLocation = "DOAS AirLoop"; + c->typeHVACname = "AirLoopHVAC:DedicatedOutdoorAirSystem"; + int DOASSysNum = state.dataAirLoop->OutsideAirSys(c->oASysNum).AirLoopDOASNum; + c->userNameforHVACsystem = state.dataAirLoopHVACDOAS->airloopDOAS[DOASSysNum].Name; + } else if (c->airloopNum > 0 && c->zoneEqNum == 0) { c->coilLocation = "AirLoop"; c->typeHVACname = "AirLoopHVAC"; c->userNameforHVACsystem = state.dataAirSystemsData->PrimaryAirSystems(c->airloopNum).Name; @@ -754,6 +764,10 @@ void ReportCoilSelection::doFinalProcessingOfCoilData(EnergyPlusData &state) c->coilSizingMethodConcurrenceName = "Non-Coincident"; } else if (c->coilSizingMethodConcurrence == DataSizing::Coincident) { c->coilSizingMethodConcurrenceName = "Coincident"; + } else if (c->coilSizingMethodConcurrence == DataSizing::Combination) { + c->coilSizingMethodConcurrenceName = "Combination"; + } else { + c->coilSizingMethodConcurrenceName = "N/A"; } if (c->coilSizingMethodCapacity == DataSizing::CoolingDesignCapacity) { @@ -1276,7 +1290,8 @@ void ReportCoilSelection::setCoilCoolingCapacity( // if ( c->zoneEqNum > 0 ) doZoneEqSetup( index ); c->oASysNum = curOASysNum; - if (curSysNum > 0 && c->zoneEqNum == 0 && allocated(state.dataSize->FinalSysSizing) && allocated(SysSizPeakDDNum)) { + if (curSysNum > 0 && c->zoneEqNum == 0 && allocated(state.dataSize->FinalSysSizing) && allocated(SysSizPeakDDNum) && + curSysNum <= state.dataHVACGlobal->NumPrimaryAirSys) { // These next blocks does not always work with SizingPeriod:WeatherFileDays or SizingPeriod:WeatherFileConditionType, protect against hard // crash @@ -1370,6 +1385,8 @@ void ReportCoilSelection::setCoilCoolingCapacity( c->rmSensibleAtPeak = finalSysSizing.SysCoolCoinSpaceSens; } else if (c->coilSizingMethodConcurrence == DataSizing::NonCoincident) { c->rmSensibleAtPeak = sumSensLoad; + } else { // DataSizing::Combination or other + c->rmSensibleAtPeak = sumSensLoad; } // now set Coil Ent And Lvg Conditions @@ -1494,6 +1511,41 @@ void ReportCoilSelection::setCoilCoolingCapacity( c->coilDesLvgWetBulb = Psychrometrics::PsyTwbFnTdbWPb( state, c->coilDesLvgTemp, c->coilDesLvgHumRat, state.dataEnvrn->StdBaroPress, "ReportCoilSelection::setCoilCoolingCapacity"); c->coilDesLvgEnth = Psychrometrics::PsyHFnTdbW(c->coilDesLvgTemp, c->coilDesLvgHumRat); + } else if (curOASysNum > 0 && c->airloopNum > state.dataHVACGlobal->NumPrimaryAirSys) { + if (!state.dataAirLoopHVACDOAS->airloopDOAS.empty()) { + int DOASSysNum = state.dataAirLoop->OutsideAirSys(curOASysNum).AirLoopDOASNum; + c->coilDesEntTemp = state.dataAirLoopHVACDOAS->airloopDOAS[DOASSysNum].SizingCoolOATemp; + c->coilDesEntHumRat = state.dataAirLoopHVACDOAS->airloopDOAS[DOASSysNum].SizingCoolOAHumRat; + if (c->coilDesEntTemp > -999.0 && c->coilDesEntHumRat > -999.0) { + c->coilDesEntWetBulb = Psychrometrics::PsyTwbFnTdbWPb( + state, c->coilDesEntTemp, c->coilDesEntHumRat, state.dataEnvrn->StdBaroPress, "ReportCoilSelection::setCoilCoolingCapacity"); + c->coilDesEntEnth = Psychrometrics::PsyHFnTdbW(c->coilDesEntTemp, c->coilDesEntHumRat); + } + c->coilDesLvgTemp = state.dataAirLoopHVACDOAS->airloopDOAS[DOASSysNum].PrecoolTemp; + c->coilDesLvgHumRat = state.dataAirLoopHVACDOAS->airloopDOAS[DOASSysNum].PrecoolHumRat; + if (c->coilDesLvgTemp > -999.0 && c->coilDesLvgHumRat > -999.0) { + c->coilDesLvgWetBulb = Psychrometrics::PsyTwbFnTdbWPb( + state, c->coilDesLvgTemp, c->coilDesLvgHumRat, state.dataEnvrn->StdBaroPress, "ReportCoilSelection::setCoilCoolingCapacity"); + c->coilDesLvgEnth = Psychrometrics::PsyHFnTdbW(c->coilDesLvgTemp, c->coilDesLvgHumRat); + } + int sizMethod = 0; + bool sizMethodsAreTheSame = true; + for (int airLoopNum = 0; airLoopNum < state.dataAirLoopHVACDOAS->airloopDOAS[DOASSysNum].NumOfAirLoops; ++airLoopNum) { + int actualAirLoopNum = state.dataAirLoopHVACDOAS->airloopDOAS[DOASSysNum].m_AirLoopNum[airLoopNum]; + if (airLoopNum == 0) { + sizMethod = state.dataSize->FinalSysSizing(actualAirLoopNum).SizingOption; + } else { + if (sizMethod != state.dataSize->FinalSysSizing(actualAirLoopNum).SizingOption) { + sizMethodsAreTheSame = false; + } + } + } + if (sizMethodsAreTheSame) { + c->coilSizingMethodConcurrence = sizMethod; + } else { + c->coilSizingMethodConcurrence = DataSizing::Combination; + } + } } else { // do nothing } @@ -1530,7 +1582,7 @@ void ReportCoilSelection::setCoilHeatingCapacity( doAirLoopSetup(state, index); c->zoneEqNum = curZoneEqNum; // if ( c->zoneEqNum > 0 ) doZoneEqSetup( index ); - if (curSysNum > 0 && c->zoneEqNum == 0 && allocated(state.dataSize->FinalSysSizing)) { + if (curSysNum > 0 && c->zoneEqNum == 0 && curSysNum <= int(state.dataSize->FinalSysSizing.size())) { auto &finalSysSizing = state.dataSize->FinalSysSizing(curSysNum); c->desDayNameAtSensPeak = finalSysSizing.HeatDesDay; @@ -1755,6 +1807,42 @@ void ReportCoilSelection::setCoilHeatingCapacity( c->coilDesLvgWetBulb = Psychrometrics::PsyTwbFnTdbWPb( state, c->coilDesLvgTemp, c->coilDesLvgHumRat, state.dataEnvrn->StdBaroPress, "ReportCoilSelection::setCoilHeatingCapacity"); c->coilDesLvgEnth = Psychrometrics::PsyHFnTdbW(c->coilDesLvgTemp, c->coilDesLvgHumRat); + } else if (curOASysNum > 0 && c->airloopNum > int(state.dataSize->FinalSysSizing.size())) { + if (!state.dataAirLoopHVACDOAS->airloopDOAS.empty()) { + c->oASysNum = curOASysNum; // where should this get set? It's -999 here. + int DOASSysNum = state.dataAirLoop->OutsideAirSys(curOASysNum).AirLoopDOASNum; + c->coilDesEntTemp = state.dataAirLoopHVACDOAS->airloopDOAS[DOASSysNum].HeatOutTemp; + c->coilDesEntHumRat = state.dataAirLoopHVACDOAS->airloopDOAS[DOASSysNum].HeatOutHumRat; + if (c->coilDesEntTemp > -999.0 && c->coilDesEntHumRat > -999.0) { + c->coilDesEntWetBulb = Psychrometrics::PsyTwbFnTdbWPb( + state, c->coilDesEntTemp, c->coilDesEntHumRat, state.dataEnvrn->StdBaroPress, "ReportCoilSelection::setCoilHeatingCapacity"); + c->coilDesEntEnth = Psychrometrics::PsyHFnTdbW(c->coilDesEntTemp, c->coilDesEntHumRat); + } + c->coilDesLvgTemp = state.dataAirLoopHVACDOAS->airloopDOAS[DOASSysNum].PreheatTemp; + c->coilDesLvgHumRat = state.dataAirLoopHVACDOAS->airloopDOAS[DOASSysNum].PreheatHumRat; + if (c->coilDesLvgTemp > -999.0 && c->coilDesLvgHumRat > -999.0) { + c->coilDesLvgWetBulb = Psychrometrics::PsyTwbFnTdbWPb( + state, c->coilDesLvgTemp, c->coilDesLvgHumRat, state.dataEnvrn->StdBaroPress, "ReportCoilSelection::setCoilHeatingCapacity"); + c->coilDesLvgEnth = Psychrometrics::PsyHFnTdbW(c->coilDesLvgTemp, c->coilDesLvgHumRat); + } + int sizMethod = 0; + bool sizMethodsAreTheSame = true; + for (int airLoopNum = 0; airLoopNum < state.dataAirLoopHVACDOAS->airloopDOAS[DOASSysNum].NumOfAirLoops; ++airLoopNum) { + int actualAirLoopNum = state.dataAirLoopHVACDOAS->airloopDOAS[DOASSysNum].m_AirLoopNum[airLoopNum]; + if (airLoopNum == 0) { + sizMethod = state.dataSize->FinalSysSizing(actualAirLoopNum).SizingOption; + } else { + if (sizMethod != state.dataSize->FinalSysSizing(actualAirLoopNum).SizingOption) { + sizMethodsAreTheSame = false; + } + } + } + if (sizMethodsAreTheSame) { + c->coilSizingMethodConcurrence = sizMethod; + } else { + c->coilSizingMethodConcurrence = DataSizing::Combination; + } + } } else { // do nothing } @@ -1772,7 +1860,7 @@ void ReportCoilSelection::setCoilHeatingCapacity( c->coilDesMassFlow = finalZoneSizing.DesHeatMassFlow; c->coilDesVolFlow = c->coilDesMassFlow / state.dataEnvrn->StdRhoAir; } - } else if (curSysNum > 0 && allocated(state.dataSize->FinalSysSizing)) { + } else if (curSysNum > 0 && curSysNum <= int(state.dataSize->FinalSysSizing.size())) { auto &finalSysSizing = state.dataSize->FinalSysSizing(curSysNum); if (curOASysNum > 0 && allocated(state.dataSize->OASysEqSizing)) { auto &oASysEqSizing = state.dataSize->OASysEqSizing(curSysNum); diff --git a/src/EnergyPlus/ReportCoilSelection.hh b/src/EnergyPlus/ReportCoilSelection.hh index f05b61810cc..97429355714 100644 --- a/src/EnergyPlus/ReportCoilSelection.hh +++ b/src/EnergyPlus/ReportCoilSelection.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ResultsFramework.cc b/src/EnergyPlus/ResultsFramework.cc index 01310891abb..fbb59577166 100644 --- a/src/EnergyPlus/ResultsFramework.cc +++ b/src/EnergyPlus/ResultsFramework.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -76,8 +76,6 @@ namespace EnergyPlus { namespace ResultsFramework { using namespace OutputProcessor; - using OutputProcessor::RealVariables; - using OutputProcessor::RealVariableType; // trim string std::string trim(std::string_view const s) @@ -158,75 +156,54 @@ namespace ResultsFramework { // Class Variable Variable::Variable(const std::string &VarName, - const OutputProcessor::ReportingFrequency reportFrequency, + const OutputProcessor::ReportFreq reportFrequency, const OutputProcessor::TimeStepType timeStepType, const int ReportID, - const OutputProcessor::Unit units) - : varName(VarName), m_timeStepType(timeStepType), rptID(ReportID), Units(units) + const Constant::Units units) + : m_varName(VarName), m_reportFreq(reportFrequency), m_timeStepType(timeStepType), m_rptID(ReportID), m_units(units) { - setReportFrequency(reportFrequency); } Variable::Variable(const std::string &VarName, - const OutputProcessor::ReportingFrequency reportFrequency, + const OutputProcessor::ReportFreq reportFrequency, const OutputProcessor::TimeStepType timeStepType, const int ReportID, - const OutputProcessor::Unit units, + const Constant::Units units, const std::string &customUnits) - : varName(VarName), m_timeStepType(timeStepType), rptID(ReportID), Units(units), m_customUnits(customUnits) + : m_varName(VarName), m_reportFreq(reportFrequency), m_timeStepType(timeStepType), m_rptID(ReportID), m_units(units), + m_customUnits(customUnits) { - setReportFrequency(reportFrequency); } std::string Variable::variableName() const { - return varName; + return m_varName; } void Variable::setVariableName(const std::string &VarName) { - varName = VarName; + m_varName = VarName; } std::string Variable::sReportFrequency() const { - return sReportFreq; + static constexpr std::array reportFreqStrings = { + "Detailed", "TimeStep", "Hourly", "Daily", "Monthly", "RunPeriod", "Yearly"}; + + static constexpr std::array timeStepTypeStrings = {"Detailed - Zone", "Detailed - HVAC"}; + + return (m_reportFreq == ReportFreq::EachCall) ? std::string(timeStepTypeStrings[(int)m_timeStepType]) + : std::string(reportFreqStrings[(int)m_reportFreq]); } - OutputProcessor::ReportingFrequency Variable::iReportFrequency() const + OutputProcessor::ReportFreq Variable::iReportFrequency() const { - return iReportFreq; + return m_reportFreq; } - void Variable::setReportFrequency(const OutputProcessor::ReportingFrequency reportFrequency) + void Variable::setReportFrequency(const OutputProcessor::ReportFreq reportFrequency) { - iReportFreq = reportFrequency; - switch (iReportFreq) { - case OutputProcessor::ReportingFrequency::EachCall: // each time UpdatedataandReport is called - if (m_timeStepType == OutputProcessor::TimeStepType::Zone) sReportFreq = "Detailed - Zone"; - if (m_timeStepType == OutputProcessor::TimeStepType::System) sReportFreq = "Detailed - HVAC"; - break; - case OutputProcessor::ReportingFrequency::TimeStep: // at 'EndTimeStepFlag' - sReportFreq = "TimeStep"; - break; - case OutputProcessor::ReportingFrequency::Hourly: // at 'EndHourFlag' - sReportFreq = "Hourly"; - break; - case OutputProcessor::ReportingFrequency::Daily: // at 'EndDayFlag' - sReportFreq = "Daily"; - break; - case OutputProcessor::ReportingFrequency::Monthly: // at end of month - sReportFreq = "Monthly"; - break; - case OutputProcessor::ReportingFrequency::Simulation: // once per environment 'EndEnvrnFlag' - sReportFreq = "RunPeriod"; - break; - case OutputProcessor::ReportingFrequency::Yearly: // once per environment 'EndEnvrnFlag' - sReportFreq = "Yearly"; - break; - default: - assert(false); - } + m_reportFreq = reportFrequency; } OutputProcessor::TimeStepType Variable::timeStepType() const @@ -241,22 +218,22 @@ namespace ResultsFramework { int Variable::reportID() const { - return rptID; + return m_rptID; } void Variable::setReportID(int Id) { - rptID = Id; + m_rptID = Id; } - OutputProcessor::Unit Variable::units() const + Constant::Units Variable::units() const { - return Units; + return m_units; } - void Variable::setUnits(const OutputProcessor::Unit units) + void Variable::setUnits(const Constant::Units units) { - Units = units; + m_units = units; } std::string Variable::customUnits() const @@ -271,45 +248,45 @@ namespace ResultsFramework { void Variable::pushValue(const double val) { - Values.push_back(val); + m_values.push_back(val); } double Variable::value(size_t index) const { - return Values.at(index); + return m_values.at(index); } size_t Variable::numValues() const { - return Values.size(); + return m_values.size(); } json Variable::getJSON() const { json root; if (m_customUnits.empty()) { - root = {{"Name", varName}, {"Units", unitEnumToString(Units)}, {"Frequency", sReportFreq}}; + root = {{"Name", m_varName}, {"Units", Constant::unitNames[(int)m_units]}, {"Frequency", sReportFrequency()}}; } else { - root = {{"Name", varName}, {"Units", m_customUnits}, {"Frequency", sReportFreq}}; + root = {{"Name", m_varName}, {"Units", m_customUnits}, {"Frequency", sReportFrequency()}}; } return root; } // Class OutputVariable OutputVariable::OutputVariable(const std::string &VarName, - const OutputProcessor::ReportingFrequency reportFrequency, + const OutputProcessor::ReportFreq reportFrequency, const OutputProcessor::TimeStepType timeStepType, const int ReportID, - const OutputProcessor::Unit units) + const Constant::Units units) : Variable(VarName, reportFrequency, timeStepType, ReportID, units) { } OutputVariable::OutputVariable(const std::string &VarName, - const OutputProcessor::ReportingFrequency reportFrequency, + const OutputProcessor::ReportFreq reportFrequency, const OutputProcessor::TimeStepType timeStepType, const int ReportID, - const OutputProcessor::Unit units, + const Constant::Units units, const std::string &customUnits) : Variable(VarName, reportFrequency, timeStepType, ReportID, units, customUnits) { @@ -317,9 +294,9 @@ namespace ResultsFramework { // Class MeterVariable MeterVariable::MeterVariable(const std::string &VarName, - const OutputProcessor::ReportingFrequency reportFrequency, + const OutputProcessor::ReportFreq reportFrequency, const int ReportID, - const OutputProcessor::Unit units, + const Constant::Units units, const bool MeterOnly, const bool Accumulative) : Variable(VarName, reportFrequency, OutputProcessor::TimeStepType::Zone, ReportID, units) @@ -409,43 +386,24 @@ namespace ResultsFramework { // TS.emplace_back(ts); // } - void DataFrame::setRDataFrameEnabled(bool state) - { - RDataFrameEnabled = state; - } - - void DataFrame::setIDataFrameEnabled(bool state) - { - IDataFrameEnabled = state; - } - - bool DataFrame::rDataFrameEnabled() const - { - return RDataFrameEnabled; - } - - bool DataFrame::iDataFrameEnabled() const + bool DataFrame::dataFrameEnabled() const { - return IDataFrameEnabled; - } - void DataFrame::setRVariablesScanned(bool state) - { - RVariablesScanned = state; + return DataFrameEnabled; } - void DataFrame::setIVariablesScanned(bool state) + void DataFrame::setDataFrameEnabled(bool state) { - IVariablesScanned = state; + DataFrameEnabled = state; } - bool DataFrame::rVariablesScanned() const + void DataFrame::setVariablesScanned(bool state) { - return RVariablesScanned; + VariablesScanned = state; } - bool DataFrame::iVariablesScanned() const + bool DataFrame::variablesScanned() const { - return IVariablesScanned; + return VariablesScanned; } void DataFrame::pushVariableValue(const int reportID, double value) @@ -470,7 +428,7 @@ namespace ResultsFramework { for (auto const &varMap : variableMap) { if (varMap.second.customUnits().empty()) { - cols.push_back({{"Variable", varMap.second.variableName()}, {"Units", unitEnumToString(varMap.second.units())}}); + cols.push_back({{"Variable", varMap.second.variableName()}, {"Units", Constant::unitNames[(int)varMap.second.units()]}}); } else { cols.push_back({{"Variable", varMap.second.variableName()}, {"Units", varMap.second.customUnits()}}); } @@ -513,7 +471,7 @@ namespace ResultsFramework { for (auto const &varMap : meterMap) { if (!(meterOnlyCheck && varMap.second.meterOnly())) { - cols.push_back({{"Variable", varMap.second.variableName()}, {"Units", unitEnumToString(varMap.second.units())}}); + cols.push_back({{"Variable", varMap.second.variableName()}, {"Units", Constant::unitNames[(int)varMap.second.units()]}}); } } @@ -752,10 +710,10 @@ namespace ResultsFramework { void CSVWriter::parseTSOutputs(EnergyPlusData &state, json const &data, std::vector const &outputVariables, - OutputProcessor::ReportingFrequency reportingFrequency) + OutputProcessor::ReportFreq reportingFrequency) { if (data.empty()) return; - updateReportingFrequency(reportingFrequency); + updateReportFreq(reportingFrequency); std::vector indices; std::unordered_set seen; std::string search_string; @@ -814,10 +772,10 @@ namespace ResultsFramework { } } - void CSVWriter::updateReportingFrequency(OutputProcessor::ReportingFrequency reportingFrequency) + void CSVWriter::updateReportFreq(OutputProcessor::ReportFreq reportingFrequency) { - if (reportingFrequency < smallestReportingFrequency) { - smallestReportingFrequency = reportingFrequency; + if (reportingFrequency < smallestReportFreq) { + smallestReportFreq = reportingFrequency; } } @@ -870,7 +828,7 @@ namespace ResultsFramework { for (auto &item : outputs) { std::string datetime = item.first; if (rewriteTimestamp) { - if (smallestReportingFrequency < OutputProcessor::ReportingFrequency::Monthly) { + if (smallestReportFreq < OutputProcessor::ReportFreq::Month) { datetime = datetime.replace(datetime.find(' '), 1, " "); } else { convertToMonth(datetime); @@ -973,344 +931,104 @@ namespace ResultsFramework { return outputMsgPack; } - void ResultsFramework::initializeRTSDataFrame(const OutputProcessor::ReportingFrequency reportFrequency, - const Array1D &RVariableTypes, - const int NumOfRVariable, - const OutputProcessor::TimeStepType timeStepType) - { - Reference RVar; - - for (int Loop = 1; Loop <= NumOfRVariable; ++Loop) { - RVar >>= RVariableTypes(Loop).VarPtr; - auto &rVar = RVar(); - if (rVar.Report && rVar.frequency == reportFrequency) { - Variable var; - if (RVariableTypes(Loop).units == OutputProcessor::Unit::customEMS) { - var = Variable(RVariableTypes(Loop).VarName, - reportFrequency, - RVariableTypes(Loop).timeStepType, - RVariableTypes(Loop).ReportID, - RVariableTypes(Loop).units, - RVariableTypes(Loop).unitNameCustomEMS); + void ResultsFramework::initializeTSDataFrame(const OutputProcessor::ReportFreq reportFrequency, + const std::vector &Variables, + const OutputProcessor::TimeStepType timeStepType) + { + for (auto *var : Variables) { + + if (var->Report && var->freq == reportFrequency) { + Variable rfvar; + if (var->units == Constant::Units::customEMS) { + rfvar = Variable(var->keyColonName, reportFrequency, var->timeStepType, var->ReportID, var->units, var->unitNameCustomEMS); } else { - var = Variable(RVariableTypes(Loop).VarName, - reportFrequency, - RVariableTypes(Loop).timeStepType, - RVariableTypes(Loop).ReportID, - RVariableTypes(Loop).units); + rfvar = Variable(var->keyColonName, reportFrequency, var->timeStepType, var->ReportID, var->units); } - switch (reportFrequency) { - case OutputProcessor::ReportingFrequency::EachCall: // each time UpdatedataandReport is called - if ((timeStepType == OutputProcessor::TimeStepType::Zone) && - (RVariableTypes(Loop).timeStepType == OutputProcessor::TimeStepType::Zone)) { - RIDetailedZoneTSData.setRDataFrameEnabled(true); - RIDetailedZoneTSData.addVariable(var); - } else if ((timeStepType == OutputProcessor::TimeStepType::System) && - (RVariableTypes(Loop).timeStepType == OutputProcessor::TimeStepType::System)) { - RIDetailedHVACTSData.setRDataFrameEnabled(true); - RIDetailedHVACTSData.addVariable(var); - } - break; - case OutputProcessor::ReportingFrequency::TimeStep: // at 'EndTimeStepFlag' - RITimestepTSData.setRDataFrameEnabled(true); - RITimestepTSData.addVariable(var); - break; - case OutputProcessor::ReportingFrequency::Hourly: // at 'EndHourFlag' - RIHourlyTSData.setRDataFrameEnabled(true); - RIHourlyTSData.addVariable(var); - break; - case OutputProcessor::ReportingFrequency::Daily: // at 'EndDayFlag' - RIDailyTSData.setRDataFrameEnabled(true); - RIDailyTSData.addVariable(var); - break; - case OutputProcessor::ReportingFrequency::Monthly: // at end of month - RIMonthlyTSData.setRDataFrameEnabled(true); - RIMonthlyTSData.addVariable(var); - break; - case OutputProcessor::ReportingFrequency::Simulation: // once per environment 'EndEnvrnFlag' - RIRunPeriodTSData.setRDataFrameEnabled(true); - RIRunPeriodTSData.addVariable(var); - break; - case OutputProcessor::ReportingFrequency::Yearly: // at end of year - RIYearlyTSData.setRDataFrameEnabled(true); - RIYearlyTSData.addVariable(var); - break; - default: - assert(false); - } - } - } - // set the scanned variables to true or false - switch (reportFrequency) { - case OutputProcessor::ReportingFrequency::EachCall: - if (timeStepType == OutputProcessor::TimeStepType::Zone) { - RIDetailedZoneTSData.setRVariablesScanned(true); - } else if (timeStepType == OutputProcessor::TimeStepType::System) { - RIDetailedHVACTSData.setRVariablesScanned(true); - } - break; - case OutputProcessor::ReportingFrequency::TimeStep: // at 'EndTimeStepFlag' - RITimestepTSData.setRVariablesScanned(true); - break; - case OutputProcessor::ReportingFrequency::Hourly: // at 'EndHourFlag' - RIHourlyTSData.setRVariablesScanned(true); - break; - case OutputProcessor::ReportingFrequency::Daily: // at 'EndDayFlag' - RIDailyTSData.setRVariablesScanned(true); - break; - case OutputProcessor::ReportingFrequency::Monthly: // at end of month - RIMonthlyTSData.setRVariablesScanned(true); - break; - case OutputProcessor::ReportingFrequency::Simulation: // once per environment 'EndEnvrnFlag' - RIRunPeriodTSData.setRVariablesScanned(true); - break; - case OutputProcessor::ReportingFrequency::Yearly: // at end of year - RIYearlyTSData.setRVariablesScanned(true); - break; - default: - assert(false); - } - } - void ResultsFramework::initializeITSDataFrame(const OutputProcessor::ReportingFrequency reportFrequency, - const Array1D &IVariableTypes, - const int NumOfIVariable, - const OutputProcessor::TimeStepType timeStepType) - { - Reference IVar; - - // loop over values to suck in var info - for (int Loop = 1; Loop <= NumOfIVariable; ++Loop) { - IVar >>= IVariableTypes(Loop).VarPtr; - auto &iVar = IVar(); - if (iVar.Report && iVar.frequency == reportFrequency) { - OutputVariable var(IVariableTypes(Loop).VarName, - reportFrequency, - IVariableTypes(Loop).timeStepType, - IVariableTypes(Loop).ReportID, - IVariableTypes(Loop).units); switch (reportFrequency) { - case OutputProcessor::ReportingFrequency::EachCall: // each time UpdatedataandReport is called - if ((timeStepType == OutputProcessor::TimeStepType::Zone) && - (IVariableTypes(Loop).timeStepType == OutputProcessor::TimeStepType::Zone)) { - RIDetailedZoneTSData.setIDataFrameEnabled(true); - RIDetailedZoneTSData.addVariable(var); - } else if ((timeStepType == OutputProcessor::TimeStepType::System) && - (IVariableTypes(Loop).timeStepType == OutputProcessor::TimeStepType::System)) { - RIDetailedHVACTSData.setIDataFrameEnabled(true); - RIDetailedHVACTSData.addVariable(var); + case OutputProcessor::ReportFreq::EachCall: { // each time UpdatedataandReport is called + if (timeStepType == var->timeStepType) { + detailedTSData[(int)timeStepType].setDataFrameEnabled(true); + detailedTSData[(int)timeStepType].addVariable(rfvar); } - break; - case OutputProcessor::ReportingFrequency::TimeStep: // at 'EndTimeStepFlag' - RITimestepTSData.setIDataFrameEnabled(true); - RITimestepTSData.addVariable(var); - break; - case OutputProcessor::ReportingFrequency::Hourly: // at 'EndHourFlag' - RIHourlyTSData.setIDataFrameEnabled(true); - RIHourlyTSData.addVariable(var); - break; - case OutputProcessor::ReportingFrequency::Daily: // at 'EndDayFlag' - RIDailyTSData.setIDataFrameEnabled(true); - RIDailyTSData.addVariable(var); - break; - case OutputProcessor::ReportingFrequency::Monthly: // at end of month - RIMonthlyTSData.setIDataFrameEnabled(true); - RIMonthlyTSData.addVariable(var); - break; - case OutputProcessor::ReportingFrequency::Simulation: // once per environment 'EndEnvrnFlag' - RIRunPeriodTSData.setIDataFrameEnabled(true); - RIRunPeriodTSData.addVariable(var); - break; - case OutputProcessor::ReportingFrequency::Yearly: // once per environment 'EndEnvrnFlag' - RIYearlyTSData.setIDataFrameEnabled(true); - RIYearlyTSData.addVariable(var); - break; - default: + } break; + case OutputProcessor::ReportFreq::Hour: // at 'EndHourFlag' + case OutputProcessor::ReportFreq::TimeStep: // at 'EndTimeStepFlag' + case OutputProcessor::ReportFreq::Day: // at 'EndDayFlag' + case OutputProcessor::ReportFreq::Month: // at 'EndMonthFlag' + case OutputProcessor::ReportFreq::Simulation: // once per environment 'EndEnvrnFlag' + case OutputProcessor::ReportFreq::Year: { // at end of year + freqTSData[(int)reportFrequency].setDataFrameEnabled(true); + freqTSData[(int)reportFrequency].addVariable(rfvar); + } break; + default: { assert(false); + } break; } } } - // set the scanned variables to true or false switch (reportFrequency) { - case OutputProcessor::ReportingFrequency::EachCall: - if (timeStepType == OutputProcessor::TimeStepType::Zone) { - RIDetailedZoneTSData.setIVariablesScanned(true); - } else if (timeStepType == OutputProcessor::TimeStepType::System) { - RIDetailedHVACTSData.setIVariablesScanned(true); - } - break; - case OutputProcessor::ReportingFrequency::TimeStep: // at 'EndTimeStepFlag' - RITimestepTSData.setIVariablesScanned(true); - break; - case OutputProcessor::ReportingFrequency::Hourly: // at 'EndHourFlag' - RIHourlyTSData.setIVariablesScanned(true); - break; - case OutputProcessor::ReportingFrequency::Daily: // at 'EndDayFlag' - RIDailyTSData.setIVariablesScanned(true); - break; - case OutputProcessor::ReportingFrequency::Monthly: // at end of month - RIMonthlyTSData.setIVariablesScanned(true); - break; - case OutputProcessor::ReportingFrequency::Simulation: // once per environment 'EndEnvrnFlag' - RIRunPeriodTSData.setIVariablesScanned(true); - break; - case OutputProcessor::ReportingFrequency::Yearly: // once per environment 'EndEnvrnFlag' - RIYearlyTSData.setIVariablesScanned(true); - break; - default: + case OutputProcessor::ReportFreq::EachCall: { + detailedTSData[(int)timeStepType].setVariablesScanned(true); + } break; + case OutputProcessor::ReportFreq::TimeStep: // at 'EndTimeStepFlag' + case OutputProcessor::ReportFreq::Hour: // at 'EndHourFlag' + case OutputProcessor::ReportFreq::Day: // at 'EndDayFlag' + case OutputProcessor::ReportFreq::Month: // at end of month + case OutputProcessor::ReportFreq::Simulation: // once per environment 'EndEnvrnFlag' + case OutputProcessor::ReportFreq::Year: { // at end of year + detailedTSData[(int)timeStepType].setVariablesScanned(true); + } break; + default: { assert(false); + } break; } } - void ResultsFramework::initializeMeters(const Array1D &EnergyMeters, - const OutputProcessor::ReportingFrequency reportFrequency) + void ResultsFramework::initializeMeters(const std::vector &meters, const OutputProcessor::ReportFreq freq) { - switch (reportFrequency) { - case OutputProcessor::ReportingFrequency::EachCall: + switch (freq) { + case OutputProcessor::ReportFreq::EachCall: { // nothing to do; meters are not reported at this frequency - break; - case OutputProcessor::ReportingFrequency::TimeStep: // at 'TimeStep' - for (int Loop = 1; Loop <= EnergyMeters.isize(); ++Loop) { - if (EnergyMeters(Loop).RptTS || EnergyMeters(Loop).RptTSFO) { - MeterVariable var( - EnergyMeters(Loop).Name, reportFrequency, EnergyMeters(Loop).TSRptNum, EnergyMeters(Loop).Units, EnergyMeters(Loop).RptTSFO); - TSMeters.addVariable(var); - TSMeters.setRDataFrameEnabled(true); - } - if (EnergyMeters(Loop).RptAccTS || EnergyMeters(Loop).RptAccTSFO) { - MeterVariable var(EnergyMeters(Loop).Name, - reportFrequency, - EnergyMeters(Loop).TSAccRptNum, - EnergyMeters(Loop).Units, - EnergyMeters(Loop).RptAccTSFO); - TSMeters.addVariable(var); - TSMeters.setRDataFrameEnabled(true); - } - } - break; - case OutputProcessor::ReportingFrequency::Hourly: // at 'Hourly' - for (int Loop = 1; Loop <= EnergyMeters.isize(); ++Loop) { - if (EnergyMeters(Loop).RptHR || EnergyMeters(Loop).RptHRFO) { - MeterVariable var( - EnergyMeters(Loop).Name, reportFrequency, EnergyMeters(Loop).HRRptNum, EnergyMeters(Loop).Units, EnergyMeters(Loop).RptHRFO); - HRMeters.addVariable(var); - HRMeters.setRDataFrameEnabled(true); + } break; + case OutputProcessor::ReportFreq::TimeStep: // at 'TimeStep' + case OutputProcessor::ReportFreq::Hour: // at 'Hourly' + case OutputProcessor::ReportFreq::Day: // at 'Daily' + case OutputProcessor::ReportFreq::Month: // at 'Monthly' + case OutputProcessor::ReportFreq::Simulation: // at 'RunPeriod'/'SM' + case OutputProcessor::ReportFreq::Year: { // at 'Yearly' + for (auto const *meter : meters) { + auto const &period = meter->periods[(int)freq]; + if (period.Rpt || period.RptFO) { + Meters[(int)freq].addVariable(MeterVariable(meter->Name, freq, period.RptNum, meter->units, period.RptFO)); + Meters[(int)freq].setDataFrameEnabled(true); } - if (EnergyMeters(Loop).RptAccHR || EnergyMeters(Loop).RptAccHRFO) { - MeterVariable var(EnergyMeters(Loop).Name, - reportFrequency, - EnergyMeters(Loop).HRAccRptNum, - EnergyMeters(Loop).Units, - EnergyMeters(Loop).RptAccHRFO); - HRMeters.addVariable(var); - HRMeters.setRDataFrameEnabled(true); + if (period.accRpt || period.accRptFO) { + Meters[(int)freq].addVariable(MeterVariable(meter->Name, freq, period.accRptNum, meter->units, period.accRptFO)); + Meters[(int)freq].setDataFrameEnabled(true); } } - break; - case OutputProcessor::ReportingFrequency::Daily: // at 'Daily' - for (int Loop = 1; Loop <= EnergyMeters.isize(); ++Loop) { - if (EnergyMeters(Loop).RptDY || EnergyMeters(Loop).RptDYFO) { - MeterVariable var( - EnergyMeters(Loop).Name, reportFrequency, EnergyMeters(Loop).DYRptNum, EnergyMeters(Loop).Units, EnergyMeters(Loop).RptDYFO); - DYMeters.addVariable(var); - DYMeters.setRDataFrameEnabled(true); - } - if (EnergyMeters(Loop).RptAccDY || EnergyMeters(Loop).RptAccDYFO) { - MeterVariable var(EnergyMeters(Loop).Name, - reportFrequency, - EnergyMeters(Loop).DYAccRptNum, - EnergyMeters(Loop).Units, - EnergyMeters(Loop).RptAccDYFO); - DYMeters.addVariable(var); - DYMeters.setRDataFrameEnabled(true); - } - } - break; - case OutputProcessor::ReportingFrequency::Monthly: // at 'Monthly' - for (int Loop = 1; Loop <= EnergyMeters.isize(); ++Loop) { - if (EnergyMeters(Loop).RptMN || EnergyMeters(Loop).RptMNFO) { - MeterVariable var( - EnergyMeters(Loop).Name, reportFrequency, EnergyMeters(Loop).MNRptNum, EnergyMeters(Loop).Units, EnergyMeters(Loop).RptMNFO); - MNMeters.addVariable(var); - MNMeters.setRDataFrameEnabled(true); - } - if (EnergyMeters(Loop).RptAccMN || EnergyMeters(Loop).RptAccMNFO) { - MeterVariable var(EnergyMeters(Loop).Name, - reportFrequency, - EnergyMeters(Loop).MNAccRptNum, - EnergyMeters(Loop).Units, - EnergyMeters(Loop).RptAccMNFO); - MNMeters.addVariable(var); - MNMeters.setRDataFrameEnabled(true); - } - } - break; - case OutputProcessor::ReportingFrequency::Simulation: // at 'RunPeriod'/'SM' - for (int Loop = 1; Loop <= EnergyMeters.isize(); ++Loop) { - if (EnergyMeters(Loop).RptSM || EnergyMeters(Loop).RptSMFO) { - MeterVariable var( - EnergyMeters(Loop).Name, reportFrequency, EnergyMeters(Loop).SMRptNum, EnergyMeters(Loop).Units, EnergyMeters(Loop).RptSMFO); - SMMeters.addVariable(var); - SMMeters.setRDataFrameEnabled(true); - } - if (EnergyMeters(Loop).RptAccSM || EnergyMeters(Loop).RptAccSMFO) { - MeterVariable var(EnergyMeters(Loop).Name, - reportFrequency, - EnergyMeters(Loop).SMAccRptNum, - EnergyMeters(Loop).Units, - EnergyMeters(Loop).RptAccSMFO); - SMMeters.addVariable(var); - SMMeters.setRDataFrameEnabled(true); - } - } - break; - case OutputProcessor::ReportingFrequency::Yearly: // at 'Yearly' - for (int Loop = 1; Loop <= EnergyMeters.isize(); ++Loop) { - if (EnergyMeters(Loop).RptYR || EnergyMeters(Loop).RptYRFO) { - MeterVariable var( - EnergyMeters(Loop).Name, reportFrequency, EnergyMeters(Loop).YRRptNum, EnergyMeters(Loop).Units, EnergyMeters(Loop).RptYRFO); - YRMeters.addVariable(var); - YRMeters.setRDataFrameEnabled(true); - } - if (EnergyMeters(Loop).RptAccYR || EnergyMeters(Loop).RptAccYRFO) { - MeterVariable var(EnergyMeters(Loop).Name, - reportFrequency, - EnergyMeters(Loop).YRAccRptNum, - EnergyMeters(Loop).Units, - EnergyMeters(Loop).RptAccDYFO); - YRMeters.addVariable(var); - YRMeters.setRDataFrameEnabled(true); - } - } - break; - default: + } break; + + default: { assert(false); - } + } break; + } // switch (frequency) // set the scanned variables to true or false - switch (reportFrequency) { - case OutputProcessor::ReportingFrequency::EachCall: + switch (freq) { + case OutputProcessor::ReportFreq::EachCall: // case should not happen in Meters break; - case OutputProcessor::ReportingFrequency::TimeStep: // at TimeStepFlag - TSMeters.setRVariablesScanned(true); - break; - case OutputProcessor::ReportingFrequency::Hourly: // at Hourly - HRMeters.setRVariablesScanned(true); - break; - case OutputProcessor::ReportingFrequency::Daily: // at Daily - DYMeters.setRVariablesScanned(true); - break; - case OutputProcessor::ReportingFrequency::Monthly: // at Monthly - MNMeters.setRVariablesScanned(true); - break; - case OutputProcessor::ReportingFrequency::Simulation: // at RunPeriod/SM - SMMeters.setRVariablesScanned(true); - break; - case OutputProcessor::ReportingFrequency::Yearly: // at Yearly - YRMeters.setRVariablesScanned(true); - break; + case OutputProcessor::ReportFreq::TimeStep: // at TimeStepFlag + case OutputProcessor::ReportFreq::Hour: // at Hourly + case OutputProcessor::ReportFreq::Day: // at Daily + case OutputProcessor::ReportFreq::Month: // at Monthly + case OutputProcessor::ReportFreq::Simulation: // at RunPeriod/SM + case OutputProcessor::ReportFreq::Year: { // at Yearly + Meters[(int)freq].setVariablesScanned(true); + } break; default: assert(false); } @@ -1333,80 +1051,32 @@ namespace ResultsFramework { void ResultsFramework::writeCSVOutput(EnergyPlusData &state) { + using OutputProcessor::ReportFreq; + if (!hasOutputData()) { return; } CSVWriter csv(outputVariables.size()); CSVWriter mtr_csv(outputVariables.size()); - // Output yearly time series data - if (hasRIYearlyTSData()) { - csv.parseTSOutputs(state, RIYearlyTSData.getJSON(), outputVariables, OutputProcessor::ReportingFrequency::Yearly); - } - - if (hasYRMeters()) { - csv.parseTSOutputs(state, YRMeters.getJSON(true), outputVariables, OutputProcessor::ReportingFrequency::Yearly); - mtr_csv.parseTSOutputs(state, YRMeters.getJSON(), outputVariables, OutputProcessor::ReportingFrequency::Yearly); - } - - // Output run period time series data - if (hasRIRunPeriodTSData()) { - csv.parseTSOutputs(state, RIRunPeriodTSData.getJSON(), outputVariables, OutputProcessor::ReportingFrequency::Simulation); - } - - if (hasSMMeters()) { - csv.parseTSOutputs(state, SMMeters.getJSON(true), outputVariables, OutputProcessor::ReportingFrequency::Simulation); - mtr_csv.parseTSOutputs(state, SMMeters.getJSON(), outputVariables, OutputProcessor::ReportingFrequency::Simulation); - } - - // Output monthly time series data - if (hasRIMonthlyTSData()) { - csv.parseTSOutputs(state, RIMonthlyTSData.getJSON(), outputVariables, OutputProcessor::ReportingFrequency::Monthly); - } - - if (hasMNMeters()) { - csv.parseTSOutputs(state, MNMeters.getJSON(true), outputVariables, OutputProcessor::ReportingFrequency::Monthly); - mtr_csv.parseTSOutputs(state, MNMeters.getJSON(), outputVariables, OutputProcessor::ReportingFrequency::Monthly); - } - - // Output daily time series data - if (hasRIDailyTSData()) { - csv.parseTSOutputs(state, RIDailyTSData.getJSON(), outputVariables, OutputProcessor::ReportingFrequency::Daily); - } - - if (hasDYMeters()) { - csv.parseTSOutputs(state, DYMeters.getJSON(true), outputVariables, OutputProcessor::ReportingFrequency::Daily); - mtr_csv.parseTSOutputs(state, DYMeters.getJSON(), outputVariables, OutputProcessor::ReportingFrequency::Daily); - } - - // Output hourly time series data - if (hasRIHourlyTSData()) { - csv.parseTSOutputs(state, RIHourlyTSData.getJSON(), outputVariables, OutputProcessor::ReportingFrequency::Hourly); - } - - if (hasHRMeters()) { - csv.parseTSOutputs(state, HRMeters.getJSON(true), outputVariables, OutputProcessor::ReportingFrequency::Hourly); - mtr_csv.parseTSOutputs(state, HRMeters.getJSON(), outputVariables, OutputProcessor::ReportingFrequency::Hourly); - } - - // Output timestep time series data - if (hasRITimestepTSData()) { - csv.parseTSOutputs(state, RITimestepTSData.getJSON(), outputVariables, OutputProcessor::ReportingFrequency::TimeStep); - } - - if (hasTSMeters()) { - csv.parseTSOutputs(state, TSMeters.getJSON(true), outputVariables, OutputProcessor::ReportingFrequency::TimeStep); - mtr_csv.parseTSOutputs(state, TSMeters.getJSON(), outputVariables, OutputProcessor::ReportingFrequency::TimeStep); - } + for (ReportFreq freq : + {ReportFreq::Year, ReportFreq::Simulation, ReportFreq::Month, ReportFreq::Day, ReportFreq::Hour, ReportFreq::TimeStep}) { + // Output yearly time series data + if (hasTSData(freq)) { + csv.parseTSOutputs(state, freqTSData[(int)freq].getJSON(), outputVariables, freq); + } - // Output detailed HVAC time series data - if (hasRIDetailedHVACTSData()) { - csv.parseTSOutputs(state, RIDetailedHVACTSData.getJSON(), outputVariables, OutputProcessor::ReportingFrequency::EachCall); + if (hasMeters(freq)) { + csv.parseTSOutputs(state, Meters[(int)freq].getJSON(true), outputVariables, freq); + mtr_csv.parseTSOutputs(state, Meters[(int)freq].getJSON(), outputVariables, freq); + } } - // Output detailed Zone time series data - if (hasRIDetailedZoneTSData()) { - csv.parseTSOutputs(state, RIDetailedZoneTSData.getJSON(), outputVariables, OutputProcessor::ReportingFrequency::EachCall); + for (TimeStepType timeStepType : {TimeStepType::System, TimeStepType::Zone}) { + // Output detailed HVAC time series data + if (hasDetailedTSData(timeStepType)) { + csv.parseTSOutputs(state, detailedTSData[(int)timeStepType].getJSON(), outputVariables, ReportFreq::EachCall); + } } csv.writeOutput(state, outputVariables, state.files.csv, state.files.outputControl.csv, rewriteTimestamp); @@ -1417,44 +1087,19 @@ namespace ResultsFramework { void ResultsFramework::writeTimeSeriesReports(JsonOutputFilePaths &jsonOutputFilePaths) { - // Output detailed Zone time series data - if (hasRIDetailedZoneTSData()) { - RIDetailedZoneTSData.writeReport(jsonOutputFilePaths, outputJSON, outputCBOR, outputMsgPack); - } - - // Output detailed HVAC time series data - if (hasRIDetailedHVACTSData()) { - RIDetailedHVACTSData.writeReport(jsonOutputFilePaths, outputJSON, outputCBOR, outputMsgPack); + // Output detailed Zone & HVAC time series data + for (TimeStepType timeStepType : {TimeStepType::Zone, TimeStepType::System}) { + if (hasDetailedTSData(timeStepType)) { + detailedTSData[(int)timeStepType].writeReport(jsonOutputFilePaths, outputJSON, outputCBOR, outputMsgPack); + } } // Output timestep time series data - if (hasRITimestepTSData()) { - RITimestepTSData.writeReport(jsonOutputFilePaths, outputJSON, outputCBOR, outputMsgPack); - } - - // Output hourly time series data - if (hasRIHourlyTSData()) { - RIHourlyTSData.writeReport(jsonOutputFilePaths, outputJSON, outputCBOR, outputMsgPack); - } - - // Output daily time series data - if (hasRIDailyTSData()) { - RIDailyTSData.writeReport(jsonOutputFilePaths, outputJSON, outputCBOR, outputMsgPack); - } - - // Output monthly time series data - if (hasRIMonthlyTSData()) { - RIMonthlyTSData.writeReport(jsonOutputFilePaths, outputJSON, outputCBOR, outputMsgPack); - } - - // Output run period time series data - if (hasRIRunPeriodTSData()) { - RIRunPeriodTSData.writeReport(jsonOutputFilePaths, outputJSON, outputCBOR, outputMsgPack); - } - - // Output yearly time series data - if (hasRIYearlyTSData()) { - RIYearlyTSData.writeReport(jsonOutputFilePaths, outputJSON, outputCBOR, outputMsgPack); + for (ReportFreq freq : + {ReportFreq::TimeStep, ReportFreq::Hour, ReportFreq::Day, ReportFreq::Month, ReportFreq::Simulation, ReportFreq::Year}) { + if (hasFreqTSData(freq)) { + freqTSData[(int)freq].writeReport(jsonOutputFilePaths, outputJSON, outputCBOR, outputMsgPack); + } } } @@ -1464,36 +1109,22 @@ namespace ResultsFramework { root = {{"SimulationResults", {{"Simulation", SimulationInformation.getJSON()}}}}; // output variables - if (hasRIDetailedZoneTSData()) { - outputVars["Detailed-Zone"] = RIDetailedZoneTSData.getVariablesJSON(); - } - - if (hasRIDetailedHVACTSData()) { - outputVars["Detailed-HVAC"] = RIDetailedHVACTSData.getVariablesJSON(); - } - - if (hasRITimestepTSData()) { - outputVars["TimeStep"] = RITimestepTSData.getVariablesJSON(); - } - if (hasRIHourlyTSData()) { - outputVars["Hourly"] = RIHourlyTSData.getVariablesJSON(); - } - - if (hasRIDailyTSData()) { - outputVars["Daily"], RIDailyTSData.getVariablesJSON(); - } - - if (hasRIMonthlyTSData()) { - outputVars["Monthly"] = RIMonthlyTSData.getVariablesJSON(); - } - - if (hasRIRunPeriodTSData()) { - outputVars["RunPeriod"] = RIRunPeriodTSData.getVariablesJSON(); + // This could be constexpr except that json maps do not take string_view keys + static std::array const timeStepStrings = {"Detailed-Zone", "Detailed-HVAC"}; + for (TimeStepType timeStep : {TimeStepType::Zone, TimeStepType::System}) { + if (hasDetailedTSData(timeStep)) { + outputVars[timeStepStrings[(int)timeStep]] = detailedTSData[(int)timeStep].getVariablesJSON(); + } } - if (hasRIYearlyTSData()) { - outputVars["Yearly"] = RIYearlyTSData.getVariablesJSON(); + // Same issue here + static std::array const freqStrings = {"Timestep", "Hourly", "Daily", "Monthly", "RunPeriod", "Yearly"}; + for (ReportFreq freq : + {ReportFreq::Year, ReportFreq::Simulation, ReportFreq::Month, ReportFreq::Day, ReportFreq::Hour, ReportFreq::TimeStep}) { + if (hasFreqTSData(freq)) { + outputVars[freqStrings[(int)freq]] = freqTSData[(int)freq].getVariablesJSON(); + } } // output dictionary @@ -1502,52 +1133,12 @@ namespace ResultsFramework { // meter variables // -- meter values - if (hasTSMeters()) { - meterVars["TimeStep"] = TSMeters.getVariablesJSON(); - } - - if (hasHRMeters()) { - meterVars["Hourly"] = HRMeters.getVariablesJSON(); - } - - if (hasDYMeters()) { - meterVars["Daily"] = DYMeters.getVariablesJSON(); - } - - if (hasMNMeters()) { - meterVars["Monthly"] = MNMeters.getVariablesJSON(); - } - - if (hasSMMeters()) { - meterVars["RunPeriod"] = SMMeters.getVariablesJSON(); - } - - if (hasYRMeters()) { - meterVars["Yearly"] = YRMeters.getVariablesJSON(); - } - - if (hasTSMeters()) { - meterData["TimeStep"] = TSMeters.getJSON(); - } - - if (hasHRMeters()) { - meterData["Hourly"] = HRMeters.getJSON(); - } - - if (hasDYMeters()) { - meterData["Daily"] = DYMeters.getJSON(); - } - - if (hasMNMeters()) { - meterData["Monthly"] = MNMeters.getJSON(); - } - - if (hasSMMeters()) { - meterData["RunPeriod"] = SMMeters.getJSON(); - } - - if (hasYRMeters()) { - meterData["Yearly"] = YRMeters.getJSON(); + for (ReportFreq freq : + {ReportFreq::Year, ReportFreq::Simulation, ReportFreq::Month, ReportFreq::Day, ReportFreq::Hour, ReportFreq::TimeStep}) { + if (hasMeters(freq)) { + meterVars[freqStrings[(int)freq]] = Meters[(int)freq].getVariablesJSON(); + meterData[freqStrings[(int)freq]] = Meters[(int)freq].getJSON(); + } } // -- meter dictionary @@ -1571,16 +1162,15 @@ namespace ResultsFramework { void ResultsFramework::addReportVariable(std::string_view const keyedValue, std::string_view const variableName, - std::string const &units, - OutputProcessor::ReportingFrequency const reportingInterval) + std::string_view const units, + OutputProcessor::ReportFreq const freq) { - outputVariables.emplace_back(fmt::format("{0}:{1} [{2}]({3})", keyedValue, variableName, units, reportingFrequency(reportingInterval))); + outputVariables.emplace_back(fmt::format("{0}:{1} [{2}]({3})", keyedValue, variableName, units, reportFreqNames[(int)freq])); } - void - ResultsFramework::addReportMeter(std::string const &meter, std::string const &units, OutputProcessor::ReportingFrequency const reportingInterval) + void ResultsFramework::addReportMeter(std::string const &meter, std::string_view units, OutputProcessor::ReportFreq const freq) { - outputVariables.emplace_back(fmt::format("{0} [{1}]({2})", meter, units, reportingFrequency(reportingInterval))); + outputVariables.emplace_back(fmt::format("{0} [{1}]({2})", meter, units, reportFreqNames[(int)freq])); } } // namespace ResultsFramework diff --git a/src/EnergyPlus/ResultsFramework.hh b/src/EnergyPlus/ResultsFramework.hh index 062a9c67d67..af9acf9b5e2 100644 --- a/src/EnergyPlus/ResultsFramework.hh +++ b/src/EnergyPlus/ResultsFramework.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -54,7 +54,6 @@ // ObjexxFCL Headers #include #include -#include #include @@ -76,6 +75,9 @@ namespace ResultsFramework { using json = nlohmann::json; + using OutputProcessor::ReportFreq; + using OutputProcessor::TimeStepType; + // trim string std::string trim(std::string_view const s); @@ -114,23 +116,23 @@ namespace ResultsFramework { public: Variable() = default; Variable(const std::string &VarName, - const OutputProcessor::ReportingFrequency reportFrequency, + const ReportFreq reportFrequency, const OutputProcessor::TimeStepType timeStepType, const int ReportID, - OutputProcessor::Unit units); + Constant::Units units); Variable(const std::string &VarName, - const OutputProcessor::ReportingFrequency reportFrequency, + const ReportFreq reportFrequency, const OutputProcessor::TimeStepType timeStepType, const int ReportID, - OutputProcessor::Unit units, + Constant::Units units, const std::string &customUnits); std::string variableName() const; void setVariableName(const std::string &VarName); std::string sReportFrequency() const; - OutputProcessor::ReportingFrequency iReportFrequency() const; - void setReportFrequency(const OutputProcessor::ReportingFrequency reportFrequency); + ReportFreq iReportFrequency() const; + void setReportFrequency(const ReportFreq reportFrequency); OutputProcessor::TimeStepType timeStepType() const; void setTimeStepType(const OutputProcessor::TimeStepType timeStepType); @@ -138,8 +140,8 @@ namespace ResultsFramework { int reportID() const; void setReportID(const int Id); - OutputProcessor::Unit units() const; - void setUnits(OutputProcessor::Unit units); + Constant::Units units() const; + void setUnits(Constant::Units units); std::string customUnits() const; void setCustomUnits(const std::string &customUnits); @@ -151,30 +153,29 @@ namespace ResultsFramework { virtual json getJSON() const; protected: - std::string varName; - std::string sReportFreq; - OutputProcessor::ReportingFrequency iReportFreq = OutputProcessor::ReportingFrequency::EachCall; + std::string m_varName; + ReportFreq m_reportFreq = ReportFreq::EachCall; OutputProcessor::TimeStepType m_timeStepType = OutputProcessor::TimeStepType::Zone; - int rptID = -1; - OutputProcessor::Unit Units; + int m_rptID = -1; + Constant::Units m_units; std::string m_customUnits; - std::vector Values; + std::vector m_values; }; class OutputVariable : public Variable { public: OutputVariable(const std::string &VarName, - const OutputProcessor::ReportingFrequency reportFrequency, + const ReportFreq reportFrequency, const OutputProcessor::TimeStepType timeStepType, const int ReportID, - OutputProcessor::Unit units); + Constant::Units units); OutputVariable(const std::string &VarName, - const OutputProcessor::ReportingFrequency reportFrequency, + const ReportFreq reportFrequency, const OutputProcessor::TimeStepType timeStepType, const int ReportID, - OutputProcessor::Unit units, + Constant::Units units, const std::string &customUnits); }; @@ -183,9 +184,9 @@ namespace ResultsFramework { public: MeterVariable() = default; MeterVariable(const std::string &VarName, - const OutputProcessor::ReportingFrequency reportFrequency, + const ReportFreq reportFrequency, const int ReportID, - OutputProcessor::Unit units, + Constant::Units units, const bool MeterOnly, const bool Acculumative = false); @@ -211,17 +212,13 @@ namespace ResultsFramework { void addVariable(Variable const &var); - void setRDataFrameEnabled(bool state); - void setIDataFrameEnabled(bool state); + void setDataFrameEnabled(bool state); - bool rDataFrameEnabled() const; - bool iDataFrameEnabled() const; + bool dataFrameEnabled() const; - void setRVariablesScanned(bool state); - void setIVariablesScanned(bool state); + void setVariablesScanned(bool state); - bool rVariablesScanned() const; - bool iVariablesScanned() const; + bool variablesScanned() const; void newRow(const int month, const int dayOfMonth, int hourOfDay, int curMin, int calendarYear); // void newRow(const std::string &ts); @@ -239,10 +236,8 @@ namespace ResultsFramework { bool beginningOfInterval = false; protected: - bool IDataFrameEnabled = false; - bool RDataFrameEnabled = false; - bool RVariablesScanned = false; - bool IVariablesScanned = false; + bool DataFrameEnabled = false; + bool VariablesScanned = false; int lastHour = 0; int lastMinute = 0; std::string ReportFrequency; @@ -337,22 +332,19 @@ namespace ResultsFramework { InputOutputFile &outputFile, bool outputControl, bool rewriteTimestamp); - void parseTSOutputs(EnergyPlusData &state, - json const &data, - std::vector const &outputVariables, - OutputProcessor::ReportingFrequency reportingFrequency); + void parseTSOutputs(EnergyPlusData &state, json const &data, std::vector const &outputVariables, ReportFreq reportingFrequency); private: friend class EnergyPlus::EnergyPlusFixture; friend class EnergyPlus::ResultsFrameworkFixture; char s[129] = {0}; - OutputProcessor::ReportingFrequency smallestReportingFrequency = OutputProcessor::ReportingFrequency::Yearly; + ReportFreq smallestReportFreq = ReportFreq::Year; std::map> outputs; std::vector outputVariableIndices; static std::string &convertToMonth(std::string &datetime); - void updateReportingFrequency(OutputProcessor::ReportingFrequency reportingFrequency); + void updateReportFreq(ReportFreq reportingFrequency); // void readRVI(); // void readMVI(); }; @@ -376,78 +368,61 @@ namespace ResultsFramework { bool MsgPackEnabled() const; - void initializeRTSDataFrame(const OutputProcessor::ReportingFrequency reportFrequency, - const Array1D &RVariableTypes, - const int NumOfRVariable, - const OutputProcessor::TimeStepType timeStepType = OutputProcessor::TimeStepType::Zone); - - void initializeITSDataFrame(const OutputProcessor::ReportingFrequency reportFrequency, - const Array1D &IVariableTypes, - const int NumOfIVariable, - const OutputProcessor::TimeStepType timeStepType = OutputProcessor::TimeStepType::Zone); - - void initializeMeters(const Array1D &EnergyMeters, const OutputProcessor::ReportingFrequency reportFrequency); - - DataFrame RIDetailedZoneTSData = DataFrame("Detailed-Zone"); - DataFrame RIDetailedHVACTSData = DataFrame("Detailed-HVAC"); - DataFrame RITimestepTSData = DataFrame("TimeStep"); - DataFrame RIHourlyTSData = DataFrame("Hourly"); - DataFrame RIDailyTSData = DataFrame("Daily"); - DataFrame RIMonthlyTSData = DataFrame("Monthly"); - DataFrame RIRunPeriodTSData = DataFrame("RunPeriod"); - DataFrame RIYearlyTSData = DataFrame("Yearly"); - MeterDataFrame TSMeters = MeterDataFrame("TimeStep"); - MeterDataFrame HRMeters = MeterDataFrame("Hourly"); - MeterDataFrame DYMeters = MeterDataFrame("Daily"); - MeterDataFrame MNMeters = MeterDataFrame("Monthly"); - MeterDataFrame SMMeters = MeterDataFrame("RunPeriod"); - MeterDataFrame YRMeters = MeterDataFrame("Yearly"); + void initializeTSDataFrame(const ReportFreq reportFrequency, + const std::vector &Variables, + const OutputProcessor::TimeStepType timeStepType = OutputProcessor::TimeStepType::Zone); + + void initializeMeters(const std::vector &EnergyMeters, const ReportFreq reportFrequency); + + std::array detailedTSData = {DataFrame("Dummy"), DataFrame("Detailed-Zone"), DataFrame("Detailed-HVAC")}; + + std::array freqTSData = {DataFrame("Each Call"), + DataFrame("TimeStep"), + DataFrame("Hourly"), + DataFrame("Daily"), + DataFrame("Monthly"), + DataFrame("RunPeriod"), + DataFrame("Yearly")}; + + std::array Meters = {MeterDataFrame("Each Call"), + MeterDataFrame("TimeStep"), + MeterDataFrame("Hourly"), + MeterDataFrame("Daily"), + MeterDataFrame("Monthly"), + MeterDataFrame("RunPeriod"), + MeterDataFrame("Yearly")}; void setISO8601(const bool value) { rewriteTimestamp = !value; - RIDetailedZoneTSData.iso8601 = value; - RIDetailedHVACTSData.iso8601 = value; - RITimestepTSData.iso8601 = value; - RIHourlyTSData.iso8601 = value; - RIDailyTSData.iso8601 = value; - RIMonthlyTSData.iso8601 = value; - RIRunPeriodTSData.iso8601 = value; - RIYearlyTSData.iso8601 = value; - TSMeters.iso8601 = value; - HRMeters.iso8601 = value; - DYMeters.iso8601 = value; - MNMeters.iso8601 = value; - SMMeters.iso8601 = value; - YRMeters.iso8601 = value; + for (int iTimeStep = (int)TimeStepType::Zone; iTimeStep < (int)TimeStepType::Num; ++iTimeStep) { + detailedTSData[iTimeStep].iso8601 = value; + } + + for (int iFreq = (int)ReportFreq::TimeStep; iFreq < (int)ReportFreq::Num; ++iFreq) { + freqTSData[iFreq].iso8601 = Meters[iFreq].iso8601 = value; + } } void setBeginningOfInterval(const bool value) { - RIDetailedZoneTSData.beginningOfInterval = value; - RIDetailedHVACTSData.beginningOfInterval = value; - RITimestepTSData.beginningOfInterval = value; - RIHourlyTSData.beginningOfInterval = value; - RIDailyTSData.beginningOfInterval = value; - RIMonthlyTSData.beginningOfInterval = value; - RIRunPeriodTSData.beginningOfInterval = value; - RIYearlyTSData.beginningOfInterval = value; - TSMeters.beginningOfInterval = value; - HRMeters.beginningOfInterval = value; - DYMeters.beginningOfInterval = value; - MNMeters.beginningOfInterval = value; - SMMeters.beginningOfInterval = value; - YRMeters.beginningOfInterval = value; + for (int iTimeStep = 0; iTimeStep < (int)TimeStepType::Num; ++iTimeStep) { + detailedTSData[iTimeStep].beginningOfInterval = value; + } + + for (int iFreq = 0; iFreq < (int)ReportFreq::Num; ++iFreq) { + freqTSData[iFreq].beginningOfInterval = Meters[iFreq].beginningOfInterval = value; + } } void writeOutputs(EnergyPlusData &state); void addReportVariable(std::string_view const keyedValue, std::string_view const variableName, - std::string const &units, - OutputProcessor::ReportingFrequency const reportingInterval); + std::string_view const units, + ReportFreq const reportingInterval); - void addReportMeter(std::string const &meter, std::string const &units, OutputProcessor::ReportingFrequency const reportingInterval); + void addReportMeter(std::string const &meter, std::string_view const units, ReportFreq const reportingInterval); SimInfo SimulationInformation; @@ -475,90 +450,118 @@ namespace ResultsFramework { friend class EnergyPlus::ResultsFrameworkFixture; protected: + inline bool hasDetailedTSData(TimeStepType timeStepType) const + { + return detailedTSData[(int)timeStepType].dataFrameEnabled(); + } + + inline bool hasFreqTSData(ReportFreq freq) const + { + return freqTSData[(int)freq].dataFrameEnabled(); + } + +#ifdef GET_OUT inline bool hasRIDetailedZoneTSData() const { - return RIDetailedZoneTSData.iDataFrameEnabled() || RIDetailedZoneTSData.rDataFrameEnabled(); + return detailedTSData[(int)TimeStepType::Zone].iDataFrameEnabled() || detailedTSData[(int)TimeStepType::Zone].rDataFrameEnabled(); }; inline bool hasRIDetailedHVACTSData() const { - return RIDetailedHVACTSData.iDataFrameEnabled() || RIDetailedHVACTSData.rDataFrameEnabled(); + return detailedTSData[(int)TimeStepType::System].iDataFrameEnabled() || detailedTSData[(int)TimeStepType::System].rDataFrameEnabled(); }; + // This API can be condensed in an obvious way inline bool hasRITimestepTSData() const { - return RITimestepTSData.iDataFrameEnabled() || RITimestepTSData.rDataFrameEnabled(); + return freqTSData[(int)ReportFreq::TimeStep].iDataFrameEnabled() || freqTSData[(int)ReportFreq::TimeStep].rDataFrameEnabled(); }; inline bool hasRIHourlyTSData() const { - return RIHourlyTSData.iDataFrameEnabled() || RIHourlyTSData.rDataFrameEnabled(); + return freqTSData[(int)ReportFreq::Hour].iDataFrameEnabled() || freqTSData[(int)ReportFreq::Hour].rDataFrameEnabled(); }; inline bool hasRIDailyTSData() const { - return RIDailyTSData.iDataFrameEnabled() || RIDailyTSData.rDataFrameEnabled(); + return freqTSData[(int)ReportFreq::Day].iDataFrameEnabled() || freqTSData[(int)ReportFreq::Day].rDataFrameEnabled(); }; inline bool hasRIMonthlyTSData() const { - return RIMonthlyTSData.iDataFrameEnabled() || RIMonthlyTSData.rDataFrameEnabled(); + return freqTSData[(int)ReportFreq::Month].iDataFrameEnabled() || freqTSData[(int)ReportFreq::Month].rDataFrameEnabled(); }; inline bool hasRIRunPeriodTSData() const { - return RIRunPeriodTSData.iDataFrameEnabled() || RIRunPeriodTSData.rDataFrameEnabled(); + return freqTSData[(int)ReportFreq::Simulation].iDataFrameEnabled() || freqTSData[(int)ReportFreq::Simulation].rDataFrameEnabled(); }; inline bool hasRIYearlyTSData() const { - return RIYearlyTSData.iDataFrameEnabled() || RIYearlyTSData.rDataFrameEnabled(); + return freqTSData[(int)ReportFreq::Year].iDataFrameEnabled() || freqTSData[(int)ReportFreq::Year].rDataFrameEnabled(); }; inline bool hasTSMeters() const { - return TSMeters.rDataFrameEnabled(); + return Meters[(int)ReportFreq::TimeStep].dataFrameEnabled(); }; inline bool hasHRMeters() const { - return HRMeters.rDataFrameEnabled(); + return Meters[(int)ReportFreq::Hour].dataFrameEnabled(); }; inline bool hasDYMeters() const { - return DYMeters.rDataFrameEnabled(); + return Meters[(int)ReportFreq::Day].dataFrameEnabled(); }; inline bool hasMNMeters() const { - return MNMeters.rDataFrameEnabled(); + return Meters[(int)ReportFreq::Month].dataFrameEnabled(); }; inline bool hasSMMeters() const { - return SMMeters.rDataFrameEnabled(); + return Meters[(int)ReportFreq::Simulation].dataFrameEnabled(); }; inline bool hasYRMeters() const { - return YRMeters.rDataFrameEnabled(); + return Meters[(int)ReportFreq::Year].dataFrameEnabled(); }; +#endif // + inline bool hasMeters(ReportFreq freq) const + { + return Meters[(int)freq].dataFrameEnabled(); + } + inline bool hasMeterData() const { - return hasTSMeters() || hasHRMeters() || hasDYMeters() || hasMNMeters() || hasSMMeters() || hasYRMeters(); + return hasMeters(ReportFreq::TimeStep) || hasMeters(ReportFreq::Hour) || hasMeters(ReportFreq::Day) || hasMeters(ReportFreq::Month) || + hasMeters(ReportFreq::Simulation) || hasMeters(ReportFreq::Year); }; - inline bool hasTSData() const + inline bool hasTSData(ReportFreq freq, TimeStepType timeStepType = TimeStepType::Invalid) const { - return hasRIDetailedZoneTSData() || hasRIDetailedHVACTSData() || hasRITimestepTSData() || hasRIHourlyTSData() || hasRIDailyTSData() || - hasRIMonthlyTSData() || hasRIRunPeriodTSData() || hasRIYearlyTSData(); + assert(freq != ReportFreq::Invalid && (freq != ReportFreq::EachCall || timeStepType != TimeStepType::Invalid)); + return (freq == ReportFreq::EachCall) ? detailedTSData[(int)timeStepType].dataFrameEnabled() : freqTSData[(int)freq].dataFrameEnabled(); + }; + + inline bool hasAnyTSData() const + { + for (int iTimeStep = 0; iTimeStep < (int)TimeStepType::Num; ++iTimeStep) + if (detailedTSData[iTimeStep].dataFrameEnabled()) return true; + for (int iFreq = (int)ReportFreq::TimeStep; iFreq < (int)ReportFreq::Num; ++iFreq) + if (freqTSData[iFreq].dataFrameEnabled()) return true; + return false; }; inline bool hasOutputData() const { - return hasTSData() || hasMeterData(); + return hasAnyTSData() || hasMeterData(); }; }; @@ -571,35 +574,12 @@ struct ResultsFrameworkData : BaseGlobalStruct void clear_state() override { - this->resultsFramework->DYMeters.setRDataFrameEnabled(false); - this->resultsFramework->DYMeters.setRVariablesScanned(false); - this->resultsFramework->DYMeters.setIVariablesScanned(false); - this->resultsFramework->DYMeters.setIDataFrameEnabled(false); - - this->resultsFramework->TSMeters.setRVariablesScanned(false); - this->resultsFramework->TSMeters.setRDataFrameEnabled(false); - this->resultsFramework->TSMeters.setIDataFrameEnabled(false); - this->resultsFramework->TSMeters.setIVariablesScanned(false); - - this->resultsFramework->HRMeters.setRVariablesScanned(false); - this->resultsFramework->HRMeters.setRDataFrameEnabled(false); - this->resultsFramework->HRMeters.setIDataFrameEnabled(false); - this->resultsFramework->HRMeters.setIVariablesScanned(false); - - this->resultsFramework->MNMeters.setRVariablesScanned(false); - this->resultsFramework->MNMeters.setRDataFrameEnabled(false); - this->resultsFramework->MNMeters.setIDataFrameEnabled(false); - this->resultsFramework->MNMeters.setIVariablesScanned(false); - - this->resultsFramework->SMMeters.setRVariablesScanned(false); - this->resultsFramework->SMMeters.setRDataFrameEnabled(false); - this->resultsFramework->SMMeters.setIDataFrameEnabled(false); - this->resultsFramework->SMMeters.setIVariablesScanned(false); - - this->resultsFramework->YRMeters.setRVariablesScanned(false); - this->resultsFramework->YRMeters.setRDataFrameEnabled(false); - this->resultsFramework->YRMeters.setIDataFrameEnabled(false); - this->resultsFramework->YRMeters.setIVariablesScanned(false); + using OutputProcessor::ReportFreq; + for (int iFreq = (int)ReportFreq::TimeStep; iFreq < (int)ReportFreq::Num; ++iFreq) { + auto &meters = this->resultsFramework->Meters[iFreq]; + meters.setDataFrameEnabled(false); + meters.setVariablesScanned(false); + } } }; diff --git a/src/EnergyPlus/ReturnAirPathManager.cc b/src/EnergyPlus/ReturnAirPathManager.cc index 815ff2de4ea..688d92ed54f 100644 --- a/src/EnergyPlus/ReturnAirPathManager.cc +++ b/src/EnergyPlus/ReturnAirPathManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ReturnAirPathManager.hh b/src/EnergyPlus/ReturnAirPathManager.hh index dd45d2de77f..c3c6ac16dbe 100644 --- a/src/EnergyPlus/ReturnAirPathManager.hh +++ b/src/EnergyPlus/ReturnAirPathManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/RoomAirModelAirflowNetwork.cc b/src/EnergyPlus/RoomAirModelAirflowNetwork.cc index 2ca2d85fd35..eff37e6b939 100644 --- a/src/EnergyPlus/RoomAirModelAirflowNetwork.cc +++ b/src/EnergyPlus/RoomAirModelAirflowNetwork.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -196,28 +196,28 @@ namespace RoomAir { SetupOutputVariable(state, "RoomAirflowNetwork Node NonAirSystemResponse", - OutputProcessor::Unit::W, + Constant::Units::W, afnNode.NonAirSystemResponse, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, afnNode.Name); SetupOutputVariable(state, "RoomAirflowNetwork Node SysDepZoneLoadsLagged", - OutputProcessor::Unit::W, + Constant::Units::W, afnNode.SysDepZoneLoadsLagged, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, afnNode.Name); SetupOutputVariable(state, "RoomAirflowNetwork Node SumIntSensibleGain", - OutputProcessor::Unit::W, + Constant::Units::W, afnNode.SumIntSensibleGain, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, afnNode.Name); SetupOutputVariable(state, "RoomAirflowNetwork Node SumIntLatentGain", - OutputProcessor::Unit::W, + Constant::Units::W, afnNode.SumIntLatentGain, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, @@ -339,14 +339,14 @@ namespace RoomAir { } SetupOutputVariable(state, "RoomAirflowNetwork Node HVAC Supply Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, afnHVAC.SupplyFraction, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, afnHVAC.Name); SetupOutputVariable(state, "RoomAirflowNetwork Node HVAC Return Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, afnHVAC.ReturnFraction, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/RoomAirModelAirflowNetwork.hh b/src/EnergyPlus/RoomAirModelAirflowNetwork.hh index 3e4db9ce82f..f2675cc1382 100644 --- a/src/EnergyPlus/RoomAirModelAirflowNetwork.hh +++ b/src/EnergyPlus/RoomAirModelAirflowNetwork.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/RoomAirModelManager.cc b/src/EnergyPlus/RoomAirModelManager.cc index ab60a784d32..d7aa8ac9986 100644 --- a/src/EnergyPlus/RoomAirModelManager.cc +++ b/src/EnergyPlus/RoomAirModelManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -1720,21 +1720,21 @@ namespace RoomAir { auto &roomAFNZoneNode = roomAFNZoneInfo.Node(iAirNode); SetupOutputVariable(state, "RoomAirflowNetwork Node Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, roomAFNZoneNode.AirTemp, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, roomAFNZoneNode.Name); SetupOutputVariable(state, "RoomAirflowNetwork Node Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, roomAFNZoneNode.HumRat, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, roomAFNZoneNode.Name); SetupOutputVariable(state, "RoomAirflowNetwork Node Relative Humidity", - OutputProcessor::Unit::Perc, + Constant::Units::Perc, roomAFNZoneNode.RelHumidity, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, @@ -2137,70 +2137,70 @@ namespace RoomAir { // CurrentModuleObject='RoomAirSettings:ThreeNodeDisplacementVentilation' SetupOutputVariable(state, "Room Air Zone Mixed Subzone Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataRoomAir->ZTMX(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, state.dataHeatBal->Zone(iZone).Name); SetupOutputVariable(state, "Room Air Zone Occupied Subzone Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataRoomAir->ZTOC(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, state.dataHeatBal->Zone(iZone).Name); SetupOutputVariable(state, "Room Air Zone Floor Subzone Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataRoomAir->ZTFloor(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, state.dataHeatBal->Zone(iZone).Name); SetupOutputVariable(state, "Room Air Zone Transition Height", - OutputProcessor::Unit::m, + Constant::Units::m, state.dataRoomAir->HeightTransition(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, state.dataHeatBal->Zone(iZone).Name); SetupOutputVariable(state, "Room Air Zone Recommended Minimum Flow Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataRoomAir->FracMinFlow(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, state.dataHeatBal->Zone(iZone).Name); SetupOutputVariable(state, "Room Air Zone Is Mixed Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataRoomAir->ZoneDispVent3NodeMixedFlagRep(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, state.dataHeatBal->Zone(iZone).Name); SetupOutputVariable(state, "Room Air Zone Average Temperature Gradient", - OutputProcessor::Unit::K_m, + Constant::Units::K_m, state.dataRoomAir->AvgTempGrad(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, state.dataHeatBal->Zone(iZone).Name); SetupOutputVariable(state, "Room Air Zone Maximum Temperature Gradient", - OutputProcessor::Unit::K_m, + Constant::Units::K_m, state.dataRoomAir->MaxTempGrad(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, state.dataHeatBal->Zone(iZone).Name); SetupOutputVariable(state, "Room Air Zone Thermal Comfort Effective Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataRoomAir->TCMF(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, state.dataHeatBal->Zone(iZone).Name); SetupOutputVariable(state, "Room Air Zone Thermostat Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBalFanSys->TempTstatAir(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, @@ -2230,70 +2230,70 @@ namespace RoomAir { // CurrentModuleObject='RoomAirSettings:UnderFloorAirDistributionInterior' SetupOutputVariable(state, "Room Air Zone Mixed Subzone Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataRoomAir->ZTMX(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Room Air Zone Occupied Subzone Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataRoomAir->ZTOC(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Room Air Zone Transition Height", - OutputProcessor::Unit::m, + Constant::Units::m, state.dataRoomAir->HeightTransition(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Room Air Zone Is Mixed Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataRoomAir->ZoneUFADMixedFlagRep(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Room Air Zone Average Temperature Gradient", - OutputProcessor::Unit::K_m, + Constant::Units::K_m, state.dataRoomAir->AvgTempGrad(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Room Air Zone Effective Comfort Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataRoomAir->TCMF(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Room Air Zone Thermostat Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBalFanSys->TempTstatAir(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Room Air Zone Transition Height Gamma Value", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataRoomAir->ZoneUFADGamma(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Room Air Zone Plume Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataRoomAir->ZoneUFADPowInPlumes(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Room Air Zone Temperature Stratification Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataRoomAir->Phi(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, @@ -2309,77 +2309,77 @@ namespace RoomAir { auto const &zone = state.dataHeatBal->Zone(iZone); SetupOutputVariable(state, "Room Air Zone Mixed Subzone Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataRoomAir->ZTMX(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Room Air Zone Occupied Subzone Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataRoomAir->ZTOC(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Room Air Zone Transition Height", - OutputProcessor::Unit::m, + Constant::Units::m, state.dataRoomAir->HeightTransition(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Room Air Zone Is Mixed Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataRoomAir->ZoneUFADMixedFlagRep(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Room Air Zone Average Temperature Gradient", - OutputProcessor::Unit::K_m, + Constant::Units::K_m, state.dataRoomAir->AvgTempGrad(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Room Air Zone Effective Comfort Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataRoomAir->TCMF(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Room Air Zone Thermostat Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBalFanSys->TempTstatAir(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Room Air Zone Transition Height Gamma Value", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataRoomAir->ZoneUFADGamma(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Room Air Zone Plume Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataRoomAir->ZoneUFADPowInPlumes(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Room Air Zone Window Plume Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataRoomAir->ZoneUFADPowInPlumesfromWindows(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Room Air Zone Temperature Stratification Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataRoomAir->Phi(iZone), OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, @@ -2452,63 +2452,63 @@ namespace RoomAir { // CurrentModuleObject='RoomAirSettings:CrossVentilation' SetupOutputVariable(state, "Room Air Zone Jet Region Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataRoomAir->ZTJET(iZone), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, zone.Name); SetupOutputVariable(state, "Room Air Zone Recirculation Region Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataRoomAir->ZTREC(iZone), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, zone.Name); SetupOutputVariable(state, "Room Air Zone Jet Region Average Air Velocity", - OutputProcessor::Unit::m_s, + Constant::Units::m_s, state.dataRoomAir->Ujet(iZone), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, zone.Name); SetupOutputVariable(state, "Room Air Zone Recirculation Region Average Air Velocity", - OutputProcessor::Unit::m_s, + Constant::Units::m_s, state.dataRoomAir->Urec(iZone), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, zone.Name); SetupOutputVariable(state, "Room Air Zone Recirculation and Inflow Rate Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataRoomAir->RecInflowRatio(iZone), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, zone.Name); SetupOutputVariable(state, "Room Air Zone Inflow Opening Area", - OutputProcessor::Unit::m2, + Constant::Units::m2, state.dataRoomAir->Ain(iZone), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, zone.Name); SetupOutputVariable(state, "Room Air Zone Room Length", - OutputProcessor::Unit::m, + Constant::Units::m, state.dataRoomAir->Dstar(iZone), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, zone.Name); SetupOutputVariable(state, "Room Air Zone Is Mixing Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataRoomAir->ZoneCrossVentIsMixing(iZone), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, zone.Name); SetupOutputVariable(state, "Room Air Zone Is Recirculating Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataRoomAir->ZoneCrossVentHasREC(iZone), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -2518,7 +2518,7 @@ namespace RoomAir { if (state.afn->AirflowNetworkCompData(N).CompTypeNum == AirflowNetwork::iComponentTypeNum::DOP) { SetupOutputVariable(state, "Room Air Window Jet Region Average Air Velocity", - OutputProcessor::Unit::m_s, + Constant::Units::m_s, state.dataRoomAir->CrossVentJetRecFlows(i, iZone).Ujet, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/RoomAirModelManager.hh b/src/EnergyPlus/RoomAirModelManager.hh index b01b6952ff1..3b5f3b9751d 100644 --- a/src/EnergyPlus/RoomAirModelManager.hh +++ b/src/EnergyPlus/RoomAirModelManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/RoomAirModelUserTempPattern.cc b/src/EnergyPlus/RoomAirModelUserTempPattern.cc index e275c1499ba..ce7f9c2f717 100644 --- a/src/EnergyPlus/RoomAirModelUserTempPattern.cc +++ b/src/EnergyPlus/RoomAirModelUserTempPattern.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -367,7 +367,7 @@ void FigureTwoGradInterpPattern(EnergyPlusData &state, int const PattrnID, int c if (state.dataRoomAirModelTempPattern->SetupOutputFlag(ZoneNum)) { SetupOutputVariable(state, "Room Air Zone Vertical Temperature Gradient", - OutputProcessor::Unit::K_m, + Constant::Units::K_m, patternZoneInfo.Gradient, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::State, diff --git a/src/EnergyPlus/RoomAirModelUserTempPattern.hh b/src/EnergyPlus/RoomAirModelUserTempPattern.hh index de17d3a779f..9b93a1b551d 100644 --- a/src/EnergyPlus/RoomAirModelUserTempPattern.hh +++ b/src/EnergyPlus/RoomAirModelUserTempPattern.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/RootFinder.cc b/src/EnergyPlus/RootFinder.cc index 66580165a13..33d6b880a62 100644 --- a/src/EnergyPlus/RootFinder.cc +++ b/src/EnergyPlus/RootFinder.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/RootFinder.hh b/src/EnergyPlus/RootFinder.hh index 760be055a63..2391a3349cb 100644 --- a/src/EnergyPlus/RootFinder.hh +++ b/src/EnergyPlus/RootFinder.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/RuntimeLanguageProcessor.cc b/src/EnergyPlus/RuntimeLanguageProcessor.cc index 5627e9cbd2e..53d0c467601 100644 --- a/src/EnergyPlus/RuntimeLanguageProcessor.cc +++ b/src/EnergyPlus/RuntimeLanguageProcessor.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -2708,11 +2708,8 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) int VariableNum(0); // temporary int RuntimeReportVarNum; bool Found; - OutputProcessor::SOVTimeStepType FreqString; // temporary - OutputProcessor::SOVStoreType VarTypeString; // temporary - std::string ResourceTypeString; - std::string GroupTypeString; - std::string EndUseTypeString; + OutputProcessor::SOVTimeStepType sovTimeStepType; // temporary + OutputProcessor::SOVStoreType sovStoreType; // temporary std::string EndUseSubCatString; int TrendNum; @@ -2735,7 +2732,7 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) std::string::size_type lbracket; std::string UnitsA; std::string UnitsB; - OutputProcessor::Unit curUnit(OutputProcessor::Unit::None); + Constant::Units curUnit(Constant::Units::None); std::string::size_type ptr; if (state.dataRuntimeLangProcessor->GetInput) { // GetInput check is redundant with the InitializeRuntimeLanguage routine @@ -3306,7 +3303,7 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) ShowContinueError(state, format("...Units entered in {} (deprecated use)=\"{}\"", cAlphaFieldNames(1), UnitsA)); } } - curUnit = OutputProcessor::unitStringToEnum(UnitsB); + curUnit = static_cast(getEnumValue(Constant::unitNamesUC, Util::makeUPPER(UnitsB))); state.dataRuntimeLangProcessor->RuntimeReportVar(RuntimeReportVarNum).Name = cAlphaArgs(1); @@ -3352,58 +3349,49 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) state.dataRuntimeLangProcessor->RuntimeReportVar(RuntimeReportVarNum).VariableNum = VariableNum; } - { - std::string const &SELECT_CASE_var = cAlphaArgs(3); - - if (SELECT_CASE_var == "AVERAGED") { - VarTypeString = OutputProcessor::SOVStoreType::Average; - } else if (SELECT_CASE_var == "SUMMED") { - VarTypeString = OutputProcessor::SOVStoreType::Summed; - } else { - ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); - ShowContinueError(state, "...valid values are Averaged or Summed."); - ErrorsFound = true; - } + if (cAlphaArgs(3) == "AVERAGED") { + sovStoreType = OutputProcessor::SOVStoreType::Average; + } else if (cAlphaArgs(3) == "SUMMED") { + sovStoreType = OutputProcessor::SOVStoreType::Summed; + } else { + ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); + ShowContinueError(state, "...valid values are Averaged or Summed."); + ErrorsFound = true; } - { - std::string const &SELECT_CASE_var = cAlphaArgs(4); - - if (SELECT_CASE_var == "ZONETIMESTEP") { - FreqString = OutputProcessor::SOVTimeStepType::Zone; - } else if (SELECT_CASE_var == "SYSTEMTIMESTEP") { - FreqString = OutputProcessor::SOVTimeStepType::System; - } else { - ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(4), cAlphaArgs(4))); - ShowContinueError(state, "...valid values are ZoneTimestep or SystemTimestep."); - ErrorsFound = true; - } + if (cAlphaArgs(4) == "ZONETIMESTEP") { + sovTimeStepType = OutputProcessor::SOVTimeStepType::Zone; + } else if (cAlphaArgs(4) == "SYSTEMTIMESTEP") { + sovTimeStepType = OutputProcessor::SOVTimeStepType::System; + } else { + ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(4), cAlphaArgs(4))); + ShowContinueError(state, "...valid values are ZoneTimestep or SystemTimestep."); + ErrorsFound = true; } - if (curUnit != OutputProcessor::Unit::unknown) { + if (curUnit != Constant::Units::Invalid) { SetupOutputVariable(state, cAlphaArgs(1), curUnit, state.dataRuntimeLangProcessor->RuntimeReportVar(RuntimeReportVarNum).Value, - FreqString, - VarTypeString, + sovTimeStepType, + sovStoreType, "EMS"); } else { SetupOutputVariable(state, cAlphaArgs(1), - OutputProcessor::Unit::customEMS, + Constant::Units::customEMS, state.dataRuntimeLangProcessor->RuntimeReportVar(RuntimeReportVarNum).Value, - FreqString, - VarTypeString, + sovTimeStepType, + sovStoreType, "EMS", - {}, - {}, - {}, - {}, - {}, - {}, + Constant::eResource::Invalid, + OutputProcessor::SOVEndUseCat::Invalid, + {}, // EndUseSub + OutputProcessor::SOVGroup::Invalid, + {}, // Zone 1, 1, -999, @@ -3487,7 +3475,7 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) ShowContinueError(state, format("...Units entered in {} (deprecated use)=\"{}\"", cAlphaFieldNames(1), UnitsA)); } } - curUnit = OutputProcessor::unitStringToEnum(UnitsB); + curUnit = static_cast(getEnumValue(Constant::unitNamesUC, Util::makeUPPER(UnitsB))); state.dataRuntimeLangProcessor->RuntimeReportVar(RuntimeReportVarNum).Name = cAlphaArgs(1); @@ -3532,164 +3520,109 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) state.dataRuntimeLangProcessor->RuntimeReportVar(RuntimeReportVarNum).VariableNum = VariableNum; } - VarTypeString = OutputProcessor::SOVStoreType::Summed; // all metered vars are sum type + sovStoreType = OutputProcessor::SOVStoreType::Summed; // all metered vars are sum type - { - std::string const &SELECT_CASE_var = cAlphaArgs(3); - - if (SELECT_CASE_var == "ZONETIMESTEP") { - FreqString = OutputProcessor::SOVTimeStepType::Zone; - } else if (SELECT_CASE_var == "SYSTEMTIMESTEP") { - FreqString = OutputProcessor::SOVTimeStepType::System; - } else { - ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(4), cAlphaArgs(4))); - ShowContinueError(state, "...valid values are ZoneTimestep or SystemTimestep."); - ErrorsFound = true; - } + if (cAlphaArgs(3) == "ZONETIMESTEP") { + sovTimeStepType = OutputProcessor::SOVTimeStepType::Zone; + } else if (cAlphaArgs(3) == "SYSTEMTIMESTEP") { + sovTimeStepType = OutputProcessor::SOVTimeStepType::System; + } else { + ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(4), cAlphaArgs(4))); + ShowContinueError(state, "...valid values are ZoneTimestep or SystemTimestep."); + ErrorsFound = true; } // Resource Type - { - std::string const &SELECT_CASE_var = cAlphaArgs(5); - - if (SELECT_CASE_var == "ELECTRICITY") { - ResourceTypeString = "Electricity"; - } else if (SELECT_CASE_var == "NATURALGAS") { - ResourceTypeString = "NaturalGas"; - } else if (SELECT_CASE_var == "GASOLINE") { - ResourceTypeString = "Gasoline"; - } else if (SELECT_CASE_var == "DIESEL") { - ResourceTypeString = "Diesel"; - } else if (SELECT_CASE_var == "COAL") { - ResourceTypeString = "Coal"; - } else if (SELECT_CASE_var == "FUELOILNO1") { - ResourceTypeString = "FuelOilNo1"; - } else if (SELECT_CASE_var == "FUELOILNO2") { - ResourceTypeString = "FuelOilNo2"; - } else if (SELECT_CASE_var == "OTHERFUEL1") { - ResourceTypeString = "OtherFuel1"; - } else if (SELECT_CASE_var == "OTHERFUEL2") { - ResourceTypeString = "OtherFuel2"; - } else if (SELECT_CASE_var == "PROPANE") { - ResourceTypeString = "Propane"; - } else if (SELECT_CASE_var == "WATERUSE") { - ResourceTypeString = "Water"; - } else if (SELECT_CASE_var == "ONSITEWATERPRODUCED") { - ResourceTypeString = "OnSiteWater"; - } else if (SELECT_CASE_var == "MAINSWATERSUPPLY") { - ResourceTypeString = "MainsWater"; - } else if (SELECT_CASE_var == "RAINWATERCOLLECTED") { - ResourceTypeString = "RainWater"; - } else if (SELECT_CASE_var == "WELLWATERDRAWN") { - ResourceTypeString = "WellWater"; - } else if (SELECT_CASE_var == "CONDENSATEWATERCOLLECTED") { - ResourceTypeString = "Condensate"; - } else if (SELECT_CASE_var == "ENERGYTRANSFER") { - ResourceTypeString = "EnergyTransfer"; - } else if (SELECT_CASE_var == "STEAM") { - ResourceTypeString = "Steam"; - } else if (SELECT_CASE_var == "DISTRICTCOOLING") { - ResourceTypeString = "DistrictCooling"; - } else if (SELECT_CASE_var == "DISTRICTHEATINGWATER") { - ResourceTypeString = "DistrictHeatingWater"; - } else if (SELECT_CASE_var == "DISTRICTHEATINGSTEAM") { - ResourceTypeString = "DistrictHeatingSteam"; - } else if (SELECT_CASE_var == "ELECTRICITYPRODUCEDONSITE") { - ResourceTypeString = "ElectricityProduced"; - } else if (SELECT_CASE_var == "SOLARWATERHEATING") { - ResourceTypeString = "SolarWater"; - } else if (SELECT_CASE_var == "SOLARAIRHEATING") { - ResourceTypeString = "SolarAir"; - } else { - ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(5), cAlphaArgs(5))); - ErrorsFound = true; - } + Constant::eResource resource = + static_cast(getEnumValue(Constant::eResourceNamesUC, Util::makeUPPER(cAlphaArgs(5)))); + + if (resource == Constant::eResource::Invalid) { + ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(5), cAlphaArgs(5))); + ErrorsFound = true; } // Group Type - { - std::string const &SELECT_CASE_var = cAlphaArgs(6); - - if (SELECT_CASE_var == "BUILDING") { - GroupTypeString = "Building"; - } else if (SELECT_CASE_var == "HVAC") { - GroupTypeString = "HVAC"; - } else if (SELECT_CASE_var == "PLANT") { - GroupTypeString = "Plant"; - } else if (SELECT_CASE_var == "SYSTEM") { - GroupTypeString = "System"; - } else { - ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(6), cAlphaArgs(6))); - ErrorsFound = true; - } + OutputProcessor::SOVGroup sovGroup; + + if (cAlphaArgs(6) == "BUILDING") { + sovGroup = OutputProcessor::SOVGroup::Building; + } else if (cAlphaArgs(6) == "HVAC") { + sovGroup = OutputProcessor::SOVGroup::HVAC; + } else if (cAlphaArgs(6) == "PLANT") { + sovGroup = OutputProcessor::SOVGroup::Plant; + } else if (cAlphaArgs(6) == "SYSTEM") { + sovGroup = OutputProcessor::SOVGroup::HVAC; + } else { + ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(6), cAlphaArgs(6))); + ErrorsFound = true; } // End Use Type - { - std::string const &SELECT_CASE_var = cAlphaArgs(7); - - if (SELECT_CASE_var == "HEATING") { - EndUseTypeString = "Heating"; - } else if (SELECT_CASE_var == "COOLING") { - EndUseTypeString = "Cooling"; - } else if (SELECT_CASE_var == "INTERIORLIGHTS") { - EndUseTypeString = "InteriorLights"; - } else if (SELECT_CASE_var == "EXTERIORLIGHTS") { - EndUseTypeString = "ExteriorLights"; - } else if (SELECT_CASE_var == "INTERIOREQUIPMENT") { - EndUseTypeString = "InteriorEquipment"; - } else if (SELECT_CASE_var == "EXTERIOREQUIPMENT") { - EndUseTypeString = "ExteriorEquipment"; - } else if (SELECT_CASE_var == "FANS") { - EndUseTypeString = "Fans"; - } else if (SELECT_CASE_var == "PUMPS") { - EndUseTypeString = "Pumps"; - } else if (SELECT_CASE_var == "HEATREJECTION") { - EndUseTypeString = "HeatRejection"; - } else if (SELECT_CASE_var == "HUMIDIFIER") { - EndUseTypeString = "Humidifier"; - } else if (SELECT_CASE_var == "HEATRECOVERY") { - EndUseTypeString = "HeatRecovery"; - } else if (SELECT_CASE_var == "WATERSYSTEMS") { - EndUseTypeString = "WaterSystems"; - } else if (SELECT_CASE_var == "REFRIGERATION") { - EndUseTypeString = "Refrigeration"; - } else if (SELECT_CASE_var == "ONSITEGENERATION") { - EndUseTypeString = "Cogeneration"; - } else if (SELECT_CASE_var == "HEATINGCOILS") { - EndUseTypeString = "HeatingCoils"; - } else if (SELECT_CASE_var == "COOLINGCOILS") { - EndUseTypeString = "CoolingCoils"; - } else if (SELECT_CASE_var == "CHILLERS") { - EndUseTypeString = "Chillers"; - } else if (SELECT_CASE_var == "BOILERS") { - EndUseTypeString = "Boilers"; - } else if (SELECT_CASE_var == "BASEBOARD") { - EndUseTypeString = "Baseboard"; - } else if (SELECT_CASE_var == "HEATRECOVERYFORCOOLING") { - EndUseTypeString = "HeatRecoveryForCooling"; - } else if (SELECT_CASE_var == "HEATRECOVERYFORHEATING") { - EndUseTypeString = "HeatRecoveryForHeating"; - } else { - ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(7), cAlphaArgs(7))); - ErrorsFound = true; - } + OutputProcessor::SOVEndUseCat sovEndUseCat; + + if (cAlphaArgs(7) == "HEATING") { + sovEndUseCat = OutputProcessor::SOVEndUseCat::Heating; + } else if (cAlphaArgs(7) == "COOLING") { + sovEndUseCat = OutputProcessor::SOVEndUseCat::Cooling; + } else if (cAlphaArgs(7) == "INTERIORLIGHTS") { + sovEndUseCat = OutputProcessor::SOVEndUseCat::InteriorLights; + } else if (cAlphaArgs(7) == "EXTERIORLIGHTS") { + sovEndUseCat = OutputProcessor::SOVEndUseCat::ExteriorLights; + } else if (cAlphaArgs(7) == "INTERIOREQUIPMENT") { + sovEndUseCat = OutputProcessor::SOVEndUseCat::InteriorEquipment; + } else if (cAlphaArgs(7) == "EXTERIOREQUIPMENT") { + sovEndUseCat = OutputProcessor::SOVEndUseCat::ExteriorEquipment; + } else if (cAlphaArgs(7) == "FANS") { + sovEndUseCat = OutputProcessor::SOVEndUseCat::Fans; + } else if (cAlphaArgs(7) == "PUMPS") { + sovEndUseCat = OutputProcessor::SOVEndUseCat::Pumps; + } else if (cAlphaArgs(7) == "HEATREJECTION") { + sovEndUseCat = OutputProcessor::SOVEndUseCat::HeatRejection; + } else if (cAlphaArgs(7) == "HUMIDIFIER") { + sovEndUseCat = OutputProcessor::SOVEndUseCat::Humidification; + } else if (cAlphaArgs(7) == "HEATRECOVERY") { + sovEndUseCat = OutputProcessor::SOVEndUseCat::HeatRecovery; + } else if (cAlphaArgs(7) == "WATERSYSTEMS") { + sovEndUseCat = OutputProcessor::SOVEndUseCat::WaterSystem; + } else if (cAlphaArgs(7) == "REFRIGERATION") { + sovEndUseCat = OutputProcessor::SOVEndUseCat::Refrigeration; + } else if (cAlphaArgs(7) == "ONSITEGENERATION") { + sovEndUseCat = OutputProcessor::SOVEndUseCat::Cogeneration; + } else if (cAlphaArgs(7) == "HEATINGCOILS") { + sovEndUseCat = OutputProcessor::SOVEndUseCat::HeatingCoils; + } else if (cAlphaArgs(7) == "COOLINGCOILS") { + sovEndUseCat = OutputProcessor::SOVEndUseCat::CoolingCoils; + } else if (cAlphaArgs(7) == "CHILLERS") { + sovEndUseCat = OutputProcessor::SOVEndUseCat::Chillers; + } else if (cAlphaArgs(7) == "BOILERS") { + sovEndUseCat = OutputProcessor::SOVEndUseCat::Boilers; + } else if (cAlphaArgs(7) == "BASEBOARD") { + sovEndUseCat = OutputProcessor::SOVEndUseCat::Baseboard; + } else if (cAlphaArgs(7) == "HEATRECOVERYFORCOOLING") { + sovEndUseCat = OutputProcessor::SOVEndUseCat::HeatRecoveryForCooling; + } else if (cAlphaArgs(7) == "HEATRECOVERYFORHEATING") { + sovEndUseCat = OutputProcessor::SOVEndUseCat::HeatRecoveryForHeating; + } else { + ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(7), cAlphaArgs(7))); + ErrorsFound = true; } // Additional End Use Types Only Used for EnergyTransfer - if ((ResourceTypeString != "EnergyTransfer") && - (EndUseTypeString == "HeatingCoils" || EndUseTypeString == "CoolingCoils" || EndUseTypeString == "Chillers" || - EndUseTypeString == "Boilers" || EndUseTypeString == "Baseboard" || EndUseTypeString == "HeatRecoveryForCooling" || - EndUseTypeString == "HeatRecoveryForHeating")) { + if ((resource != Constant::eResource::EnergyTransfer) && + (sovEndUseCat == OutputProcessor::SOVEndUseCat::HeatingCoils || sovEndUseCat == OutputProcessor::SOVEndUseCat::CoolingCoils || + sovEndUseCat == OutputProcessor::SOVEndUseCat::Chillers || sovEndUseCat == OutputProcessor::SOVEndUseCat::Boilers || + sovEndUseCat == OutputProcessor::SOVEndUseCat::Baseboard || + sovEndUseCat == OutputProcessor::SOVEndUseCat::HeatRecoveryForCooling || + sovEndUseCat == OutputProcessor::SOVEndUseCat::HeatRecoveryForHeating)) { ShowWarningError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError(state, format("Invalid {}={} for {}={}", cAlphaFieldNames(5), cAlphaArgs(5), cAlphaFieldNames(7), cAlphaArgs(7))); ShowContinueError(state, format("Field {} is reset from {} to EnergyTransfer", cAlphaFieldNames(5), cAlphaArgs(5))); - ResourceTypeString = "EnergyTransfer"; + resource = Constant::eResource::EnergyTransfer; } if (!lAlphaFieldBlanks(8)) { @@ -3699,27 +3632,25 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) cAlphaArgs(1), curUnit, state.dataRuntimeLangProcessor->RuntimeReportVar(RuntimeReportVarNum).Value, - FreqString, - VarTypeString, + sovTimeStepType, + sovStoreType, "EMS", - {}, - ResourceTypeString, - EndUseTypeString, + resource, + sovEndUseCat, EndUseSubCatString, - GroupTypeString); + sovGroup); } else { // no subcat SetupOutputVariable(state, cAlphaArgs(1), curUnit, state.dataRuntimeLangProcessor->RuntimeReportVar(RuntimeReportVarNum).Value, - FreqString, - VarTypeString, + sovTimeStepType, + sovStoreType, "EMS", + resource, + sovEndUseCat, {}, - ResourceTypeString, - EndUseTypeString, - {}, - GroupTypeString); + sovGroup); } } } // NumEMSMeteredOutputVariables > 0 diff --git a/src/EnergyPlus/RuntimeLanguageProcessor.hh b/src/EnergyPlus/RuntimeLanguageProcessor.hh index 0aaac579b2d..72c5d5b0a57 100644 --- a/src/EnergyPlus/RuntimeLanguageProcessor.hh +++ b/src/EnergyPlus/RuntimeLanguageProcessor.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SQLiteProcedures.cc b/src/EnergyPlus/SQLiteProcedures.cc index 20016536130..057e8952429 100644 --- a/src/EnergyPlus/SQLiteProcedures.cc +++ b/src/EnergyPlus/SQLiteProcedures.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -68,13 +68,16 @@ namespace EnergyPlus { -const int SQLite::LocalReportEach = -1; // Write out each time UpdatedataandLocalReport is called -const int SQLite::LocalReportTimeStep = 0; // Write out at 'EndTimeStepFlag' -const int SQLite::LocalReportHourly = 1; // Write out at 'EndHourFlag' -const int SQLite::LocalReportDaily = 2; // Write out at 'EndDayFlag' -const int SQLite::LocalReportMonthly = 3; // Write out at end of month (must be determined) -const int SQLite::LocalReportSim = 4; // Write out once per environment 'EndEnvrnFlag' -const int SQLite::LocalReportYearly = 5; // Write out once per year +constexpr std::array reportFreqInts = { + -1, // EachCall + 0, // TimeStep + 1, // Hour + 2, // Day + 3, // Month + 4, // Simulation + 5 // Year +}; + const int SQLite::ReportNameId = 1; const int SQLite::ReportForStringId = 2; const int SQLite::TableNameId = 3; @@ -133,6 +136,8 @@ bool ParseSQLiteInput(EnergyPlusData &state, bool &writeOutputToSQLite, bool &wr sql_ort->unitsStyle_SQLite = OutputReportTabular::UnitsStyle::JtoGJ; } else if ("InchPound" == tabularDataUnitConversion) { sql_ort->unitsStyle_SQLite = OutputReportTabular::UnitsStyle::InchPound; + } else if ("InchPoundExceptElectricity" == tabularDataUnitConversion) { + sql_ort->unitsStyle_SQLite = OutputReportTabular::UnitsStyle::InchPoundExceptElectricity; } } return true; @@ -1349,76 +1354,6 @@ void SQLite::initializeIndexes() } } -std::string SQLite::storageType(const int storageTypeIndex) -{ - std::string result; - - switch (storageTypeIndex) { - case 1: // static_cast(OutputProcessor::StoreType::Averaged) - result = "Avg"; - break; - case 2: // static_cast(OutputProcessor::StoreType::Summed) - result = "Sum"; - break; - default: - result = "Unknown!!!"; - } - - return result; -} - -std::string SQLite::timestepTypeName(const int timestepType) -{ - std::string result; - - switch (timestepType) { - case 1: // static_cast(OutputProcessor::TimeStepType::TimeStepZone) - result = "Zone"; - break; - case 2: // static_cast(OutputProcessor::TimeStepType::TimeStepSystem) - result = "HVAC System"; - break; - default: - result = "Unknown!!!"; - } - - return result; -} - -std::string SQLite::reportingFreqName(const int reportingFreqIndex) -{ - std::string result; - - switch (reportingFreqIndex) { - case LocalReportEach: - result = "HVAC System Timestep"; - break; - case LocalReportTimeStep: - result = "Zone Timestep"; - break; - case LocalReportHourly: - result = "Hourly"; - break; - case LocalReportDaily: - result = "Daily"; - break; - case LocalReportMonthly: - result = "Monthly"; - break; - case LocalReportSim: - result = "Run Period"; - break; - case LocalReportYearly: - result = "Annual"; - break; - default: - result = "Unknown!!!"; - break; - } - - return result; -} - void SQLite::adjustReportingHourAndMinutes(int &hour, int &minutes) { switch (minutes) { @@ -1450,25 +1385,37 @@ int SQLite::logicalToInteger(const bool value) } void SQLite::createSQLiteReportDictionaryRecord(int const reportVariableReportID, - int const storeTypeIndex, + OutputProcessor::StoreType const storeType, std::string_view indexGroup, std::string_view keyedValueString, std::string_view const variableName, - int const indexType, + OutputProcessor::TimeStepType timeStepType, std::string_view units, - int const reportingFreq, + OutputProcessor::ReportFreq const reportFreq, bool isMeter, std::string_view const scheduleName) { + static constexpr std::array reportFreqStrings = { + "HVAC System Timestep", "Zone Timestep", "Hourly", "Daily", "Monthly", "Run Period", "Annual"}; + + static constexpr std::array storeTypeStrings = {"Dummy", "Avg", "Sum"}; + + static constexpr std::array timeStepTypeStrings = {"Dummy", "Zone", "HVAC System"}; + if (m_writeOutputToSQLite) { sqliteBindInteger(m_reportDictionaryInsertStmt, 1, reportVariableReportID); sqliteBindLogical(m_reportDictionaryInsertStmt, 2, isMeter); - sqliteBindText(m_reportDictionaryInsertStmt, 3, storageType(storeTypeIndex)); + sqliteBindText( + m_reportDictionaryInsertStmt, 3, (storeType == OutputProcessor::StoreType::Invalid) ? "Unknown!!!" : storeTypeStrings[(int)storeType]); sqliteBindText(m_reportDictionaryInsertStmt, 4, indexGroup); - sqliteBindText(m_reportDictionaryInsertStmt, 5, timestepTypeName(indexType)); + sqliteBindText(m_reportDictionaryInsertStmt, + 5, + (timeStepType == OutputProcessor::TimeStepType::Invalid) ? "Unknown!!!" : timeStepTypeStrings[(int)timeStepType]); sqliteBindText(m_reportDictionaryInsertStmt, 6, keyedValueString); sqliteBindText(m_reportDictionaryInsertStmt, 7, variableName); - sqliteBindText(m_reportDictionaryInsertStmt, 8, reportingFreqName(reportingFreq)); + sqliteBindText(m_reportDictionaryInsertStmt, + 8, + (reportFreq == OutputProcessor::ReportFreq::Invalid) ? "Unknown!!!" : reportFreqStrings[(int)reportFreq]); if (!scheduleName.empty()) { sqliteBindText(m_reportDictionaryInsertStmt, 9, scheduleName); @@ -1485,131 +1432,143 @@ void SQLite::createSQLiteReportDictionaryRecord(int const reportVariableReportID void SQLite::createSQLiteReportDataRecord(int const recordIndex, Real64 const value, - ObjexxFCL::Optional_int_const reportingInterval, - ObjexxFCL::Optional minValue, - ObjexxFCL::Optional_int_const minValueDate, - ObjexxFCL::Optional maxValue, - ObjexxFCL::Optional_int_const maxValueDate, - ObjexxFCL::Optional_int_const minutesPerTimeStep) + OutputProcessor::ReportFreq const reportFreq, + Real64 const minValue, + int const minValueDate, + Real64 const maxValue, + int const maxValueDate, + int const minutesPerTimeStep) { - if (m_writeOutputToSQLite) { - ++m_dataIndex; - - sqliteBindInteger(m_reportDataInsertStmt, 1, m_dataIndex); - sqliteBindForeignKey(m_reportDataInsertStmt, 2, m_sqlDBTimeIndex); - sqliteBindForeignKey(m_reportDataInsertStmt, 3, recordIndex); - sqliteBindDouble(m_reportDataInsertStmt, 4, value); - - sqliteStepCommand(m_reportDataInsertStmt); - sqliteResetCommand(m_reportDataInsertStmt); - - if (reportingInterval.present() && minValueDate != 0 && maxValueDate != 0) { - int minMonth; - int minDay; - int minHour; - int minMinute; - int maxMonth; - int maxDay; - int maxHour; - int maxMinute; - - General::DecodeMonDayHrMin(minValueDate, minMonth, minDay, minHour, minMinute); - General::DecodeMonDayHrMin(maxValueDate, maxMonth, maxDay, maxHour, maxMinute); - - adjustReportingHourAndMinutes(minHour, minMinute); - adjustReportingHourAndMinutes(maxHour, maxMinute); - - ++m_extendedDataIndex; - - if (minutesPerTimeStep.present()) { // This is for data created by a 'Report Meter' statement - switch (reportingInterval()) { - case LocalReportHourly: - case LocalReportDaily: - case LocalReportMonthly: - case LocalReportSim: - case LocalReportYearly: - sqliteBindInteger(m_reportExtendedDataInsertStmt, 1, m_extendedDataIndex); - sqliteBindForeignKey(m_reportExtendedDataInsertStmt, 2, m_dataIndex); - - sqliteBindDouble(m_reportExtendedDataInsertStmt, 3, maxValue); - sqliteBindInteger(m_reportExtendedDataInsertStmt, 4, maxMonth); - sqliteBindInteger(m_reportExtendedDataInsertStmt, 5, maxDay); - sqliteBindInteger(m_reportExtendedDataInsertStmt, 6, maxHour); - sqliteBindInteger(m_reportExtendedDataInsertStmt, 7, maxMinute - minutesPerTimeStep + 1); - sqliteBindInteger(m_reportExtendedDataInsertStmt, 8, maxMinute); - - sqliteBindDouble(m_reportExtendedDataInsertStmt, 9, minValue); - sqliteBindInteger(m_reportExtendedDataInsertStmt, 10, minMonth); - sqliteBindInteger(m_reportExtendedDataInsertStmt, 11, minDay); - sqliteBindInteger(m_reportExtendedDataInsertStmt, 12, minHour); - sqliteBindInteger(m_reportExtendedDataInsertStmt, 13, minMinute - minutesPerTimeStep + 1); - sqliteBindInteger(m_reportExtendedDataInsertStmt, 14, minMinute); - - sqliteStepCommand(m_reportExtendedDataInsertStmt); - sqliteResetCommand(m_reportExtendedDataInsertStmt); - break; - - case LocalReportTimeStep: - --m_extendedDataIndex; // Reset the data index to account for the error - break; - - default: - --m_extendedDataIndex; // Reset the data index to account for the error - std::stringstream ss; - ss << "Illegal reportingInterval passed to CreateSQLiteMeterRecord: " << reportingInterval; - sqliteWriteMessage(ss.str()); - } - } else { // This is for data created by a 'Report Variable' statement - switch (reportingInterval()) { - case LocalReportDaily: - case LocalReportMonthly: - case LocalReportSim: - case LocalReportYearly: - sqliteBindInteger(m_reportExtendedDataInsertStmt, 1, m_extendedDataIndex); - sqliteBindForeignKey(m_reportExtendedDataInsertStmt, 2, m_dataIndex); - - sqliteBindDouble(m_reportExtendedDataInsertStmt, 3, maxValue); - sqliteBindInteger(m_reportExtendedDataInsertStmt, 4, maxMonth); - sqliteBindInteger(m_reportExtendedDataInsertStmt, 5, maxDay); - sqliteBindInteger(m_reportExtendedDataInsertStmt, 6, maxHour); - sqliteBindNULL(m_reportExtendedDataInsertStmt, 7); - sqliteBindInteger(m_reportExtendedDataInsertStmt, 8, maxMinute); - - sqliteBindDouble(m_reportExtendedDataInsertStmt, 9, minValue); - sqliteBindInteger(m_reportExtendedDataInsertStmt, 10, minMonth); - sqliteBindInteger(m_reportExtendedDataInsertStmt, 11, minDay); - sqliteBindInteger(m_reportExtendedDataInsertStmt, 12, minHour); - sqliteBindNULL(m_reportExtendedDataInsertStmt, 13); - sqliteBindInteger(m_reportExtendedDataInsertStmt, 14, minMinute); - - sqliteStepCommand(m_reportExtendedDataInsertStmt); - sqliteResetCommand(m_reportExtendedDataInsertStmt); - break; - - default: - --m_extendedDataIndex; // Reset the data index to account for the error - std::stringstream ss; - ss << "Illegal reportingInterval passed to CreateSQLiteMeterRecord: " << reportingInterval; - sqliteWriteMessage(ss.str()); - } - } - } + + if (!m_writeOutputToSQLite) { + return; } -} -void SQLite::createSQLiteTimeIndexRecord(int const reportingInterval, + ++m_dataIndex; + + sqliteBindInteger(m_reportDataInsertStmt, 1, m_dataIndex); + sqliteBindForeignKey(m_reportDataInsertStmt, 2, m_sqlDBTimeIndex); + sqliteBindForeignKey(m_reportDataInsertStmt, 3, recordIndex); + sqliteBindDouble(m_reportDataInsertStmt, 4, value); + + sqliteStepCommand(m_reportDataInsertStmt); + sqliteResetCommand(m_reportDataInsertStmt); + + if (minValueDate != -1 && maxValueDate != -1) { + int minMonth; + int minDay; + int minHour; + int minMinute; + int maxMonth; + int maxDay; + int maxHour; + int maxMinute; + + General::DecodeMonDayHrMin(minValueDate, minMonth, minDay, minHour, minMinute); + General::DecodeMonDayHrMin(maxValueDate, maxMonth, maxDay, maxHour, maxMinute); + + adjustReportingHourAndMinutes(minHour, minMinute); + adjustReportingHourAndMinutes(maxHour, maxMinute); + + ++m_extendedDataIndex; + + if (minutesPerTimeStep != -1) { // This is for data created by a 'Report Meter' statement + switch (reportFreq) { + case OutputProcessor::ReportFreq::Hour: + case OutputProcessor::ReportFreq::Day: + case OutputProcessor::ReportFreq::Month: + case OutputProcessor::ReportFreq::Simulation: + case OutputProcessor::ReportFreq::Year: { + sqliteBindInteger(m_reportExtendedDataInsertStmt, 1, m_extendedDataIndex); + sqliteBindForeignKey(m_reportExtendedDataInsertStmt, 2, m_dataIndex); + + sqliteBindDouble(m_reportExtendedDataInsertStmt, 3, maxValue); + sqliteBindInteger(m_reportExtendedDataInsertStmt, 4, maxMonth); + sqliteBindInteger(m_reportExtendedDataInsertStmt, 5, maxDay); + sqliteBindInteger(m_reportExtendedDataInsertStmt, 6, maxHour); + sqliteBindInteger(m_reportExtendedDataInsertStmt, 7, maxMinute - minutesPerTimeStep + 1); + sqliteBindInteger(m_reportExtendedDataInsertStmt, 8, maxMinute); + + sqliteBindDouble(m_reportExtendedDataInsertStmt, 9, minValue); + sqliteBindInteger(m_reportExtendedDataInsertStmt, 10, minMonth); + sqliteBindInteger(m_reportExtendedDataInsertStmt, 11, minDay); + sqliteBindInteger(m_reportExtendedDataInsertStmt, 12, minHour); + sqliteBindInteger(m_reportExtendedDataInsertStmt, 13, minMinute - minutesPerTimeStep + 1); + sqliteBindInteger(m_reportExtendedDataInsertStmt, 14, minMinute); + + sqliteStepCommand(m_reportExtendedDataInsertStmt); + sqliteResetCommand(m_reportExtendedDataInsertStmt); + } break; + + case OutputProcessor::ReportFreq::TimeStep: + case OutputProcessor::ReportFreq::EachCall: { + --m_extendedDataIndex; // Reset the data index to account for the error + } break; + + default: { + --m_extendedDataIndex; // Reset the data index to account for the error + std::stringstream ss; + ss << "Illegal reportingInterval passed to CreateSQLiteMeterRecord: " << (int)reportFreq; + sqliteWriteMessage(ss.str()); + } break; + } // switch (reportFreq) + + } else { // This is for data created by a 'Report Variable' statement + switch (reportFreq) { + case OutputProcessor::ReportFreq::Day: + case OutputProcessor::ReportFreq::Month: + case OutputProcessor::ReportFreq::Simulation: + case OutputProcessor::ReportFreq::Year: { + sqliteBindInteger(m_reportExtendedDataInsertStmt, 1, m_extendedDataIndex); + sqliteBindForeignKey(m_reportExtendedDataInsertStmt, 2, m_dataIndex); + + sqliteBindDouble(m_reportExtendedDataInsertStmt, 3, maxValue); + sqliteBindInteger(m_reportExtendedDataInsertStmt, 4, maxMonth); + sqliteBindInteger(m_reportExtendedDataInsertStmt, 5, maxDay); + sqliteBindInteger(m_reportExtendedDataInsertStmt, 6, maxHour); + sqliteBindNULL(m_reportExtendedDataInsertStmt, 7); + sqliteBindInteger(m_reportExtendedDataInsertStmt, 8, maxMinute); + + sqliteBindDouble(m_reportExtendedDataInsertStmt, 9, minValue); + sqliteBindInteger(m_reportExtendedDataInsertStmt, 10, minMonth); + sqliteBindInteger(m_reportExtendedDataInsertStmt, 11, minDay); + sqliteBindInteger(m_reportExtendedDataInsertStmt, 12, minHour); + sqliteBindNULL(m_reportExtendedDataInsertStmt, 13); + sqliteBindInteger(m_reportExtendedDataInsertStmt, 14, minMinute); + + sqliteStepCommand(m_reportExtendedDataInsertStmt); + sqliteResetCommand(m_reportExtendedDataInsertStmt); + } break; + + case OutputProcessor::ReportFreq::TimeStep: + case OutputProcessor::ReportFreq::EachCall: + case OutputProcessor::ReportFreq::Hour: { + --m_extendedDataIndex; // Reset the data index to account for the error + } break; + default: { + --m_extendedDataIndex; // Reset the data index to account for the error + std::stringstream ss; + ss << "Illegal reportingInterval passed to CreateSQLiteMeterRecord: " << (int)reportFreq; + sqliteWriteMessage(ss.str()); + } break; + } // switch (reportFreq) + } // if (minutesPerTimeStep != -1) + } // if (minDataValue != 0) +} // SQLite::createSQLiteReportDataRecord() + +void SQLite::createSQLiteTimeIndexRecord(OutputProcessor::ReportFreq const reportFreq, [[maybe_unused]] int const recordIndex, int const cumlativeSimulationDays, int const curEnvirNum, int const simulationYear, bool const curYearIsLeapYear, - ObjexxFCL::Optional_int_const month, - ObjexxFCL::Optional_int_const dayOfMonth, - ObjexxFCL::Optional_int_const hour, - ObjexxFCL::Optional endMinute, - ObjexxFCL::Optional startMinute, - ObjexxFCL::Optional_int_const dst, - ObjexxFCL::Optional_string_const dayType, + int const month, + int const dayOfMonth, + int const hour, + Real64 const endMinute, + Real64 const startMinute, + int const dst, + std::string_view const dayType, bool const warmupFlag) { if (m_writeOutputToSQLite) { @@ -1621,33 +1580,32 @@ void SQLite::createSQLiteTimeIndexRecord(int const reportingInterval, lastDayOfMonth[1] = 29; } - switch (reportingInterval) { - case LocalReportEach: - case LocalReportTimeStep: { - if (!month.present() || !dayOfMonth.present() || !hour.present() || !endMinute.present() || !startMinute.present() || !dst.present() || - !dayType.present()) { + switch (reportFreq) { + case OutputProcessor::ReportFreq::EachCall: + case OutputProcessor::ReportFreq::TimeStep: { + if (month == -1 || dayOfMonth == -1 || hour == -1 || endMinute == -1.0 || startMinute == -1.0 || dst == -1 || dayType == "") { sqliteWriteMessage("Empty month, dayOfMonth, hour, endMinute, startMinute, dst, or dayType passed to CreateSQLiteTimeIndexRecord"); break; } ++m_sqlDBTimeIndex; - int intEndMinute = static_cast(endMinute() + 0.5); - intStartMinute = static_cast(startMinute() + 0.5); - int t_hour = hour(); + int intEndMinute = static_cast(endMinute + 0.5); + intStartMinute = static_cast(startMinute + 0.5); + int t_hour = hour; intervalInMinutes = intEndMinute - intStartMinute; adjustReportingHourAndMinutes(t_hour, intEndMinute); sqliteBindInteger(m_timeIndexInsertStmt, 1, m_sqlDBTimeIndex); sqliteBindInteger(m_timeIndexInsertStmt, 2, simulationYear); - sqliteBindInteger(m_timeIndexInsertStmt, 3, month()); - sqliteBindInteger(m_timeIndexInsertStmt, 4, dayOfMonth()); + sqliteBindInteger(m_timeIndexInsertStmt, 3, month); + sqliteBindInteger(m_timeIndexInsertStmt, 4, dayOfMonth); sqliteBindInteger(m_timeIndexInsertStmt, 5, t_hour); sqliteBindInteger(m_timeIndexInsertStmt, 6, intEndMinute); - sqliteBindInteger(m_timeIndexInsertStmt, 7, dst()); + sqliteBindInteger(m_timeIndexInsertStmt, 7, dst); sqliteBindInteger(m_timeIndexInsertStmt, 8, intervalInMinutes); - sqliteBindInteger(m_timeIndexInsertStmt, 9, reportingInterval); + sqliteBindInteger(m_timeIndexInsertStmt, 9, reportFreqInts[(int)reportFreq]); sqliteBindInteger(m_timeIndexInsertStmt, 10, cumlativeSimulationDays); - sqliteBindText(m_timeIndexInsertStmt, 11, dayType()); + sqliteBindText(m_timeIndexInsertStmt, 11, dayType); sqliteBindInteger(m_timeIndexInsertStmt, 12, curEnvirNum); sqliteBindLogical(m_timeIndexInsertStmt, 13, warmupFlag); @@ -1656,8 +1614,8 @@ void SQLite::createSQLiteTimeIndexRecord(int const reportingInterval, break; } - case LocalReportHourly: { - if (!month.present() || !dayOfMonth.present() || !hour.present() || !dst.present() || !dayType.present()) { + case OutputProcessor::ReportFreq::Hour: { + if (month == -1 || dayOfMonth == -1 || hour == -1 || dst == -1 || dayType == "") { sqliteWriteMessage("Empty month, dayOfMonth, hour, dst, or dayType passed to CreateSQLiteTimeIndexRecord"); break; } @@ -1665,15 +1623,15 @@ void SQLite::createSQLiteTimeIndexRecord(int const reportingInterval, sqliteBindInteger(m_timeIndexInsertStmt, 1, m_sqlDBTimeIndex); sqliteBindInteger(m_timeIndexInsertStmt, 2, simulationYear); - sqliteBindInteger(m_timeIndexInsertStmt, 3, month()); - sqliteBindInteger(m_timeIndexInsertStmt, 4, dayOfMonth()); - sqliteBindInteger(m_timeIndexInsertStmt, 5, hour()); + sqliteBindInteger(m_timeIndexInsertStmt, 3, month); + sqliteBindInteger(m_timeIndexInsertStmt, 4, dayOfMonth); + sqliteBindInteger(m_timeIndexInsertStmt, 5, hour); sqliteBindInteger(m_timeIndexInsertStmt, 6, 0); - sqliteBindInteger(m_timeIndexInsertStmt, 7, dst()); + sqliteBindInteger(m_timeIndexInsertStmt, 7, dst); sqliteBindInteger(m_timeIndexInsertStmt, 8, intervalInMinutes); - sqliteBindInteger(m_timeIndexInsertStmt, 9, reportingInterval); + sqliteBindInteger(m_timeIndexInsertStmt, 9, reportFreqInts[(int)reportFreq]); sqliteBindInteger(m_timeIndexInsertStmt, 10, cumlativeSimulationDays); - sqliteBindText(m_timeIndexInsertStmt, 11, dayType()); + sqliteBindText(m_timeIndexInsertStmt, 11, dayType); sqliteBindInteger(m_timeIndexInsertStmt, 12, curEnvirNum); sqliteStepCommand(m_timeIndexInsertStmt); @@ -1681,8 +1639,8 @@ void SQLite::createSQLiteTimeIndexRecord(int const reportingInterval, break; } - case LocalReportDaily: { - if (!month.present() || !dayOfMonth.present() || !dst.present() || !dayType.present()) { + case OutputProcessor::ReportFreq::Day: { + if (month == -1 || dayOfMonth == -1 || dst == -1 || dayType == "") { sqliteWriteMessage("Empty month, dayOfMonth, dst, or dayType passed to CreateSQLiteTimeIndexRecord"); break; } @@ -1691,15 +1649,15 @@ void SQLite::createSQLiteTimeIndexRecord(int const reportingInterval, intervalInMinutes = 60 * 24; sqliteBindInteger(m_timeIndexInsertStmt, 1, m_sqlDBTimeIndex); sqliteBindInteger(m_timeIndexInsertStmt, 2, simulationYear); - sqliteBindInteger(m_timeIndexInsertStmt, 3, month()); - sqliteBindInteger(m_timeIndexInsertStmt, 4, dayOfMonth()); + sqliteBindInteger(m_timeIndexInsertStmt, 3, month); + sqliteBindInteger(m_timeIndexInsertStmt, 4, dayOfMonth); sqliteBindInteger(m_timeIndexInsertStmt, 5, 24); sqliteBindInteger(m_timeIndexInsertStmt, 6, 0); - sqliteBindInteger(m_timeIndexInsertStmt, 7, dst()); + sqliteBindInteger(m_timeIndexInsertStmt, 7, dst); sqliteBindInteger(m_timeIndexInsertStmt, 8, intervalInMinutes); - sqliteBindInteger(m_timeIndexInsertStmt, 9, reportingInterval); + sqliteBindInteger(m_timeIndexInsertStmt, 9, reportFreqInts[(int)reportFreq]); sqliteBindInteger(m_timeIndexInsertStmt, 10, cumlativeSimulationDays); - sqliteBindText(m_timeIndexInsertStmt, 11, dayType()); + sqliteBindText(m_timeIndexInsertStmt, 11, dayType); sqliteBindInteger(m_timeIndexInsertStmt, 12, curEnvirNum); sqliteStepCommand(m_timeIndexInsertStmt); @@ -1707,23 +1665,23 @@ void SQLite::createSQLiteTimeIndexRecord(int const reportingInterval, break; } - case LocalReportMonthly: { - if (!month.present()) { + case OutputProcessor::ReportFreq::Month: { + if (month == -1) { sqliteWriteMessage("Empty month passed to CreateSQLiteTimeIndexRecord"); break; } ++m_sqlDBTimeIndex; - intervalInMinutes = 60 * 24 * lastDayOfMonth[month() - 1]; + intervalInMinutes = 60 * 24 * lastDayOfMonth[month - 1]; sqliteBindInteger(m_timeIndexInsertStmt, 1, m_sqlDBTimeIndex); sqliteBindInteger(m_timeIndexInsertStmt, 2, simulationYear); - sqliteBindInteger(m_timeIndexInsertStmt, 3, month()); - sqliteBindInteger(m_timeIndexInsertStmt, 4, lastDayOfMonth[month() - 1]); + sqliteBindInteger(m_timeIndexInsertStmt, 3, month); + sqliteBindInteger(m_timeIndexInsertStmt, 4, lastDayOfMonth[month - 1]); sqliteBindInteger(m_timeIndexInsertStmt, 5, 24); sqliteBindInteger(m_timeIndexInsertStmt, 6, 0); sqliteBindNULL(m_timeIndexInsertStmt, 7); sqliteBindInteger(m_timeIndexInsertStmt, 8, intervalInMinutes); - sqliteBindInteger(m_timeIndexInsertStmt, 9, reportingInterval); + sqliteBindInteger(m_timeIndexInsertStmt, 9, reportFreqInts[(int)reportFreq]); sqliteBindInteger(m_timeIndexInsertStmt, 10, cumlativeSimulationDays); sqliteBindNULL(m_timeIndexInsertStmt, 11); sqliteBindInteger(m_timeIndexInsertStmt, 12, curEnvirNum); @@ -1733,7 +1691,7 @@ void SQLite::createSQLiteTimeIndexRecord(int const reportingInterval, break; } - case LocalReportSim: { + case OutputProcessor::ReportFreq::Simulation: { ++m_sqlDBTimeIndex; intervalInMinutes = 60 * 24 * cumlativeSimulationDays; @@ -1745,7 +1703,7 @@ void SQLite::createSQLiteTimeIndexRecord(int const reportingInterval, sqliteBindNULL(m_timeIndexInsertStmt, 6); sqliteBindNULL(m_timeIndexInsertStmt, 7); sqliteBindInteger(m_timeIndexInsertStmt, 8, intervalInMinutes); - sqliteBindInteger(m_timeIndexInsertStmt, 9, reportingInterval); + sqliteBindInteger(m_timeIndexInsertStmt, 9, reportFreqInts[(int)reportFreq]); sqliteBindInteger(m_timeIndexInsertStmt, 10, cumlativeSimulationDays); sqliteBindNULL(m_timeIndexInsertStmt, 11); sqliteBindInteger(m_timeIndexInsertStmt, 12, curEnvirNum); @@ -1757,12 +1715,12 @@ void SQLite::createSQLiteTimeIndexRecord(int const reportingInterval, } default: { std::stringstream ss; - ss << "Illegal reportingInterval passed to CreateSQLiteTimeIndexRecord: " << reportingInterval; + ss << "Illegal reportingInterval passed to CreateSQLiteTimeIndexRecord: " << (int)reportFreq; sqliteWriteMessage(ss.str()); } } } -} +} // SQLite::createSQLiteTimeIndexRecord() void SQLite::createYearlyTimeIndexRecord(int const simulationYear, int const curEnvirNum) { @@ -1778,7 +1736,7 @@ void SQLite::createYearlyTimeIndexRecord(int const simulationYear, int const cur sqliteBindNULL(m_timeIndexInsertStmt, 6); sqliteBindNULL(m_timeIndexInsertStmt, 7); sqliteBindNULL(m_timeIndexInsertStmt, 8); - sqliteBindInteger(m_timeIndexInsertStmt, 9, LocalReportYearly); + sqliteBindInteger(m_timeIndexInsertStmt, 9, reportFreqInts[(int)OutputProcessor::ReportFreq::Year]); sqliteBindNULL(m_timeIndexInsertStmt, 10); sqliteBindNULL(m_timeIndexInsertStmt, 11); sqliteBindInteger(m_timeIndexInsertStmt, 12, curEnvirNum); diff --git a/src/EnergyPlus/SQLiteProcedures.hh b/src/EnergyPlus/SQLiteProcedures.hh index 31218178c22..eb6e677b808 100644 --- a/src/EnergyPlus/SQLiteProcedures.hh +++ b/src/EnergyPlus/SQLiteProcedures.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -58,7 +58,6 @@ // ObjexxFCL Headers #include #include -#include // EnergyPlus Headers #include @@ -68,6 +67,7 @@ #include #include #include +#include namespace EnergyPlus { @@ -170,38 +170,38 @@ public: bool sqliteWithinTransaction(); void createSQLiteReportDictionaryRecord(int const reportVariableReportID, - int const storeTypeIndex, + OutputProcessor::StoreType const storeType, std::string_view indexGroup, std::string_view keyedValueString, std::string_view const variableName, - int const indexType, + OutputProcessor::TimeStepType const timeStepType, std::string_view units, - int const reportingFreq, + OutputProcessor::ReportFreq const reportFreq, bool isMeter, std::string_view const ScheduleName = {}); void createSQLiteReportDataRecord(int const recordIndex, Real64 const value, - ObjexxFCL::Optional_int_const reportingInterval = _, - ObjexxFCL::Optional minValue = _, - ObjexxFCL::Optional_int_const minValueDate = _, - ObjexxFCL::Optional maxValue = _, - ObjexxFCL::Optional_int_const maxValueDate = _, - ObjexxFCL::Optional_int_const minutesPerTimeStep = _); - - void createSQLiteTimeIndexRecord(int const reportingInterval, + OutputProcessor::ReportFreq const reportFreq = OutputProcessor::ReportFreq::Invalid, + Real64 const minValue = 0.0, + int const minValueDate = -1, + Real64 const maxValue = 0.0, + int const maxValueDate = -1, + int const minutesPerTimeStep = -1); + + void createSQLiteTimeIndexRecord(OutputProcessor::ReportFreq const reportFreq, int const recordIndex, int const CumlativeSimulationDays, int const curEnvirNum, int const simulationYear, bool const curYearIsLeapYear, - ObjexxFCL::Optional_int_const Month = _, - ObjexxFCL::Optional_int_const DayOfMonth = _, - ObjexxFCL::Optional_int_const Hour = _, - ObjexxFCL::Optional EndMinute = _, - ObjexxFCL::Optional StartMinute = _, - ObjexxFCL::Optional_int_const DST = _, - ObjexxFCL::Optional_string_const DayType = _, + int const Month = -1, + int const DayOfMonth = -1, + int const Hour = -1, + Real64 const EndMinute = -1.0, + Real64 const StartMinute = -1.0, + int const DST = -1, + std::string_view const DayType = "", bool const warmupFlag = false); void createYearlyTimeIndexRecord(int const simulationYear, int const curEnvirNum); @@ -281,10 +281,6 @@ public: private: int createSQLiteStringTableRecord(std::string_view stringValue, int const stringType); - static std::string storageType(const int storageTypeIndex); - static std::string timestepTypeName(const int timestepType); - static std::string reportingFreqName(const int reportingFreqIndex); - static void adjustReportingHourAndMinutes(int &hour, int &minutes); // Given combinedString, parse out units and description. // Example: Given combinedString "Total Energy [GJ]", return "Total Energy" diff --git a/src/EnergyPlus/SZVAVModel.cc b/src/EnergyPlus/SZVAVModel.cc index 833ef699d4f..62970e18b8e 100644 --- a/src/EnergyPlus/SZVAVModel.cc +++ b/src/EnergyPlus/SZVAVModel.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SZVAVModel.hh b/src/EnergyPlus/SZVAVModel.hh index 4982869ad68..e7f5ca48ad7 100644 --- a/src/EnergyPlus/SZVAVModel.hh +++ b/src/EnergyPlus/SZVAVModel.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ScheduleManager.cc b/src/EnergyPlus/ScheduleManager.cc index 9f923db5887..7cf3efe6b93 100644 --- a/src/EnergyPlus/ScheduleManager.cc +++ b/src/EnergyPlus/ScheduleManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -2886,7 +2886,7 @@ namespace ScheduleManager { // RE-ENGINEERED na // PURPOSE OF THIS FUNCTION: - // This function returns the internal pointer to Schedule "ScheduleName". + // This function returns the internal pointer to Schedule "ScheduleName" (actually, it doesn't do that) // METHODOLOGY EMPLOYED: // na @@ -4569,7 +4569,7 @@ namespace ScheduleManager { // Set Up Reporting SetupOutputVariable(state, "Schedule Value", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataScheduleMgr->Schedule(ScheduleIndex).CurrentValue, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/ScheduleManager.hh b/src/EnergyPlus/ScheduleManager.hh index 43bedbff93e..44b9f2bdc0a 100644 --- a/src/EnergyPlus/ScheduleManager.hh +++ b/src/EnergyPlus/ScheduleManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SetPointManager.cc b/src/EnergyPlus/SetPointManager.cc index 7651b66af18..cfddfacb881 100644 --- a/src/EnergyPlus/SetPointManager.cc +++ b/src/EnergyPlus/SetPointManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -3154,14 +3154,14 @@ void GetSetPointManagerInputData(EnergyPlusData &state, bool &ErrorsFound) for (SetPtMgrNum = 1; SetPtMgrNum <= state.dataSetPointManager->NumWarmestSetPtMgrsTempFlow; ++SetPtMgrNum) { SetupOutputVariable(state, "Setpoint Manager Warmest Temperature Critical Zone Number", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSetPointManager->WarmestSetPtMgrTempFlow(SetPtMgrNum).CritZoneNum, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataSetPointManager->WarmestSetPtMgrTempFlow(SetPtMgrNum).Name); SetupOutputVariable(state, "Setpoint Manager Warmest Temperature Turndown Flow Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSetPointManager->WarmestSetPtMgrTempFlow(SetPtMgrNum).Turndown, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -8351,16 +8351,8 @@ void DefineIdealCondEntSetPointManager::SetupMeteredVarsForSetPt(EnergyPlusData std::string TypeOfComp; std::string NameOfComp; - Array1D_int VarIndexes; // Variable Numbers - Array1D VarTypes; // Variable Types (1=integer, 2=real, 3=meter) - Array1D IndexTypes; // Variable Index Types (1=Zone,2=HVAC) - Array1D unitsForVar; // units from enum for each variable - Array1D ResourceTypes; // ResourceTypes for each variable - Array1D_string EndUses; // EndUses for each variable - Array1D_string Groups; // Groups for each variable - Array1D_string Names; // Variable Names for each variable + Array1D meteredVars; int NumVariables; - int NumFound; // Chiller and ChW pump location, assumes supply side int ChillerLoopNum(this->LoopIndexPlantSide); // Chiller loop number @@ -8377,37 +8369,21 @@ void DefineIdealCondEntSetPointManager::SetupMeteredVarsForSetPt(EnergyPlusData TypeOfComp = state.dataPlnt->PlantLoop(ChillerLoopNum).LoopSide(LoopSideLocation::Supply).Branch(ChillerBranchNum).Comp(ChillerNum).TypeOf; NameOfComp = state.dataPlnt->PlantLoop(ChillerLoopNum).LoopSide(LoopSideLocation::Supply).Branch(ChillerBranchNum).Comp(ChillerNum).Name; NumVariables = GetNumMeteredVariables(state, TypeOfComp, NameOfComp); - VarIndexes.allocate(NumVariables); - VarTypes.allocate(NumVariables); - IndexTypes.allocate(NumVariables); - unitsForVar.allocate(NumVariables); - ResourceTypes.allocate(NumVariables); - EndUses.allocate(NumVariables); - Groups.allocate(NumVariables); - Names.allocate(NumVariables); - - GetMeteredVariables( - state, TypeOfComp, NameOfComp, VarIndexes, VarTypes, IndexTypes, unitsForVar, ResourceTypes, EndUses, Groups, Names, NumFound); - this->ChllrVarType = VarTypes(1); - this->ChllrVarIndex = VarIndexes(1); + meteredVars.allocate(NumVariables); + + GetMeteredVariables(state, NameOfComp, meteredVars); + this->ChllrVarType = meteredVars(1).varType; + this->ChllrVarIndex = meteredVars(1).num; TypeOfComp = state.dataPlnt->PlantLoop(ChillerLoopNum).LoopSide(LoopSideLocation::Supply).Branch(ChilledPumpBranchNum).Comp(ChilledPumpNum).TypeOf; NameOfComp = state.dataPlnt->PlantLoop(ChillerLoopNum).LoopSide(LoopSideLocation::Supply).Branch(ChilledPumpBranchNum).Comp(ChilledPumpNum).Name; NumVariables = GetNumMeteredVariables(state, TypeOfComp, NameOfComp); - VarIndexes.allocate(NumVariables); - VarTypes.allocate(NumVariables); - IndexTypes.allocate(NumVariables); - unitsForVar.allocate(NumVariables); - ResourceTypes.allocate(NumVariables); - EndUses.allocate(NumVariables); - Groups.allocate(NumVariables); - Names.allocate(NumVariables); - - GetMeteredVariables( - state, TypeOfComp, NameOfComp, VarIndexes, VarTypes, IndexTypes, unitsForVar, ResourceTypes, EndUses, Groups, Names, NumFound); - this->ChlPumpVarType = VarTypes(1); - this->ChlPumpVarIndex = VarIndexes(1); + meteredVars.allocate(NumVariables); + + GetMeteredVariables(state, NameOfComp, meteredVars); + this->ChlPumpVarType = meteredVars(1).varType; + this->ChlPumpVarIndex = meteredVars(1).num; for (int i = 1; i <= this->numTowers; i++) { TypeOfComp = state.dataPlnt->PlantLoop(TowerLoopNum) @@ -8421,37 +8397,21 @@ void DefineIdealCondEntSetPointManager::SetupMeteredVarsForSetPt(EnergyPlusData .Comp(this->TowerNum(i)) .Name; NumVariables = GetNumMeteredVariables(state, TypeOfComp, NameOfComp); - VarIndexes.allocate(NumVariables); - VarTypes.allocate(NumVariables); - IndexTypes.allocate(NumVariables); - unitsForVar.allocate(NumVariables); - ResourceTypes.allocate(NumVariables); - EndUses.allocate(NumVariables); - Groups.allocate(NumVariables); - Names.allocate(NumVariables); + meteredVars.allocate(NumVariables); - GetMeteredVariables( - state, TypeOfComp, NameOfComp, VarIndexes, VarTypes, IndexTypes, unitsForVar, ResourceTypes, EndUses, Groups, Names, NumFound); - this->ClTowerVarType.push_back(VarTypes(1)); - this->ClTowerVarIndex.push_back(VarIndexes(1)); + GetMeteredVariables(state, NameOfComp, meteredVars); + this->ClTowerVarType.push_back(meteredVars(1).varType); + this->ClTowerVarIndex.push_back(meteredVars(1).num); } TypeOfComp = state.dataPlnt->PlantLoop(TowerLoopNum).LoopSide(LoopSideLocation::Supply).Branch(CondPumpBranchNum).Comp(CondPumpNum).TypeOf; NameOfComp = state.dataPlnt->PlantLoop(TowerLoopNum).LoopSide(LoopSideLocation::Supply).Branch(CondPumpBranchNum).Comp(CondPumpNum).Name; NumVariables = GetNumMeteredVariables(state, TypeOfComp, NameOfComp); - VarIndexes.allocate(NumVariables); - VarTypes.allocate(NumVariables); - IndexTypes.allocate(NumVariables); - unitsForVar.allocate(NumVariables); - ResourceTypes.allocate(NumVariables); - EndUses.allocate(NumVariables); - Groups.allocate(NumVariables); - Names.allocate(NumVariables); - - GetMeteredVariables( - state, TypeOfComp, NameOfComp, VarIndexes, VarTypes, IndexTypes, unitsForVar, ResourceTypes, EndUses, Groups, Names, NumFound); - this->CndPumpVarType = VarTypes(1); - this->CndPumpVarIndex = VarIndexes(1); + meteredVars.allocate(NumVariables); + + GetMeteredVariables(state, NameOfComp, meteredVars); + this->CndPumpVarType = meteredVars(1).varType; + this->CndPumpVarIndex = meteredVars(1).num; } void DefineSysNodeResetSetPointManager::calculate(EnergyPlusData &state) diff --git a/src/EnergyPlus/SetPointManager.hh b/src/EnergyPlus/SetPointManager.hh index 37637554aa6..5280bac3566 100644 --- a/src/EnergyPlus/SetPointManager.hh +++ b/src/EnergyPlus/SetPointManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -759,8 +759,8 @@ namespace SetPointManager { // Default Constructor DefineIdealCondEntSetPointManager() : MinimumLiftTD(0.0), MaxCondEntTemp(0.0), NumCtrlNodes(0), SetPt(0.0), ChillerIndexPlantSide(0), BranchIndexPlantSide(0), - LoopIndexPlantSide(0), ChllrVarType(OutputProcessor::VariableType::NotFound), ChllrVarIndex(0), - ChlPumpVarType(OutputProcessor::VariableType::NotFound), ChlPumpVarIndex(0), CndPumpVarType(OutputProcessor::VariableType::NotFound), + LoopIndexPlantSide(0), ChllrVarType(OutputProcessor::VariableType::Invalid), ChllrVarIndex(0), + ChlPumpVarType(OutputProcessor::VariableType::Invalid), ChlPumpVarIndex(0), CndPumpVarType(OutputProcessor::VariableType::Invalid), CndPumpVarIndex(0), Type(DataPlant::PlantEquipmentType::Invalid), CondLoopNum(0), numTowers(0), CondPumpNum(0), CondPumpBranchNum(0), ChilledPumpNum(0), ChilledPumpBranchNum(0), SetupIdealCondEntSetPtVars(true) { diff --git a/src/EnergyPlus/Shape.hh b/src/EnergyPlus/Shape.hh index be280fe757f..ec91e8b34aa 100644 --- a/src/EnergyPlus/Shape.hh +++ b/src/EnergyPlus/Shape.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SimAirServingZones.cc b/src/EnergyPlus/SimAirServingZones.cc index f33104e7781..1891f11545a 100644 --- a/src/EnergyPlus/SimAirServingZones.cc +++ b/src/EnergyPlus/SimAirServingZones.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -1373,7 +1373,7 @@ void GetAirPathData(EnergyPlusData &state) for (AirSysNum = 1; AirSysNum <= NumPrimaryAirSys; ++AirSysNum) { SetupOutputVariable(state, "Air System Simulation Cycle On Off Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataAirLoop->PriAirSysAvailMgr(AirSysNum).AvailStatus, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, @@ -2439,21 +2439,21 @@ void SimAirLoops(EnergyPlusData &state, bool const FirstHVACIteration, bool &Sim if (!state.dataSimAirServingZones->OutputSetupFlag) { SetupOutputVariable(state, "Air System Simulation Maximum Iteration Count", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSimAirServingZones->salIterMax, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, "SimAir"); SetupOutputVariable(state, "Air System Simulation Iteration Count", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSimAirServingZones->salIterTot, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, "SimAir"); SetupOutputVariable(state, "Air System Component Model Simulation Calls", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSimAirServingZones->NumCallsTot, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -5246,21 +5246,18 @@ void UpdateSysSizing(EnergyPlusData &state, Constant::CallIndicator const CallIn // sum up the system mass flow rate for this time step Real64 adjCoolFlowSeq = termUnitSizing.applyTermUnitSizingCoolFlow(zoneSizing.CoolFlowSeq(TimeStepInDay), zoneSizing.CoolFlowSeqNoOA(TimeStepInDay)); - state.dataSize->SysSizing(state.dataSize->CurOverallSimDay, AirLoopNum).CoolFlowSeq(TimeStepInDay) += - adjCoolFlowSeq / (1.0 + termUnitSizing.InducRat); + Real64 adjustedFlow = adjCoolFlowSeq / (1.0 + termUnitSizing.InducRat); + state.dataSize->SysSizing(state.dataSize->CurOverallSimDay, AirLoopNum).CoolFlowSeq(TimeStepInDay) += adjustedFlow; // sum up the zone cooling load to be met by this system for this time step state.dataSize->SysSizing(state.dataSize->CurOverallSimDay, AirLoopNum).SumZoneCoolLoadSeq(TimeStepInDay) += - zoneSizing.CoolLoadSeq(TimeStepInDay); + termUnitSizing.applyTermUnitSizingCoolLoad(zoneSizing.CoolLoadSeq(TimeStepInDay)); // calculate the return air temperature for this time step - SysCoolRetTemp += - zoneSizing.CoolZoneRetTempSeq(TimeStepInDay) * zoneSizing.CoolFlowSeq(TimeStepInDay) / (1.0 + termUnitSizing.InducRat); - SysCoolRetHumRat += - zoneSizing.CoolZoneHumRatSeq(TimeStepInDay) * zoneSizing.CoolFlowSeq(TimeStepInDay) / (1.0 + termUnitSizing.InducRat); - SysCoolZoneAvgTemp += - zoneSizing.CoolZoneTempSeq(TimeStepInDay) * zoneSizing.CoolFlowSeq(TimeStepInDay) / (1.0 + termUnitSizing.InducRat); - SysDOASHeatAdd += zoneSizing.DOASHeatAddSeq(TimeStepInDay) * zoneSizing.CoolFlowSeq(TimeStepInDay) / (1.0 + termUnitSizing.InducRat); - SysDOASLatAdd += zoneSizing.DOASLatAddSeq(TimeStepInDay) * zoneSizing.CoolFlowSeq(TimeStepInDay) / (1.0 + termUnitSizing.InducRat); - SysLatCoolHumRat += zoneSizing.CoolDesHumRat * zoneSizing.CoolFlowSeq(TimeStepInDay) / (1.0 + termUnitSizing.InducRat); + SysCoolRetTemp += zoneSizing.CoolZoneRetTempSeq(TimeStepInDay) * adjustedFlow; + SysCoolRetHumRat += zoneSizing.CoolZoneHumRatSeq(TimeStepInDay) * adjustedFlow; + SysCoolZoneAvgTemp += zoneSizing.CoolZoneTempSeq(TimeStepInDay) * adjustedFlow; + SysDOASHeatAdd += zoneSizing.DOASHeatAddSeq(TimeStepInDay) * adjustedFlow; + SysDOASLatAdd += zoneSizing.DOASLatAddSeq(TimeStepInDay) * adjustedFlow; + SysLatCoolHumRat += zoneSizing.CoolDesHumRat * adjustedFlow; } // end of loop over zones cooled by central system // Get peak system cooling load with coincident auto &sysSizing = state.dataSize->SysSizing(state.dataSize->CurOverallSimDay, AirLoopNum); @@ -5380,16 +5377,15 @@ void UpdateSysSizing(EnergyPlusData &state, Constant::CallIndicator const CallIn // sum up the heating mass flow rate for this time step Real64 adjHeatFlowSeq = termUnitSizing.applyTermUnitSizingHeatFlow(zoneSizing.HeatFlowSeq(TimeStepInDay), zoneSizing.HeatFlowSeqNoOA(TimeStepInDay)); - sysSizing.HeatFlowSeq(TimeStepInDay) += adjHeatFlowSeq / (1.0 + termUnitSizing.InducRat); + Real64 adjustedFlow = adjHeatFlowSeq / (1.0 + termUnitSizing.InducRat); + sysSizing.HeatFlowSeq(TimeStepInDay) += adjustedFlow; // sum up the zone heating load to be met by this system for this time step - sysSizing.SumZoneHeatLoadSeq(TimeStepInDay) += zoneSizing.HeatLoadSeq(TimeStepInDay) / (1.0 + termUnitSizing.InducRat); + sysSizing.SumZoneHeatLoadSeq(TimeStepInDay) += + termUnitSizing.applyTermUnitSizingHeatLoad(zoneSizing.HeatLoadSeq(TimeStepInDay) / (1.0 + termUnitSizing.InducRat)); // calculate the return air temperature for this time step - SysHeatRetTemp += - zoneSizing.HeatZoneRetTempSeq(TimeStepInDay) * zoneSizing.HeatFlowSeq(TimeStepInDay) / (1.0 + termUnitSizing.InducRat); - SysHeatRetHumRat += - zoneSizing.HeatZoneHumRatSeq(TimeStepInDay) * zoneSizing.HeatFlowSeq(TimeStepInDay) / (1.0 + termUnitSizing.InducRat); - SysHeatZoneAvgTemp += - zoneSizing.HeatZoneTempSeq(TimeStepInDay) * zoneSizing.HeatFlowSeq(TimeStepInDay) / (1.0 + termUnitSizing.InducRat); + SysHeatRetTemp += zoneSizing.HeatZoneRetTempSeq(TimeStepInDay) * adjustedFlow; + SysHeatRetHumRat += zoneSizing.HeatZoneHumRatSeq(TimeStepInDay) * adjustedFlow; + SysHeatZoneAvgTemp += zoneSizing.HeatZoneTempSeq(TimeStepInDay) * adjustedFlow; } // end heated zones loop // Get peak system heating load with coincident if (abs(sysSizing.SysDesHeatLoad) > abs(sysSizing.SumZoneHeatLoadSeq(TimeStepInDay))) { @@ -5466,16 +5462,15 @@ void UpdateSysSizing(EnergyPlusData &state, Constant::CallIndicator const CallIn // sum up the heating mass flow rate for this time step Real64 adjHeatFlowSeq = termUnitSizing.applyTermUnitSizingHeatFlow(zoneSizing.HeatFlowSeq(TimeStepInDay), zoneSizing.HeatFlowSeqNoOA(TimeStepInDay)); - sysSizing.HeatFlowSeq(TimeStepInDay) += adjHeatFlowSeq / (1.0 + termUnitSizing.InducRat); + Real64 adjustedFlow = adjHeatFlowSeq / (1.0 + termUnitSizing.InducRat); + sysSizing.HeatFlowSeq(TimeStepInDay) += adjustedFlow; // sum up the zone heating load to be met by this system for this time step - sysSizing.SumZoneHeatLoadSeq(TimeStepInDay) += zoneSizing.HeatLoadSeq(TimeStepInDay) / (1.0 + termUnitSizing.InducRat); + sysSizing.SumZoneHeatLoadSeq(TimeStepInDay) += + termUnitSizing.applyTermUnitSizingHeatLoad(zoneSizing.HeatLoadSeq(TimeStepInDay) / (1.0 + termUnitSizing.InducRat)); // calculate the return air temperature for this time step - SysHeatRetTemp += - zoneSizing.HeatZoneRetTempSeq(TimeStepInDay) * zoneSizing.HeatFlowSeq(TimeStepInDay) / (1.0 + termUnitSizing.InducRat); - SysHeatRetHumRat += - zoneSizing.HeatZoneHumRatSeq(TimeStepInDay) * zoneSizing.HeatFlowSeq(TimeStepInDay) / (1.0 + termUnitSizing.InducRat); - SysHeatZoneAvgTemp += - zoneSizing.HeatZoneTempSeq(TimeStepInDay) * zoneSizing.HeatFlowSeq(TimeStepInDay) / (1.0 + termUnitSizing.InducRat); + SysHeatRetTemp += zoneSizing.HeatZoneRetTempSeq(TimeStepInDay) * adjustedFlow; + SysHeatRetHumRat += zoneSizing.HeatZoneHumRatSeq(TimeStepInDay) * adjustedFlow; + SysHeatZoneAvgTemp += zoneSizing.HeatZoneTempSeq(TimeStepInDay) * adjustedFlow; } // end of cooled zones loop // Get peak system heating load with coincident if (fabs(sysSizing.SysDesHeatLoad) < fabs(sysSizing.SumZoneHeatLoadSeq(TimeStepInDay))) { diff --git a/src/EnergyPlus/SimAirServingZones.hh b/src/EnergyPlus/SimAirServingZones.hh index 3a476f92b3e..3262699bbb6 100644 --- a/src/EnergyPlus/SimAirServingZones.hh +++ b/src/EnergyPlus/SimAirServingZones.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SimulationManager.cc b/src/EnergyPlus/SimulationManager.cc index 5bafe68215e..3dbbdc89f45 100644 --- a/src/EnergyPlus/SimulationManager.cc +++ b/src/EnergyPlus/SimulationManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -1680,16 +1680,16 @@ namespace SimulationManager { print(state.files.audit, variable_fmt, "NumOfIVariable(Total)", state.dataOutputProcessor->NumTotalIVariable); print(state.files.audit, variable_fmt, "NumOfIVariable(Actual)", state.dataOutputProcessor->NumOfIVariable); print(state.files.audit, variable_fmt, "NumOfIVariable(Summed)", state.dataOutputProcessor->NumOfIVariable_Sum); - print(state.files.audit, variable_fmt, "MaxRVariable", state.dataOutputProcessor->MaxRVariable); - print(state.files.audit, variable_fmt, "MaxIVariable", state.dataOutputProcessor->MaxIVariable); - print(state.files.audit, variable_fmt, "NumEnergyMeters", state.dataOutputProcessor->NumEnergyMeters); - print(state.files.audit, variable_fmt, "NumVarMeterArrays", state.dataOutputProcessor->NumVarMeterArrays); + // print(state.files.audit, variable_fmt, "MaxRVariable", state.dataOutputProcessor->MaxRVariable); + // print(state.files.audit, variable_fmt, "MaxIVariable", state.dataOutputProcessor->MaxIVariable); + print(state.files.audit, variable_fmt, "NumEnergyMeters", state.dataOutputProcessor->meters.size()); + // print(state.files.audit, variable_fmt, "NumVarMeterArrays", state.dataOutputProcessor->NumVarMeterArrays); print(state.files.audit, variable_fmt, "maxUniqueKeyCount", state.dataOutRptTab->maxUniqueKeyCount); print(state.files.audit, variable_fmt, "maxNumberOfFigures", state.dataSolarShading->maxNumberOfFigures); print(state.files.audit, variable_fmt, "MAXHCArrayBounds", state.dataSolarShading->MAXHCArrayBounds); print(state.files.audit, variable_fmt, "MaxVerticesPerSurface", state.dataSurface->MaxVerticesPerSurface); - print(state.files.audit, variable_fmt, "NumReportList", state.dataOutputProcessor->NumReportList); - print(state.files.audit, variable_fmt, "InstMeterCacheSize", state.dataOutputProcessor->InstMeterCacheSize); + // print(state.files.audit, variable_fmt, "NumReportList", state.dataOutputProcessor->NumReportList); + // print(state.files.audit, variable_fmt, "InstMeterCacheSize", state.dataOutputProcessor->InstMeterCacheSize); if (state.dataSysVars->SutherlandHodgman) { if (state.dataSysVars->SlaterBarsky) { print(state.files.audit, " {}\n", "ClippingAlgorithm=SlaterBarskyandSutherlandHodgman"); diff --git a/src/EnergyPlus/SimulationManager.hh b/src/EnergyPlus/SimulationManager.hh index a14b95b365c..f32f523db67 100644 --- a/src/EnergyPlus/SimulationManager.hh +++ b/src/EnergyPlus/SimulationManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SingleDuct.cc b/src/EnergyPlus/SingleDuct.cc index e584d8e97f0..0252d2153c0 100644 --- a/src/EnergyPlus/SingleDuct.cc +++ b/src/EnergyPlus/SingleDuct.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -755,14 +755,14 @@ void GetSysInput(EnergyPlusData &state) // Setup the Average damper Position output variable SetupOutputVariable(state, "Zone Air Terminal VAV Damper Position", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSingleDuct->sd_airterminal(state.dataSingleDuct->SysNumGSI).DamperPosition, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataSingleDuct->sd_airterminal(state.dataSingleDuct->SysNumGSI).SysName); SetupOutputVariable(state, "Zone Air Terminal Minimum Air Flow Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSingleDuct->sd_airterminal(state.dataSingleDuct->SysNumGSI).ZoneMinAirFracReport, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1064,7 +1064,7 @@ void GetSysInput(EnergyPlusData &state) // Setup the Average damper Position output variable SetupOutputVariable(state, "Zone Air Terminal VAV Damper Position", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSingleDuct->sd_airterminal(state.dataSingleDuct->SysNumGSI).DamperPosition, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1777,14 +1777,14 @@ void GetSysInput(EnergyPlusData &state) // Setup the Average damper Position output variable SetupOutputVariable(state, "Zone Air Terminal VAV Damper Position", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSingleDuct->sd_airterminal(state.dataSingleDuct->SysNumGSI).DamperPosition, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataSingleDuct->sd_airterminal(state.dataSingleDuct->SysNumGSI).SysName); SetupOutputVariable(state, "Zone Air Terminal Minimum Air Flow Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSingleDuct->sd_airterminal(state.dataSingleDuct->SysNumGSI).ZoneMinAirFracReport, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1975,7 +1975,7 @@ void GetSysInput(EnergyPlusData &state) // Setup the Average damper Position output variable SetupOutputVariable(state, "Zone Air Terminal VAV Damper Position", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSingleDuct->sd_airterminal(state.dataSingleDuct->SysNumGSI).DamperPosition, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -2412,7 +2412,7 @@ void GetSysInput(EnergyPlusData &state) // Setup the Average damper Position output variable SetupOutputVariable(state, "Zone Air Terminal VAV Damper Position", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSingleDuct->sd_airterminal(state.dataSingleDuct->SysNumGSI).DamperPosition, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -2423,7 +2423,7 @@ void GetSysInput(EnergyPlusData &state) for (int sdIndex = 1; sdIndex <= state.dataSingleDuct->NumSDAirTerminal; ++sdIndex) { SetupOutputVariable(state, "Zone Air Terminal Outdoor Air Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataSingleDuct->sd_airterminal(sdIndex).OutdoorAirFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/SingleDuct.hh b/src/EnergyPlus/SingleDuct.hh index 68cfbf9d25d..f45c07cfe0d 100644 --- a/src/EnergyPlus/SingleDuct.hh +++ b/src/EnergyPlus/SingleDuct.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SizingAnalysisObjects.cc b/src/EnergyPlus/SizingAnalysisObjects.cc index a6e9e014a59..a72c0c79115 100644 --- a/src/EnergyPlus/SizingAnalysisObjects.cc +++ b/src/EnergyPlus/SizingAnalysisObjects.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -378,7 +378,7 @@ ZoneTimestepObject SizingLoggerFramework::PrepareZoneTimestepStamp(EnergyPlusDat locDayOfSim, state.dataGlobal->HourOfDay, state.dataGlobal->TimeStep, - *state.dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).TimeStep, + *state.dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].TimeStep, state.dataGlobal->NumOfTimeStepInHour); return tmpztStepStamp; @@ -404,13 +404,13 @@ void SizingLoggerFramework::UpdateSizingLogValuesSystemStep(EnergyPlusData &stat tmpztStepStamp = PrepareZoneTimestepStamp(state); // prepare system timestep stamp - tmpSysStepStamp.CurMinuteEnd = state.dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute; + tmpSysStepStamp.CurMinuteEnd = state.dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].CurMinute; if (tmpSysStepStamp.CurMinuteEnd == 0.0) { tmpSysStepStamp.CurMinuteEnd = MinutesPerHour; } tmpSysStepStamp.CurMinuteStart = - tmpSysStepStamp.CurMinuteEnd - (*state.dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep) * MinutesPerHour; - tmpSysStepStamp.TimeStepDuration = *state.dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep; + tmpSysStepStamp.CurMinuteEnd - (*state.dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep) * MinutesPerHour; + tmpSysStepStamp.TimeStepDuration = *state.dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep; for (auto &l : logObjs) { l.FillSysStep(tmpztStepStamp, tmpSysStepStamp); diff --git a/src/EnergyPlus/SizingAnalysisObjects.hh b/src/EnergyPlus/SizingAnalysisObjects.hh index b42559d49dd..52c20c35990 100644 --- a/src/EnergyPlus/SizingAnalysisObjects.hh +++ b/src/EnergyPlus/SizingAnalysisObjects.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SizingManager.cc b/src/EnergyPlus/SizingManager.cc index 5f440edd387..9d2c1b6f5f4 100644 --- a/src/EnergyPlus/SizingManager.cc +++ b/src/EnergyPlus/SizingManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SizingManager.hh b/src/EnergyPlus/SizingManager.hh index ff107d6d5d0..922787017dc 100644 --- a/src/EnergyPlus/SizingManager.hh +++ b/src/EnergyPlus/SizingManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SolarCollectors.cc b/src/EnergyPlus/SolarCollectors.cc index 90e0991e4ce..41619ff3e22 100644 --- a/src/EnergyPlus/SolarCollectors.cc +++ b/src/EnergyPlus/SolarCollectors.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -736,7 +736,7 @@ namespace SolarCollectors { // Setup report variables SetupOutputVariable(state, "Solar Collector Incident Angle Modifier", - OutputProcessor::Unit::None, + Constant::Units::None, this->IncidentAngleModifier, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -744,7 +744,7 @@ namespace SolarCollectors { SetupOutputVariable(state, "Solar Collector Efficiency", - OutputProcessor::Unit::None, + Constant::Units::None, this->Efficiency, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -752,7 +752,7 @@ namespace SolarCollectors { SetupOutputVariable(state, "Solar Collector Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -760,7 +760,7 @@ namespace SolarCollectors { SetupOutputVariable(state, "Solar Collector Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->HeatGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -768,7 +768,7 @@ namespace SolarCollectors { SetupOutputVariable(state, "Solar Collector Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->HeatLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -776,21 +776,20 @@ namespace SolarCollectors { SetupOutputVariable(state, "Solar Collector Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::SolarWater, + OutputProcessor::SOVEndUseCat::HeatProduced, {}, - "SolarWater", - "HeatProduced", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } else if (this->Type == DataPlant::PlantEquipmentType::SolarCollectorICS) { SetupOutputVariable(state, "Solar Collector Transmittance Absorptance Product", - OutputProcessor::Unit::None, + Constant::Units::None, this->TauAlpha, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -798,7 +797,7 @@ namespace SolarCollectors { SetupOutputVariable(state, "Solar Collector Overall Top Heat Loss Coefficient", - OutputProcessor::Unit::W_m2C, + Constant::Units::W_m2C, this->UTopLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -806,7 +805,7 @@ namespace SolarCollectors { SetupOutputVariable(state, "Solar Collector Absorber Plate Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->TempOfAbsPlate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -814,7 +813,7 @@ namespace SolarCollectors { SetupOutputVariable(state, "Solar Collector Storage Water Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->TempOfWater, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -822,7 +821,7 @@ namespace SolarCollectors { SetupOutputVariable(state, "Solar Collector Thermal Efficiency", - OutputProcessor::Unit::None, + Constant::Units::None, this->Efficiency, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -830,7 +829,7 @@ namespace SolarCollectors { SetupOutputVariable(state, "Solar Collector Storage Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->StoredHeatRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -838,20 +837,19 @@ namespace SolarCollectors { SetupOutputVariable(state, "Solar Collector Storage Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->StoredHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::SolarWater, + OutputProcessor::SOVEndUseCat::HeatProduced, {}, - "SolarWater", - "HeatProduced", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Solar Collector Skin Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->SkinHeatLossRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -859,20 +857,19 @@ namespace SolarCollectors { SetupOutputVariable(state, "Solar Collector Skin Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->CollHeatLossEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::SolarWater, + OutputProcessor::SOVEndUseCat::HeatProduced, {}, - "SolarWater", - "HeatProduced", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Solar Collector Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->HeatRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -880,16 +877,15 @@ namespace SolarCollectors { SetupOutputVariable(state, "Solar Collector Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->HeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::SolarWater, + OutputProcessor::SOVEndUseCat::HeatProduced, {}, - "SolarWater", - "HeatProduced", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } } diff --git a/src/EnergyPlus/SolarCollectors.hh b/src/EnergyPlus/SolarCollectors.hh index 4dd17e8075c..cd9289bfa42 100644 --- a/src/EnergyPlus/SolarCollectors.hh +++ b/src/EnergyPlus/SolarCollectors.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SolarReflectionManager.cc b/src/EnergyPlus/SolarReflectionManager.cc index be71b2ede06..da9355b0fbd 100644 --- a/src/EnergyPlus/SolarReflectionManager.cc +++ b/src/EnergyPlus/SolarReflectionManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -469,7 +469,7 @@ namespace SolarReflectionManager { if (ObsSurfNum == ObsSurfNumToSkip) continue; // Determine if this ray hits ObsSurfNum (in which case hit is true) and, if so, what the // distance from the receiving point to the hit point is - PierceSurface(state, ObsSurfNum, RecPt, RayVec, HitPt, hit); + hit = PierceSurface(state, ObsSurfNum, RecPt, RayVec, HitPt); if (hit) { // added TH 3/29/2010 to set ObsSurfNumToSkip if (state.dataSurface->Surface(ObsSurfNum).Class == SurfaceClass::Window) { @@ -752,12 +752,11 @@ namespace SolarReflectionManager { // For now it is assumed that obstructions that are shading surfaces are opaque. // An improvement here would be to allow these to have transmittance. - PierceSurface(state, - state.dataSolarReflectionManager->ObsSurfNum, - state.dataSolarReflectionManager->OriginThisRay, - state.dataSolarReflectionManager->SunVec, - state.dataSolarReflectionManager->ObsHitPt, - hit); + hit = PierceSurface(state, + state.dataSolarReflectionManager->ObsSurfNum, + state.dataSolarReflectionManager->OriginThisRay, + state.dataSolarReflectionManager->SunVec, + state.dataSolarReflectionManager->ObsHitPt); if (hit) break; // An obstruction was hit } if (hit) continue; // Sun does not reach this ray's hit point @@ -955,12 +954,11 @@ namespace SolarReflectionManager { for (int RecPtNum = 1; RecPtNum <= NumRecPts; ++RecPtNum) { // See if ray from receiving point to mirrored sun hits the reflecting surface state.dataSolarReflectionManager->RecPt = state.dataSolarReflectionManager->SolReflRecSurf(RecSurfNum).RecPt(RecPtNum); - PierceSurface(state, - ReflSurfNum, - state.dataSolarReflectionManager->RecPt, - state.dataSolarReflectionManager->SunVecMir, - state.dataSolarReflectionManager->HitPtRefl, - hitRefl); + hitRefl = PierceSurface(state, + ReflSurfNum, + state.dataSolarReflectionManager->RecPt, + state.dataSolarReflectionManager->SunVecMir, + state.dataSolarReflectionManager->HitPtRefl); if (hitRefl) { // Reflecting surface was hit ReflDistanceSq = distance_squared(state.dataSolarReflectionManager->HitPtRefl, state.dataSolarReflectionManager->RecPt); @@ -972,14 +970,13 @@ namespace SolarReflectionManager { ++loop2) { int const ObsSurfNum = state.dataSolarReflectionManager->SolReflRecSurf(RecSurfNum).PossibleObsSurfNums(loop2); if (ObsSurfNum == ReflSurfNum || ObsSurfNum == state.dataSurface->Surface(ReflSurfNum).BaseSurf) continue; - PierceSurface(state, - ObsSurfNum, - state.dataSolarReflectionManager->RecPt, - state.dataSolarReflectionManager->SunVecMir, - ReflDistance, - state.dataSolarReflectionManager->HitPtObs, - hitObs); // ReflDistance cutoff added - if (hitObs) { // => Could skip distance check (unless < vs <= ReflDistance really matters) + hitObs = PierceSurface(state, + ObsSurfNum, + state.dataSolarReflectionManager->RecPt, + state.dataSolarReflectionManager->SunVecMir, + ReflDistance, + state.dataSolarReflectionManager->HitPtObs); // ReflDistance cutoff added + if (hitObs) { // => Could skip distance check (unless < vs <= ReflDistance really matters) if (distance_squared(state.dataSolarReflectionManager->HitPtObs, state.dataSolarReflectionManager->RecPt) < ReflDistanceSq) { hitObsRefl = true; @@ -1003,12 +1000,11 @@ namespace SolarReflectionManager { ++loop2) { int const ObsSurfNum = state.dataSolarReflectionManager->SolReflRecSurf(ReflSurfRecNum).PossibleObsSurfNums(loop2); - PierceSurface(state, - ObsSurfNum, - state.dataSolarReflectionManager->HitPtRefl, - state.dataSolarReflectionManager->SunVect, - state.dataSolarReflectionManager->HitPtObs, - hitObs); + hitObs = PierceSurface(state, + ObsSurfNum, + state.dataSolarReflectionManager->HitPtRefl, + state.dataSolarReflectionManager->SunVect, + state.dataSolarReflectionManager->HitPtObs); if (hitObs) break; } } @@ -1023,12 +1019,11 @@ namespace SolarReflectionManager { if (ObsSurfNum == ReflSurfNum - 1) continue; } - PierceSurface(state, - ObsSurfNum, - state.dataSolarReflectionManager->HitPtRefl, - state.dataSolarReflectionManager->SunVect, - state.dataSolarReflectionManager->HitPtObs, - hitObs); + hitObs = PierceSurface(state, + ObsSurfNum, + state.dataSolarReflectionManager->HitPtRefl, + state.dataSolarReflectionManager->SunVect, + state.dataSolarReflectionManager->HitPtObs); if (hitObs) break; } } @@ -1249,12 +1244,11 @@ namespace SolarReflectionManager { continue; } } - PierceSurface(state, - state.dataSolarReflectionManager->iObsSurfNum, - state.dataSolarReflectionManager->HitPntRefl, - state.dataSolarReflectionManager->URay, - state.dataSolarReflectionManager->HitPntObs, - hitObs); + hitObs = PierceSurface(state, + state.dataSolarReflectionManager->iObsSurfNum, + state.dataSolarReflectionManager->HitPntRefl, + state.dataSolarReflectionManager->URay, + state.dataSolarReflectionManager->HitPntObs); if (hitObs) break; } if (hitObs) continue; // Obstruction hit diff --git a/src/EnergyPlus/SolarReflectionManager.hh b/src/EnergyPlus/SolarReflectionManager.hh index 4a5596b2ec4..1109541ab04 100644 --- a/src/EnergyPlus/SolarReflectionManager.hh +++ b/src/EnergyPlus/SolarReflectionManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SolarShading.cc b/src/EnergyPlus/SolarShading.cc index dca47bdca03..aa9361e7509 100644 --- a/src/EnergyPlus/SolarShading.cc +++ b/src/EnergyPlus/SolarShading.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -843,7 +843,6 @@ void AllocateModuleArrays(EnergyPlusData &state) // METHODOLOGY EMPLOYED: // Allocation is dependent on the user input file. - int SurfLoop; int I; int NumOfLayers; int constexpr HoursInDay(24); @@ -1056,35 +1055,35 @@ void AllocateModuleArrays(EnergyPlusData &state) std::string &thisEnclosureName = state.dataViewFactor->EnclSolInfo(enclosureNum).Name; SetupOutputVariable(state, "Zone Windows Total Transmitted Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneTransSolar(enclosureNum), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, thisEnclosureName); SetupOutputVariable(state, "Zone Exterior Windows Total Transmitted Beam Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneBmSolFrExtWinsRep(enclosureNum), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, thisEnclosureName); SetupOutputVariable(state, "Zone Interior Windows Total Transmitted Beam Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneBmSolFrIntWinsRep(enclosureNum), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, thisEnclosureName); SetupOutputVariable(state, "Zone Exterior Windows Total Transmitted Diffuse Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneDifSolFrExtWinsRep(enclosureNum), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, thisEnclosureName); SetupOutputVariable(state, "Zone Interior Windows Total Transmitted Diffuse Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneDifSolFrIntWinsRep(enclosureNum), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -1092,35 +1091,35 @@ void AllocateModuleArrays(EnergyPlusData &state) // Energy variables SetupOutputVariable(state, "Zone Windows Total Transmitted Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneTransSolarEnergy(enclosureNum), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, thisEnclosureName); SetupOutputVariable(state, "Zone Exterior Windows Total Transmitted Beam Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneBmSolFrExtWinsRepEnergy(enclosureNum), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, thisEnclosureName); SetupOutputVariable(state, "Zone Interior Windows Total Transmitted Beam Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneBmSolFrIntWinsRepEnergy(enclosureNum), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, thisEnclosureName); SetupOutputVariable(state, "Zone Exterior Windows Total Transmitted Diffuse Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneDifSolFrExtWinsRepEnergy(enclosureNum), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, thisEnclosureName); SetupOutputVariable(state, "Zone Interior Windows Total Transmitted Diffuse Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneDifSolFrIntWinsRepEnergy(enclosureNum), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -1129,28 +1128,28 @@ void AllocateModuleArrays(EnergyPlusData &state) for (int ZoneLoop = 1; ZoneLoop <= state.dataGlobal->NumOfZones; ++ZoneLoop) { SetupOutputVariable(state, "Zone Windows Total Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneWinHeatGainRep(ZoneLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(ZoneLoop).Name); SetupOutputVariable(state, "Zone Windows Total Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneWinHeatLossRep(ZoneLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(ZoneLoop).Name); SetupOutputVariable(state, "Zone Windows Total Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneWinHeatGainRepEnergy(ZoneLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(ZoneLoop).Name); SetupOutputVariable(state, "Zone Windows Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneWinHeatLossRepEnergy(ZoneLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -1159,14 +1158,14 @@ void AllocateModuleArrays(EnergyPlusData &state) // CurrentModuleObject='Zone(Advanced)' SetupOutputVariable(state, "Zone Opaque Surface Inside Faces Total Conduction Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneOpaqSurfInsFaceCondGainRep(ZoneLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(ZoneLoop).Name); SetupOutputVariable(state, "Zone Opaque Surface Inside Faces Total Conduction Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneOpaqSurfInsFaceCondLossRep(ZoneLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -1174,14 +1173,14 @@ void AllocateModuleArrays(EnergyPlusData &state) // Energy variables SetupOutputVariable(state, "Zone Opaque Surface Inside Faces Total Conduction Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnOpqSurfInsFaceCondGnRepEnrg(ZoneLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(ZoneLoop).Name); SetupOutputVariable(state, "Zone Opaque Surface Inside Faces Total Conduction Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnOpqSurfInsFaceCondLsRepEnrg(ZoneLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -1191,359 +1190,359 @@ void AllocateModuleArrays(EnergyPlusData &state) DisplayString(state, "Initializing Surface (Shading) Report Variables"); // CurrentModuleObject='Surfaces' - for (SurfLoop = 1; SurfLoop <= state.dataSurface->TotSurfaces; ++SurfLoop) { + for (int SurfLoop = 1; SurfLoop <= state.dataSurface->TotSurfaces; ++SurfLoop) { + auto &surf = state.dataSurface->Surface(SurfLoop); SetupOutputVariable(state, "Surface Outside Normal Azimuth Angle", - OutputProcessor::Unit::deg, - state.dataSurface->Surface(SurfLoop).Azimuth, + Constant::Units::deg, + surf.Azimuth, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); - if (state.dataSurface->Surface(SurfLoop).ExtSolar) { + surf.Name); + if (surf.ExtSolar) { SetupOutputVariable(state, "Surface Outside Face Sunlit Area", - OutputProcessor::Unit::m2, + Constant::Units::m2, state.dataSurface->SurfSunlitArea(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Outside Face Sunlit Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfSunlitFrac(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Outside Face Incident Solar Radiation Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBal->SurfQRadSWOutIncident(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Outside Face Incident Beam Solar Radiation Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBal->SurfQRadSWOutIncidentBeam(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Outside Face Incident Sky Diffuse Solar Radiation Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBal->SurfQRadSWOutIncidentSkyDiffuse(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Outside Face Incident Ground Diffuse Solar Radiation Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBal->SurfQRadSWOutIncidentGndDiffuse(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Outside Face Beam Solar Incident Angle Cosine Value", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataHeatBal->SurfCosIncidenceAngle(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Outside Face Incident Sky Diffuse Ground Reflected Solar Radiation Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBal->SurfQRadSWOutIncSkyDiffReflGnd(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Outside Face Incident Sky Diffuse Surface Reflected Solar Radiation Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBal->SurfQRadSWOutIncSkyDiffReflObs(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Outside Face Incident Beam To Beam Surface Reflected Solar Radiation Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBal->SurfQRadSWOutIncBmToBmReflObs(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Outside Face Incident Beam To Diffuse Surface Reflected Solar Radiation Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBal->SurfQRadSWOutIncBmToDiffReflObs(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Outside Face Incident Beam To Diffuse Ground Reflected Solar Radiation Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBal->SurfQRadSWOutIncBmToDiffReflGnd(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Anisotropic Sky Multiplier", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSolarShading->SurfAnisoSkyMult(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window BSDF Beam Direction Number", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataHeatBal->SurfWinBSDFBeamDirectionRep(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window BSDF Beam Theta Angle", - OutputProcessor::Unit::rad, + Constant::Units::rad, state.dataHeatBal->SurfWinBSDFBeamThetaRep(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window BSDF Beam Phi Angle", - OutputProcessor::Unit::rad, + Constant::Units::rad, state.dataHeatBal->SurfWinBSDFBeamPhiRep(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } - if (!state.dataSurface->Surface(SurfLoop).HeatTransSurf) continue; + if (!surf.HeatTransSurf) continue; - if (state.dataSurface->Surface(SurfLoop).Class == SurfaceClass::Window) { + if (surf.Class == SurfaceClass::Window) { // CurrentModuleObject='Windows/GlassDoors' - if (state.dataSurface->Surface(SurfLoop).ExtSolar) { + if (surf.ExtSolar) { SetupOutputVariable(state, "Surface Window Total Glazing Layers Absorbed Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->SurfWinQRadSWwinAbsTot(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Total Glazing Layers Absorbed Shortwave Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->SurfWinSWwinAbsTotalReport(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); - if (state.dataConstruction->Construct(state.dataSurface->Surface(SurfLoop).Construction).WindowTypeBSDF) { - NumOfLayers = state.dataConstruction->Construct(state.dataSurface->Surface(SurfLoop).Construction).TotSolidLayers; + if (state.dataConstruction->Construct(surf.Construction).WindowTypeBSDF) { + NumOfLayers = state.dataConstruction->Construct(surf.Construction).TotSolidLayers; } else { - NumOfLayers = state.dataConstruction->Construct(state.dataSurface->Surface(SurfLoop).Construction).TotLayers; + NumOfLayers = state.dataConstruction->Construct(surf.Construction).TotLayers; } for (I = 1; I <= NumOfLayers; ++I) { - if (state.dataConstruction->Construct(state.dataSurface->Surface(SurfLoop).Construction).WindowTypeBSDF) { + if (state.dataConstruction->Construct(surf.Construction).WindowTypeBSDF) { SetupOutputVariable(state, format("Surface Window Total Absorbed Shortwave Radiation Rate Layer {}", I), - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->SurfWinQRadSWwinAbsLayer(SurfLoop, I), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } - if (state.dataConstruction->Construct(state.dataSurface->Surface(SurfLoop).Construction).WindowTypeBSDF || (I == 1)) { + if (state.dataConstruction->Construct(surf.Construction).WindowTypeBSDF || (I == 1)) { SetupOutputVariable(state, format("Surface Window Front Face Temperature Layer {}", I), - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBal->SurfWinFenLaySurfTempFront(SurfLoop, I), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } - if (state.dataConstruction->Construct(state.dataSurface->Surface(SurfLoop).Construction).WindowTypeBSDF || (I == NumOfLayers)) { + if (state.dataConstruction->Construct(surf.Construction).WindowTypeBSDF || (I == NumOfLayers)) { SetupOutputVariable(state, format("Surface Window Back Face Temperature Layer {}", I), - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBal->SurfWinFenLaySurfTempBack(SurfLoop, I), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } } SetupOutputVariable(state, "Surface Window Transmitted Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinTransSolar(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Transmitted Beam Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinBmSolar(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); // added TH 12/9/2009 SetupOutputVariable(state, "Surface Window Transmitted Beam To Beam Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinBmBmSolar(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Transmitted Beam To Diffuse Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinBmDifSolar(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Transmitted Diffuse Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinDifSolar(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinHeatGainRep(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinHeatLossRep(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Gap Convective Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinGapConvHtFlowRep(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Shading Device Absorbed Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinShadingAbsorbedSolar(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Net Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinHeatGain(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); if (state.dataGlobal->DisplayAdvancedReportVariables) { // CurrentModuleObject='Windows/GlassDoors(Advanced)' SetupOutputVariable(state, "Surface Window Inside Face Glazing Zone Convection Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinGainConvGlazToZoneRep(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Inside Face Glazing Net Infrared Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinGainIRGlazToZoneRep(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Shortwave from Zone Back Out Window Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinLossSWZoneToOutWinRep(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Inside Face Frame and Divider Zone Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinGainFrameDividerToZoneRep(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Inside Face Gap between Shade and Glazing Zone Convection Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinConvHeatFlowNatural(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Inside Face Shade Zone Convection Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinGainConvShadeToZoneRep(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Inside Face Shade Net Infrared Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinGainIRShadeToZoneRep(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); - if (state.dataConstruction->Construct(state.dataSurface->Surface(SurfLoop).Construction).WindowTypeEQL) { + surf.Name); + if (state.dataConstruction->Construct(surf.Construction).WindowTypeEQL) { SetupOutputVariable(state, "Surface Window Inside Face Other Convection Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinOtherConvHeatGain(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } } // Added TH 12/23/2008 for thermochromic windows // CurrentModuleObject='Thermochromic Windows' - if (state.dataConstruction->Construct(state.dataSurface->Surface(SurfLoop).Construction).TCFlag == 1) { + if (state.dataConstruction->Construct(surf.Construction).TCFlag == 1) { SetupOutputVariable(state, "Surface Window Thermochromic Layer Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSurface->SurfWinTCLayerTemp(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Thermochromic Layer Property Specification Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSurface->SurfWinSpecTemp(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } // Added TH 5/26/2009 for switchable windows to report switching factor (tinted level) // CurrentModuleObject='Switchable Windows' - if (state.dataSurface->Surface(SurfLoop).HasShadeControl) { - if (state.dataSurface->WindowShadingControl(state.dataSurface->Surface(SurfLoop).activeWindowShadingControl).ShadingType == - WinShadingType::SwitchableGlazing) { + if (surf.HasShadeControl) { + if (state.dataSurface->WindowShadingControl(surf.activeWindowShadingControl).ShadingType == WinShadingType::SwitchableGlazing) { // IF (SurfaceWindow(SurfLoop)%ShadingFlag == WinShadingType::SwitchableGlazing) THEN !ShadingFlag is not set to // WinShadingType::SwitchableGlazing yet! SetupOutputVariable(state, "Surface Window Switchable Glazing Switching Factor", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinSwitchingFactor(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Switchable Glazing Visible Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinVisTransSelected(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } } @@ -1551,258 +1550,258 @@ void AllocateModuleArrays(EnergyPlusData &state) // CurrentModuleObject='Window Frames' SetupOutputVariable(state, "Surface Window Frame Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinFrameHeatGain(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Frame Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinFrameHeatLoss(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Frame Inside Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSurface->SurfWinFrameTempIn(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Frame Outside Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSurface->SurfWinFrameTempSurfOut(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } if (state.dataSurface->SurfWinDividerArea(SurfLoop) > 0.0) { // CurrentModuleObject='Window Dividers' SetupOutputVariable(state, "Surface Window Divider Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinDividerHeatGain(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Divider Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinDividerHeatLoss(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Divider Inside Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSurface->SurfWinDividerTempIn(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Divider Outside Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSurface->SurfWinDividerTempSurfOut(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } // CurrentModuleObject='Windows' // Energy SetupOutputVariable(state, "Surface Window Total Glazing Layers Absorbed Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->SurfWinQRadSWwinAbsTotEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Transmitted Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinTransSolarEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Transmitted Beam Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinBmSolarEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); // added TH 12/9/2009 SetupOutputVariable(state, "Surface Window Transmitted Beam To Beam Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinBmBmSolarEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Transmitted Beam To Diffuse Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinBmDifSolarEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Transmitted Diffuse Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinDifSolarEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinHeatGainRepEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinHeatLossRepEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Gap Convective Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinGapConvHtFlowRepEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Shading Device Absorbed Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinShadingAbsorbedSolarEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Net Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinHeatTransferRepEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window System Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinSysSolTransmittance(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window System Solar Reflectance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinSysSolReflectance(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window System Solar Absorptance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinSysSolAbsorptance(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Inside Face Glazing Condensation Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinInsideGlassCondensationFlag(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Inside Face Frame Condensation Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinInsideFrameCondensationFlag(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Inside Face Divider Condensation Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinInsideDividerCondensationFlag(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); // Outside reveal report variables // IF (Surface(SurfLoop)%Reveal > 0.0) THEN SetupOutputVariable(state, "Surface Window Outside Reveal Reflected Beam Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinBmSolRefldOutsRevealReport(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); // Energy SetupOutputVariable(state, "Surface Window Outside Reveal Reflected Beam Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinBmSolRefldOutsRevealRepEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); // ENDIF // Inside reveal report variables if (state.dataSurface->SurfWinInsideReveal(SurfLoop) > 0.0 || state.dataSurface->SurfWinInsideSillDepth(SurfLoop) > 0.0) { SetupOutputVariable(state, "Surface Window Inside Reveal Reflected Beam Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinBmSolRefldInsRevealReport(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); // Energy SetupOutputVariable(state, "Surface Window Inside Reveal Reflected Beam Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinBmSolRefldInsRevealRepEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); // Added report variables for inside reveal to debug CR 7596. TH 5/26/2009 // All reflected solar by the inside reveal is turned into diffuse SetupOutputVariable(state, "Surface Window Inside Reveal Absorbed Beam Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinBmSolAbsdInsRevealReport(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Inside Reveal Reflected Diffuse Zone Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinInsRevealDiffIntoZoneReport(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Inside Reveal Reflected Diffuse Frame Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinInsRevealDiffOntoFrameReport(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Inside Reveal Reflected Diffuse Glazing Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinInsRevealDiffOntoGlazingReport(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } // Output blind report variables only when blinds are used @@ -1810,706 +1809,706 @@ void AllocateModuleArrays(EnergyPlusData &state) // CurrentModuleObject='Window Blinds' SetupOutputVariable(state, "Surface Window Blind Beam to Beam Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinBlTsolBmBm(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Blind Beam to Diffuse Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinBlTsolBmDif(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Blind Diffuse to Diffuse Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinBlTsolDifDif(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Blind and Glazing System Beam Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinBlGlSysTsolBmBm(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Blind and Glazing System Diffuse Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinBlGlSysTsolDifDif(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } // Output screen report variables only when screens are used - if (state.dataSurface->SurfWinScreenNumber(SurfLoop) > 0) { + if (state.dataSurface->SurfaceWindow(SurfLoop).screenNum > 0) { // CurrentModuleObject='Window Screens' SetupOutputVariable(state, "Surface Window Screen Beam to Beam Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinScTsolBmBm(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Screen Beam to Diffuse Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinScTsolBmDif(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Screen Diffuse to Diffuse Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinScTsolDifDif(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Screen and Glazing System Beam Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinScGlSysTsolBmBm(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Screen and Glazing System Diffuse Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinScGlSysTsolDifDif(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } // CurrentModuleObject='Windows' SetupOutputVariable(state, "Surface Window Solar Horizontal Profile Angle", - OutputProcessor::Unit::deg, + Constant::Units::deg, state.dataSurface->SurfWinProfileAngHor(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Solar Vertical Profile Angle", - OutputProcessor::Unit::deg, + Constant::Units::deg, state.dataSurface->SurfWinProfileAngVert(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Glazing Beam to Beam Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinGlTsolBmBm(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Glazing Beam to Diffuse Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinGlTsolBmDif(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Glazing Diffuse to Diffuse Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinGlTsolDifDif(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Model Solver Iteration Count", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinWindowCalcIterationsRep(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } else { // Not ExtSolar if (state.dataGlobal->DisplayAdvancedReportVariables) { // CurrentModuleObject='InteriorWindows(Advanced)' - if (state.dataSurface->SurfWinOriginalClass(SurfLoop) != SurfaceClass::TDD_Diffuser) { + if (surf.OriginalClass != SurfaceClass::TDD_Diffuser) { SetupOutputVariable(state, "Surface Window Total Glazing Layers Absorbed Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->SurfWinQRadSWwinAbsTot(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } SetupOutputVariable(state, "Surface Window Total Glazing Layers Absorbed Shortwave Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->SurfWinSWwinAbsTotalReport(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); - if (state.dataSurface->SurfWinOriginalClass(SurfLoop) != SurfaceClass::TDD_Diffuser) { + if (surf.OriginalClass != SurfaceClass::TDD_Diffuser) { SetupOutputVariable(state, "Surface Window Transmitted Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinTransSolar(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } SetupOutputVariable(state, "Surface Window Transmitted Beam Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinBmSolar(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); // added TH 12/9/2009 SetupOutputVariable(state, "Surface Window Transmitted Beam To Beam Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinBmBmSolar(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Transmitted Beam To Diffuse Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinBmDifSolar(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Transmitted Diffuse Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinDifSolar(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinHeatGainRep(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinHeatLossRep(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Gap Convective Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinGapConvHtFlowRep(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Shading Device Absorbed Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinShadingAbsorbedSolar(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); if (state.dataSurface->SurfWinFrameArea(SurfLoop) > 0.0) { SetupOutputVariable(state, "Surface Window Frame Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinFrameHeatGain(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Frame Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinFrameHeatLoss(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Frame Inside Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSurface->SurfWinFrameTempIn(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Frame Outside Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSurface->SurfWinFrameTempSurfOut(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } if (state.dataSurface->SurfWinDividerArea(SurfLoop) > 0.0) { SetupOutputVariable(state, "Surface Window Divider Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinDividerHeatGain(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Divider Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinDividerHeatLoss(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Divider Inside Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSurface->SurfWinDividerTempIn(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Divider Outside Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSurface->SurfWinDividerTempSurfOut(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } // Energy - if (state.dataSurface->SurfWinOriginalClass(SurfLoop) != SurfaceClass::TDD_Diffuser) { + if (surf.OriginalClass != SurfaceClass::TDD_Diffuser) { SetupOutputVariable(state, "Surface Window Total Glazing Layers Absorbed Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->SurfWinQRadSWwinAbsTotEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } - if (state.dataSurface->SurfWinOriginalClass(SurfLoop) != SurfaceClass::TDD_Diffuser) { + if (surf.OriginalClass != SurfaceClass::TDD_Diffuser) { SetupOutputVariable(state, "Surface Window Transmitted Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinTransSolarEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } SetupOutputVariable(state, "Surface Window Transmitted Beam Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinBmSolarEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Transmitted Beam To Beam Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinBmBmSolarEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Transmitted Beam To Diffuse Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinBmDifSolarEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Transmitted Diffuse Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinDifSolarEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinHeatGainRepEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinHeatLossRepEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Gap Convective Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinGapConvHtFlowRepEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Shading Device Absorbed Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinShadingAbsorbedSolarEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window System Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinSysSolTransmittance(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window System Solar Reflectance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinSysSolReflectance(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window System Solar Absorptance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinSysSolAbsorptance(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Inside Face Glazing Condensation Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinInsideGlassCondensationFlag(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Inside Face Frame Condensation Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinInsideFrameCondensationFlag(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Inside Face Divider Condensation Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinInsideDividerCondensationFlag(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Outside Reveal Reflected Beam Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinBmSolRefldOutsRevealReport(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Inside Reveal Reflected Beam Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinBmSolRefldInsRevealReport(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); // Energy SetupOutputVariable(state, "Surface Window Outside Reveal Reflected Beam Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinBmSolRefldOutsRevealRepEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Inside Reveal Reflected Beam Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinBmSolRefldInsRevealRepEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); // Output blind report variables only when blinds are used if (state.dataSurface->SurfWinBlindNumber(SurfLoop) > 0) { SetupOutputVariable(state, "Surface Window Blind Beam to Beam Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinBlTsolBmBm(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Blind Beam to Diffuse Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinBlTsolBmDif(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Blind Diffuse to Diffuse Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinBlTsolDifDif(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Blind and Glazing System Beam Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinBlGlSysTsolBmBm(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Blind and Glazing System Diffuse Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinBlGlSysTsolDifDif(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } // Output screen report variables only when screens are used - if (state.dataSurface->SurfWinScreenNumber(SurfLoop) > 0) { + if (state.dataSurface->SurfaceWindow(SurfLoop).screenNum > 0) { SetupOutputVariable(state, "Surface Window Screen Beam to Beam Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinScTsolBmBm(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Screen Beam to Diffuse Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinScTsolBmDif(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Screen Diffuse to Diffuse Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinScTsolDifDif(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Screen and Glazing System Beam Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinScGlSysTsolBmBm(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Screen and Glazing System Diffuse Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinScGlSysTsolDifDif(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } SetupOutputVariable(state, "Surface Window Solar Horizontal Profile Angle", - OutputProcessor::Unit::deg, + Constant::Units::deg, state.dataSurface->SurfWinProfileAngHor(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Solar Vertical Profile Angle", - OutputProcessor::Unit::deg, + Constant::Units::deg, state.dataSurface->SurfWinProfileAngVert(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Glazing Beam to Beam Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinGlTsolBmBm(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Glazing Beam to Diffuse Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinGlTsolBmDif(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Glazing Diffuse to Diffuse Solar Transmittance", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinGlTsolDifDif(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Model Solver Iteration Count", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSurface->SurfWinWindowCalcIterationsRep(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } } // end non extsolar reporting as advanced variables } // Window Reporting - if (state.dataSurface->Surface(SurfLoop).Class == SurfaceClass::Window && state.dataSurface->Surface(SurfLoop).ExtBoundCond > 0 && - state.dataSurface->Surface(SurfLoop).ExtBoundCond != SurfLoop) { // Interzone window - // CurrentModuleObject='InterzoneWindows' + if (surf.Class == SurfaceClass::Window && surf.ExtBoundCond > 0 && surf.ExtBoundCond != SurfLoop) { // Interzone window + // CurrentModuleObject='InterzoneWindows' SetupOutputVariable(state, "Surface Window Transmitted Beam Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinBmSolTransThruIntWinRep(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); // energy SetupOutputVariable(state, "Surface Window Transmitted Beam Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinBmSolTransThruIntWinRepEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } - if (state.dataSurface->Surface(SurfLoop).Class == SurfaceClass::TDD_Dome && state.dataSurface->Surface(SurfLoop).ExtSolar) { + if (surf.Class == SurfaceClass::TDD_Dome && surf.ExtSolar) { // CurrentModuleObject='TDD Domes' SetupOutputVariable(state, "Surface Window Total Glazing Layers Absorbed Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->SurfWinQRadSWwinAbsTot(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Transmitted Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinTransSolar(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); // energy SetupOutputVariable(state, "Surface Window Total Glazing Layers Absorbed Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->SurfWinQRadSWwinAbsTotEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Transmitted Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinTransSolarEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } - if (state.dataSurface->SurfWinOriginalClass(SurfLoop) == SurfaceClass::TDD_Diffuser) { + if (surf.OriginalClass == SurfaceClass::TDD_Diffuser) { // CurrentModuleObject='TDD Diffusers' SetupOutputVariable(state, "Surface Outside Face Incident Solar Radiation Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBal->SurfQRadSWOutIncident(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Total Glazing Layers Absorbed Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->SurfWinQRadSWwinAbsTot(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Transmitted Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurface->SurfWinTransSolar(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); // energy SetupOutputVariable(state, "Surface Window Total Glazing Layers Absorbed Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->SurfWinQRadSWwinAbsTotEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Window Transmitted Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurface->SurfWinTransSolarEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } } - for (SurfLoop = 1; SurfLoop <= state.dataSurface->TotSurfaces; ++SurfLoop) { - if (!state.dataSurface->Surface(SurfLoop).HeatTransSurf) continue; + for (int SurfLoop = 1; SurfLoop <= state.dataSurface->TotSurfaces; ++SurfLoop) { + auto &surf = state.dataSurface->Surface(SurfLoop); + if (!surf.HeatTransSurf) continue; // CurrentModuleObject='Surfaces' SetupOutputVariable(state, "Surface Inside Face Exterior Windows Incident Beam Solar Radiation Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBal->SurfBmIncInsSurfIntensRep(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Inside Face Exterior Windows Incident Beam Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->SurfBmIncInsSurfAmountRep(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Inside Face Interior Windows Incident Beam Solar Radiation Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataHeatBal->SurfIntBmIncInsSurfIntensRep(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Inside Face Interior Windows Incident Beam Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->SurfIntBmIncInsSurfAmountRep(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Inside Face Initial Transmitted Diffuse Absorbed Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->SurfInitialDifSolInAbsReport(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Inside Face Initial Transmitted Diffuse Transmitted Out Window Solar Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->SurfWinInitialDifSolInTransReport(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Inside Face Absorbed Shortwave Radiation Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->SurfSWInAbsTotalReport(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); // energy SetupOutputVariable(state, "Surface Inside Face Exterior Windows Incident Beam Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->SurfBmIncInsSurfAmountRepEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); SetupOutputVariable(state, "Surface Inside Face Interior Windows Incident Beam Solar Radiation Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->SurfIntBmIncInsSurfAmountRepEnergy(SurfLoop), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, - state.dataSurface->Surface(SurfLoop).Name); + surf.Name); } } @@ -4890,14 +4889,14 @@ void CalcPerSolarBeam(EnergyPlusData &state, state.dataHeatBal->SurfWinOverlapAreas(hour, timestep, backSurfNum, surfNum) = 0.0; } } - } - } - } - } + } // for (timestep) + } // for (hour) + } // for (spaceNum) + } // for (zoneNum) for (auto &e : state.dataSurface->SurfaceWindow) { - e.OutProjSLFracMult = 1.0; - e.InOutProjSLFracMult = 1.0; + std::fill(e.OutProjSLFracMult.begin(), e.OutProjSLFracMult.end(), 1.0); + std::fill(e.InOutProjSLFracMult.begin(), e.InOutProjSLFracMult.end(), 1.0); } } else { for (int zoneNum = 1; zoneNum <= state.dataGlobal->NumOfZones; ++zoneNum) { @@ -4924,8 +4923,8 @@ void CalcPerSolarBeam(EnergyPlusData &state, } for (int SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; ++SurfNum) { - state.dataSurface->SurfaceWindow(SurfNum).OutProjSLFracMult(state.dataGlobal->HourOfDay) = 1.0; - state.dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult(state.dataGlobal->HourOfDay) = 1.0; + state.dataSurface->SurfaceWindow(SurfNum).OutProjSLFracMult[state.dataGlobal->HourOfDay] = 1.0; + state.dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult[state.dataGlobal->HourOfDay] = 1.0; } } @@ -6286,7 +6285,8 @@ void CalcInteriorSolarOverlaps(EnergyPlusData &state, ++JBKS; state.dataHeatBal->SurfWinBackSurfaces(iHour, TS, JBKS, HTSS) = bkSurfNum; Real64 OverlapArea = pssas[state.dataSurface->SurfPenumbraID(bkSurfNum)] / state.dataSolarShading->SurfSunCosTheta(HTSS); - state.dataHeatBal->SurfWinOverlapAreas(iHour, TS, JBKS, HTSS) = OverlapArea * state.dataSurface->SurfWinGlazedFrac(HTSS); + state.dataHeatBal->SurfWinOverlapAreas(iHour, TS, JBKS, HTSS) = + OverlapArea * state.dataSurface->SurfaceWindow(HTSS).glazedFrac; } } } @@ -6329,7 +6329,8 @@ void CalcInteriorSolarOverlaps(EnergyPlusData &state, if (JBKS <= state.dataBSDFWindow->MaxBkSurf) { state.dataHeatBal->SurfWinBackSurfaces(iHour, TS, JBKS, HTSS) = BackSurfNum; int baseSurfaceNum = state.dataSurface->Surface(BackSurfNum).BaseSurf; - state.dataHeatBal->SurfWinOverlapAreas(iHour, TS, JBKS, HTSS) = OverlapArea * state.dataSurface->SurfWinGlazedFrac(HTSS); + state.dataHeatBal->SurfWinOverlapAreas(iHour, TS, JBKS, HTSS) = + OverlapArea * state.dataSurface->SurfaceWindow(HTSS).glazedFrac; // If this is a subsurface, subtract its overlap area from its base surface if (baseSurfaceNum != BackSurfNum) { for (int iBaseBKS = 1; iBaseBKS <= JBKS; ++iBaseBKS) { @@ -6454,16 +6455,15 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) // EXTERIOR WINDOWS OR TDD DOMES //-------------------------------------------------------------------------------------------------------- for (int const SurfNum : thisEnclosure.SurfacePtr) { - if (state.dataSurface->Surface(SurfNum).Class != SurfaceClass::Window && - state.dataSurface->Surface(SurfNum).Class != SurfaceClass::TDD_Dome) - continue; - if (!state.dataSurface->Surface(SurfNum).ExtSolar && state.dataSurface->SurfWinOriginalClass(SurfNum) != SurfaceClass::TDD_Diffuser) - continue; + auto &surf = state.dataSurface->Surface(SurfNum); + auto &surfWin = state.dataSurface->SurfaceWindow(SurfNum); + if (surf.Class != SurfaceClass::Window && surf.Class != SurfaceClass::TDD_Dome) continue; + if (!surf.ExtSolar && surf.OriginalClass != SurfaceClass::TDD_Diffuser) continue; int const ConstrNum = state.dataSurface->SurfActiveConstruction(SurfNum); int const ConstrNumSh = state.dataSurface->SurfWinActiveShadedConstruction(SurfNum); auto &thisConstruct = state.dataConstruction->Construct(ConstrNum); int BlNum = state.dataSurface->SurfWinBlindNumber(SurfNum); - int ScNum = state.dataSurface->SurfWinScreenNumber(SurfNum); + int ScNum = surfWin.screenNum; WinShadingType ShadeFlag = state.dataSurface->SurfWinShadingFlag(SurfNum); // Set in subr. WindowShadingManager Real64 ProfAng = 0.0; // Window solar profile angle (radians) @@ -6472,7 +6472,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) Real64 VarSlats = state.dataSurface->SurfWinMovableSlats(SurfNum); int PipeNum = state.dataSurface->SurfWinTDDPipeNum(SurfNum); int SurfNum2 = SurfNum; - if (state.dataSurface->SurfWinOriginalClass(SurfNum) == SurfaceClass::TDD_Diffuser) { + if (surf.OriginalClass == SurfaceClass::TDD_Diffuser) { SurfNum2 = state.dataDaylightingDevicesData->TDDPipe(PipeNum).Dome; } Real64 CosInc = state.dataHeatBal->SurfCosIncAng(state.dataGlobal->HourOfDay, state.dataGlobal->TimeStep, SurfNum2); @@ -6484,8 +6484,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) // EXTERIOR BEAM ABSORBED BY SHADING DEVICE (SurfWinExtBeamAbsByShadFac) //----------------------------------------- // Somewhat of a kludge - if (state.dataSurface->Surface(SurfNum).Class == SurfaceClass::TDD_Dome || - state.dataSurface->SurfWinOriginalClass(SurfNum) == SurfaceClass::TDD_Diffuser) + if (surf.Class == SurfaceClass::TDD_Dome || surf.OriginalClass == SurfaceClass::TDD_Diffuser) state.dataHeatBal->SurfSunlitFracWithoutReveal(state.dataGlobal->HourOfDay, state.dataGlobal->TimeStep, SurfNum) = SunLitFract; // Frames/dividers not allow int FenSolAbsPtr = 0; @@ -6626,7 +6625,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) Array1D AbWin(NGlass); // Factor for front beam radiation absorbed in window glass layer for (int Lay = 1; Lay <= NGlass; ++Lay) { AbWin(Lay) = POLYF(CosInc, thisConstruct.AbsBeamCoef(Lay)) * CosInc * SunLitFract * - state.dataSurface->SurfaceWindow(SurfNum).OutProjSLFracMult(state.dataGlobal->HourOfDay); + state.dataSurface->SurfaceWindow(SurfNum).OutProjSLFracMult[state.dataGlobal->HourOfDay]; } if (!IS_SHADED_NO_GLARE_CTRL(ShadeFlag)) { // (ShadeFlag <= 0 || ShadeFlag >= 10) - Bare window (ShadeFlag = -1 or 0 or shading device of off) @@ -6638,9 +6637,10 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) } } else { // Shade, screen, blind or switchable glazing on (ShadeFlag > 0) - Real64 FracSunLit = SunLitFract * state.dataSurface->SurfaceWindow(SurfNum).OutProjSLFracMult( - state.dataGlobal->HourOfDay); // Effective fraction of window that is sunlit; - Real64 InOutProjSLFracMult = state.dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult(state.dataGlobal->HourOfDay); + Real64 FracSunLit = + SunLitFract * state.dataSurface->SurfaceWindow(SurfNum) + .OutProjSLFracMult[state.dataGlobal->HourOfDay]; // Effective fraction of window that is sunlit; + Real64 InOutProjSLFracMult = state.dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult[state.dataGlobal->HourOfDay]; Array1D AbWinSh(NGlass); // Like AbWin, but for shaded window Array1D ADiffWinSh(NGlass); // Diffuse solar absorptance of glass layer, window with shading device if (ANY_EXTERIOR_SHADE_BLIND_SCREEN(ShadeFlag)) FracSunLit = SunLitFract; @@ -6659,7 +6659,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) state.dataSolarShading->SurfWinExtBeamAbsByShadFac(SurfNum) = (AbsShade * CosInc * SunLitFract * InOutProjSLFracMult + state.dataSurface->SurfWinOutsRevealDiffOntoGlazing(SurfNum) * thisConstructSh.AbsDiffShade) * - state.dataSurface->SurfWinGlazedFrac(SurfNum); + surfWin.glazedFrac; // In the above, GlazedFrac corrects for shadowing of divider onto interior shade } else if (ShadeFlag == WinShadingType::ExtShade) { // Exterior beam absorbed by EXTERIOR SHADE state.dataSolarShading->SurfWinExtBeamAbsByShadFac(SurfNum) = thisConstructSh.AbsDiffShade * CosInc * SunLitFract; @@ -6701,7 +6701,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) state.dataSolarShading->SurfWinExtBeamAbsByShadFac(SurfNum) = (AbsShade * CosInc * SunLitFract * InOutProjSLFracMult + state.dataSurface->SurfWinOutsRevealDiffOntoGlazing(SurfNum) * AbsShadeDiff) * - state.dataSurface->SurfWinGlazedFrac(SurfNum); + surfWin.glazedFrac; // In the above, GlazedFrac corrects for shadowing of divider onto interior blind } else if (ShadeFlag == WinShadingType::ExtBlind) { // Exterior blind on @@ -6894,7 +6894,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) .ComplexFen.State(state.dataSurface->SurfaceWindow(SurfNum).ComplexFen.CurrentState) .WinBmFtAbs(state.dataGlobal->HourOfDay, state.dataGlobal->TimeStep, Lay); Real64 AbWin = absBeamWin * CosInc * SunLitFract * - state.dataSurface->SurfaceWindow(SurfNum).OutProjSLFracMult(state.dataGlobal->HourOfDay); + state.dataSurface->SurfaceWindow(SurfNum).OutProjSLFracMult[state.dataGlobal->HourOfDay]; // Add contribution of beam reflected from outside and inside reveal state.dataSurface->SurfWinA(SurfNum, Lay) = @@ -6918,8 +6918,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) auto &CFS = state.dataWindowEquivLayer->CFS; // recalcuate the diffuse absorptance and transmittance of the // the equivalent layer window model if there is shade control - int EQLNum = state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction) - .EQLConsPtr; // equivalent layer fenestration index + int EQLNum = state.dataConstruction->Construct(surf.Construction).EQLConsPtr; // equivalent layer fenestration index if (CFS(EQLNum).ISControlled) { WindowEquivalentLayer::CalcEQLOpticalProperty( state, SurfNum, SolarArrays::DIFF, state.dataSolarShading->SurfWinAbsSolDiffEQL); @@ -6932,7 +6931,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) for (int Lay = 1; Lay <= CFS(EQLNum).NL + 1; ++Lay) { // Factor for front beam radiation absorbed for equivalent layer window model Real64 AbWinEQL = state.dataSolarShading->SurfWinAbsSolBeamEQL(1, Lay) * CosInc * SunLitFract * - state.dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult(state.dataGlobal->HourOfDay); + state.dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult[state.dataGlobal->HourOfDay]; ; if (CFS(EQLNum).L(1).LTYPE != LayerType::GLAZE) { // if the first layer is not glazing (or it is a shade) do not @@ -6997,7 +6996,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) // surface incorrectly assuming wall heat transfer routines for windows. // Construct( Surface( SurfNum ).Construction ).TransDiff = NomDiffTrans; } - } else if (state.dataSurface->SurfWinOriginalClass(SurfNum) == SurfaceClass::TDD_Diffuser) { + } else if (surf.OriginalClass == SurfaceClass::TDD_Diffuser) { DiffTrans = TransTDD(state, PipeNum, CosInc, Dayltg::RadType::SolarAniso); } else { DiffTrans = thisConstruct.TransDiff; @@ -7078,7 +7077,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) Real64 TDifBare; // Bare diffuse transmittance of exterior window // Beam-beam transmittance for bare exterior window if (SunLitFract > 0.0) { - if (state.dataSurface->SurfWinOriginalClass(SurfNum) == SurfaceClass::TDD_Diffuser) { + if (surf.OriginalClass == SurfaceClass::TDD_Diffuser) { TBmDif = TransTDD(state, PipeNum, CosInc, Dayltg::RadType::SolarBeam); state.dataDaylightingDevicesData->TDDPipe(PipeNum).TransSolBeam = TBmDif; // Report variable } else if (state.dataSurface->SurfWinWindowModelType(SurfNum) == WindowModel::Detailed) { // Regular window @@ -7098,8 +7097,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) TBmBm; } else if (state.dataSurface->SurfWinWindowModelType(SurfNum) == WindowModel::EQL) { // get ASHWAT fenestration model beam-beam and beam-diffuse properties - int EQLNum = state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction) - .EQLConsPtr; // equivalent layer fenestration index + int EQLNum = state.dataConstruction->Construct(surf.Construction).EQLConsPtr; // equivalent layer fenestration index Real64 TBmBmEQL = state.dataSolarShading->SurfWinAbsSolBeamEQL(1, state.dataWindowEquivLayer->CFS(EQLNum).NL + 1); // Beam-diffuse transmittance Real64 TBmDiffEQL = max(0.0, state.dataSolarShading->SurfWinAbsSolBeamEQL(2, state.dataWindowEquivLayer->CFS(EQLNum).NL + 1)); @@ -7110,7 +7108,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) } } // Diffuse-diffuse transmittance for bare exterior window - if (state.dataSurface->SurfWinOriginalClass(SurfNum) == SurfaceClass::TDD_Diffuser) { + if (surf.OriginalClass == SurfaceClass::TDD_Diffuser) { TDifBare = TransTDD(state, PipeNum, CosInc, Dayltg::RadType::SolarAniso); } else { if (state.dataSurface->SurfWinWindowModelType(SurfNum) == WindowModel::BSDF) { @@ -7262,58 +7260,49 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) state.dataSolarShading->SurfWinTransBmDifSolar(SurfNum) = 0.0; // Factor for exterior beam to diffuse solar transmitted through window, or window plus shade, into zone at current time (m2) - Real64 InOutProjSLFracMult = state.dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult(state.dataGlobal->HourOfDay); + Real64 InOutProjSLFracMult = state.dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult[state.dataGlobal->HourOfDay]; if (state.dataSurface->SurfWinWindowModelType(SurfNum) != WindowModel::EQL) { - state.dataSolarShading->SurfWinTransDifSolar(SurfNum) = DiffTrans * state.dataSurface->Surface(SurfNum).Area; + state.dataSolarShading->SurfWinTransDifSolar(SurfNum) = DiffTrans * surf.Area; if (ANY_BLIND(ShadeFlag)) { if (state.dataMaterial->Blind(state.dataSurface->SurfWinBlindNumber(SurfNum)).SlatOrientation == DataWindowEquivalentLayer::Orientation::Horizontal) { - state.dataSolarShading->SurfWinTransDifSolarGnd(SurfNum) = DiffTransGnd * state.dataSurface->Surface(SurfNum).Area; - state.dataSolarShading->SurfWinTransDifSolarSky(SurfNum) = DiffTransSky * state.dataSurface->Surface(SurfNum).Area; + state.dataSolarShading->SurfWinTransDifSolarGnd(SurfNum) = DiffTransGnd * surf.Area; + state.dataSolarShading->SurfWinTransDifSolarSky(SurfNum) = DiffTransSky * surf.Area; } } } else { // In equivalent layer window model system diffuse transmittance is based on unit // diffuse radiation flux, and hence doesn't distinguish between sky and // ground reflected diffuse radiations - state.dataSolarShading->SurfWinTransDifSolar(SurfNum) = DiffTrans * state.dataSurface->Surface(SurfNum).Area; - state.dataSolarShading->SurfWinTransDifSolarGnd(SurfNum) = DiffTrans * state.dataSurface->Surface(SurfNum).Area; - state.dataSolarShading->SurfWinTransDifSolarSky(SurfNum) = DiffTrans * state.dataSurface->Surface(SurfNum).Area; + state.dataSolarShading->SurfWinTransDifSolar(SurfNum) = DiffTrans * surf.Area; + state.dataSolarShading->SurfWinTransDifSolarGnd(SurfNum) = DiffTrans * surf.Area; + state.dataSolarShading->SurfWinTransDifSolarSky(SurfNum) = DiffTrans * surf.Area; } if (!IS_SHADED_NO_GLARE_CTRL(ShadeFlag) || ShadeFlag == WinShadingType::SwitchableGlazing) { // Unshaded or switchable glazing // Note: with previous defs of TBmBm & TBmDif, these come out right for Complex Fenestration // SurfWinTransBmSolar uses the directional-hemispherical transmittance - state.dataSolarShading->SurfWinTransBmSolar(SurfNum) = - (TBmBm + TBmDif) * SunLitFract * CosInc * state.dataSurface->Surface(SurfNum).Area * InOutProjSLFracMult; - state.dataSolarShading->SurfWinTransBmBmSolar(SurfNum) = - TBmBm * SunLitFract * CosInc * state.dataSurface->Surface(SurfNum).Area * InOutProjSLFracMult; // m2 - state.dataSolarShading->SurfWinTransBmDifSolar(SurfNum) = - TBmDif * SunLitFract * CosInc * state.dataSurface->Surface(SurfNum).Area * InOutProjSLFracMult; // m2 + state.dataSolarShading->SurfWinTransBmSolar(SurfNum) = (TBmBm + TBmDif) * SunLitFract * CosInc * surf.Area * InOutProjSLFracMult; + state.dataSolarShading->SurfWinTransBmBmSolar(SurfNum) = TBmBm * SunLitFract * CosInc * surf.Area * InOutProjSLFracMult; // m2 + state.dataSolarShading->SurfWinTransBmDifSolar(SurfNum) = TBmDif * SunLitFract * CosInc * surf.Area * InOutProjSLFracMult; // m2 } else { - state.dataSolarShading->SurfWinTransBmSolar(SurfNum) = - TBmAllShBlSc * SunLitFract * CosInc * state.dataSurface->Surface(SurfNum).Area * InOutProjSLFracMult; - state.dataSolarShading->SurfWinTransBmBmSolar(SurfNum) = - TBmBmShBlSc * SunLitFract * CosInc * state.dataSurface->Surface(SurfNum).Area * InOutProjSLFracMult; - state.dataSolarShading->SurfWinTransBmDifSolar(SurfNum) = - TBmDifShBlSc * SunLitFract * CosInc * state.dataSurface->Surface(SurfNum).Area * InOutProjSLFracMult; + state.dataSolarShading->SurfWinTransBmSolar(SurfNum) = TBmAllShBlSc * SunLitFract * CosInc * surf.Area * InOutProjSLFracMult; + state.dataSolarShading->SurfWinTransBmBmSolar(SurfNum) = TBmBmShBlSc * SunLitFract * CosInc * surf.Area * InOutProjSLFracMult; + state.dataSolarShading->SurfWinTransBmDifSolar(SurfNum) = TBmDifShBlSc * SunLitFract * CosInc * surf.Area * InOutProjSLFracMult; } // Add diffuse transmitted by window from beam reflected from outside reveal if (state.dataSurface->SurfWinWindowModelType(SurfNum) == WindowModel::BSDF) { // Complex Fenestration if (FenSolAbsPtr == 0) { - state.dataSolarShading->SurfWinTransBmSolar(SurfNum) = - (TBmBm + TBmDif) * SunLitFract * CosInc * state.dataSurface->Surface(SurfNum).Area * InOutProjSLFracMult; - state.dataSolarShading->SurfWinTransBmBmSolar(SurfNum) = - TBmBm * SunLitFract * CosInc * state.dataSurface->Surface(SurfNum).Area * InOutProjSLFracMult; // m2 - state.dataSolarShading->SurfWinTransBmDifSolar(SurfNum) = - TBmDif * SunLitFract * CosInc * state.dataSurface->Surface(SurfNum).Area * InOutProjSLFracMult; // m2 + state.dataSolarShading->SurfWinTransBmSolar(SurfNum) = (TBmBm + TBmDif) * SunLitFract * CosInc * surf.Area * InOutProjSLFracMult; + state.dataSolarShading->SurfWinTransBmBmSolar(SurfNum) = TBmBm * SunLitFract * CosInc * surf.Area * InOutProjSLFracMult; // m2 + state.dataSolarShading->SurfWinTransBmDifSolar(SurfNum) = TBmDif * SunLitFract * CosInc * surf.Area * InOutProjSLFracMult; // m2 state.dataSolarShading->SurfWinTransBmSolar(SurfNum) += - state.dataSurface->SurfWinOutsRevealDiffOntoGlazing(SurfNum) * NomDiffTrans * state.dataSurface->Surface(SurfNum).Area; + state.dataSurface->SurfWinOutsRevealDiffOntoGlazing(SurfNum) * NomDiffTrans * surf.Area; state.dataSolarShading->SurfWinTransBmDifSolar(SurfNum) += - state.dataSurface->SurfWinOutsRevealDiffOntoGlazing(SurfNum) * NomDiffTrans * state.dataSurface->Surface(SurfNum).Area; + state.dataSurface->SurfWinOutsRevealDiffOntoGlazing(SurfNum) * NomDiffTrans * surf.Area; } else { state.dataSolarShading->SurfWinTransBmSolar(SurfNum) = 0.0; state.dataSolarShading->SurfWinTransBmDifSolar(SurfNum) = 0.0; @@ -7321,16 +7310,16 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) } else { // Regular window // this is also valid for equivalent layer window state.dataSolarShading->SurfWinTransBmSolar(SurfNum) += - state.dataSurface->SurfWinOutsRevealDiffOntoGlazing(SurfNum) * DiffTrans * state.dataSurface->Surface(SurfNum).Area; + state.dataSurface->SurfWinOutsRevealDiffOntoGlazing(SurfNum) * DiffTrans * surf.Area; state.dataSolarShading->SurfWinTransBmDifSolar(SurfNum) += - state.dataSurface->SurfWinOutsRevealDiffOntoGlazing(SurfNum) * DiffTrans * state.dataSurface->Surface(SurfNum).Area; + state.dataSurface->SurfWinOutsRevealDiffOntoGlazing(SurfNum) * DiffTrans * surf.Area; } //----------------------------------------------------------------- // BLOCK 5 - UPDATE SOLAR ENTERING A ZONE AS BEAM OR DIFFUSE RADIATION //----------------------------------------------------------------- // Increment factor for total exterior beam solar entering zone through window as beam or diffuse - if (SunLitFract > 0.0 && state.dataSurface->Surface(SurfNum).Class != SurfaceClass::TDD_Dome) { + if (SunLitFract > 0.0 && surf.Class != SurfaceClass::TDD_Dome) { // Window is schedule surface gained. Do not make addition to what enters into zone since that information is not available if (FenSolAbsPtr == 0) { Real64 TBmAll; // Window beam-to-(beam+diffuse) transmittance @@ -7340,8 +7329,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) } else { TBmAll = TBmBm + TBmDif; } - BTOTZone += state.dataSurface->Surface(SurfNum).IncSolMultiplier * TBmAll * SunLitFract * CosInc * - state.dataSurface->Surface(SurfNum).Area * InOutProjSLFracMult; // [m2] + BTOTZone += surf.IncSolMultiplier * TBmAll * SunLitFract * CosInc * surf.Area * InOutProjSLFracMult; // [m2] } } @@ -7354,19 +7342,18 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) if (state.dataSurface->SurfWinWindowModelType(SurfNum) == WindowModel::BSDF) { // Complex Fenestration // Do not add total into zone from scheduled surface gains. That will be added later if (SurfaceScheduledSolarInc(state, SurfNum, ConstrNum) == 0) { - BTOTZone = - BTOTZone - state.dataSurface->SurfWinBmSolRefldInsReveal(SurfNum) - - state.dataSurface->SurfWinBmSolAbsdInsReveal(SurfNum) + state.dataSurface->SurfWinInsRevealDiffIntoZone(SurfNum) + - state.dataSurface->SurfWinOutsRevealDiffOntoGlazing(SurfNum) * NomDiffTrans * state.dataSurface->Surface(SurfNum).Area; + BTOTZone = BTOTZone - state.dataSurface->SurfWinBmSolRefldInsReveal(SurfNum) - + state.dataSurface->SurfWinBmSolAbsdInsReveal(SurfNum) + state.dataSurface->SurfWinInsRevealDiffIntoZone(SurfNum) + + state.dataSurface->SurfWinOutsRevealDiffOntoGlazing(SurfNum) * NomDiffTrans * surf.Area; } } else { // Regular window BTOTZone = BTOTZone - state.dataSurface->SurfWinBmSolRefldInsReveal(SurfNum) - state.dataSurface->SurfWinBmSolAbsdInsReveal(SurfNum) + state.dataSurface->SurfWinInsRevealDiffIntoZone(SurfNum) + - state.dataSurface->SurfWinOutsRevealDiffOntoGlazing(SurfNum) * DiffTrans * state.dataSurface->Surface(SurfNum).Area; + state.dataSurface->SurfWinOutsRevealDiffOntoGlazing(SurfNum) * DiffTrans * surf.Area; } // Add beam solar absorbed by outside reveal to outside of window's base surface. Add beam solar absorbed by inside reveal to inside // of window's base surface. This ignores 2-D heat transfer effects. - int BaseSurfNum = state.dataSurface->Surface(SurfNum).BaseSurf; + int BaseSurfNum = surf.BaseSurf; state.dataSurface->SurfOpaqAI(BaseSurfNum) += state.dataSurface->SurfWinBmSolAbsdInsReveal(SurfNum) / state.dataSurface->Surface(BaseSurfNum).Area; state.dataSurface->SurfOpaqAO(BaseSurfNum) += @@ -7384,8 +7371,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) if (SunLitFract > 0.0) { if (state.dataSurface->SurfWinWindowModelType(SurfNum) != WindowModel::BSDF) if (ANY_SHADE(ShadeFlag) || state.dataSurface->SurfWinSolarDiffusing(SurfNum) || - state.dataSurface->SurfWinOriginalClass(SurfNum) == SurfaceClass::TDD_Diffuser || - state.dataSurface->Surface(SurfNum).Class == SurfaceClass::TDD_Dome) + surf.OriginalClass == SurfaceClass::TDD_Diffuser || surf.Class == SurfaceClass::TDD_Dome) continue; // Find interior beam radiation that is: @@ -7401,7 +7387,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) Real64 TBmBmBl = state.dataSurface->SurfWinBlGlSysTsolBmBm(SurfNum); Real64 TBmBm = state.dataSurface->SurfWinGlTsolBmBm(SurfNum); - Real64 InOutProjSLFracMult = state.dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult(state.dataGlobal->HourOfDay); + Real64 InOutProjSLFracMult = state.dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult[state.dataGlobal->HourOfDay]; int InShelfSurf = 0; // Inside daylighting shelf surface number int ShelfNum = state.dataSurface->SurfDaylightingShelfInd(SurfNum); if (ShelfNum > 0) { // Daylighting shelf @@ -7414,13 +7400,13 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) } else { TBm = TBmBm; // Bare glass or switchable glazing // Correction for beam absorbed by inside reveal - TBmDenom = (SunLitFract * CosInc * state.dataSurface->Surface(SurfNum).Area * InOutProjSLFracMult); + TBmDenom = (SunLitFract * CosInc * surf.Area * InOutProjSLFracMult); if (TBmDenom != 0.0) { // when =0.0, no correction TBm -= state.dataSurface->SurfWinBmSolAbsdInsReveal(SurfNum) / TBmDenom; } TBm = max(0.0, TBm); // this multiplier doesn't work with other shading, so no need to apply in other branches - TBm *= state.dataSurface->Surface(SurfNum).IncSolMultiplier; + TBm *= surf.IncSolMultiplier; } if (TBm == 0.0) continue; @@ -7428,7 +7414,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) // Inside daylighting shelves assume that no beam will pass the end of the shelf. // Since all beam is absorbed on the shelf, this might cause them to get unrealistically hot at times. // BTOTWinZone - Transmitted beam solar factor for a window [m2] - Real64 BTOTWinZone = TBm * SunLitFract * state.dataSurface->Surface(SurfNum).Area * CosInc * InOutProjSLFracMult; + Real64 BTOTWinZone = TBm * SunLitFract * surf.Area * CosInc * InOutProjSLFracMult; // Shelf surface area is divided by 2 because only one side sees beam (Area was multiplied by 2 during init) state.dataSurface->SurfOpaqAI(InShelfSurf) += BTOTWinZone / (0.5 * state.dataSurface->Surface(InShelfSurf).Area); //[-] BABSZone += BTOTWinZone; //[m2] @@ -7912,7 +7898,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) } else if (ShadeFlagBack == WinShadingType::ExtScreen) { // Interior beam absorptance of GLASS LAYERS of exterior back window with EXTERIOR SCREEN - int ScNumBack = state.dataSurface->SurfWinScreenNumber(BackSurfNum); // Back surface screen number + int ScNumBack = surfWin.screenNum; // Back surface screen number Real64 TGlBmBack = POLYF(CosIncBack, state.dataConstruction->Construct(ConstrNumBack).TransSolBeamCoef); Real64 RGlDiffFront = state.dataConstruction->Construct(ConstrNumBack).ReflectSolDiffFront; Real64 TScBmBmBack = @@ -8020,7 +8006,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) .Geom(CurCplxFenState) .PhiBm(state.dataGlobal->HourOfDay, state.dataGlobal->TimeStep); - int BaseSurf = state.dataSurface->Surface(SurfNum).BaseSurf; // Base surface number for current complex window + int BaseSurf = surf.BaseSurf; // Base surface number for current complex window // Get total number of back surfaces for current window (surface) // Note that it is organized by base surface int NBkSurf = state.dataShadowComb->ShadowComb(BaseSurf).NumBackSurf; @@ -8278,7 +8264,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) if (state.dataSolarShading->SurfIntAbsFac(FloorNum) <= 0.0 || FloorNum == SurfNum) continue; // Keep only floor surfaces int const FlConstrNum = state.dataSurface->SurfActiveConstruction(FloorNum); - Real64 BTOTWinZone = TBm * SunLitFract * state.dataSurface->Surface(SurfNum).Area * CosInc * InOutProjSLFracMult; //[m2] + Real64 BTOTWinZone = TBm * SunLitFract * surf.Area * CosInc * InOutProjSLFracMult; //[m2] Real64 AbsBeamTotWin = 0.0; if (state.dataConstruction->Construct(FlConstrNum).TransDiff <= 0.0) { @@ -8339,16 +8325,17 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) Real64 BTOTZoneSSG = 0.0; // Solar entering a zone in case of scheduled surface gains for (int iSSG = 1; iSSG <= state.dataSurface->TotSurfIncSolSSG; ++iSSG) { int SurfNum = state.dataSurface->SurfIncSolSSG(iSSG).SurfPtr; + auto &surf = state.dataSurface->Surface(SurfNum); // do calculation only if construction number match. - if (state.dataSurface->SurfIncSolSSG(iSSG).ConstrPtr == state.dataSurface->Surface(SurfNum).Construction) { - if (state.dataSurface->Surface(SurfNum).SolarEnclIndex == enclosureNum) { - Real64 AbsIntSurf = state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).InsideAbsorpSolar; + if (state.dataSurface->SurfIncSolSSG(iSSG).ConstrPtr == surf.Construction) { + if (surf.SolarEnclIndex == enclosureNum) { + Real64 AbsIntSurf = state.dataConstruction->Construct(surf.Construction).InsideAbsorpSolar; // SolarIntoZone = GetCurrentScheduleValue(SurfIncSolSSG(iSSG)%SchedPtr) * Surface(SurfNum)%Area Real64 SolarIntoZone = GetCurrentScheduleValue( state, state.dataSurface->SurfIncSolSSG(iSSG).SchedPtr); // Solar radiation into zone to current surface state.dataSurface->SurfOpaqAI(SurfNum) = SolarIntoZone * AbsIntSurf; - BABSZoneSSG += state.dataSurface->SurfOpaqAI(SurfNum) * state.dataSurface->Surface(SurfNum).Area; - BTOTZoneSSG += SolarIntoZone * state.dataSurface->Surface(SurfNum).Area; + BABSZoneSSG += state.dataSurface->SurfOpaqAI(SurfNum) * surf.Area; + BTOTZoneSSG += SolarIntoZone * surf.Area; } } } @@ -8361,7 +8348,8 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) // Variables for reporting for (int const SurfNum : thisEnclosure.SurfacePtr) { - Real64 SurfIncSolarMultiplier = state.dataSurface->Surface(SurfNum).IncSolMultiplier; + auto &surf = state.dataSurface->Surface(SurfNum); + Real64 SurfIncSolarMultiplier = surf.IncSolMultiplier; Real64 currBeamSolarRad = state.dataEnvrn->BeamSolarRad * SurfIncSolarMultiplier; Real64 currDifSolarRad = state.dataEnvrn->DifSolarRad * SurfIncSolarMultiplier; Real64 currGndSolarRad = state.dataEnvrn->GndSolarRad * SurfIncSolarMultiplier; @@ -8370,10 +8358,9 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) state.dataHeatBal->SurfBmIncInsSurfAmountRepEnergy(SurfNum) = state.dataHeatBal->SurfBmIncInsSurfAmountRep(SurfNum) * state.dataGlobal->TimeStepZoneSec; state.dataHeatBal->SurfBmIncInsSurfIntensRep(SurfNum) = - state.dataHeatBal->SurfBmIncInsSurfAmountRep(SurfNum) / - (state.dataSurface->Surface(SurfNum).Area + state.dataSurface->SurfWinDividerArea(SurfNum)); + state.dataHeatBal->SurfBmIncInsSurfAmountRep(SurfNum) / (surf.Area + state.dataSurface->SurfWinDividerArea(SurfNum)); } else { // Simple interior solar distribution. All beam falls on floor. - if (state.dataSolarShading->SurfIntAbsFac(SurfNum) > 0.0 && state.dataSurface->Surface(SurfNum).HeatTransSurf) { + if (state.dataSolarShading->SurfIntAbsFac(SurfNum) > 0.0 && surf.HeatTransSurf) { if (thisEnclosure.FloorArea > 0.0) { // spread onto all floor surfaces, these may or may not be called "floor" state.dataHeatBal->SurfBmIncInsSurfIntensRep(SurfNum) = currBeamSolarRad * BTOTZone / thisEnclosure.FloorArea; @@ -8384,19 +8371,16 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) state.dataHeatBal->SurfBmIncInsSurfIntensRep(SurfNum) = 0.0; } } - state.dataHeatBal->SurfBmIncInsSurfAmountRep(SurfNum) = - state.dataSurface->Surface(SurfNum).Area * state.dataHeatBal->SurfBmIncInsSurfIntensRep(SurfNum); + state.dataHeatBal->SurfBmIncInsSurfAmountRep(SurfNum) = surf.Area * state.dataHeatBal->SurfBmIncInsSurfIntensRep(SurfNum); state.dataHeatBal->SurfBmIncInsSurfAmountRepEnergy(SurfNum) = state.dataHeatBal->SurfBmIncInsSurfAmountRep(SurfNum) * state.dataGlobal->TimeStepZoneSec; } - if (state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Window || - state.dataSurface->Surface(SurfNum).Class == SurfaceClass::TDD_Dome) { + if (surf.Class == SurfaceClass::Window || surf.Class == SurfaceClass::TDD_Dome) { state.dataSurface->SurfWinIntBeamAbsByShade(SurfNum) = state.dataSolarShading->SurfWinIntBeamAbsByShadFac(SurfNum); state.dataSurface->SurfWinExtBeamAbsByShade(SurfNum) = currBeamSolarRad * state.dataSolarShading->SurfWinExtBeamAbsByShadFac(SurfNum); - if ((state.dataSurface->Surface(SurfNum).ExtBoundCond == ExternalEnvironment) || - (state.dataSurface->Surface(SurfNum).ExtBoundCond == OtherSideCondModeledExt)) { + if ((surf.ExtBoundCond == ExternalEnvironment) || (surf.ExtBoundCond == OtherSideCondModeledExt)) { WinShadingType ShadeFlag = state.dataSurface->SurfWinShadingFlag(SurfNum); int ShelfNum = state.dataSurface->SurfDaylightingShelfInd(SurfNum); @@ -8406,7 +8390,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) } // This lookup may be avoid if this 2nd surf loop can be combined with the 1st - if (state.dataSurface->SurfWinOriginalClass(SurfNum) == SurfaceClass::TDD_Diffuser) { + if (surf.OriginalClass == SurfaceClass::TDD_Diffuser) { int PipeNum = state.dataSurface->SurfWinTDDPipeNum(SurfNum); int SurfNum2 = state.dataDaylightingDevicesData->TDDPipe(PipeNum).Dome; Real64 CosInc = state.dataHeatBal->SurfCosIncAng(state.dataGlobal->HourOfDay, state.dataGlobal->TimeStep, SurfNum2); @@ -8421,8 +8405,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) state.dataSurface->Surface(SurfNum2).ViewFactorGround; state.dataSurface->SurfWinBmSolar(SurfNum) = currBeamSolarRad * state.dataSolarShading->SurfWinTransBmSolar(SurfNum); - state.dataSurface->SurfWinDifSolar(SurfNum) = - SkySolarTrans * state.dataSurface->Surface(SurfNum).Area + GndSolarTrans * state.dataSurface->Surface(SurfNum).Area; + state.dataSurface->SurfWinDifSolar(SurfNum) = SkySolarTrans * surf.Area + GndSolarTrans * surf.Area; state.dataSurface->SurfWinBmSolarEnergy(SurfNum) = state.dataSurface->SurfWinBmSolar(SurfNum) * state.dataGlobal->TimeStepZoneSec; state.dataSurface->SurfWinDifSolarEnergy(SurfNum) = @@ -8450,7 +8433,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) state.dataDaylightingDevicesData->Shelf(ShelfNum).OutReflectSol; Real64 DifSolarInc = currDifSolarRad * state.dataSolarShading->SurfAnisoSkyMult(SurfNum) + - currGndSolarRad * state.dataSurface->Surface(SurfNum).ViewFactorGround + + currGndSolarRad * surf.ViewFactorGround + ShelfSolarRad * state.dataDaylightingDevicesData->Shelf(ShelfNum).ViewFactor; state.dataSurface->SurfWinBmSolar(SurfNum) = currBeamSolarRad * state.dataSolarShading->SurfWinTransBmSolar(SurfNum); @@ -8504,7 +8487,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) state.dataSurface->SurfWinBmDifSolar(SurfNum) * state.dataGlobal->TimeStepZoneSec; // Solar not added by TDD:DOME; added to zone via TDD:DIFFUSER - if (state.dataSurface->Surface(SurfNum).Class != SurfaceClass::TDD_Dome) { + if (surf.Class != SurfaceClass::TDD_Dome) { state.dataHeatBal->ZoneTransSolar(enclosureNum) += state.dataSurface->SurfWinTransSolar(SurfNum); //[W] state.dataHeatBal->ZoneTransSolarEnergy(enclosureNum) = state.dataHeatBal->ZoneTransSolar(enclosureNum) * state.dataGlobal->TimeStepZoneSec; //[J] @@ -8550,12 +8533,12 @@ void CalcAbsorbedOnExteriorOpaqueSurfaces(EnergyPlusData &state) for (int spaceNum : state.dataHeatBal->Zone(ZoneNum).spaceIndexes) { auto &thisSpace = state.dataHeatBal->space(spaceNum); for (int SurfNum = thisSpace.HTSurfaceFirst; SurfNum <= thisSpace.HTSurfaceLast; ++SurfNum) { + auto &surf = state.dataSurface->Surface(SurfNum); // TH added 3/24/2010 while debugging CR 7872 - if (!state.dataSurface->Surface(SurfNum).ExtSolar && state.dataSurface->SurfWinOriginalClass(SurfNum) != SurfaceClass::TDD_Diffuser) - continue; + if (!surf.ExtSolar && surf.OriginalClass != SurfaceClass::TDD_Diffuser) continue; int const ConstrNum = state.dataSurface->SurfActiveConstruction(SurfNum); int SurfNum2 = SurfNum; - if (state.dataSurface->SurfWinOriginalClass(SurfNum) == SurfaceClass::TDD_Diffuser) { + if (surf.OriginalClass == SurfaceClass::TDD_Diffuser) { int PipeNum = state.dataSurface->SurfWinTDDPipeNum(SurfNum); SurfNum2 = state.dataDaylightingDevicesData->TDDPipe(PipeNum).Dome; } @@ -8619,9 +8602,10 @@ void CalcInteriorSolarDistributionWCESimple(EnergyPlusData &state) auto &thisEnclosure = state.dataViewFactor->EnclSolInfo(enclosureNum); for (int const SurfNum : thisEnclosure.SurfacePtr) { - if (state.dataSurface->Surface(SurfNum).Class != SurfaceClass::Window) continue; + auto &surf = state.dataSurface->Surface(SurfNum); + if (surf.Class != SurfaceClass::Window) continue; int SurfNum2 = 0; - if (state.dataSurface->SurfWinOriginalClass(SurfNum) == SurfaceClass::TDD_Diffuser) { + if (surf.OriginalClass == SurfaceClass::TDD_Diffuser) { int PipeNum = state.dataSurface->SurfWinTDDPipeNum(SurfNum); SurfNum2 = state.dataDaylightingDevicesData->TDDPipe(PipeNum).Dome; } else { @@ -8659,14 +8643,13 @@ void CalcInteriorSolarDistributionWCESimple(EnergyPlusData &state) cplxState.WinSkyGndAbs(Lay) * state.dataSurface->SurfGndSolarInc(SurfNum2) + state.dataSurface->SurfWinA(SurfNum, Lay) * state.dataEnvrn->BeamSolarRad + state.dataSurface->SurfWinACFOverlap(SurfNum, Lay) * state.dataEnvrn->BeamSolarRad; - state.dataHeatBal->SurfWinQRadSWwinAbsLayer(SurfNum, Lay) = - state.dataHeatBal->SurfWinQRadSWwinAbs(SurfNum, Lay) * state.dataSurface->Surface(SurfNum).Area; + state.dataHeatBal->SurfWinQRadSWwinAbsLayer(SurfNum, Lay) = state.dataHeatBal->SurfWinQRadSWwinAbs(SurfNum, Lay) * surf.Area; state.dataSurface->SurfWinADiffFront(SurfNum, Lay) = cplxState.WinSkyGndAbs(Lay); } } else { for (size_t Lay = 1; Lay <= numOfLayers; ++Lay) { Real64 AbWinBeam = aLayer->getAbsorptanceLayer(Lay, Side::Front, ScatteringSimple::Direct, Theta, Phi) * - window.OutProjSLFracMult(state.dataGlobal->HourOfDay); + window.OutProjSLFracMult[state.dataGlobal->HourOfDay]; Real64 AbWinDiffFront = aLayer->getAbsorptanceLayer(Lay, Side::Front, ScatteringSimple::Diffuse, Theta, Phi); // Real64 AbWinDiffBack = aLayer->getAbsorptanceLayer(Lay, Side::Back, ScatteringSimple::Diffuse, // Theta, Phi); @@ -8675,7 +8658,7 @@ void CalcInteriorSolarDistributionWCESimple(EnergyPlusData &state) // results as BSDF and Winkelmann models. state.dataSurface->SurfWinA(SurfNum, Lay) = AbWinBeam * CosInc * SunLitFract * - state.dataSurface->SurfaceWindow(SurfNum).OutProjSLFracMult(state.dataGlobal->HourOfDay); + state.dataSurface->SurfaceWindow(SurfNum).OutProjSLFracMult[state.dataGlobal->HourOfDay]; state.dataSurface->SurfWinADiffFront(SurfNum, Lay) = AbWinDiffFront; // Simon: Same not as for BSDF. Normal solar radiation should be taken here because angle of @@ -8684,8 +8667,7 @@ void CalcInteriorSolarDistributionWCESimple(EnergyPlusData &state) Real64 absDiff = state.dataSurface->SurfWinADiffFront(SurfNum, Lay) * (state.dataSurface->SurfSkySolarInc(SurfNum2) + state.dataSurface->SurfGndSolarInc(SurfNum2)); state.dataHeatBal->SurfWinQRadSWwinAbs(SurfNum, Lay) = (absBeam + absDiff); - state.dataHeatBal->SurfWinQRadSWwinAbsLayer(SurfNum, Lay) = - state.dataHeatBal->SurfWinQRadSWwinAbs(SurfNum, Lay) * state.dataSurface->Surface(SurfNum).Area; + state.dataHeatBal->SurfWinQRadSWwinAbsLayer(SurfNum, Lay) = state.dataHeatBal->SurfWinQRadSWwinAbs(SurfNum, Lay) * surf.Area; } } } @@ -8713,16 +8695,13 @@ void CalcInteriorSolarDistributionWCESimple(EnergyPlusData &state) //////////////////////////////////////////////////////////////////// Real64 TBmBm = aLayer->getPropertySimple(minLambda, maxLambda, PropertySimple::T, Side::Front, Scattering::DirectDirect, Theta, Phi); Real64 TBmDif = aLayer->getPropertySimple(minLambda, maxLambda, PropertySimple::T, Side::Front, Scattering::DirectDiffuse, Theta, Phi); - Real64 SurfWinTransBmBmSolar = - TBmBm * SunLitFract * CosInc * state.dataSurface->Surface(SurfNum).Area * window.InOutProjSLFracMult(state.dataGlobal->HourOfDay); - Real64 SurfWinTransBmDifSolar = - TBmDif * SunLitFract * CosInc * state.dataSurface->Surface(SurfNum).Area * window.InOutProjSLFracMult(state.dataGlobal->HourOfDay); + Real64 SurfWinTransBmBmSolar = TBmBm * SunLitFract * CosInc * surf.Area * window.InOutProjSLFracMult[state.dataGlobal->HourOfDay]; + Real64 SurfWinTransBmDifSolar = TBmDif * SunLitFract * CosInc * surf.Area * window.InOutProjSLFracMult[state.dataGlobal->HourOfDay]; BTOTZone += SurfWinTransBmBmSolar + SurfWinTransBmDifSolar; Real64 DifSolarRadiation = state.dataSurface->SurfSkySolarInc(SurfNum2) + state.dataSurface->SurfGndSolarInc(SurfNum2); - state.dataSurface->SurfWinBmSolar(SurfNum) = - state.dataEnvrn->BeamSolarRad * (TBmBm + TBmDif) * state.dataSurface->Surface(SurfNum).Area * CosInc; - state.dataSurface->SurfWinDifSolar(SurfNum) = DifSolarRadiation * Tdiff * state.dataSurface->Surface(SurfNum).Area; + state.dataSurface->SurfWinBmSolar(SurfNum) = state.dataEnvrn->BeamSolarRad * (TBmBm + TBmDif) * surf.Area * CosInc; + state.dataSurface->SurfWinDifSolar(SurfNum) = DifSolarRadiation * Tdiff * surf.Area; state.dataSurface->SurfWinBmSolarEnergy(SurfNum) = state.dataSurface->SurfWinBmSolar(SurfNum) * state.dataGlobal->TimeStepZoneSec; state.dataSurface->SurfWinDifSolarEnergy(SurfNum) = state.dataSurface->SurfWinDifSolar(SurfNum) * state.dataGlobal->TimeStepZoneSec; state.dataSurface->SurfWinTransSolar(SurfNum) = state.dataSurface->SurfWinBmSolar(SurfNum) + state.dataSurface->SurfWinDifSolar(SurfNum); @@ -8731,7 +8710,7 @@ void CalcInteriorSolarDistributionWCESimple(EnergyPlusData &state) // Add beam solar absorbed by outside reveal to outside of window's base surface. // Add beam solar absorbed by inside reveal to inside of window's base surface. // This ignores 2-D heat transfer effects. - int BaseSurfNum = state.dataSurface->Surface(SurfNum).BaseSurf; + int BaseSurfNum = surf.BaseSurf; state.dataSurface->SurfOpaqAI(BaseSurfNum) = state.dataSurface->SurfWinBmSolAbsdInsReveal(SurfNum2) / state.dataSurface->Surface(BaseSurfNum).Area; state.dataSurface->SurfOpaqAO(BaseSurfNum) = @@ -8742,14 +8721,13 @@ void CalcInteriorSolarDistributionWCESimple(EnergyPlusData &state) //////////////////////////////////////////////////////////////////// Real64 TBm = TBmBm; // Correction for beam absorbed by inside reveal - Real64 TBmDenom = - SunLitFract * CosInc * state.dataSurface->Surface(SurfNum).Area * window.InOutProjSLFracMult(state.dataGlobal->HourOfDay); + Real64 TBmDenom = SunLitFract * CosInc * surf.Area * window.InOutProjSLFracMult[state.dataGlobal->HourOfDay]; if (TBmDenom != 0.0) { // when =0.0, no correction TBm -= state.dataSurface->SurfWinBmSolAbsdInsReveal(SurfNum) / TBmDenom; } TBm = max(0.0, TBm); - TBm *= state.dataSurface->Surface(SurfNum).IncSolMultiplier; + TBm *= surf.IncSolMultiplier; int NumOfBackSurf = state.dataShadowComb->ShadowComb(BaseSurfNum).NumBackSurf; @@ -8781,8 +8759,7 @@ void CalcInteriorSolarDistributionWCESimple(EnergyPlusData &state) if (!state.dataSurface->Surface(FloorNum).HeatTransSurf) continue; if (state.dataSolarShading->SurfIntAbsFac(FloorNum) <= 0.0 || FloorNum == SurfNum) continue; // Keep only floor surfaces - Real64 BTOTWinZone = TBm * SunLitFract * state.dataSurface->Surface(SurfNum).Area * CosInc * - window.InOutProjSLFracMult(state.dataGlobal->HourOfDay); //[m2] + Real64 BTOTWinZone = TBm * SunLitFract * surf.Area * CosInc * window.InOutProjSLFracMult[state.dataGlobal->HourOfDay]; //[m2] if (state.dataConstruction->Construct(state.dataSurface->Surface(FloorNum).Construction).TransDiff <= 0.0) { // Opaque surface @@ -8987,7 +8964,7 @@ void PerformSolarCalculations(EnergyPlusData &state) // Recalculate daylighting coefficients if storm window has been added // or removed from one or more windows at beginning of day - if (state.dataDaylightingManager->TotWindowsWithDayl > 0 && !state.dataGlobal->BeginSimFlag && !state.dataGlobal->BeginEnvrnFlag && + if (state.dataDayltg->TotWindowsWithDayl > 0 && !state.dataGlobal->BeginSimFlag && !state.dataGlobal->BeginEnvrnFlag && !state.dataGlobal->WarmupFlag && state.dataSurface->TotStormWin > 0 && state.dataHeatBal->StormWinChangeThisDay) { CalcDayltgCoefficients(state); } @@ -9509,6 +9486,7 @@ void WindowShadingManager(EnergyPlusData &state) int const firstSurfWin = thisSpace.WindowSurfaceFirst; int const lastSurfWin = thisSpace.WindowSurfaceLast; for (int ISurf = firstSurfWin; ISurf <= lastSurfWin; ++ISurf) { + auto const &surfWin = state.dataSurface->SurfaceWindow(ISurf); state.dataSurface->SurfWinExtIntShadePrevTS(ISurf) = state.dataSurface->SurfWinShadingFlag(ISurf); state.dataSurface->SurfWinShadingFlag(ISurf) = WinShadingType::NoShade; @@ -9558,9 +9536,9 @@ void WindowShadingManager(EnergyPlusData &state) Real64 RhoGlassIR = 1 - EpsGlassIR; Real64 EffShBlEmiss = EpsShadeIR * (1.0 + RhoGlassIR * TauShadeIR / (1.0 - RhoGlassIR * RhoShadeIR)); - surface_window.EffShBlindEmiss[0] = EffShBlEmiss; + surface_window.EffShBlindEmiss[1] = EffShBlEmiss; Real64 EffGlEmiss = EpsGlassIR * TauShadeIR / (1.0 - RhoGlassIR * RhoShadeIR); - surface_window.EffGlassEmiss[0] = EffGlEmiss; + surface_window.EffGlassEmiss[1] = EffGlEmiss; } } @@ -9578,7 +9556,7 @@ void WindowShadingManager(EnergyPlusData &state) // Vis trans at normal incidence of unswitched glass. Counting the GlazedFrac if (IConst > 0) state.dataSurface->SurfWinVisTransSelected(ISurf) = - POLYF(1.0, state.dataConstruction->Construct(IConst).TransVisBeamCoef) * state.dataSurface->SurfWinGlazedFrac(ISurf); + POLYF(1.0, state.dataConstruction->Construct(IConst).TransVisBeamCoef) * surfWin.glazedFrac; // Window has shading control // select the active window shading control and corresponding contructions @@ -9618,7 +9596,7 @@ void WindowShadingManager(EnergyPlusData &state) } Real64 GlareControlIsActive = - (state.dataDaylightingData->ZoneDaylight(IZone).totRefPts > 0 && state.dataEnvrn->SunIsUp && + (state.dataDayltg->ZoneDaylight(IZone).totRefPts > 0 && state.dataEnvrn->SunIsUp && state.dataSurface->WindowShadingControl(IShadingCtrl).GlareControlIsActive); // True if glare control is active Real64 SolarOnWindow = 0.0; // Direct plus diffuse solar intensity on window (W/m2) @@ -9940,7 +9918,7 @@ void WindowShadingManager(EnergyPlusData &state) // Vis trans at normal incidence of fully switched glass IConst = state.dataSurface->Surface(ISurf).activeShadedConstruction; state.dataSurface->SurfWinVisTransSelected(ISurf) = - POLYF(1.0, state.dataConstruction->Construct(IConst).TransVisBeamCoef) * state.dataSurface->SurfWinGlazedFrac(ISurf); + POLYF(1.0, state.dataConstruction->Construct(IConst).TransVisBeamCoef) * surfWin.glazedFrac; } // Slat angle control for blinds @@ -9957,7 +9935,6 @@ void WindowShadingManager(EnergyPlusData &state) if (BlNum > 0) { Real64 InputSlatAngle = state.dataMaterial->Blind(BlNum).SlatAngle * Constant::DegToRadians; // Slat angle of associated Material:WindowBlind (rad) - Real64 ProfAng; // Solar profile angle (rad) Real64 SlatAng; // Slat angle this time step (rad) Real64 PermeabilityA; // Intermediate variables in blind permeability calc Real64 PermeabilityB; @@ -9965,12 +9942,10 @@ void WindowShadingManager(EnergyPlusData &state) Real64 ThetaBlock1; // Slat angles that just block beam solar (rad) Real64 ThetaBlock2; - Dayltg::ProfileAngle(state, - ISurf, - state.dataEnvrn->SOLCOS, - state.dataMaterial->Blind(BlNum).SlatOrientation, - state.dataSurface->SurfWinProfileAng(ISurf)); - ProfAng = state.dataSurface->SurfWinProfileAng(ISurf); + auto const &blind = state.dataMaterial->Blind(BlNum); + Real64 ProfAng = state.dataSurface->SurfWinProfileAng(ISurf) = + Dayltg::ProfileAngle(state, ISurf, state.dataEnvrn->SOLCOS, blind.SlatOrientation); + if (ProfAng > Constant::PiOvr2 || ProfAng < -Constant::PiOvr2) { ProfAng = min(max(ProfAng, -Constant::PiOvr2), Constant::PiOvr2); } @@ -9979,29 +9954,25 @@ void WindowShadingManager(EnergyPlusData &state) state.dataSurface->SurfWinProfAngInterpFac(ISurf) = (ProfAng + Constant::PiOvr2 - (ProfAngIndex - 1) * DeltaProfAng) / DeltaProfAng; - if (state.dataMaterial->Blind(BlNum).SlatWidth > state.dataMaterial->Blind(BlNum).SlatSeparation && BeamSolarOnWindow > 0.0) { + if (blind.SlatWidth > blind.SlatSeparation && BeamSolarOnWindow > 0.0) { ProfAng = state.dataSurface->SurfWinProfileAng(ISurf); - Real64 ThetaBase = std::acos(std::cos(ProfAng) * state.dataMaterial->Blind(BlNum).SlatSeparation / - state.dataMaterial->Blind(BlNum).SlatWidth); + Real64 ThetaBase = std::acos(std::cos(ProfAng) * blind.SlatSeparation / blind.SlatWidth); // There are two solutions for the slat angle that just blocks beam radiation ThetaBlock1 = ProfAng + ThetaBase; ThetaBlock2 = ProfAng + Constant::Pi - ThetaBase; state.dataSolarShading->ThetaSmall = min(ThetaBlock1, ThetaBlock2); state.dataSolarShading->ThetaBig = max(ThetaBlock1, ThetaBlock2); - state.dataSolarShading->ThetaMin = state.dataMaterial->Blind(BlNum).MinSlatAngle * Constant::DegToRadians; - state.dataSolarShading->ThetaMax = state.dataMaterial->Blind(BlNum).MaxSlatAngle * Constant::DegToRadians; + state.dataSolarShading->ThetaMin = blind.MinSlatAngle * Constant::DegToRadians; + state.dataSolarShading->ThetaMax = blind.MaxSlatAngle * Constant::DegToRadians; } // TH 5/20/2010, CR 8064: Slat Width <= Slat Separation - if (state.dataMaterial->Blind(BlNum).SlatWidth <= state.dataMaterial->Blind(BlNum).SlatSeparation && - BeamSolarOnWindow > 0.0) { + if (blind.SlatWidth <= blind.SlatSeparation && BeamSolarOnWindow > 0.0) { if (state.dataSurface->WindowShadingControl(IShadingCtrl).slatAngleControl == SlatAngleControl::BlockBeamSolar) { ProfAng = state.dataSurface->SurfWinProfileAng(ISurf); - if (std::abs(std::cos(ProfAng) * state.dataMaterial->Blind(BlNum).SlatSeparation / - state.dataMaterial->Blind(BlNum).SlatWidth) <= 1.0) { + if (std::abs(std::cos(ProfAng) * blind.SlatSeparation / blind.SlatWidth) <= 1.0) { // set to block 100% of beam solar, not necessarily to block maximum solar (beam + diffuse) - ThetaBase = std::acos(std::cos(ProfAng) * state.dataMaterial->Blind(BlNum).SlatSeparation / - state.dataMaterial->Blind(BlNum).SlatWidth); + ThetaBase = std::acos(std::cos(ProfAng) * blind.SlatSeparation / blind.SlatWidth); state.dataSurface->SurfWinSlatsBlockBeam(ISurf) = true; } else { // cannot block 100% of beam solar, turn slats to be perpendicular to sun beam to block maximal beam solar @@ -10014,8 +9985,8 @@ void WindowShadingManager(EnergyPlusData &state) state.dataSolarShading->ThetaSmall = min(ThetaBlock1, ThetaBlock2); state.dataSolarShading->ThetaBig = max(ThetaBlock1, ThetaBlock2); - state.dataSolarShading->ThetaMin = state.dataMaterial->Blind(BlNum).MinSlatAngle * Constant::DegToRadians; - state.dataSolarShading->ThetaMax = state.dataMaterial->Blind(BlNum).MaxSlatAngle * Constant::DegToRadians; + state.dataSolarShading->ThetaMin = blind.MinSlatAngle * Constant::DegToRadians; + state.dataSolarShading->ThetaMax = blind.MaxSlatAngle * Constant::DegToRadians; } } @@ -10024,26 +9995,23 @@ void WindowShadingManager(EnergyPlusData &state) state.dataSurface->SurfWinSlatAngThisTS(ISurf) = InputSlatAngle; if ((state.dataSurface->SurfWinSlatAngThisTS(ISurf) <= state.dataSolarShading->ThetaSmall || state.dataSurface->SurfWinSlatAngThisTS(ISurf) >= state.dataSolarShading->ThetaBig) && - (state.dataMaterial->Blind(BlNum).SlatWidth > state.dataMaterial->Blind(BlNum).SlatSeparation) && - (BeamSolarOnWindow > 0.0)) + (blind.SlatWidth > blind.SlatSeparation) && (BeamSolarOnWindow > 0.0)) state.dataSurface->SurfWinSlatsBlockBeam(ISurf) = true; } break; case SlatAngleControl::Scheduled: { // 'SCHEDULEDSLATANGLE' state.dataSurface->SurfWinSlatAngThisTS(ISurf) = GetCurrentScheduleValue(state, state.dataSurface->WindowShadingControl(IShadingCtrl).SlatAngleSchedule); state.dataSurface->SurfWinSlatAngThisTS(ISurf) = - max(state.dataMaterial->Blind(BlNum).MinSlatAngle, - min(state.dataSurface->SurfWinSlatAngThisTS(ISurf), state.dataMaterial->Blind(BlNum).MaxSlatAngle)) * + max(blind.MinSlatAngle, min(state.dataSurface->SurfWinSlatAngThisTS(ISurf), blind.MaxSlatAngle)) * Constant::DegToRadians; if ((state.dataSurface->SurfWinSlatAngThisTS(ISurf) <= state.dataSolarShading->ThetaSmall || state.dataSurface->SurfWinSlatAngThisTS(ISurf) >= state.dataSolarShading->ThetaBig) && - (state.dataMaterial->Blind(BlNum).SlatWidth > state.dataMaterial->Blind(BlNum).SlatSeparation) && - (BeamSolarOnWindow > 0.0)) + (blind.SlatWidth > blind.SlatSeparation) && (BeamSolarOnWindow > 0.0)) state.dataSurface->SurfWinSlatsBlockBeam(ISurf) = true; } break; case SlatAngleControl::BlockBeamSolar: { // 'BLOCKBEAMSOLAR' if (BeamSolarOnWindow > 0.0) { - if (state.dataMaterial->Blind(BlNum).SlatSeparation >= state.dataMaterial->Blind(BlNum).SlatWidth) { + if (blind.SlatSeparation >= blind.SlatWidth) { // TH 5/20/2010. CR 8064. // The following line of code assumes slats are always vertical/closed to minimize solar penetration // The slat angle can however change if the only goal is to block maximum amount of direct beam solar @@ -10102,18 +10070,12 @@ void WindowShadingManager(EnergyPlusData &state) } // Air flow permeability for calculation of convective air flow between blind and glass SlatAng = state.dataSurface->SurfWinSlatAngThisTS(ISurf); - PermeabilityA = - std::sin(SlatAng) - state.dataMaterial->Blind(BlNum).SlatThickness / state.dataMaterial->Blind(BlNum).SlatSeparation; - PermeabilityB = 1.0 - (std::abs(state.dataMaterial->Blind(BlNum).SlatWidth * std::cos(SlatAng)) + - state.dataMaterial->Blind(BlNum).SlatThickness * std::sin(SlatAng)) / - state.dataMaterial->Blind(BlNum).SlatSeparation; + PermeabilityA = std::sin(SlatAng) - blind.SlatThickness / blind.SlatSeparation; + PermeabilityB = + 1.0 - (std::abs(blind.SlatWidth * std::cos(SlatAng)) + blind.SlatThickness * std::sin(SlatAng)) / blind.SlatSeparation; state.dataSurface->SurfWinBlindAirFlowPermeability(ISurf) = min(1.0, max(0.0, PermeabilityA, PermeabilityB)); state.dataSurface->SurfWinBlindBmBmTrans(ISurf) = - WindowManager::BlindBeamBeamTrans(ProfAng, - SlatAng, - state.dataMaterial->Blind(BlNum).SlatWidth, - state.dataMaterial->Blind(BlNum).SlatSeparation, - state.dataMaterial->Blind(BlNum).SlatThickness); + WindowManager::BlindBeamBeamTrans(ProfAng, SlatAng, blind.SlatWidth, blind.SlatSeparation, blind.SlatThickness); // Calculate blind interpolation factors and indices. if (state.dataSurface->SurfWinMovableSlats(ISurf)) { if (SlatAng > Constant::Pi || SlatAng < 0.0) { @@ -10156,8 +10118,9 @@ void CheckGlazingShadingStatusChange(EnergyPlusData &state) for (int spaceNum : state.dataHeatBal->Zone(ZoneNum).spaceIndexes) { auto &thisSpace = state.dataHeatBal->space(spaceNum); for (int SurfNum = thisSpace.HTSurfaceFirst; SurfNum <= thisSpace.HTSurfaceLast; ++SurfNum) { - if (state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).TCFlag == 1 || - state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).WindowTypeEQL) { + auto &surf = state.dataSurface->Surface(SurfNum); + if (state.dataConstruction->Construct(surf.Construction).TCFlag == 1 || + state.dataConstruction->Construct(surf.Construction).WindowTypeEQL) { state.dataHeatBal->EnclRadAlwaysReCalc = true; break; } @@ -10194,10 +10157,10 @@ void CheckGlazingShadingStatusChange(EnergyPlusData &state) if (!state.dataGlobal->AndShadingControlInModel) return; for (int enclosureNum = 1; enclosureNum <= state.dataViewFactor->NumOfSolarEnclosures; ++enclosureNum) { for (int const SurfNum : state.dataViewFactor->EnclRadInfo(enclosureNum).SurfacePtr) { - bool surfShadingStatusChange = - state.dataSurface->SurfWinExtIntShadePrevTS(SurfNum) != state.dataSurface->SurfWinShadingFlag(SurfNum) || - state.dataSurface->Surface(SurfNum).activeShadedConstruction != state.dataSurface->Surface(SurfNum).activeShadedConstructionPrev || - state.dataSurface->SurfWinMovableSlats(SurfNum); + auto &surf = state.dataSurface->Surface(SurfNum); + bool surfShadingStatusChange = state.dataSurface->SurfWinExtIntShadePrevTS(SurfNum) != state.dataSurface->SurfWinShadingFlag(SurfNum) || + surf.activeShadedConstruction != surf.activeShadedConstructionPrev || + state.dataSurface->SurfWinMovableSlats(SurfNum); if (surfShadingStatusChange) { state.dataViewFactor->EnclSolInfo(enclosureNum).radReCalc = true; state.dataViewFactor->EnclRadInfo(enclosureNum).radReCalc = true; @@ -10416,46 +10379,47 @@ void SkyDifSolarShading(EnergyPlusData &state) } for (int SurfNum : state.dataSurface->AllExtSolarSurfaceList) { + auto &surf = state.dataSurface->Surface(SurfNum); // CurrentModuleObject='Surfaces' if (detailedShading) { SetupOutputVariable(state, "Debug Surface Solar Shading Model DifShdgRatioIsoSky", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSolarShading->SurfCurDifShdgRatioIsoSky(SurfNum), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfNum).Name); + surf.Name); } else { SetupOutputVariable(state, "Debug Surface Solar Shading Model DifShdgRatioIsoSky", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSolarShading->SurfDifShdgRatioIsoSky(SurfNum), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfNum).Name); + surf.Name); } SetupOutputVariable(state, "Debug Surface Solar Shading Model DifShdgRatioHoriz", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSolarShading->SurfDifShdgRatioHoriz(SurfNum), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfNum).Name); + surf.Name); SetupOutputVariable(state, "Debug Surface Solar Shading Model WithShdgIsoSky", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSolarShading->SurfWithShdgIsoSky(SurfNum), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfNum).Name); + surf.Name); SetupOutputVariable(state, "Debug Surface Solar Shading Model WoShdgIsoSky", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSolarShading->SurfWoShdgIsoSky(SurfNum), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, - state.dataSurface->Surface(SurfNum).Name); + surf.Name); } for (int IPhi = 0; IPhi < NPhi; ++IPhi) { // Loop over patch altitude values @@ -10466,21 +10430,23 @@ void SkyDifSolarShading(EnergyPlusData &state) state.dataSolarShading->SUNCOS(2) = state.dataSolarShading->cos_Phi[IPhi] * state.dataSolarShading->sin_Theta[ITheta]; for (int SurfNum : state.dataSurface->AllExtSolAndShadingSurfaceList) { + auto &surf = state.dataSurface->Surface(SurfNum); + // Cosine of angle of incidence on surface of solar radiation from patch - state.dataSolarShading->SurfSunCosTheta(SurfNum) = - state.dataSolarShading->SUNCOS(1) * state.dataSurface->Surface(SurfNum).OutNormVec(1) + - state.dataSolarShading->SUNCOS(2) * state.dataSurface->Surface(SurfNum).OutNormVec(2) + - state.dataSolarShading->SUNCOS(3) * state.dataSurface->Surface(SurfNum).OutNormVec(3); + state.dataSolarShading->SurfSunCosTheta(SurfNum) = state.dataSolarShading->SUNCOS.x * surf.OutNormVec.x + + state.dataSolarShading->SUNCOS.y * surf.OutNormVec.y + + state.dataSolarShading->SUNCOS.z * surf.OutNormVec.z; } SHADOW(state, 24, 0); for (int SurfNum : state.dataSurface->AllExtSolAndShadingSurfaceList) { + auto &surf = state.dataSurface->Surface(SurfNum); if (state.dataSolarShading->SurfSunCosTheta(SurfNum) < 0.0) continue; Fac1WoShdg = state.dataSolarShading->cos_Phi[IPhi] * DThetaDPhi * state.dataSolarShading->SurfSunCosTheta(SurfNum); - SurfArea = state.dataSurface->Surface(SurfNum).NetAreaShadowCalc; + SurfArea = surf.NetAreaShadowCalc; if (SurfArea > Eps) { FracIlluminated = state.dataSolarShading->SurfSunlitArea(SurfNum) / SurfArea; } else { @@ -10605,17 +10571,15 @@ void CalcWindowProfileAngles(EnergyPlusData &state) int const firstSurfWin = thisSpace.WindowSurfaceFirst; int const lastSurfWin = thisSpace.WindowSurfaceLast; for (int SurfNum = firstSurfWin; SurfNum <= lastSurfWin; ++SurfNum) { - - if (state.dataSurface->Surface(SurfNum).ExtBoundCond != ExternalEnvironment && - state.dataSurface->Surface(SurfNum).ExtBoundCond != OtherSideCondModeledExt) - continue; + auto &surf = state.dataSurface->Surface(SurfNum); + if (surf.ExtBoundCond != ExternalEnvironment && surf.ExtBoundCond != OtherSideCondModeledExt) continue; state.dataSurface->SurfWinProfileAngHor(SurfNum) = 0.0; state.dataSurface->SurfWinProfileAngVert(SurfNum) = 0.0; if (state.dataHeatBal->SurfCosIncAng(state.dataGlobal->HourOfDay, state.dataGlobal->TimeStep, SurfNum) <= 0.0) continue; - ElevWin = Constant::PiOvr2 - state.dataSurface->Surface(SurfNum).Tilt * Constant::DegToRadians; - AzimWin = state.dataSurface->Surface(SurfNum).Azimuth * Constant::DegToRadians; + ElevWin = Constant::PiOvr2 - surf.Tilt * Constant::DegToRadians; + AzimWin = surf.Azimuth * Constant::DegToRadians; ProfileAngHor = std::atan(sin_ElevSun / std::abs(cos_ElevSun * std::cos(AzimWin - AzimSun))) - ElevWin; @@ -10624,7 +10588,7 @@ void CalcWindowProfileAngles(EnergyPlusData &state) // IF(ABS(ElevWin) < 0.1d0) THEN ! Near-vertical window // ProfileAngVert = ABS(AzimWin-AzimSun) // ELSE - WinNorm = state.dataSurface->Surface(SurfNum).OutNormVec; + WinNorm = surf.OutNormVec; ThWin = AzimWin - Constant::PiOvr2; Real64 const sin_Elevwin(std::sin(ElevWin)); WinNormCrossBase.x = -(sin_Elevwin * std::cos(ThWin)); @@ -10752,17 +10716,18 @@ void CalcFrameDividerShadow(EnergyPlusData &state, DivProjOut = state.dataSurface->FrameDivider(FrDivNum).DividerProjectionOut; DivProjIn = state.dataSurface->FrameDivider(FrDivNum).DividerProjectionIn; - GlArea = state.dataSurface->Surface(SurfNum).Area; - ElevWin = Constant::PiOvr2 - state.dataSurface->Surface(SurfNum).Tilt * Constant::DegToRadians; + auto &surf = state.dataSurface->Surface(SurfNum); + GlArea = surf.Area; + ElevWin = Constant::PiOvr2 - surf.Tilt * Constant::DegToRadians; ElevSun = Constant::PiOvr2 - std::acos(state.dataSolarShading->SUNCOS(3)); - AzimWin = state.dataSurface->Surface(SurfNum).Azimuth * Constant::DegToRadians; + AzimWin = surf.Azimuth * Constant::DegToRadians; AzimSun = std::atan2(state.dataSolarShading->SUNCOS(1), state.dataSolarShading->SUNCOS(2)); ProfileAngHor = std::atan(std::sin(ElevSun) / std::abs(std::cos(ElevSun) * std::cos(AzimWin - AzimSun))) - ElevWin; if (std::abs(ElevWin) < 0.1) { // Near-vertical window ProfileAngVert = std::abs(AzimWin - AzimSun); } else { - WinNorm = state.dataSurface->Surface(SurfNum).OutNormVec; + WinNorm = surf.OutNormVec; ThWin = AzimWin - Constant::PiOvr2; WinNormCrossBase(1) = -std::sin(ElevWin) * std::cos(ThWin); WinNormCrossBase(2) = std::sin(ElevWin) * std::sin(ThWin); @@ -10780,8 +10745,7 @@ void CalcFrameDividerShadow(EnergyPlusData &state, FrWidth = state.dataSurface->FrameDivider(FrDivNum).FrameWidth; DivWidth = state.dataSurface->FrameDivider(FrDivNum).DividerWidth; - Arealite = (state.dataSurface->Surface(SurfNum).Height / (NHorDiv + 1.0) - DivWidth / 2.0) * - (state.dataSurface->Surface(SurfNum).Width / (NVertDiv + 1.0) - DivWidth / 2.0); + Arealite = (surf.Height / (NHorDiv + 1.0) - DivWidth / 2.0) * (surf.Width / (NVertDiv + 1.0) - DivWidth / 2.0); if (DivProjOut > 0.0 || DivProjIn > 0.0) { ArealiteCol = (NHorDiv + 1) * Arealite; ArealiteRow = (NVertDiv + 1) * Arealite; @@ -10805,12 +10769,12 @@ void CalcFrameDividerShadow(EnergyPlusData &state, if (DivProjOut > 0.0 || DivProjIn > 0.0) { // Shaded area from all vertical dividers - AshVDout = NVertDiv * min((state.dataSurface->Surface(SurfNum).Height - NHorDiv * DivWidth) * DivProjOut * TanProfileAngVert, ArealiteCol); - AshVDin = NVertDiv * min((state.dataSurface->Surface(SurfNum).Height - NHorDiv * DivWidth) * DivProjIn * TanProfileAngVert, ArealiteCol); + AshVDout = NVertDiv * min((surf.Height - NHorDiv * DivWidth) * DivProjOut * TanProfileAngVert, ArealiteCol); + AshVDin = NVertDiv * min((surf.Height - NHorDiv * DivWidth) * DivProjIn * TanProfileAngVert, ArealiteCol); // Shaded area from all horizontal dividers - AshHDout = NHorDiv * min((state.dataSurface->Surface(SurfNum).Width - NVertDiv * DivWidth) * DivProjOut * TanProfileAngHor, ArealiteRow); - AshHDin = NHorDiv * min((state.dataSurface->Surface(SurfNum).Width - NVertDiv * DivWidth) * DivProjIn * TanProfileAngHor, ArealiteRow); + AshHDout = NHorDiv * min((surf.Width - NVertDiv * DivWidth) * DivProjOut * TanProfileAngHor, ArealiteRow); + AshHDin = NHorDiv * min((surf.Width - NVertDiv * DivWidth) * DivProjIn * TanProfileAngHor, ArealiteRow); // Horizontal divider/vertical divider shadow overlap AshDDover = min(DivProjOut * TanProfileAngHor * DivProjOut * TanProfileAngVert, Arealite) * NHorDiv * NVertDiv; @@ -10821,14 +10785,14 @@ void CalcFrameDividerShadow(EnergyPlusData &state, // Shaded area from sides of frame; to avoid complications from possible overlaps between // shadow from side of frame and shadow from vertical divider the shaded area from side of // frame is restricted to the area of one column of lites. - AshVFout = min((state.dataSurface->Surface(SurfNum).Height - NHorDiv * DivWidth) * FrProjOut * TanProfileAngVert, ArealiteCol); - AshVFin = min((state.dataSurface->Surface(SurfNum).Height - NHorDiv * DivWidth) * FrProjIn * TanProfileAngVert, ArealiteCol); + AshVFout = min((surf.Height - NHorDiv * DivWidth) * FrProjOut * TanProfileAngVert, ArealiteCol); + AshVFin = min((surf.Height - NHorDiv * DivWidth) * FrProjIn * TanProfileAngVert, ArealiteCol); // Shaded area from top or bottom of frame; to avoid complications from possible overlaps // between shadow from top or bottom of frame and shadow from horizontal divider, the shaded // area from the top or bottom of frame is restricted to the area of one row of lites. - AshHFout = min((state.dataSurface->Surface(SurfNum).Width - NVertDiv * DivWidth) * FrProjOut * TanProfileAngHor, ArealiteRow); - AshHFin = min((state.dataSurface->Surface(SurfNum).Width - NVertDiv * DivWidth) * FrProjIn * TanProfileAngHor, ArealiteRow); + AshHFout = min((surf.Width - NVertDiv * DivWidth) * FrProjOut * TanProfileAngHor, ArealiteRow); + AshHFin = min((surf.Width - NVertDiv * DivWidth) * FrProjIn * TanProfileAngHor, ArealiteRow); // Top/bottom of frame/side of frame shadow overlap AshFFover = min(FrProjOut * TanProfileAngHor * FrProjOut * TanProfileAngVert, Arealite); @@ -10847,8 +10811,8 @@ void CalcFrameDividerShadow(EnergyPlusData &state, // Divide by the glazed area of the window FracShFDOut = AshFDtotOut / GlArea; FracShFDin = AshFDtotIn / GlArea; - state.dataSurface->SurfaceWindow(SurfNum).OutProjSLFracMult(HourNum) = 1.0 - FracShFDOut; - state.dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult(HourNum) = 1.0 - (FracShFDin + FracShFDOut); + state.dataSurface->SurfaceWindow(SurfNum).OutProjSLFracMult[HourNum] = 1.0 - FracShFDOut; + state.dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult[HourNum] = 1.0 - (FracShFDin + FracShFDOut); } void CalcBeamSolarOnWinRevealSurface(EnergyPlusData &state) @@ -11015,13 +10979,12 @@ void CalcBeamSolarOnWinRevealSurface(EnergyPlusData &state) state.dataSurface->SurfWinInsRevealDiffIntoZone(SurfNum) = 0.0; state.dataSurface->SurfWinInsRevealDiffIntoZoneReport(SurfNum) = 0.0; - if ((state.dataSurface->Surface(SurfNum).ExtBoundCond != ExternalEnvironment && - state.dataSurface->Surface(SurfNum).ExtBoundCond != OtherSideCondModeledExt)) - continue; - if (state.dataSurface->Surface(SurfNum).Reveal == 0.0 && state.dataSurface->SurfWinInsideReveal(SurfNum) == 0.0 && + auto &surf = state.dataSurface->Surface(SurfNum); + if ((surf.ExtBoundCond != ExternalEnvironment && surf.ExtBoundCond != OtherSideCondModeledExt)) continue; + if (surf.Reveal == 0.0 && state.dataSurface->SurfWinInsideReveal(SurfNum) == 0.0 && state.dataSurface->SurfWinInsideSillDepth(SurfNum) == 0.0) continue; - if (state.dataSurface->Surface(SurfNum).Sides != 4) continue; + if (surf.Sides != 4) continue; if (state.dataSurface->SurfWinInsideSillDepth(SurfNum) < state.dataSurface->SurfWinInsideReveal(SurfNum)) continue; ShadeFlag = state.dataSurface->SurfWinShadingFlag(SurfNum); @@ -11035,22 +10998,19 @@ void CalcBeamSolarOnWinRevealSurface(EnergyPlusData &state) // Calculate cosine of angle of incidence of beam solar on reveal surfaces, // assumed to be perpendicular to window plane - CosBetaBottom = - -state.dataEnvrn->SOLCOS(1) * state.dataSurface->Surface(SurfNum).SinAzim * state.dataSurface->Surface(SurfNum).CosTilt - - state.dataEnvrn->SOLCOS(2) * state.dataSurface->Surface(SurfNum).CosAzim * state.dataSurface->Surface(SurfNum).CosTilt + - state.dataEnvrn->SOLCOS(3) * state.dataSurface->Surface(SurfNum).SinTilt; + CosBetaBottom = -state.dataEnvrn->SOLCOS(1) * surf.SinAzim * surf.CosTilt - state.dataEnvrn->SOLCOS(2) * surf.CosAzim * surf.CosTilt + + state.dataEnvrn->SOLCOS(3) * surf.SinTilt; - CosBetaLeft = -state.dataEnvrn->SOLCOS(1) * state.dataSurface->Surface(SurfNum).CosAzim - - state.dataEnvrn->SOLCOS(2) * state.dataSurface->Surface(SurfNum).SinAzim; + CosBetaLeft = -state.dataEnvrn->SOLCOS(1) * surf.CosAzim - state.dataEnvrn->SOLCOS(2) * surf.SinAzim; // Note: CosBetaTop = -CosBetaBottom, CosBetaRight = -CosBetaLeft - OutsReveal = state.dataSurface->Surface(SurfNum).Reveal; + OutsReveal = surf.Reveal; InsReveal = state.dataSurface->SurfWinInsideReveal(SurfNum); InsideRevealSolAbs = 0.0; GlazingThickness = state.dataSurface->SurfWinTotGlazingThickness(SurfNum); - H = state.dataSurface->Surface(SurfNum).Height; - W = state.dataSurface->Surface(SurfNum).Width; + H = surf.Height; + W = surf.Width; d1 = OutsReveal + 0.5 * GlazingThickness; ConstrNum = state.dataSurface->SurfActiveConstruction(SurfNum); ConstrNumSh = state.dataSurface->SurfWinActiveShadedConstruction(SurfNum); @@ -11060,7 +11020,7 @@ void CalcBeamSolarOnWinRevealSurface(EnergyPlusData &state) thisConstruct.TransSolBeamCoef); TanProfileAngVert = state.dataSurface->SurfWinTanProfileAngVert(SurfNum); TanProfileAngHor = state.dataSurface->SurfWinTanProfileAngHor(SurfNum); - FrameDivNum = state.dataSurface->Surface(SurfNum).FrameDivider; + FrameDivNum = surf.FrameDivider; FrameWidth = 0.0; if (FrameDivNum != 0) { FrameWidth = state.dataSurface->FrameDivider(FrameDivNum).FrameWidth; @@ -11088,7 +11048,7 @@ void CalcBeamSolarOnWinRevealSurface(EnergyPlusData &state) TanAlpha = TanProfileAngHor; TanGamma = TanProfileAngVert; CosBeta = std::abs(CosBetaLeft); - L = state.dataSurface->Surface(SurfNum).Height; + L = surf.Height; d2 = InsReveal + 0.5 * GlazingThickness; d2prime = d1 + d2 - W / TanGamma; InsideRevealSolAbs = state.dataSurface->SurfWinInsideRevealSolAbs(SurfNum); @@ -11097,7 +11057,7 @@ void CalcBeamSolarOnWinRevealSurface(EnergyPlusData &state) TanAlpha = TanProfileAngVert; TanGamma = TanProfileAngHor; CosBeta = std::abs(CosBetaBottom); - L = state.dataSurface->Surface(SurfNum).Width; + L = surf.Width; if (CosBetaBottom > 0.0) { // Bottom reveal surfaces may be illuminated d2 = InsSillDepth + 0.5 * GlazingThickness; InsideRevealSolAbs = state.dataSurface->SurfWinInsideSillSolAbs(SurfNum); @@ -11266,8 +11226,7 @@ void CalcBeamSolarOnWinRevealSurface(EnergyPlusData &state) state.dataSurface->SurfWinBmSolRefldOutsRevealReport(SurfNum) * state.dataGlobal->TimeStepZoneSec; // Reflected solar from outside horizontal and vertical reveal incident on glazing - state.dataSurface->SurfWinOutsRevealDiffOntoGlazing(SurfNum) += - FracToGlassOuts * BmSolRefldOutsReveal / state.dataSurface->Surface(SurfNum).Area; + state.dataSurface->SurfWinOutsRevealDiffOntoGlazing(SurfNum) += FracToGlassOuts * BmSolRefldOutsReveal / surf.Area; if (FrameWidth > 0.0) { // Reflected solar from outside horizontal and vertical reveal incident on frame @@ -11315,8 +11274,7 @@ void CalcBeamSolarOnWinRevealSurface(EnergyPlusData &state) state.dataSurface->SurfWinBmSolRefldInsRevealReport(SurfNum) * state.dataGlobal->TimeStepZoneSec; // Reflected solar from inside horizontal and vertical reveal incident on glazing - state.dataSurface->SurfWinInsRevealDiffOntoGlazing(SurfNum) += - FracToGlassIns * BmSolRefldInsReveal / state.dataSurface->Surface(SurfNum).Area; + state.dataSurface->SurfWinInsRevealDiffOntoGlazing(SurfNum) += FracToGlassIns * BmSolRefldInsReveal / surf.Area; // Added TH 5/26/2009 for reporting purpose - diffuse on window glass from inside // reveal (W) @@ -11398,11 +11356,12 @@ void ReportSurfaceShading(EnergyPlusData &state) int RepCol; // the column of the predefined report for (SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; ++SurfNum) { + auto &surf = state.dataSurface->Surface(SurfNum); + state.dataSurface->SurfSunlitFrac(SurfNum) = state.dataHeatBal->SurfSunlitFrac(state.dataGlobal->HourOfDay, state.dataGlobal->TimeStep, SurfNum); state.dataSurface->SurfSunlitArea(SurfNum) = - state.dataHeatBal->SurfSunlitFrac(state.dataGlobal->HourOfDay, state.dataGlobal->TimeStep, SurfNum) * - state.dataSurface->Surface(SurfNum).Area; + state.dataHeatBal->SurfSunlitFrac(state.dataGlobal->HourOfDay, state.dataGlobal->TimeStep, SurfNum) * surf.Area; } // added for predefined reporting RepCol = 0; @@ -11433,8 +11392,9 @@ void ReportSurfaceShading(EnergyPlusData &state) } if (RepCol != 0) { for (SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; ++SurfNum) { - if (state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Window) { - PreDefTableEntry(state, RepCol, state.dataSurface->Surface(SurfNum).Name, state.dataSurface->SurfSunlitFrac(SurfNum)); + auto &surf = state.dataSurface->Surface(SurfNum); + if (surf.Class == SurfaceClass::Window) { + PreDefTableEntry(state, RepCol, surf.Name, state.dataSurface->SurfSunlitFrac(SurfNum)); } } } @@ -11642,16 +11602,17 @@ void ComputeWinShadeAbsorpFactors(EnergyPlusData &state) int const firstSurfWin = thisSpace.WindowSurfaceFirst; int const lastSurfWin = thisSpace.WindowSurfaceLast; for (int SurfNum = firstSurfWin; SurfNum <= lastSurfWin; ++SurfNum) { - if (state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Window && state.dataSurface->Surface(SurfNum).HasShadeControl) { - int WinShadeCtrlNum = state.dataSurface->Surface(SurfNum).activeWindowShadingControl; // Window shading control number + auto &surf = state.dataSurface->Surface(SurfNum); + if (surf.Class == SurfaceClass::Window && surf.HasShadeControl) { + int WinShadeCtrlNum = surf.activeWindowShadingControl; // Window shading control number int MatNumSh = 0; // Shade layer material number Real64 AbsorpEff = 0.0; // Effective absorptance of isolated shade layer (fraction of // of incident radiation remaining after reflected portion is // removed that is absorbed if (ANY_SHADE(state.dataSurface->WindowShadingControl(WinShadeCtrlNum).ShadingType)) { - int const ConstrNumSh = state.dataSurface->Surface(SurfNum).activeShadedConstruction; // Window construction number with shade - int TotLay = state.dataConstruction->Construct(ConstrNumSh).TotLayers; // Total layers in a construction + int const ConstrNumSh = surf.activeShadedConstruction; // Window construction number with shade + int TotLay = state.dataConstruction->Construct(ConstrNumSh).TotLayers; // Total layers in a construction if (state.dataSurface->WindowShadingControl(WinShadeCtrlNum).ShadingType == WinShadingType::IntShade) { MatNumSh = state.dataConstruction->Construct(ConstrNumSh).LayerPoint(TotLay); // Interior shade @@ -11778,9 +11739,9 @@ void CalcWinTransDifSolInitialDistribution(EnergyPlusData &state) // Loop over all diffuse solar transmitting surfaces (i.e., exterior windows and TDDs) in the current zone for (int const DifTransSurfNum : thisEnclosure.SurfacePtr) { // Skip surfaces that are not exterior, except for TDD_Diffusers - if (((state.dataSurface->Surface(DifTransSurfNum).ExtBoundCond != ExternalEnvironment) && - (state.dataSurface->Surface(DifTransSurfNum).ExtBoundCond != OtherSideCondModeledExt)) && - state.dataSurface->SurfWinOriginalClass(DifTransSurfNum) != SurfaceClass::TDD_Diffuser) + auto &difTransSurf = state.dataSurface->Surface(DifTransSurfNum); + if ((difTransSurf.ExtBoundCond != ExternalEnvironment) && (difTransSurf.ExtBoundCond != OtherSideCondModeledExt) && + (difTransSurf.OriginalClass != SurfaceClass::TDD_Diffuser)) continue; // Do I need to do anything special for TDDs? @@ -11789,9 +11750,7 @@ void CalcWinTransDifSolInitialDistribution(EnergyPlusData &state) // } // Skip surfaces that are not exterior windows or TDD diffusers - if (state.dataSurface->Surface(DifTransSurfNum).Class != SurfaceClass::Window && - state.dataSurface->SurfWinOriginalClass(DifTransSurfNum) != SurfaceClass::TDD_Diffuser) - continue; + if (difTransSurf.Class != SurfaceClass::Window && difTransSurf.OriginalClass != SurfaceClass::TDD_Diffuser) continue; //---------------------------------------------------------------------------------------------------------- // DISTRIBUTE TRANSMITTED DIFFUSE SOLAR THROUGH EXTERIOR WINDOWS AND TDDS TO INTERIOR HEAT TRANSFER @@ -12087,7 +12046,7 @@ void CalcWinTransDifSolInitialDistribution(EnergyPlusData &state) } // Correct for divider shadowing if (ANY_EXTERIOR_SHADE_BLIND_SCREEN(ShadeFlag)) { - ShBlDifSolarAbsW *= state.dataSurface->SurfWinGlazedFrac(HeatTransSurfNum); + ShBlDifSolarAbsW *= state.dataSurface->SurfaceWindow(HeatTransSurfNum).glazedFrac; } // Accumulate diffuse solar absorbed by shade or screen [W/m2] for heat balance calcs @@ -12405,8 +12364,9 @@ void CalcInteriorWinTransDifSolInitialDistribution(EnergyPlusData &state, } else { // Exterior or Interior Window int const ConstrNumSh = state.dataSurface->SurfWinActiveShadedConstruction(HeatTransSurfNum); + auto const &construction = state.dataConstruction->Construct(ConstrNum); - TotGlassLayers = state.dataConstruction->Construct(ConstrNum).TotGlassLayers; + TotGlassLayers = construction.TotGlassLayers; ShadeFlag = state.dataSurface->SurfWinShadingFlag(HeatTransSurfNum); if (NOT_SHADED(ShadeFlag)) { // No window shading @@ -12418,8 +12378,8 @@ void CalcInteriorWinTransDifSolInitialDistribution(EnergyPlusData &state, // to account for layer by layer transmittance and reflection effects. for (IGlass = 1; IGlass <= TotGlassLayers; ++IGlass) { // Calc diffuse solar absorbed from the inside by each window glass layer [W] - AbsInt = state.dataConstruction->Construct(ConstrNum).AbsDiffBack(IGlass); - WinDifSolLayAbsW = SolarTrans_ViewFactor * state.dataConstruction->Construct(ConstrNum).AbsDiffBack(IGlass); + AbsInt = construction.AbsDiffBack(IGlass); + WinDifSolLayAbsW = SolarTrans_ViewFactor * construction.AbsDiffBack(IGlass); // Accumulate distributed diffuse solar absorbed [W] by overall window for transmittance calc // below @@ -12441,7 +12401,7 @@ void CalcInteriorWinTransDifSolInitialDistribution(EnergyPlusData &state, // * view factor from current (sending) window IntWinSurfNum to current (receiving) surface // HeatTransSurfNum // * current window inside solar reflectance - DifSolarReflW = SolarTrans_ViewFactor * state.dataConstruction->Construct(ConstrNum).ReflectSolDiffBack; + DifSolarReflW = SolarTrans_ViewFactor * construction.ReflectSolDiffBack; // Accumulate total reflected distributed diffuse solar for each zone for subsequent // interreflection calcs @@ -12489,13 +12449,14 @@ void CalcInteriorWinTransDifSolInitialDistribution(EnergyPlusData &state, } else if (ShadeFlag == WinShadingType::SwitchableGlazing) { // Switchable glazing // Init accumulator for transmittance calc below + auto const &constructionSh = state.dataConstruction->Construct(ConstrNumSh); DifSolarAbsW = 0.0; for (IGlass = 1; IGlass <= TotGlassLayers; ++IGlass) { // Calc diffuse solar absorbed in each window glass layer WinDifSolLayAbsW = SolarTrans_ViewFactor * InterpSw(state.dataSurface->SurfWinSwitchingFactor(HeatTransSurfNum), - state.dataConstruction->Construct(ConstrNum).AbsDiffBack(IGlass), - state.dataConstruction->Construct(ConstrNumSh).AbsDiffBack(IGlass)); + construction.AbsDiffBack(IGlass), + constructionSh.AbsDiffBack(IGlass)); // Accumulate distributed diffuse solar absorbed [W] by overall window for transmittance calc // below @@ -12512,8 +12473,8 @@ void CalcInteriorWinTransDifSolInitialDistribution(EnergyPlusData &state, // Calc diffuse solar reflected back to zone DifSolarReflW = SolarTrans_ViewFactor * InterpSw(state.dataSurface->SurfWinSwitchingFactor(HeatTransSurfNum), - state.dataConstruction->Construct(ConstrNum).ReflectSolDiffBack, - state.dataConstruction->Construct(ConstrNumSh).ReflectSolDiffBack); + construction.ReflectSolDiffBack, + constructionSh.ReflectSolDiffBack); // Accumulate total reflected distributed diffuse solar for each zone for subsequent // interreflection calcs @@ -12545,18 +12506,19 @@ void CalcInteriorWinTransDifSolInitialDistribution(EnergyPlusData &state, Real64 SurfWinSlatsAngInterpFac = state.dataSurface->SurfWinSlatsAngInterpFac(HeatTransSurfNum); // First calc diffuse solar absorbed by each glass layer in this window with shade/blind in place - for (IGlass = 1; IGlass <= state.dataConstruction->Construct(ConstrNumSh).TotGlassLayers; ++IGlass) { + auto const &constructionSh = state.dataConstruction->Construct(ConstrNumSh); + for (IGlass = 1; IGlass <= constructionSh.TotGlassLayers; ++IGlass) { if (ANY_SHADE_SCREEN(ShadeFlag)) { // Calc diffuse solar absorbed in each window glass layer and shade - WinDifSolLayAbsW = SolarTrans_ViewFactor * state.dataConstruction->Construct(ConstrNumSh).AbsDiffBack(IGlass); + WinDifSolLayAbsW = SolarTrans_ViewFactor * constructionSh.AbsDiffBack(IGlass); } else if (ANY_BLIND(ShadeFlag)) { if (state.dataSurface->SurfWinMovableSlats(HeatTransSurfNum)) { - BlAbsDiffBk = General::Interp(state.dataConstruction->Construct(ConstrNumSh).BlAbsDiffBack(SurfWinSlatsAngIndex, IGlass), - state.dataConstruction->Construct(ConstrNumSh) - .BlAbsDiffBack(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1), IGlass), - SurfWinSlatsAngInterpFac); + BlAbsDiffBk = + General::Interp(constructionSh.BlAbsDiffBack(SurfWinSlatsAngIndex, IGlass), + constructionSh.BlAbsDiffBack(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1), IGlass), + SurfWinSlatsAngInterpFac); } else { - BlAbsDiffBk = state.dataConstruction->Construct(ConstrNumSh).BlAbsDiffBack(1, IGlass); + BlAbsDiffBk = constructionSh.BlAbsDiffBack(1, IGlass); } // Calc diffuse solar absorbed in each window glass layer and shade WinDifSolLayAbsW = SolarTrans_ViewFactor * BlAbsDiffBk; @@ -12577,17 +12539,16 @@ void CalcInteriorWinTransDifSolInitialDistribution(EnergyPlusData &state, // Next calc diffuse solar reflected back to zone from window with shade or blind on // Diffuse back solar reflectance, bare glass or shade on - InsideDifReflectance = state.dataConstruction->Construct(ConstrNum).ReflectSolDiffBack; + InsideDifReflectance = construction.ReflectSolDiffBack; if ((ShadeFlag == WinShadingType::IntBlind) || (ShadeFlag == WinShadingType::ExtBlind)) { // Diffuse back solar reflectance, blind present, vs. slat angle if (state.dataSurface->SurfWinMovableSlats(HeatTransSurfNum)) { InsideDifReflectance = - General::Interp(state.dataConstruction->Construct(ConstrNumSh).BlReflectSolDiffBack(SurfWinSlatsAngIndex), - state.dataConstruction->Construct(ConstrNumSh) - .BlReflectSolDiffBack(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1)), + General::Interp(constructionSh.BlReflectSolDiffBack(SurfWinSlatsAngIndex), + constructionSh.BlReflectSolDiffBack(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1)), SurfWinSlatsAngInterpFac); } else { - InsideDifReflectance = state.dataConstruction->Construct(ConstrNumSh).BlReflectSolDiffBack(1); + InsideDifReflectance = constructionSh.BlReflectSolDiffBack(1); } } DifSolarReflW = SolarTrans_ViewFactor * InsideDifReflectance; @@ -12604,22 +12565,21 @@ void CalcInteriorWinTransDifSolInitialDistribution(EnergyPlusData &state, BlNum = state.dataSurface->SurfWinBlindNumber(HeatTransSurfNum); if (ANY_SHADE_SCREEN(ShadeFlag)) { // Calc diffuse solar absorbed by shade or screen [W] - ShBlDifSolarAbsW = SolarTrans_ViewFactor * state.dataConstruction->Construct(ConstrNumSh).AbsDiffBackShade; + ShBlDifSolarAbsW = SolarTrans_ViewFactor * constructionSh.AbsDiffBackShade; } else if (ANY_BLIND(ShadeFlag)) { // Calc diffuse solar absorbed by blind [W] if (state.dataSurface->SurfWinMovableSlats(HeatTransSurfNum)) { - AbsDiffBkBl = General::Interp(state.dataConstruction->Construct(ConstrNumSh).AbsDiffBackBlind(SurfWinSlatsAngIndex), - state.dataConstruction->Construct(ConstrNumSh) - .AbsDiffBackBlind(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1)), + AbsDiffBkBl = General::Interp(constructionSh.AbsDiffBackBlind(SurfWinSlatsAngIndex), + constructionSh.AbsDiffBackBlind(std::min(Material::MaxSlatAngs, SurfWinSlatsAngIndex + 1)), SurfWinSlatsAngInterpFac); } else { - AbsDiffBkBl = state.dataConstruction->Construct(ConstrNumSh).AbsDiffBackBlind(1); + AbsDiffBkBl = constructionSh.AbsDiffBackBlind(1); } ShBlDifSolarAbsW = SolarTrans_ViewFactor * AbsDiffBkBl; } // Correct for divider shadowing if (ANY_EXTERIOR_SHADE_BLIND_SCREEN(ShadeFlag)) { - ShBlDifSolarAbsW *= state.dataSurface->SurfWinGlazedFrac(HeatTransSurfNum); + ShBlDifSolarAbsW *= state.dataSurface->SurfaceWindow(HeatTransSurfNum).glazedFrac; } // Accumulate diffuse solar absorbed by shade or screen [W/m2] for heat balance calcs diff --git a/src/EnergyPlus/SolarShading.hh b/src/EnergyPlus/SolarShading.hh index 375ffbe8e97..ccec9853074 100644 --- a/src/EnergyPlus/SolarShading.hh +++ b/src/EnergyPlus/SolarShading.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SortAndStringUtilities.cc b/src/EnergyPlus/SortAndStringUtilities.cc deleted file mode 100644 index b00e9233919..00000000000 --- a/src/EnergyPlus/SortAndStringUtilities.cc +++ /dev/null @@ -1,259 +0,0 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, -// The Regents of the University of California, through Lawrence Berkeley National Laboratory -// (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge -// National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other -// contributors. All rights reserved. -// -// NOTICE: This Software was developed under funding from the U.S. Department of Energy and the -// U.S. Government consequently retains certain rights. As such, the U.S. Government has been -// granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, -// worldwide license in the Software to reproduce, distribute copies to the public, prepare -// derivative works, and perform publicly and display publicly, and to permit others to do so. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted -// provided that the following conditions are met: -// -// (1) Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// (2) Redistributions in binary form must reproduce the above copyright notice, this list of -// conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// (3) Neither the name of the University of California, Lawrence Berkeley National Laboratory, -// the University of Illinois, U.S. Dept. of Energy nor the names of its contributors may be -// used to endorse or promote products derived from this software without specific prior -// written permission. -// -// (4) Use of EnergyPlus(TM) Name. If Licensee (i) distributes the software in stand-alone form -// without changes from the version obtained under this License, or (ii) Licensee makes a -// reference solely to the software portion of its product, Licensee must refer to the -// software as "EnergyPlus version X" software, where "X" is the version number Licensee -// obtained under this License and may not use a different name for the software. Except as -// specifically required in this Section (4), Licensee shall not use in a company name, a -// product name, in advertising, publicity, or other promotional activities any name, trade -// name, trademark, logo, or other designation of "EnergyPlus", "E+", "e+" or confusingly -// similar designation, without the U.S. Department of Energy's prior written consent. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// C++ Headers -#include - -// EnergyPlus Headers -#include - -namespace EnergyPlus { - -namespace SortAndStringUtilities { - - // Module containing the routines dealing with Sorting - - // MODULE INFORMATION: - // AUTHOR Linda Lawrie - // DATE WRITTEN March 2009 - // MODIFIED na - // RE-ENGINEERED na - - // PURPOSE OF THIS MODULE: - // - - // METHODOLOGY EMPLOYED: - // - - // REFERENCES: - // na - - // OTHER NOTES: - // na - - // USE STATEMENTS: - // - // - - // Data - // MODULE PARAMETER DEFINITIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // MODULE VARIABLE DECLARATIONS: - // na - - // SUBROUTINE SPECIFICATIONS FOR MODULE SortUtilities - - // Functions - - void SetupAndSort(Array1D_string &Alphas, // Alphas to be sorted - Array1D_int &iAlphas // Indexes of sorted array - ) - { - - // SUBROUTINE INFORMATION: - // AUTHOR Linda Lawrie - // DATE WRITTEN March 2009 - // MODIFIED na - // RE-ENGINEERED na - - // PURPOSE OF THIS SUBROUTINE: - // Set up and call sort routine for Alphas - - // METHODOLOGY EMPLOYED: - // na - - // REFERENCES: - // na - - // USE STATEMENTS: - // na - - // Argument array dimensioning - - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - - for (int Loop = 1, Loop_end = Alphas.u(); Loop <= Loop_end; ++Loop) { - iAlphas(Loop) = Loop; - } - - QsortC(Alphas, iAlphas); - } - - void QsortC(Array1S_string Alphas, // Alphas to be sorted - Array1S_int iAlphas // Indexes of sorted array - ) - { - - // SUBROUTINE INFORMATION: - // AUTHOR Linda Lawrie - // DATE WRITTEN March 2009 - // MODIFIED na - // RE-ENGINEERED na - - // PURPOSE OF THIS SUBROUTINE: - // Make sort order for an Alpha Array but store the pointers in an - // accompanying integer array which must be filled prior to the first call - // as this routine is recursive and called from within. - - // METHODOLOGY EMPLOYED: - // recursion and quick-sort methodology - - // REFERENCES: - // na - - // USE STATEMENTS: - // na - - // Argument array dimensioning - - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - - if (Alphas.size() > 1) { - int iq; - QsortPartition(Alphas, iAlphas, iq); - QsortC(Alphas({_, iq - 1}), iAlphas({_, iq - 1})); - QsortC(Alphas({iq, _}), iAlphas({iq, _})); - } - } - - void QsortPartition(Array1S_string Alphas, // Alphas to be sorted - Array1S_int iAlphas, // Indexes of sorted array - int &marker) - { - - // SUBROUTINE INFORMATION: - // AUTHOR Linda Lawrie - // DATE WRITTEN March 2009 - // MODIFIED na - // RE-ENGINEERED na - - // PURPOSE OF THIS SUBROUTINE: - // - - // METHODOLOGY EMPLOYED: - // - - // REFERENCES: - // na - - // Using/Aliasing - - // Argument array dimensioning - - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - - std::string const &cpivot(Alphas(1)); - int i = 0; - int j = Alphas.isize() + 1; - - while (true) { - --j; - while (true) { - if (lessthani(Alphas(j), cpivot) || equali(Alphas(j), cpivot)) break; - --j; - } - ++i; - while (true) { - if (lessthani(cpivot, Alphas(i)) || equali(cpivot, Alphas(i))) break; - ++i; - } - if (i < j) { // Swap the strings at index i and j - Alphas(i).swap(Alphas(j)); - std::swap(iAlphas(i), iAlphas(j)); - } else if (i == j) { - marker = i + 1; - return; - } else { - marker = i; - return; - } - } - } - -} // namespace SortAndStringUtilities - -} // namespace EnergyPlus diff --git a/src/EnergyPlus/SplitterComponent.cc b/src/EnergyPlus/SplitterComponent.cc index 203eec4cfb4..82ec44e0bf7 100644 --- a/src/EnergyPlus/SplitterComponent.cc +++ b/src/EnergyPlus/SplitterComponent.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SplitterComponent.hh b/src/EnergyPlus/SplitterComponent.hh index d06e4fd9454..c0278c3ec16 100644 --- a/src/EnergyPlus/SplitterComponent.hh +++ b/src/EnergyPlus/SplitterComponent.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/StandardRatings.cc b/src/EnergyPlus/StandardRatings.cc index 2b04200005e..bdbab0875c8 100644 --- a/src/EnergyPlus/StandardRatings.cc +++ b/src/EnergyPlus/StandardRatings.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/StandardRatings.hh b/src/EnergyPlus/StandardRatings.hh index 24fe9151ae7..cca0cad67f0 100644 --- a/src/EnergyPlus/StandardRatings.hh +++ b/src/EnergyPlus/StandardRatings.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SteamBaseboardRadiator.cc b/src/EnergyPlus/SteamBaseboardRadiator.cc index c2deac2f39c..d4477c79bb5 100644 --- a/src/EnergyPlus/SteamBaseboardRadiator.cc +++ b/src/EnergyPlus/SteamBaseboardRadiator.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -754,6 +754,8 @@ namespace SteamBaseboardRadiator { if (state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).SurfacePtr(SurfNum) != 0) { state.dataSurface->surfIntConv(state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).SurfacePtr(SurfNum)) .getsRadiantHeat = true; + state.dataSurface->allGetsRadiantHeatSurfaceList.emplace_back( + state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).SurfacePtr(SurfNum)); } AllFracsSummed += state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).FracDistribToSurf(SurfNum); @@ -800,7 +802,7 @@ namespace SteamBaseboardRadiator { // CurrentModuleObject='ZoneHVAC:Baseboard:RadiantConvective:Steam' SetupOutputVariable(state, "Baseboard Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).TotPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -808,80 +810,78 @@ namespace SteamBaseboardRadiator { SetupOutputVariable(state, "Baseboard Convective Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).ConvPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).EquipID); SetupOutputVariable(state, "Baseboard Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).RadPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).EquipID); SetupOutputVariable(state, "Baseboard Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).TotEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).EquipID, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::Baseboard, {}, - "ENERGYTRANSFER", - "BASEBOARD", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Baseboard Convective Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).ConvEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).EquipID); SetupOutputVariable(state, "Baseboard Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).RadEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).EquipID); SetupOutputVariable(state, "Baseboard Steam Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).EquipID, + Constant::eResource::PlantLoopHeatingDemand, + OutputProcessor::SOVEndUseCat::Baseboard, {}, - "PLANTLOOPHEATINGDEMAND", - "BASEBOARD", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Baseboard Steam Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).EquipID); SetupOutputVariable(state, "Baseboard Steam Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).SteamMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).EquipID); SetupOutputVariable(state, "Baseboard Steam Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).SteamInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).EquipID); SetupOutputVariable(state, "Baseboard Steam Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).SteamOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1514,32 +1514,32 @@ namespace SteamBaseboardRadiator { Real64 constexpr SmallestArea(0.001); // Smallest area in meters squared (to avoid a divide by zero) - int RadSurfNum; // Counter for surfaces receiving radiation from radiant heater - int BaseboardNum; // Counter for the baseboard - int SurfNum; // Pointer to the Surface derived type - int ZoneNum; // Pointer to the Zone derived type Real64 ThisSurfIntensity; // temporary for W/m2 term for rad on a surface - state.dataHeatBalFanSys->SurfQSteamBaseboard = 0.0; + for (auto &thisSteamBB : state.dataSteamBaseboardRadiator->SteamBaseboard) { + for (int radSurfNum = 1; radSurfNum <= thisSteamBB.TotSurfToDistrib; ++radSurfNum) { + int surfNum = thisSteamBB.SurfacePtr(radSurfNum); + state.dataHeatBalFanSys->surfQRadFromHVAC(surfNum).SteamBaseboard = 0.0; + } + } state.dataHeatBalFanSys->ZoneQSteamBaseboardToPerson = 0.0; - for (BaseboardNum = 1; BaseboardNum <= state.dataSteamBaseboardRadiator->NumSteamBaseboards; ++BaseboardNum) { + for (int BaseboardNum = 1; BaseboardNum <= state.dataSteamBaseboardRadiator->NumSteamBaseboards; ++BaseboardNum) { - ZoneNum = state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).ZonePtr; + int ZoneNum = state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).ZonePtr; SteamBaseboardDesignData SteamBaseboardDesignDataObject{ state.dataSteamBaseboardRadiator->SteamBaseboardDesign(state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum) .DesignObjectPtr)}; // Contains the data for variable flow hydronic systems state.dataHeatBalFanSys->ZoneQSteamBaseboardToPerson(ZoneNum) += state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).QBBSteamRadSource * SteamBaseboardDesignDataObject.FracDistribPerson; - for (RadSurfNum = 1; RadSurfNum <= state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).TotSurfToDistrib; ++RadSurfNum) { - SurfNum = state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).SurfacePtr(RadSurfNum); + for (int RadSurfNum = 1; RadSurfNum <= state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).TotSurfToDistrib; ++RadSurfNum) { + int SurfNum = state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).SurfacePtr(RadSurfNum); if (state.dataSurface->Surface(SurfNum).Area > SmallestArea) { ThisSurfIntensity = (state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).QBBSteamRadSource * state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).FracDistribToSurf(RadSurfNum) / state.dataSurface->Surface(SurfNum).Area); - state.dataHeatBalFanSys->SurfQSteamBaseboard(SurfNum) += ThisSurfIntensity; - state.dataHeatBalSurf->AnyRadiantSystems = true; + state.dataHeatBalFanSys->surfQRadFromHVAC(SurfNum).SteamBaseboard += ThisSurfIntensity; if (ThisSurfIntensity > MaxRadHeatFlux) { // CR 8074, trap for excessive intensity (throws off surface balance ) ShowSevereError(state, "DistributeBBSteamRadGains: excessive thermal radiation heat flux intensity detected"); diff --git a/src/EnergyPlus/SteamBaseboardRadiator.hh b/src/EnergyPlus/SteamBaseboardRadiator.hh index 38efaa9603d..543027a18b6 100644 --- a/src/EnergyPlus/SteamBaseboardRadiator.hh +++ b/src/EnergyPlus/SteamBaseboardRadiator.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SteamCoils.cc b/src/EnergyPlus/SteamCoils.cc index 675bb44fe6a..862ecda6b74 100644 --- a/src/EnergyPlus/SteamCoils.cc +++ b/src/EnergyPlus/SteamCoils.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -391,47 +391,46 @@ namespace SteamCoils { // CurrentModuleObject = "Coil:Heating:Steam" SetupOutputVariable(state, "Heating Coil Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSteamCoils->SteamCoil(CoilNum).TotSteamHeatingCoilEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataSteamCoils->SteamCoil(CoilNum).Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "ENERGYTRANSFER", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSteamCoils->SteamCoil(CoilNum).TotSteamHeatingCoilRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataSteamCoils->SteamCoil(CoilNum).Name); SetupOutputVariable(state, "Heating Coil Steam Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataSteamCoils->SteamCoil(CoilNum).OutletSteamMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataSteamCoils->SteamCoil(CoilNum).Name); SetupOutputVariable(state, "Heating Coil Steam Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSteamCoils->SteamCoil(CoilNum).InletSteamTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataSteamCoils->SteamCoil(CoilNum).Name); SetupOutputVariable(state, "Heating Coil Steam Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSteamCoils->SteamCoil(CoilNum).OutletSteamTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataSteamCoils->SteamCoil(CoilNum).Name); SetupOutputVariable(state, "Heating Coil Steam Trap Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSteamCoils->SteamCoil(CoilNum).LoopLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/SteamCoils.hh b/src/EnergyPlus/SteamCoils.hh index e1e1bb23c64..e6c148c067c 100644 --- a/src/EnergyPlus/SteamCoils.hh +++ b/src/EnergyPlus/SteamCoils.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/StringUtilities.hh b/src/EnergyPlus/StringUtilities.hh index 2748eb14369..a97f2a660d6 100644 --- a/src/EnergyPlus/StringUtilities.hh +++ b/src/EnergyPlus/StringUtilities.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SurfaceGeometry.cc b/src/EnergyPlus/SurfaceGeometry.cc index a44115564f3..eac19084351 100644 --- a/src/EnergyPlus/SurfaceGeometry.cc +++ b/src/EnergyPlus/SurfaceGeometry.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -183,11 +183,6 @@ namespace SurfaceGeometry { state.dataSurface->SurfWinDaylFacPoint.dimension(NumSurfaces, 0); state.dataSurface->SurfWinVisTransSelected.dimension(NumSurfaces, 0); state.dataSurface->SurfWinSwitchingFactor.dimension(NumSurfaces, 0); - state.dataSurface->SurfWinTheta.dimension(NumSurfaces, 0); - state.dataSurface->SurfWinPhi.dimension(NumSurfaces, 0); - state.dataSurface->SurfWinRhoCeilingWall.dimension(NumSurfaces, 0); - state.dataSurface->SurfWinRhoFloorWall.dimension(NumSurfaces, 0); - state.dataSurface->SurfWinFractionUpgoing.dimension(NumSurfaces, 0); state.dataSurface->SurfWinVisTransRatio.dimension(NumSurfaces, 0); state.dataSurface->SurfWinIRfromParentZone.dimension(NumSurfaces, 0); state.dataSurface->SurfWinFrameArea.dimension(NumSurfaces, 0); @@ -215,10 +210,6 @@ namespace SurfaceGeometry { state.dataSurface->SurfWinDividerTempSurfOut.dimension(NumSurfaces, 23.0); state.dataSurface->SurfWinProjCorrDivOut.dimension(NumSurfaces, 0); state.dataSurface->SurfWinProjCorrDivIn.dimension(NumSurfaces, 0); - state.dataSurface->SurfWinGlazedFrac.dimension(NumSurfaces, 1); - state.dataSurface->SurfWinCenterGlArea.dimension(NumSurfaces, 0); - state.dataSurface->SurfWinEdgeGlCorrFac.dimension(NumSurfaces, 1); - state.dataSurface->SurfWinOriginalClass.dimension(NumSurfaces, SurfaceClass::None); state.dataSurface->SurfWinShadeAbsFacFace1.dimension(NumSurfaces, 0.5); state.dataSurface->SurfWinShadeAbsFacFace2.dimension(NumSurfaces, 0.5); state.dataSurface->SurfWinConvCoeffWithShade.dimension(NumSurfaces, 0); @@ -246,7 +237,6 @@ namespace SurfaceGeometry { state.dataSurface->SurfWinInsideSillSolAbs.dimension(NumSurfaces, 0); state.dataSurface->SurfWinInsideRevealSolAbs.dimension(NumSurfaces, 0); state.dataSurface->SurfWinOutsideRevealSolAbs.dimension(NumSurfaces, 0); - state.dataSurface->SurfWinScreenNumber.dimension(NumSurfaces, 0); state.dataSurface->SurfWinAirflowSource.dimension(NumSurfaces, DataSurfaces::WindowAirFlowSource::Invalid); state.dataSurface->SurfWinAirflowDestination.dimension(NumSurfaces, DataSurfaces::WindowAirFlowDestination::Invalid); state.dataSurface->SurfWinAirflowReturnNodePtr.dimension(NumSurfaces, 0); @@ -262,7 +252,6 @@ namespace SurfaceGeometry { state.dataSurface->SurfWinVentingAvailabilityRep.dimension(NumSurfaces, 0); state.dataSurface->SurfWinSkyGndSolarInc.dimension(NumSurfaces, 0); state.dataSurface->SurfWinBmGndSolarInc.dimension(NumSurfaces, 0); - state.dataSurface->SurfWinLightWellEff.dimension(NumSurfaces, 1); state.dataSurface->SurfWinSolarDiffusing.dimension(NumSurfaces, 0); state.dataSurface->SurfWinFrameHeatGain.dimension(NumSurfaces, 0); state.dataSurface->SurfWinFrameHeatLoss.dimension(NumSurfaces, 0); @@ -2431,35 +2420,34 @@ namespace SurfaceGeometry { } for (int SurfNum = 1; SurfNum <= MovedSurfs; ++SurfNum) { // TotSurfaces + auto &surf = state.dataSurface->Surface(SurfNum); // GLASSDOORs and TDD:DIFFUSERs will be treated as windows in the subsequent heat transfer and daylighting // calculations. Reset class to 'Window' after saving the original designation in SurfaceWindow. - state.dataSurface->SurfWinOriginalClass(SurfNum) = state.dataSurface->Surface(SurfNum).Class; + surf.OriginalClass = surf.Class; - if (state.dataSurface->Surface(SurfNum).Class == SurfaceClass::GlassDoor || - state.dataSurface->Surface(SurfNum).Class == SurfaceClass::TDD_Diffuser) - state.dataSurface->Surface(SurfNum).Class = SurfaceClass::Window; + if (surf.Class == SurfaceClass::GlassDoor || surf.Class == SurfaceClass::TDD_Diffuser) surf.Class = SurfaceClass::Window; - if (state.dataSurface->Surface(SurfNum).Class == SurfaceClass::TDD_Dome) { + if (surf.Class == SurfaceClass::TDD_Dome) { // Reset the TDD:DOME subsurface to act as a base surface that can shade and be shaded // NOTE: This must be set early so that subsequent shading calculations are done correctly - state.dataSurface->Surface(SurfNum).BaseSurf = SurfNum; + surf.BaseSurf = SurfNum; } } errFlag = false; if (!SurfError) { for (int SurfNum = 1; SurfNum <= MovedSurfs; ++SurfNum) { // TotSurfaces - if (state.dataSurface->Surface(SurfNum).HasShadeControl) { - WinShadingControlPtr = - state.dataSurface->Surface(SurfNum).activeWindowShadingControl; // use first item since others should be identical + auto &surf = state.dataSurface->Surface(SurfNum); + if (surf.HasShadeControl) { + WinShadingControlPtr = surf.activeWindowShadingControl; // use first item since others should be identical if (state.dataSurface->WindowShadingControl(WinShadingControlPtr).slatAngleControl != SlatAngleControl::Fixed) { state.dataSurface->SurfWinMovableSlats(SurfNum) = true; state.dataSurface->AnyMovableSlat = true; state.dataHeatBalSurf->SurfMovSlatsIndexList.push_back(SurfNum); } - ConstrNumSh = state.dataSurface->Surface(SurfNum).activeShadedConstruction; + ConstrNumSh = surf.activeShadedConstruction; if (ConstrNumSh <= 0) continue; WinShadingType ShadingType = state.dataSurface->WindowShadingControl(WinShadingControlPtr).ShadingType; @@ -2551,25 +2539,22 @@ namespace SurfaceGeometry { LayNumOutside = 0; for (int SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; ++SurfNum) { + auto &surf = state.dataSurface->Surface(SurfNum); // Check for EcoRoof and only 1 allowed to be used. - if (state.dataSurface->Surface(SurfNum).Construction > 0) - state.dataSurface->SurfExtEcoRoof(SurfNum) = - state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).TypeIsEcoRoof; + if (surf.Construction > 0) + state.dataSurface->SurfExtEcoRoof(SurfNum) = state.dataConstruction->Construct(surf.Construction).TypeIsEcoRoof; if (!state.dataSurface->SurfExtEcoRoof(SurfNum)) continue; if (LayNumOutside == 0) { - LayNumOutside = state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).LayerPoint(1); + LayNumOutside = state.dataConstruction->Construct(surf.Construction).LayerPoint(1); continue; } - if (LayNumOutside != state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).LayerPoint(1)) { + if (LayNumOutside != state.dataConstruction->Construct(surf.Construction).LayerPoint(1)) { ShowSevereError(state, format("{}Only one EcoRoof Material is currently allowed for all constructions.", RoutineName)); ShowContinueError(state, format("... first material={}", state.dataMaterial->Material(LayNumOutside)->Name)); - ShowContinueError( - state, - format("... conflicting Construction={} uses material={}", - state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).Name, - state.dataMaterial - ->Material(state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).LayerPoint(1)) - ->Name)); + ShowContinueError(state, + format("... conflicting Construction={} uses material={}", + state.dataConstruction->Construct(surf.Construction).Name, + state.dataMaterial->Material(state.dataConstruction->Construct(surf.Construction).LayerPoint(1))->Name)); ErrorsFound = true; } } @@ -2588,24 +2573,25 @@ namespace SurfaceGeometry { // Set flag that determines whether a surface can be an exterior obstruction // Also set associated surfaces for Kiva foundations and build heat transfer surface lists for (int SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; ++SurfNum) { - state.dataSurface->Surface(SurfNum).IsShadowPossibleObstruction = false; - if (state.dataSurface->Surface(SurfNum).ExtSolar) { + auto &surf = state.dataSurface->Surface(SurfNum); + surf.IsShadowPossibleObstruction = false; + if (surf.ExtSolar) { // This may include some attached shading surfaces state.dataSurface->AllExtSolarSurfaceList.push_back(SurfNum); } - if (state.dataSurface->Surface(SurfNum).HeatTransSurf) { + if (surf.HeatTransSurf) { // Outside light shelves get tagged later as HeatTransSurf=true but they haven't been processed yet state.dataSurface->AllHTSurfaceList.push_back(SurfNum); - int const zoneNum(state.dataSurface->Surface(SurfNum).Zone); + int const zoneNum(surf.Zone); auto &surfZone(state.dataHeatBal->Zone(zoneNum)); surfZone.ZoneHTSurfaceList.push_back(SurfNum); // Sort window vs non-window surfaces - if (state.dataSurface->Surface(SurfNum).Class == DataSurfaces::SurfaceClass::Window) { + if (surf.Class == DataSurfaces::SurfaceClass::Window) { state.dataSurface->AllHTWindowSurfaceList.push_back(SurfNum); surfZone.ZoneHTWindowSurfaceList.push_back(SurfNum); - if (state.dataSurface->Surface(SurfNum).ExtSolar) { + if (surf.ExtSolar) { state.dataSurface->AllExtSolWindowSurfaceList.push_back(SurfNum); - if (state.dataSurface->Surface(SurfNum).FrameDivider > 0) { + if (surf.FrameDivider > 0) { state.dataSurface->AllExtSolWinWithFrameSurfaceList.push_back(SurfNum); } } @@ -2613,7 +2599,7 @@ namespace SurfaceGeometry { state.dataSurface->AllHTNonWindowSurfaceList.push_back(SurfNum); surfZone.ZoneHTNonWindowSurfaceList.push_back(SurfNum); } - int const surfExtBoundCond(state.dataSurface->Surface(SurfNum).ExtBoundCond); + int const surfExtBoundCond(surf.ExtBoundCond); // Build zone and interzone surface lists if ((surfExtBoundCond > 0) && (surfExtBoundCond != SurfNum)) { state.dataSurface->AllIZSurfaceList.push_back(SurfNum); @@ -2622,7 +2608,7 @@ namespace SurfaceGeometry { adjZone.ZoneHTSurfaceList.push_back(SurfNum); adjZone.ZoneIZSurfaceList.push_back(SurfNum); // Sort window vs non-window surfaces - if (state.dataSurface->Surface(SurfNum).Class == DataSurfaces::SurfaceClass::Window) { + if (surf.Class == DataSurfaces::SurfaceClass::Window) { adjZone.ZoneHTWindowSurfaceList.push_back(SurfNum); } else { adjZone.ZoneHTNonWindowSurfaceList.push_back(SurfNum); @@ -2631,29 +2617,23 @@ namespace SurfaceGeometry { } // Exclude non-exterior heat transfer surfaces (but not OtherSideCondModeledExt = -4 CR7640) - if (state.dataSurface->Surface(SurfNum).HeatTransSurf && state.dataSurface->Surface(SurfNum).ExtBoundCond > 0) continue; - if (state.dataSurface->Surface(SurfNum).HeatTransSurf && state.dataSurface->Surface(SurfNum).ExtBoundCond == Ground) continue; - if (state.dataSurface->Surface(SurfNum).HeatTransSurf && state.dataSurface->Surface(SurfNum).ExtBoundCond == KivaFoundation) { + if (surf.HeatTransSurf && surf.ExtBoundCond > 0) continue; + if (surf.HeatTransSurf && surf.ExtBoundCond == Ground) continue; + if (surf.HeatTransSurf && surf.ExtBoundCond == KivaFoundation) { state.dataSurface->AllHTKivaSurfaceList.push_back(SurfNum); - if (!ErrorsFound) - state.dataSurfaceGeometry->kivaManager.foundationInputs[state.dataSurface->Surface(SurfNum).OSCPtr].surfaces.push_back( - SurfNum); + if (!ErrorsFound) state.dataSurfaceGeometry->kivaManager.foundationInputs[surf.OSCPtr].surfaces.push_back(SurfNum); continue; } - if (state.dataSurface->Surface(SurfNum).HeatTransSurf && state.dataSurface->Surface(SurfNum).ExtBoundCond == OtherSideCoefNoCalcExt) - continue; - if (state.dataSurface->Surface(SurfNum).HeatTransSurf && state.dataSurface->Surface(SurfNum).ExtBoundCond == OtherSideCoefCalcExt) - continue; + if (surf.HeatTransSurf && surf.ExtBoundCond == OtherSideCoefNoCalcExt) continue; + if (surf.HeatTransSurf && surf.ExtBoundCond == OtherSideCoefCalcExt) continue; // Exclude windows and doors, i.e., consider only their base surfaces as possible obstructions - if (state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Window || - state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Door) - continue; + if (surf.Class == SurfaceClass::Window || surf.Class == SurfaceClass::Door) continue; // Exclude duplicate shading surfaces - if (state.dataSurface->Surface(SurfNum).MirroredSurf) continue; + if (surf.MirroredSurf) continue; // Exclude air boundary surfaces - if (state.dataSurface->Surface(SurfNum).IsAirBoundarySurf) continue; + if (surf.IsAirBoundarySurf) continue; - state.dataSurface->Surface(SurfNum).IsShadowPossibleObstruction = true; + surf.IsShadowPossibleObstruction = true; state.dataSurface->AllShadowPossObstrSurfaceList.push_back(SurfNum); } @@ -2663,10 +2643,10 @@ namespace SurfaceGeometry { state.dataConstruction->Construct.end(), [](Construction::ConstructionProps const &e) { return e.TypeIsIRT; })) { for (int SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; ++SurfNum) { - if (!state.dataSurface->Surface(SurfNum).HeatTransSurf) continue; // ignore shading surfaces - if (state.dataSurface->Surface(SurfNum).ExtBoundCond > 0 && state.dataSurface->Surface(SurfNum).ExtBoundCond != SurfNum) - continue; // interzone, not adiabatic surface - if (!state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).TypeIsIRT) { + auto &surf = state.dataSurface->Surface(SurfNum); + if (!surf.HeatTransSurf) continue; // ignore shading surfaces + if (surf.ExtBoundCond > 0 && surf.ExtBoundCond != SurfNum) continue; // interzone, not adiabatic surface + if (!state.dataConstruction->Construct(surf.Construction).TypeIsIRT) { continue; } if (!state.dataGlobal->DisplayExtraWarnings) { @@ -2675,7 +2655,7 @@ namespace SurfaceGeometry { ShowWarningError(state, format("{}Surface=\"{}\" uses InfraredTransparent construction in a non-interzone surface. (illegal use)", RoutineName, - state.dataSurface->Surface(SurfNum).Name)); + surf.Name)); } } if (iTmp1 > 0) { @@ -2804,9 +2784,10 @@ namespace SurfaceGeometry { } for (int SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; SurfNum++) { + auto &surf = state.dataSurface->Surface(SurfNum); // Initialize run time surface arrays - state.dataSurface->SurfActiveConstruction(SurfNum) = state.dataSurface->Surface(SurfNum).Construction; - state.dataSurface->Surface(SurfNum).RepresentativeCalcSurfNum = SurfNum; + state.dataSurface->SurfActiveConstruction(SurfNum) = surf.Construction; + surf.RepresentativeCalcSurfNum = SurfNum; } // Representative surface calculations: Assign representative heat transfer surfaces @@ -2824,7 +2805,7 @@ namespace SurfaceGeometry { state.dataConstruction->Construct(surface.Construction).SourceSinkPresent || surface.Class == SurfaceClass::TDD_Dome || (surface.Class == SurfaceClass::Window && - (state.dataSurface->SurfWinOriginalClass(surfNum) == SurfaceClass::TDD_Diffuser || + (surface.OriginalClass == SurfaceClass::TDD_Diffuser || state.dataSurface->SurfWinWindowModelType(surfNum) != WindowModel::Detailed || state.dataWindowManager->inExtWindowModel->isExternalLibraryModel() || state.dataConstruction->Construct(surface.Construction).TCFlag == 1)); @@ -2851,6 +2832,11 @@ namespace SurfaceGeometry { void CreateMissingSpaces(EnergyPlusData &state, Array1D &Surfaces) { // Scan surfaces to see if Space was assigned in input + EPVector anySurfacesWithSpace; // True if any surfaces in a zone do not have a space assigned in input + EPVector anySurfacesWithoutSpace; // True if any surfaces in a zone have a space assigned in input + anySurfacesWithSpace.resize(state.dataGlobal->NumOfZones, false); + anySurfacesWithoutSpace.resize(state.dataGlobal->NumOfZones, false); + for (int surfNum = 1; surfNum <= state.dataSurface->TotSurfaces; ++surfNum) { auto &thisSurf = Surfaces(surfNum); if (!thisSurf.HeatTransSurf) continue; // ignore shading surfaces @@ -2859,20 +2845,20 @@ namespace SurfaceGeometry { thisSurf.spaceNum = Surfaces(thisSurf.BaseSurf).spaceNum; } if (thisSurf.spaceNum > 0) { - state.dataHeatBal->Zone(thisSurf.Zone).anySurfacesWithSpace = true; + anySurfacesWithSpace(thisSurf.Zone) = true; } else { - state.dataHeatBal->Zone(thisSurf.Zone).anySurfacesWithoutSpace = true; + anySurfacesWithoutSpace(thisSurf.Zone) = true; } } // Create any missing Spaces for (int zoneNum = 1; zoneNum <= state.dataGlobal->NumOfZones; ++zoneNum) { auto &thisZone = state.dataHeatBal->Zone(zoneNum); - if (thisZone.anySurfacesWithoutSpace) { + if (anySurfacesWithoutSpace(zoneNum)) { // If any surfaces in the zone are not assigned to a space, may need to create a new space // Every zone has at least one space, created in HeatBalanceManager::GetSpaceData // If no surfaces have a space assigned, then the default space will be used, otherwise, create a new space - if (thisZone.anySurfacesWithSpace) { + if (anySurfacesWithSpace(zoneNum)) { // Add new space ++state.dataGlobal->numSpaces; state.dataHeatBal->space(state.dataGlobal->numSpaces).zoneNum = zoneNum; @@ -2927,13 +2913,14 @@ namespace SurfaceGeometry { for (int spaceNum : state.dataHeatBal->Zone(ZoneNum).spaceIndexes) { auto &thisSpace = state.dataHeatBal->space(spaceNum); for (int SurfNum : thisSpace.surfaces) { + auto &surf = state.dataSurface->Surface(SurfNum); if (thisSpace.AllSurfaceFirst == 0) { thisSpace.AllSurfaceFirst = SurfNum; } thisSpace.AllSurfaceLast = SurfNum; - if (state.dataSurface->Surface(SurfNum).IsAirBoundarySurf) { - state.dataSurface->Surface(SurfNum).HeatTransSurf = false; + if (surf.IsAirBoundarySurf) { + surf.HeatTransSurf = false; continue; } // Non window surfaces are grouped next within each space @@ -2945,19 +2932,18 @@ namespace SurfaceGeometry { thisSpace.HTSurfaceLast = SurfNum; // Window surfaces are grouped next within each space - if ((state.dataSurface->Surface(SurfNum).Class == DataSurfaces::SurfaceClass::Window) || - (state.dataSurface->Surface(SurfNum).Class == DataSurfaces::SurfaceClass::GlassDoor) || - (state.dataSurface->Surface(SurfNum).Class == DataSurfaces::SurfaceClass::TDD_Diffuser)) { + if ((surf.Class == DataSurfaces::SurfaceClass::Window) || (surf.Class == DataSurfaces::SurfaceClass::GlassDoor) || + (surf.Class == DataSurfaces::SurfaceClass::TDD_Diffuser)) { if (thisSpace.WindowSurfaceFirst == 0) { thisSpace.WindowSurfaceFirst = SurfNum; } thisSpace.WindowSurfaceLast = SurfNum; - } else if (state.dataSurface->Surface(SurfNum).Class != DataSurfaces::SurfaceClass::TDD_Dome) { + } else if (surf.Class != DataSurfaces::SurfaceClass::TDD_Dome) { thisSpace.OpaqOrIntMassSurfaceLast = SurfNum; } // TDDDome surfaces are grouped last within each space - if (state.dataSurface->Surface(SurfNum).Class == DataSurfaces::SurfaceClass::TDD_Dome) { + if (surf.Class == DataSurfaces::SurfaceClass::TDD_Dome) { if (thisSpace.TDDDomeFirst == 0) { thisSpace.TDDDomeFirst = SurfNum; } @@ -7457,11 +7443,9 @@ namespace SurfaceGeometry { // For shading surfaces, initialize value of reflectance values to default values. These values // may be overridden below for shading surfaces with an associated Shading Surface Reflectance object. for (SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; ++SurfNum) { - if (!(state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Shading || - state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Detached_F || - state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Detached_B || - state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Overhang || - state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Fin)) + auto const &surf = state.dataSurface->Surface(SurfNum); + if (!(surf.Class == SurfaceClass::Shading || surf.Class == SurfaceClass::Detached_F || surf.Class == SurfaceClass::Detached_B || + surf.Class == SurfaceClass::Overhang || surf.Class == SurfaceClass::Fin)) continue; state.dataSurface->SurfShadowDiffuseSolRefl(SurfNum) = 0.2; state.dataSurface->SurfShadowDiffuseVisRefl(SurfNum) = 0.2; @@ -7501,17 +7485,14 @@ namespace SurfaceGeometry { // Check that associated surface is a shading surface WrongSurfaceType = false; if (SurfNum != 0) { - if (!(state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Shading || - state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Detached_F || - state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Detached_B || - state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Overhang || - state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Fin)) + auto const &surf = state.dataSurface->Surface(SurfNum); + if (!(surf.Class == SurfaceClass::Shading || surf.Class == SurfaceClass::Detached_F || surf.Class == SurfaceClass::Detached_B || + surf.Class == SurfaceClass::Overhang || surf.Class == SurfaceClass::Fin)) WrongSurfaceType = true; if (WrongSurfaceType) { - ShowSevereError(state, - format("GetShadingSurfReflectanceData: {}=\"{}\", surface is not a shading surface.", - cCurrentModuleObject, - state.dataSurface->Surface(SurfNum).Name)); + ShowSevereError( + state, + format("GetShadingSurfReflectanceData: {}=\"{}\", surface is not a shading surface.", cCurrentModuleObject, surf.Name)); ErrorsFound = true; continue; } @@ -7563,19 +7544,17 @@ namespace SurfaceGeometry { "Visible Reflectance,Surface Glazing Fraction,Surface Glazing Contruction\n"); for (SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; ++SurfNum) { - if (!(state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Shading || - state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Detached_F || - state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Detached_B || - state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Overhang || - state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Fin)) + auto const &surf = state.dataSurface->Surface(SurfNum); + if (!(surf.Class == SurfaceClass::Shading || surf.Class == SurfaceClass::Detached_F || surf.Class == SurfaceClass::Detached_B || + surf.Class == SurfaceClass::Overhang || surf.Class == SurfaceClass::Fin)) continue; constexpr std::string_view fmt = "ShadingProperty Reflectance,{},{},{:.2R},{:.2R},{:.2R}, {}\n"; if (state.dataSurface->SurfShadowGlazingConstruct(SurfNum) != 0) { print(state.files.eio, fmt, - state.dataSurface->Surface(SurfNum).Name, - cSurfaceClass(state.dataSurface->Surface(SurfNum).Class), + surf.Name, + cSurfaceClass(surf.Class), state.dataSurface->SurfShadowDiffuseSolRefl(SurfNum), state.dataSurface->SurfShadowDiffuseVisRefl(SurfNum), state.dataSurface->SurfShadowGlazingFrac(SurfNum), @@ -7583,8 +7562,8 @@ namespace SurfaceGeometry { } else { print(state.files.eio, fmt, - state.dataSurface->Surface(SurfNum).Name, - cSurfaceClass(state.dataSurface->Surface(SurfNum).Class), + surf.Name, + cSurfaceClass(surf.Class), state.dataSurface->SurfShadowDiffuseSolRefl(SurfNum), state.dataSurface->SurfShadowDiffuseVisRefl(SurfNum), state.dataSurface->SurfShadowGlazingFrac(SurfNum), @@ -7901,42 +7880,42 @@ namespace SurfaceGeometry { SetupOutputVariable(state, "Surface Exterior Cavity Baffle Surface Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBal->ExtVentedCavity(Item).Tbaffle, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ExtVentedCavity(Item).Name); SetupOutputVariable(state, "Surface Exterior Cavity Air Drybulb Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBal->ExtVentedCavity(Item).TAirCav, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ExtVentedCavity(Item).Name); SetupOutputVariable(state, "Surface Exterior Cavity Total Natural Ventilation Air Change Rate", - OutputProcessor::Unit::ach, + Constant::Units::ach, state.dataHeatBal->ExtVentedCavity(Item).PassiveACH, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ExtVentedCavity(Item).Name); SetupOutputVariable(state, "Surface Exterior Cavity Total Natural Ventilation Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataHeatBal->ExtVentedCavity(Item).PassiveMdotVent, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ExtVentedCavity(Item).Name); SetupOutputVariable(state, "Surface Exterior Cavity Natural Ventilation from Wind Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataHeatBal->ExtVentedCavity(Item).PassiveMdotWind, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ExtVentedCavity(Item).Name); SetupOutputVariable(state, "Surface Exterior Cavity Natural Ventilation from Buoyancy Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataHeatBal->ExtVentedCavity(Item).PassiveMdotTherm, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -8526,7 +8505,7 @@ namespace SurfaceGeometry { if (thisGndSurfsObj.GndSurfs(gSurfNum).TempSchPtr != 0 && SetTempSchReportVar) { SetupOutputVariable(state, "Surfaces Property Ground Surfaces Average Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisGndSurfsObj.SurfsTempAvg, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -8536,7 +8515,7 @@ namespace SurfaceGeometry { if (thisGndSurfsObj.GndSurfs(gSurfNum).ReflSchPtr != 0 && SetReflSchReportVar) { SetupOutputVariable(state, "Surfaces Property Ground Surfaces Average Reflectance", - OutputProcessor::Unit::None, + Constant::Units::None, thisGndSurfsObj.SurfsReflAvg, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -8627,7 +8606,6 @@ namespace SurfaceGeometry { if (!state.dataIPShortCut->lAlphaFieldBlanks(2)) { state.dataSurface->Surface(Found).InsideHeatSourceTermSchedule = ScheduleManager::GetScheduleIndex(state, state.dataIPShortCut->cAlphaArgs(2)); - state.dataSurface->AnyHeatBalanceInsideSourceTerm = true; if (state.dataSurface->Surface(Found).InsideHeatSourceTermSchedule == 0) { ShowSevereError(state, format("{}=\"{}\", cannot find the matching Schedule: {}=\"{}", @@ -8636,13 +8614,14 @@ namespace SurfaceGeometry { state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); ErrorsFound = true; + } else { + state.dataSurface->allInsideSourceSurfaceList.emplace_back(Found); } } if (!state.dataIPShortCut->lAlphaFieldBlanks(3)) { state.dataSurface->Surface(Found).OutsideHeatSourceTermSchedule = ScheduleManager::GetScheduleIndex(state, state.dataIPShortCut->cAlphaArgs(3)); - state.dataSurface->AnyHeatBalanceOutsideSourceTerm = true; if (state.dataSurface->Surface(Found).OutsideHeatSourceTermSchedule == 0) { ShowSevereError(state, format("{}=\"{}\", cannot find the matching Schedule: {}=\"{}", @@ -8657,6 +8636,8 @@ namespace SurfaceGeometry { cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; + } else { + state.dataSurface->allOutsideSourceSurfaceList.emplace_back(Found); } } @@ -8781,97 +8762,106 @@ namespace SurfaceGeometry { if (SELECT_CASE_var == "ALLEXTERIORSURFACES") { SurfacesOfType = false; for (SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; ++SurfNum) { - if (!state.dataSurface->Surface(SurfNum).HeatTransSurf) continue; - if (state.dataSurface->Surface(SurfNum).ExtBoundCond > 0) continue; // Interior surfaces - if (state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).TypeIsWindow) continue; + auto &surf = state.dataSurface->Surface(SurfNum); + if (!surf.HeatTransSurf) continue; + if (surf.ExtBoundCond > 0) continue; // Interior surfaces + if (state.dataConstruction->Construct(surf.Construction).TypeIsWindow) continue; SurfacesOfType = true; - state.dataSurface->Surface(SurfNum).HeatTransferAlgorithm = tmpAlgoInput; + surf.HeatTransferAlgorithm = tmpAlgoInput; } } else if (SELECT_CASE_var == "ALLEXTERIORWALLS") { SurfacesOfType = false; for (SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; ++SurfNum) { - if (!state.dataSurface->Surface(SurfNum).HeatTransSurf) continue; - if (state.dataSurface->Surface(SurfNum).ExtBoundCond > 0) continue; // Interior surfaces + auto &surf = state.dataSurface->Surface(SurfNum); + if (!surf.HeatTransSurf) continue; + if (surf.ExtBoundCond > 0) continue; // Interior surfaces - if (state.dataSurface->Surface(SurfNum).Class != SurfaceClass::Wall) continue; - if (state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).TypeIsWindow) continue; + if (surf.Class != SurfaceClass::Wall) continue; + if (state.dataConstruction->Construct(surf.Construction).TypeIsWindow) continue; SurfacesOfType = true; - state.dataSurface->Surface(SurfNum).HeatTransferAlgorithm = tmpAlgoInput; + surf.HeatTransferAlgorithm = tmpAlgoInput; } } else if (SELECT_CASE_var == "ALLEXTERIORROOFS") { SurfacesOfType = false; for (SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; ++SurfNum) { - if (!state.dataSurface->Surface(SurfNum).HeatTransSurf) continue; - if (state.dataSurface->Surface(SurfNum).ExtBoundCond > 0) continue; // Interior surfaces - if (state.dataSurface->Surface(SurfNum).Class != SurfaceClass::Roof) continue; - if (state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).TypeIsWindow) continue; + auto &surf = state.dataSurface->Surface(SurfNum); + if (!surf.HeatTransSurf) continue; + if (surf.ExtBoundCond > 0) continue; // Interior surfaces + if (surf.Class != SurfaceClass::Roof) continue; + if (state.dataConstruction->Construct(surf.Construction).TypeIsWindow) continue; SurfacesOfType = true; - state.dataSurface->Surface(SurfNum).HeatTransferAlgorithm = tmpAlgoInput; + surf.HeatTransferAlgorithm = tmpAlgoInput; } } else if (SELECT_CASE_var == "ALLEXTERIORFLOORS") { SurfacesOfType = false; for (SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; ++SurfNum) { - if (!state.dataSurface->Surface(SurfNum).HeatTransSurf) continue; - if (state.dataSurface->Surface(SurfNum).ExtBoundCond > 0) continue; // Interior surfaces - if (state.dataSurface->Surface(SurfNum).Class != SurfaceClass::Floor) continue; - if (state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).TypeIsWindow) continue; + auto &surf = state.dataSurface->Surface(SurfNum); + if (!surf.HeatTransSurf) continue; + if (surf.ExtBoundCond > 0) continue; // Interior surfaces + if (surf.Class != SurfaceClass::Floor) continue; + if (state.dataConstruction->Construct(surf.Construction).TypeIsWindow) continue; SurfacesOfType = true; - state.dataSurface->Surface(SurfNum).HeatTransferAlgorithm = tmpAlgoInput; + surf.HeatTransferAlgorithm = tmpAlgoInput; } } else if (SELECT_CASE_var == "ALLGROUNDCONTACTSURFACES") { SurfacesOfType = false; for (SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; ++SurfNum) { - if (!state.dataSurface->Surface(SurfNum).HeatTransSurf) continue; - if (state.dataSurface->Surface(SurfNum).ExtBoundCond != Ground) continue; // ground BC - if (state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).TypeIsWindow) continue; + auto &surf = state.dataSurface->Surface(SurfNum); + if (!surf.HeatTransSurf) continue; + if (surf.ExtBoundCond != Ground) continue; // ground BC + if (state.dataConstruction->Construct(surf.Construction).TypeIsWindow) continue; SurfacesOfType = true; - state.dataSurface->Surface(SurfNum).HeatTransferAlgorithm = tmpAlgoInput; + surf.HeatTransferAlgorithm = tmpAlgoInput; } } else if (SELECT_CASE_var == "ALLINTERIORSURFACES") { SurfacesOfType = false; for (SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; ++SurfNum) { - if (!state.dataSurface->Surface(SurfNum).HeatTransSurf) continue; - if (state.dataSurface->Surface(SurfNum).ExtBoundCond <= 0) continue; // Exterior surfaces - if (state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).TypeIsWindow) continue; + auto &surf = state.dataSurface->Surface(SurfNum); + if (!surf.HeatTransSurf) continue; + if (surf.ExtBoundCond <= 0) continue; // Exterior surfaces + if (state.dataConstruction->Construct(surf.Construction).TypeIsWindow) continue; SurfacesOfType = true; - state.dataSurface->Surface(SurfNum).HeatTransferAlgorithm = tmpAlgoInput; + surf.HeatTransferAlgorithm = tmpAlgoInput; } } else if (SELECT_CASE_var == "ALLINTERIORWALLS") { SurfacesOfType = false; for (SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; ++SurfNum) { - if (!state.dataSurface->Surface(SurfNum).HeatTransSurf) continue; - if (state.dataSurface->Surface(SurfNum).ExtBoundCond <= 0) continue; // Exterior surfaces - if (state.dataSurface->Surface(SurfNum).Class != SurfaceClass::Wall) continue; - if (state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).TypeIsWindow) continue; + auto &surf = state.dataSurface->Surface(SurfNum); + if (!surf.HeatTransSurf) continue; + if (surf.ExtBoundCond <= 0) continue; // Exterior surfaces + if (surf.Class != SurfaceClass::Wall) continue; + if (state.dataConstruction->Construct(surf.Construction).TypeIsWindow) continue; SurfacesOfType = true; - state.dataSurface->Surface(SurfNum).HeatTransferAlgorithm = tmpAlgoInput; + surf.HeatTransferAlgorithm = tmpAlgoInput; } } else if ((SELECT_CASE_var == "ALLINTERIORROOFS") || (SELECT_CASE_var == "ALLINTERIORCEILINGS")) { SurfacesOfType = false; for (SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; ++SurfNum) { - if (!state.dataSurface->Surface(SurfNum).HeatTransSurf) continue; - if (state.dataSurface->Surface(SurfNum).ExtBoundCond <= 0) continue; // Exterior surfaces - if (state.dataSurface->Surface(SurfNum).Class != SurfaceClass::Roof) continue; - if (state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).TypeIsWindow) continue; + auto &surf = state.dataSurface->Surface(SurfNum); + if (!surf.HeatTransSurf) continue; + if (surf.ExtBoundCond <= 0) continue; // Exterior surfaces + if (surf.Class != SurfaceClass::Roof) continue; + if (state.dataConstruction->Construct(surf.Construction).TypeIsWindow) continue; SurfacesOfType = true; - state.dataSurface->Surface(SurfNum).HeatTransferAlgorithm = tmpAlgoInput; + surf.HeatTransferAlgorithm = tmpAlgoInput; } } else if (SELECT_CASE_var == "ALLINTERIORFLOORS") { SurfacesOfType = false; for (SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; ++SurfNum) { - if (!state.dataSurface->Surface(SurfNum).HeatTransSurf) continue; - if (state.dataSurface->Surface(SurfNum).ExtBoundCond <= 0) continue; // Exterior surfaces - if (state.dataSurface->Surface(SurfNum).Class != SurfaceClass::Floor) continue; - if (state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).TypeIsWindow) continue; + auto &surf = state.dataSurface->Surface(SurfNum); + if (!surf.HeatTransSurf) continue; + if (surf.ExtBoundCond <= 0) continue; // Exterior surfaces + if (surf.Class != SurfaceClass::Floor) continue; + if (state.dataConstruction->Construct(surf.Construction).TypeIsWindow) continue; SurfacesOfType = true; - state.dataSurface->Surface(SurfNum).HeatTransferAlgorithm = tmpAlgoInput; + surf.HeatTransferAlgorithm = tmpAlgoInput; } } else { SurfacesOfType = false; @@ -10711,9 +10701,10 @@ namespace SurfaceGeometry { ShowSevereError(state, format("{}=\"{}\" invalid.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } else { - if (state.dataSurface->Surface(SurfNum).Class != SurfaceClass::Window || state.dataSurface->Surface(SurfNum).ExtBoundCond != 0) { + auto const &surf = state.dataSurface->Surface(SurfNum); + if (surf.Class != SurfaceClass::Window || surf.ExtBoundCond != 0) { ShowSevereError(state, format("{}=\"{}\"", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowSevereError(state, format("cannot be used with surface={}", state.dataSurface->Surface(SurfNum).Name)); + ShowSevereError(state, format("cannot be used with surface={}", surf.Name)); ShowContinueError(state, "because that surface is not an exterior window."); ErrorsFound = true; } @@ -10838,13 +10829,14 @@ namespace SurfaceGeometry { // Check that associated surface is a 2- or 3-pane exterior window WrongSurfaceType = false; if (SurfNum != 0) { - if (state.dataSurface->Surface(SurfNum).Class != SurfaceClass::Window) WrongSurfaceType = true; - if (state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Window) { - ConstrNum = state.dataSurface->Surface(SurfNum).Construction; + auto const &surf = state.dataSurface->Surface(SurfNum); + if (surf.Class != SurfaceClass::Window) WrongSurfaceType = true; + if (surf.Class == SurfaceClass::Window) { + ConstrNum = surf.Construction; if (state.dataConstruction->Construct(ConstrNum).TotGlassLayers != 2 && state.dataConstruction->Construct(ConstrNum).TotGlassLayers != 3) WrongSurfaceType = true; - if (state.dataSurface->Surface(SurfNum).ExtBoundCond != ExternalEnvironment) WrongSurfaceType = true; + if (surf.ExtBoundCond != ExternalEnvironment) WrongSurfaceType = true; } if (WrongSurfaceType) { ShowSevereError(state, @@ -10956,6 +10948,7 @@ namespace SurfaceGeometry { } if (SurfNum > 0) { + auto const &surf = state.dataSurface->Surface(SurfNum); state.dataSurface->AirflowWindows = true; state.dataSurface->SurfWinAirflowSource(SurfNum) = static_cast(getEnumValue(WindowAirFlowSourceNamesUC, state.dataIPShortCut->cAlphaArgs(2))); @@ -10964,9 +10957,9 @@ namespace SurfaceGeometry { static_cast(getEnumValue(WindowAirFlowDestinationNamesUC, state.dataIPShortCut->cAlphaArgs(3))); if (state.dataSurface->SurfWinAirflowDestination(SurfNum) == WindowAirFlowDestination::Return) { - int controlledZoneNum = DataZoneEquipment::GetControlledZoneIndex(state, state.dataSurface->Surface(SurfNum).ZoneName); + int controlledZoneNum = DataZoneEquipment::GetControlledZoneIndex(state, surf.ZoneName); if (controlledZoneNum > 0) { - state.dataHeatBal->Zone(state.dataSurface->Surface(SurfNum).Zone).HasAirFlowWindowReturn = true; + state.dataHeatBal->Zone(surf.Zone).HasAirFlowWindowReturn = true; } // Set return air node number @@ -10975,15 +10968,15 @@ namespace SurfaceGeometry { if (!state.dataIPShortCut->lAlphaFieldBlanks(7)) { retNodeName = state.dataIPShortCut->cAlphaArgs(7); } - std::string callDescription = cCurrentModuleObject + "=" + state.dataSurface->Surface(SurfNum).Name; + std::string callDescription = cCurrentModuleObject + "=" + surf.Name; state.dataSurface->SurfWinAirflowReturnNodePtr(SurfNum) = - DataZoneEquipment::GetReturnAirNodeForZone(state, state.dataSurface->Surface(SurfNum).Zone, retNodeName, callDescription); + DataZoneEquipment::GetReturnAirNodeForZone(state, surf.Zone, retNodeName, callDescription); if (state.dataSurface->SurfWinAirflowReturnNodePtr(SurfNum) == 0) { ShowSevereError(state, format("{}{}=\"{}\", airflow window return air node not found for {} = {}", RoutineName, cCurrentModuleObject, - state.dataSurface->Surface(SurfNum).Name, + surf.Name, state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3))); if (!state.dataIPShortCut->lAlphaFieldBlanks(7)) @@ -11034,7 +11027,7 @@ namespace SurfaceGeometry { } } // Warning if associated window is an interior window - if (state.dataSurface->Surface(SurfNum).ExtBoundCond != ExternalEnvironment && !ErrorsFound) + if (surf.ExtBoundCond != ExternalEnvironment && !ErrorsFound) ShowWarningError(state, format("{}=\"{}\", is an Interior window; cannot be an airflow window.", cCurrentModuleObject, @@ -11053,12 +11046,11 @@ namespace SurfaceGeometry { state.dataConstruction->Construct(ConstrNum).Name)); } // Require that gas be air in airflow gaps on either side of a between glass shade/blind - if (state.dataSurface->Surface(SurfNum).HasShadeControl) { - for (std::size_t listIndex = 0; listIndex < state.dataSurface->Surface(SurfNum).windowShadingControlList.size(); - ++listIndex) { - int WSCPtr = state.dataSurface->Surface(SurfNum).windowShadingControlList[listIndex]; + if (surf.HasShadeControl) { + for (std::size_t listIndex = 0; listIndex < surf.windowShadingControlList.size(); ++listIndex) { + int WSCPtr = surf.windowShadingControlList[listIndex]; if (ANY_BETWEENGLASS_SHADE_BLIND(state.dataSurface->WindowShadingControl(WSCPtr).ShadingType)) { - ConstrNumSh = state.dataSurface->Surface(SurfNum).shadedConstructionList[listIndex]; + ConstrNumSh = surf.shadedConstructionList[listIndex]; if (state.dataConstruction->Construct(ConstrNum).TotGlassLayers == 2) { MatGapFlow1 = state.dataConstruction->Construct(ConstrNumSh).LayerPoint(2); MatGapFlow2 = state.dataConstruction->Construct(ConstrNumSh).LayerPoint(4); @@ -11912,7 +11904,7 @@ namespace SurfaceGeometry { state.dataIPShortCut->cAlphaArgs(1) = format("{:.3R}", state.dataSurface->OSC(Loop).SurfFilmCoef); SetupOutputVariable(state, "Surface Other Side Coefficients Exterior Air Drybulb Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSurface->OSC(Loop).OSCTempCalc, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -12027,28 +12019,28 @@ namespace SurfaceGeometry { // setup output vars for modeled coefficients SetupOutputVariable(state, "Surface Other Side Conditions Modeled Convection Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSurface->OSCM(OSCMNum).TConv, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataSurface->OSCM(OSCMNum).Name); SetupOutputVariable(state, "Surface Other Side Conditions Modeled Convection Heat Transfer Coefficient", - OutputProcessor::Unit::W_m2K, + Constant::Units::W_m2K, state.dataSurface->OSCM(OSCMNum).HConv, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataSurface->OSCM(OSCMNum).Name); SetupOutputVariable(state, "Surface Other Side Conditions Modeled Radiation Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSurface->OSCM(OSCMNum).TRad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataSurface->OSCM(OSCMNum).Name); SetupOutputVariable(state, "Surface Other Side Conditions Modeled Radiation Heat Transfer Coefficient", - OutputProcessor::Unit::W_m2K, + Constant::Units::W_m2K, state.dataSurface->OSCM(OSCMNum).HRad, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -12414,7 +12406,6 @@ namespace SurfaceGeometry { for (int SurfNum = thisZone.AllSurfaceFirst; SurfNum <= thisZone.AllSurfaceLast; ++SurfNum) { auto &thisSurface = state.dataSurface->Surface(SurfNum); - // Only include Base Surfaces in Calc. if (thisSurface.Class != SurfaceClass::Wall && thisSurface.Class != SurfaceClass::Floor && thisSurface.Class != SurfaceClass::Roof) { @@ -13277,39 +13268,34 @@ namespace SurfaceGeometry { } // Categorize this surface + auto &surf = state.dataSurface->Surface(ThisSurf); + BaseSurface = (surf.BaseSurf == 0 || surf.BaseSurf == ThisSurf); - if (state.dataSurface->Surface(ThisSurf).BaseSurf == 0 || state.dataSurface->Surface(ThisSurf).BaseSurf == ThisSurf) { - BaseSurface = true; - } else { - BaseSurface = false; - } - - ThisBaseSurface = state.dataSurface->Surface(ThisSurf).BaseSurf; // Dont know if this is still needed or not - HeatTransSurf = state.dataSurface->Surface(ThisSurf).HeatTransSurf; + ThisBaseSurface = surf.BaseSurf; // Dont know if this is still needed or not + HeatTransSurf = surf.HeatTransSurf; // Kludge for daylighting shelves - if (state.dataSurface->Surface(ThisSurf).IsShadowing) { + if (surf.IsShadowing) { ThisBaseSurface = ThisSurf; HeatTransSurf = true; } // IF (Surface(ThisSurf)%Name(1:3) /= 'Mir') THEN - if (!state.dataSurface->Surface(ThisSurf).MirroredSurf) { - CalcCoPlanarNess( - state.dataSurface->Surface(ThisSurf).Vertex, state.dataSurface->Surface(ThisSurf).Sides, IsCoPlanar, OutOfLine, LastVertexInError); + if (!surf.MirroredSurf) { + CalcCoPlanarNess(surf.Vertex, surf.Sides, IsCoPlanar, OutOfLine, LastVertexInError); if (!IsCoPlanar) { if (OutOfLine > 0.01) { ShowSevereError(state, format("{}Suspected non-planar surface:\"{}\", Max \"out of line\"={:.5T} at Vertex # {}", RoutineName, - state.dataSurface->Surface(ThisSurf).Name, + surf.Name, OutOfLine, LastVertexInError)); } else { ShowWarningError(state, format("{}Possible non-planar surface:\"{}\", Max \"out of line\"={:.5T} at Vertex # {}", RoutineName, - state.dataSurface->Surface(ThisSurf).Name, + surf.Name, OutOfLine, LastVertexInError)); } @@ -13318,42 +13304,42 @@ namespace SurfaceGeometry { } if (BaseSurface) { - SurfWorldAz = state.dataSurface->Surface(ThisSurf).Azimuth; - SurfTilt = state.dataSurface->Surface(ThisSurf).Tilt; - for (n = 1; n <= state.dataSurface->Surface(ThisSurf).Sides; ++n) { - state.dataSurfaceGeometry->Xpsv(n) = state.dataSurface->Surface(ThisSurf).Vertex(n).x; - state.dataSurfaceGeometry->Ypsv(n) = state.dataSurface->Surface(ThisSurf).Vertex(n).y; - state.dataSurfaceGeometry->Zpsv(n) = state.dataSurface->Surface(ThisSurf).Vertex(n).z; - } - TVect = state.dataSurface->Surface(ThisSurf).Vertex(3) - state.dataSurface->Surface(ThisSurf).Vertex(2); + SurfWorldAz = surf.Azimuth; + SurfTilt = surf.Tilt; + for (n = 1; n <= surf.Sides; ++n) { + state.dataSurfaceGeometry->Xpsv(n) = surf.Vertex(n).x; + state.dataSurfaceGeometry->Ypsv(n) = surf.Vertex(n).y; + state.dataSurfaceGeometry->Zpsv(n) = surf.Vertex(n).z; + } + TVect = surf.Vertex(3) - surf.Vertex(2); ThisWidth = VecLength(TVect); - TVect = state.dataSurface->Surface(ThisSurf).Vertex(2) - state.dataSurface->Surface(ThisSurf).Vertex(1); + TVect = surf.Vertex(2) - surf.Vertex(1); ThisHeight = VecLength(TVect); - state.dataSurface->Surface(ThisSurf).Width = ThisWidth; - state.dataSurface->Surface(ThisSurf).Height = ThisHeight; // For a horizontal surface this is actually length! - if (state.dataSurface->Surface(ThisSurf).Sides == 3) { - state.dataSurface->Surface(ThisSurf).Shape = SurfaceShape::Triangle; - } else if (state.dataSurface->Surface(ThisSurf).Sides == 4) { + surf.Width = ThisWidth; + surf.Height = ThisHeight; // For a horizontal surface this is actually length! + if (surf.Sides == 3) { + surf.Shape = SurfaceShape::Triangle; + } else if (surf.Sides == 4) { // Test for rectangularity if (isRectangle(state, ThisSurf)) { - state.dataSurface->Surface(ThisSurf).Shape = SurfaceShape::Rectangle; + surf.Shape = SurfaceShape::Rectangle; } else { - state.dataSurface->Surface(ThisSurf).Shape = SurfaceShape::Quadrilateral; + surf.Shape = SurfaceShape::Quadrilateral; } } else { // Surface( ThisSurf ).Sides > 4 - state.dataSurface->Surface(ThisSurf).Shape = SurfaceShape::Polygonal; - if (std::abs(ThisHeight * ThisWidth - state.dataSurface->Surface(ThisSurf).GrossArea) > 0.001) { - state.dataSurface->Surface(ThisSurf).Width = std::sqrt(state.dataSurface->Surface(ThisSurf).GrossArea); - state.dataSurface->Surface(ThisSurf).Height = state.dataSurface->Surface(ThisSurf).Width; - ThisWidth = state.dataSurface->Surface(ThisSurf).Width; - ThisHeight = state.dataSurface->Surface(ThisSurf).Height; + surf.Shape = SurfaceShape::Polygonal; + if (std::abs(ThisHeight * ThisWidth - surf.GrossArea) > 0.001) { + surf.Width = std::sqrt(surf.GrossArea); + surf.Height = surf.Width; + ThisWidth = surf.Width; + ThisHeight = surf.Height; } } } else { // It's a subsurface to previous basesurface in this set of calls - ThisSurfAz = state.dataSurface->Surface(ThisSurf).Azimuth; - ThisSurfTilt = state.dataSurface->Surface(ThisSurf).Tilt; + ThisSurfAz = surf.Azimuth; + ThisSurfTilt = surf.Tilt; // Retrieve base surface info Real64 const baseSurfWorldAz = state.dataSurface->Surface(ThisBaseSurface).Azimuth; @@ -13368,11 +13354,11 @@ namespace SurfaceGeometry { if (HeatTransSurf) { - if (state.dataSurface->Surface(ThisSurf).Sides == 4) { + if (surf.Sides == 4) { ThisShape = SurfaceShape::RectangularDoorWindow; - } else if (state.dataSurface->Surface(ThisSurf).Sides == 3 && state.dataSurface->Surface(ThisSurf).Class == SurfaceClass::Window) { + } else if (surf.Sides == 3 && surf.Class == SurfaceClass::Window) { ThisShape = SurfaceShape::TriangularWindow; - } else if (state.dataSurface->Surface(ThisSurf).Sides == 3 && state.dataSurface->Surface(ThisSurf).Class == SurfaceClass::Door) { + } else if (surf.Sides == 3 && surf.Class == SurfaceClass::Door) { ThisShape = SurfaceShape::TriangularDoor; } else { assert(false); @@ -13380,10 +13366,10 @@ namespace SurfaceGeometry { } else { // this is a shadowing subsurface - if (std::abs(state.dataSurface->Surface(state.dataSurface->Surface(ThisSurf).BaseSurf).Tilt - ThisSurfTilt) <= 0.01) { + if (std::abs(state.dataSurface->Surface(surf.BaseSurf).Tilt - ThisSurfTilt) <= 0.01) { // left or right fin if (ThisSurfAz < 0.0) ThisSurfAz += 360.0; - if (ThisSurfAz > state.dataSurface->Surface(state.dataSurface->Surface(ThisSurf).BaseSurf).Azimuth) { + if (ThisSurfAz > state.dataSurface->Surface(surf.BaseSurf).Azimuth) { ThisShape = SurfaceShape::RectangularLeftFin; } else { ThisShape = SurfaceShape::RectangularRightFin; @@ -13396,31 +13382,26 @@ namespace SurfaceGeometry { // Setting relative coordinates for shadowing calculations for subsurfaces switch (ThisShape) { case SurfaceShape::RectangularDoorWindow: { // Rectangular heat transfer subsurface - PlaneEquation(state.dataSurface->Surface(state.dataSurface->Surface(ThisSurf).BaseSurf).Vertex, - state.dataSurface->Surface(state.dataSurface->Surface(ThisSurf).BaseSurf).Sides, - BasePlane, - SError); + PlaneEquation(state.dataSurface->Surface(surf.BaseSurf).Vertex, state.dataSurface->Surface(surf.BaseSurf).Sides, BasePlane, SError); if (SError) { - ShowSevereError( - state, - format("{}Degenerate surface (likely two vertices equal):\"{}\".", RoutineName, state.dataSurface->Surface(ThisSurf).Name)); + ShowSevereError(state, format("{}Degenerate surface (likely two vertices equal):\"{}\".", RoutineName, surf.Name)); ErrorInSurface = true; } - ThisReveal = -Pt2Plane(state.dataSurface->Surface(ThisSurf).Vertex(2), BasePlane); + ThisReveal = -Pt2Plane(surf.Vertex(2), BasePlane); if (std::abs(ThisReveal) < 0.0002) ThisReveal = 0.0; - state.dataSurface->Surface(ThisSurf).Reveal = ThisReveal; - Xp = state.dataSurface->Surface(ThisSurf).Vertex(2).x - BaseXLLC; - Yp = state.dataSurface->Surface(ThisSurf).Vertex(2).y - BaseYLLC; - Zp = state.dataSurface->Surface(ThisSurf).Vertex(2).z - BaseZLLC; + surf.Reveal = ThisReveal; + Xp = surf.Vertex(2).x - BaseXLLC; + Yp = surf.Vertex(2).y - BaseYLLC; + Zp = surf.Vertex(2).z - BaseZLLC; XLLC = -Xp * BaseCosAzimuth + Yp * BaseSinAzimuth; YLLC = -Xp * BaseSinAzimuth * BaseCosTilt - Yp * BaseCosAzimuth * BaseCosTilt + Zp * BaseSinTilt; ZLLC = Xp * BaseSinAzimuth * BaseSinTilt + Yp * BaseCosAzimuth * BaseSinTilt + Zp * BaseCosTilt; - TVect = state.dataSurface->Surface(ThisSurf).Vertex(3) - state.dataSurface->Surface(ThisSurf).Vertex(2); + TVect = surf.Vertex(3) - surf.Vertex(2); ThisWidth = VecLength(TVect); - TVect = state.dataSurface->Surface(ThisSurf).Vertex(2) - state.dataSurface->Surface(ThisSurf).Vertex(1); + TVect = surf.Vertex(2) - surf.Vertex(1); ThisHeight = VecLength(TVect); - state.dataSurface->Surface(ThisSurf).Width = ThisWidth; - state.dataSurface->Surface(ThisSurf).Height = ThisHeight; + surf.Width = ThisWidth; + surf.Height = ThisHeight; // Processing of 4-sided but non-rectangular Window, Door or GlassDoor, for use in calc of convective air flow. if (!isRectangle(state, ThisSurf)) { @@ -13433,16 +13414,16 @@ namespace SurfaceGeometry { ShowContinueError( state, format("Surface={} is transformed into an equivalent rectangular surface with the same area and aspect ratio. ", - state.dataSurface->Surface(ThisSurf).Name)); + surf.Name)); } } state.dataSurfaceGeometry->Xpsv(1) = XLLC; state.dataSurfaceGeometry->Xpsv(2) = XLLC; - state.dataSurfaceGeometry->Xpsv(3) = XLLC + state.dataSurface->Surface(ThisSurf).Width; - state.dataSurfaceGeometry->Xpsv(4) = XLLC + state.dataSurface->Surface(ThisSurf).Width; - state.dataSurfaceGeometry->Ypsv(1) = YLLC + state.dataSurface->Surface(ThisSurf).Height; - state.dataSurfaceGeometry->Ypsv(4) = YLLC + state.dataSurface->Surface(ThisSurf).Height; + state.dataSurfaceGeometry->Xpsv(3) = XLLC + surf.Width; + state.dataSurfaceGeometry->Xpsv(4) = XLLC + surf.Width; + state.dataSurfaceGeometry->Ypsv(1) = YLLC + surf.Height; + state.dataSurfaceGeometry->Ypsv(4) = YLLC + surf.Height; state.dataSurfaceGeometry->Ypsv(2) = YLLC; state.dataSurfaceGeometry->Ypsv(3) = YLLC; state.dataSurfaceGeometry->Zpsv(1) = ZLLC; @@ -13450,12 +13431,10 @@ namespace SurfaceGeometry { state.dataSurfaceGeometry->Zpsv(3) = ZLLC; state.dataSurfaceGeometry->Zpsv(4) = ZLLC; - if (state.dataSurface->Surface(ThisSurf).Class == SurfaceClass::Window && - state.dataSurface->Surface(ThisSurf).ExtBoundCond == ExternalEnvironment && - state.dataSurface->Surface(ThisSurf).FrameDivider > 0) { - FrDivNum = state.dataSurface->Surface(ThisSurf).FrameDivider; + if (surf.Class == SurfaceClass::Window && surf.ExtBoundCond == ExternalEnvironment && surf.FrameDivider > 0) { + FrDivNum = surf.FrameDivider; // Set flag for calculating beam solar reflection from outside and/or inside window reveal - if ((state.dataSurface->Surface(ThisSurf).Reveal > 0.0 && state.dataSurface->FrameDivider(FrDivNum).OutsideRevealSolAbs > 0.0) || + if ((surf.Reveal > 0.0 && state.dataSurface->FrameDivider(FrDivNum).OutsideRevealSolAbs > 0.0) || (state.dataSurface->FrameDivider(FrDivNum).InsideSillDepth > 0.0 && state.dataSurface->FrameDivider(FrDivNum).InsideSillSolAbs > 0.0) || (state.dataSurface->FrameDivider(FrDivNum).InsideReveal > 0.0 && @@ -13467,52 +13446,39 @@ namespace SurfaceGeometry { // Surface(ThisSurf)%FrameDivider will be 0 for triangular windows) FrWidth = state.dataSurface->FrameDivider(FrDivNum).FrameWidth; if (FrWidth > 0.0) { - FrArea = (state.dataSurface->Surface(ThisSurf).Height + 2.0 * FrWidth) * - (state.dataSurface->Surface(ThisSurf).Width + 2.0 * FrWidth) - - state.dataSurface->Surface(ThisSurf).Area / state.dataSurface->Surface(ThisSurf).Multiplier; - state.dataSurface->SurfWinFrameArea(ThisSurf) = FrArea * state.dataSurface->Surface(ThisSurf).Multiplier; - if ((state.dataSurface->Surface(state.dataSurface->Surface(ThisSurf).BaseSurf).Area - - state.dataSurface->SurfWinFrameArea(ThisSurf)) <= 0.0) { - ShowSevereError(state, - format("{}Base Surface=\"{}\", ", - RoutineName, - state.dataSurface->Surface(state.dataSurface->Surface(ThisSurf).BaseSurf).Name)); + FrArea = (surf.Height + 2.0 * FrWidth) * (surf.Width + 2.0 * FrWidth) - surf.Area / surf.Multiplier; + state.dataSurface->SurfWinFrameArea(ThisSurf) = FrArea * surf.Multiplier; + if ((state.dataSurface->Surface(surf.BaseSurf).Area - state.dataSurface->SurfWinFrameArea(ThisSurf)) <= 0.0) { + ShowSevereError(state, format("{}Base Surface=\"{}\", ", RoutineName, state.dataSurface->Surface(surf.BaseSurf).Name)); ShowContinueError(state, - format("Window Surface=\"{}\" area (with frame) is too large to fit on the surface.", - state.dataSurface->Surface(ThisSurf).Name)); + format("Window Surface=\"{}\" area (with frame) is too large to fit on the surface.", surf.Name)); ShowContinueError(state, format("Base surface area (-windows and doors)=[{:.2T}] m2, frame area=[{:.2T}] m2.", - state.dataSurface->Surface(state.dataSurface->Surface(ThisSurf).BaseSurf).Area, + state.dataSurface->Surface(surf.BaseSurf).Area, state.dataSurface->SurfWinFrameArea(ThisSurf))); ErrorInSurface = true; } - state.dataSurface->Surface(state.dataSurface->Surface(ThisSurf).BaseSurf).Area -= - state.dataSurface->SurfWinFrameArea(ThisSurf); + state.dataSurface->Surface(surf.BaseSurf).Area -= state.dataSurface->SurfWinFrameArea(ThisSurf); } // If exterior window has divider, subtract divider area to get glazed area - DivWidth = state.dataSurface->FrameDivider(state.dataSurface->Surface(ThisSurf).FrameDivider).DividerWidth; + DivWidth = state.dataSurface->FrameDivider(surf.FrameDivider).DividerWidth; if (DivWidth > 0.0 && !ErrorInSurface) { - DivArea = DivWidth * (state.dataSurface->FrameDivider(FrDivNum).HorDividers * state.dataSurface->Surface(ThisSurf).Width + - state.dataSurface->FrameDivider(FrDivNum).VertDividers * state.dataSurface->Surface(ThisSurf).Height - + DivArea = DivWidth * (state.dataSurface->FrameDivider(FrDivNum).HorDividers * surf.Width + + state.dataSurface->FrameDivider(FrDivNum).VertDividers * surf.Height - state.dataSurface->FrameDivider(FrDivNum).HorDividers * state.dataSurface->FrameDivider(FrDivNum).VertDividers * DivWidth); - state.dataSurface->SurfWinDividerArea(ThisSurf) = DivArea * state.dataSurface->Surface(ThisSurf).Multiplier; - if ((state.dataSurface->Surface(ThisSurf).Area - state.dataSurface->SurfWinDividerArea(ThisSurf)) <= 0.0) { - ShowSevereError(state, - format("{}Divider area exceeds glazed opening for window {}", - RoutineName, - state.dataSurface->Surface(ThisSurf).Name)); + state.dataSurface->SurfWinDividerArea(ThisSurf) = DivArea * surf.Multiplier; + if ((surf.Area - state.dataSurface->SurfWinDividerArea(ThisSurf)) <= 0.0) { + ShowSevereError(state, format("{}Divider area exceeds glazed opening for window {}", RoutineName, surf.Name)); ShowContinueError(state, format("Window surface area=[{:.2T}] m2, divider area=[{:.2T}] m2.", - state.dataSurface->Surface(ThisSurf).Area, + surf.Area, state.dataSurface->SurfWinDividerArea(ThisSurf))); ErrorInSurface = true; } - state.dataSurface->Surface(ThisSurf).Area -= state.dataSurface->SurfWinDividerArea(ThisSurf); // Glazed area + surf.Area -= state.dataSurface->SurfWinDividerArea(ThisSurf); // Glazed area if (DivArea <= 0.0) { - ShowWarningError( - state, - format("{}Calculated Divider Area <= 0.0 for Window={}", RoutineName, state.dataSurface->Surface(ThisSurf).Name)); + ShowWarningError(state, format("{}Calculated Divider Area <= 0.0 for Window={}", RoutineName, surf.Name)); if (state.dataSurface->FrameDivider(FrDivNum).HorDividers == 0) { ShowContinueError(state, "..Number of Horizontal Dividers = 0."); } @@ -13520,9 +13486,8 @@ namespace SurfaceGeometry { ShowContinueError(state, "..Number of Vertical Dividers = 0."); } } else { - state.dataSurface->SurfWinGlazedFrac(ThisSurf) = - state.dataSurface->Surface(ThisSurf).Area / - (state.dataSurface->Surface(ThisSurf).Area + state.dataSurface->SurfWinDividerArea(ThisSurf)); + auto &surfWin = state.dataSurface->SurfaceWindow(ThisSurf); + surfWin.glazedFrac = surf.Area / (surf.Area + state.dataSurface->SurfWinDividerArea(ThisSurf)); // Correction factor for portion of divider subject to divider projection correction DivFrac = (1.0 - state.dataSurface->FrameDivider(FrDivNum).HorDividers * state.dataSurface->FrameDivider(FrDivNum).VertDividers * pow_2(DivWidth) / DivArea); @@ -13553,126 +13518,120 @@ namespace SurfaceGeometry { } break; case SurfaceShape::TriangularWindow: case SurfaceShape::TriangularDoor: { - PlaneEquation(state.dataSurface->Surface(state.dataSurface->Surface(ThisSurf).BaseSurf).Vertex, - state.dataSurface->Surface(state.dataSurface->Surface(ThisSurf).BaseSurf).Sides, - BasePlane, - SError); + PlaneEquation(state.dataSurface->Surface(surf.BaseSurf).Vertex, state.dataSurface->Surface(surf.BaseSurf).Sides, BasePlane, SError); if (SError) { - ShowSevereError( - state, - format("{}Degenerate surface (likely two vertices equal):\"{}\".", RoutineName, state.dataSurface->Surface(ThisSurf).Name)); + ShowSevereError(state, format("{}Degenerate surface (likely two vertices equal):\"{}\".", RoutineName, surf.Name)); ErrorInSurface = true; } - ThisReveal = -Pt2Plane(state.dataSurface->Surface(ThisSurf).Vertex(2), BasePlane); + ThisReveal = -Pt2Plane(surf.Vertex(2), BasePlane); if (std::abs(ThisReveal) < 0.0002) ThisReveal = 0.0; - state.dataSurface->Surface(ThisSurf).Reveal = ThisReveal; - Xp = state.dataSurface->Surface(ThisSurf).Vertex(2).x - BaseXLLC; - Yp = state.dataSurface->Surface(ThisSurf).Vertex(2).y - BaseYLLC; - Zp = state.dataSurface->Surface(ThisSurf).Vertex(2).z - BaseZLLC; + surf.Reveal = ThisReveal; + Xp = surf.Vertex(2).x - BaseXLLC; + Yp = surf.Vertex(2).y - BaseYLLC; + Zp = surf.Vertex(2).z - BaseZLLC; state.dataSurfaceGeometry->Xpsv(2) = -Xp * BaseCosAzimuth + Yp * BaseSinAzimuth; state.dataSurfaceGeometry->Ypsv(2) = -Xp * BaseSinAzimuth * BaseCosTilt - Yp * BaseCosAzimuth * BaseCosTilt + Zp * BaseSinTilt; state.dataSurfaceGeometry->Zpsv(2) = Xp * BaseSinAzimuth * BaseSinTilt + Yp * BaseCosAzimuth * BaseSinTilt + Zp * BaseCosTilt; - TVect = state.dataSurface->Surface(ThisSurf).Vertex(3) - state.dataSurface->Surface(ThisSurf).Vertex(2); + TVect = surf.Vertex(3) - surf.Vertex(2); ThisWidth = VecLength(TVect); - TVect = state.dataSurface->Surface(ThisSurf).Vertex(2) - state.dataSurface->Surface(ThisSurf).Vertex(1); + TVect = surf.Vertex(2) - surf.Vertex(1); ThisHeight = VecLength(TVect); - state.dataSurface->Surface(ThisSurf).Width = ThisWidth; - state.dataSurface->Surface(ThisSurf).Height = ThisHeight; + surf.Width = ThisWidth; + surf.Height = ThisHeight; // Effective height and width of a triangular window for use in calc of convective air flow // in gap between glass and shading device when shading device is present - state.dataSurface->Surface(ThisSurf).Height = - 4.0 * state.dataSurface->Surface(ThisSurf).Area / (3.0 * state.dataSurface->Surface(ThisSurf).Width); - state.dataSurface->Surface(ThisSurf).Width *= 0.75; + surf.Height = 4.0 * surf.Area / (3.0 * surf.Width); + surf.Width *= 0.75; - Xp = state.dataSurface->Surface(ThisSurf).Vertex(1).x - BaseXLLC; - Yp = state.dataSurface->Surface(ThisSurf).Vertex(1).y - BaseYLLC; - Zp = state.dataSurface->Surface(ThisSurf).Vertex(1).z - BaseZLLC; + Xp = surf.Vertex(1).x - BaseXLLC; + Yp = surf.Vertex(1).y - BaseYLLC; + Zp = surf.Vertex(1).z - BaseZLLC; state.dataSurfaceGeometry->Xpsv(1) = -Xp * BaseCosAzimuth + Yp * BaseSinAzimuth; state.dataSurfaceGeometry->Ypsv(1) = -Xp * BaseSinAzimuth * BaseCosTilt - Yp * BaseCosAzimuth * BaseCosTilt + Zp * BaseSinTilt; state.dataSurfaceGeometry->Zpsv(1) = Xp * BaseSinAzimuth * BaseSinTilt + Yp * BaseCosAzimuth * BaseSinTilt + Zp * BaseCosTilt; - Xp = state.dataSurface->Surface(ThisSurf).Vertex(3).x - BaseXLLC; - Yp = state.dataSurface->Surface(ThisSurf).Vertex(3).y - BaseYLLC; - Zp = state.dataSurface->Surface(ThisSurf).Vertex(3).z - BaseZLLC; + Xp = surf.Vertex(3).x - BaseXLLC; + Yp = surf.Vertex(3).y - BaseYLLC; + Zp = surf.Vertex(3).z - BaseZLLC; state.dataSurfaceGeometry->Xpsv(3) = -Xp * BaseCosAzimuth + Yp * BaseSinAzimuth; state.dataSurfaceGeometry->Ypsv(3) = -Xp * BaseSinAzimuth * BaseCosTilt - Yp * BaseCosAzimuth * BaseCosTilt + Zp * BaseSinTilt; state.dataSurfaceGeometry->Zpsv(3) = Xp * BaseSinAzimuth * BaseSinTilt + Yp * BaseCosAzimuth * BaseSinTilt + Zp * BaseCosTilt; } break; case SurfaceShape::RectangularOverhang: { - Xp = state.dataSurface->Surface(ThisSurf).Vertex(2).x - BaseXLLC; - Yp = state.dataSurface->Surface(ThisSurf).Vertex(2).y - BaseYLLC; - Zp = state.dataSurface->Surface(ThisSurf).Vertex(2).z - BaseZLLC; + Xp = surf.Vertex(2).x - BaseXLLC; + Yp = surf.Vertex(2).y - BaseYLLC; + Zp = surf.Vertex(2).z - BaseZLLC; XLLC = -Xp * BaseCosAzimuth + Yp * BaseSinAzimuth; YLLC = -Xp * BaseSinAzimuth * BaseCosTilt - Yp * BaseCosAzimuth * BaseCosTilt + Zp * BaseSinTilt; ZLLC = Xp * BaseSinAzimuth * BaseSinTilt + Yp * BaseCosAzimuth * BaseSinTilt + Zp * BaseCosTilt; - TVect = state.dataSurface->Surface(ThisSurf).Vertex(3) - state.dataSurface->Surface(ThisSurf).Vertex(2); + TVect = surf.Vertex(3) - surf.Vertex(2); ThisWidth = VecLength(TVect); - TVect = state.dataSurface->Surface(ThisSurf).Vertex(2) - state.dataSurface->Surface(ThisSurf).Vertex(1); + TVect = surf.Vertex(2) - surf.Vertex(1); ThisHeight = VecLength(TVect); - state.dataSurface->Surface(ThisSurf).Width = ThisWidth; - state.dataSurface->Surface(ThisSurf).Height = ThisHeight; + surf.Width = ThisWidth; + surf.Height = ThisHeight; state.dataSurfaceGeometry->Xpsv(1) = XLLC; state.dataSurfaceGeometry->Xpsv(2) = XLLC; - state.dataSurfaceGeometry->Xpsv(3) = XLLC + state.dataSurface->Surface(ThisSurf).Width; - state.dataSurfaceGeometry->Xpsv(4) = XLLC + state.dataSurface->Surface(ThisSurf).Width; + state.dataSurfaceGeometry->Xpsv(3) = XLLC + surf.Width; + state.dataSurfaceGeometry->Xpsv(4) = XLLC + surf.Width; state.dataSurfaceGeometry->Ypsv(1) = YLLC; state.dataSurfaceGeometry->Ypsv(2) = YLLC; state.dataSurfaceGeometry->Ypsv(3) = YLLC; state.dataSurfaceGeometry->Ypsv(4) = YLLC; - state.dataSurfaceGeometry->Zpsv(1) = state.dataSurface->Surface(ThisSurf).Height; - state.dataSurfaceGeometry->Zpsv(4) = state.dataSurface->Surface(ThisSurf).Height; + state.dataSurfaceGeometry->Zpsv(1) = surf.Height; + state.dataSurfaceGeometry->Zpsv(4) = surf.Height; state.dataSurfaceGeometry->Zpsv(2) = 0.0; state.dataSurfaceGeometry->Zpsv(3) = 0.0; } break; case SurfaceShape::RectangularLeftFin: { - Xp = state.dataSurface->Surface(ThisSurf).Vertex(2).x - BaseXLLC; - Yp = state.dataSurface->Surface(ThisSurf).Vertex(2).y - BaseYLLC; - Zp = state.dataSurface->Surface(ThisSurf).Vertex(2).z - BaseZLLC; + Xp = surf.Vertex(2).x - BaseXLLC; + Yp = surf.Vertex(2).y - BaseYLLC; + Zp = surf.Vertex(2).z - BaseZLLC; XLLC = -Xp * BaseCosAzimuth + Yp * BaseSinAzimuth; YLLC = -Xp * BaseSinAzimuth * BaseCosTilt - Yp * BaseCosAzimuth * BaseCosTilt + Zp * BaseSinTilt; ZLLC = Xp * BaseSinAzimuth * BaseSinTilt + Yp * BaseCosAzimuth * BaseSinTilt + Zp * BaseCosTilt; - TVect = state.dataSurface->Surface(ThisSurf).Vertex(3) - state.dataSurface->Surface(ThisSurf).Vertex(2); + TVect = surf.Vertex(3) - surf.Vertex(2); ThisWidth = VecLength(TVect); - TVect = state.dataSurface->Surface(ThisSurf).Vertex(2) - state.dataSurface->Surface(ThisSurf).Vertex(1); + TVect = surf.Vertex(2) - surf.Vertex(1); ThisHeight = VecLength(TVect); - state.dataSurface->Surface(ThisSurf).Width = ThisWidth; - state.dataSurface->Surface(ThisSurf).Height = ThisHeight; + surf.Width = ThisWidth; + surf.Height = ThisHeight; state.dataSurfaceGeometry->Xpsv(1) = XLLC; state.dataSurfaceGeometry->Xpsv(2) = XLLC; state.dataSurfaceGeometry->Xpsv(3) = XLLC; state.dataSurfaceGeometry->Xpsv(4) = XLLC; state.dataSurfaceGeometry->Ypsv(1) = YLLC; state.dataSurfaceGeometry->Ypsv(2) = YLLC; - state.dataSurfaceGeometry->Ypsv(3) = YLLC + state.dataSurface->Surface(ThisSurf).Width; - state.dataSurfaceGeometry->Ypsv(4) = YLLC + state.dataSurface->Surface(ThisSurf).Width; - state.dataSurfaceGeometry->Zpsv(1) = state.dataSurface->Surface(ThisSurf).Height; - state.dataSurfaceGeometry->Zpsv(4) = state.dataSurface->Surface(ThisSurf).Height; + state.dataSurfaceGeometry->Ypsv(3) = YLLC + surf.Width; + state.dataSurfaceGeometry->Ypsv(4) = YLLC + surf.Width; + state.dataSurfaceGeometry->Zpsv(1) = surf.Height; + state.dataSurfaceGeometry->Zpsv(4) = surf.Height; state.dataSurfaceGeometry->Zpsv(2) = 0.0; state.dataSurfaceGeometry->Zpsv(3) = 0.0; } break; case SurfaceShape::RectangularRightFin: { - Xp = state.dataSurface->Surface(ThisSurf).Vertex(2).x - BaseXLLC; - Yp = state.dataSurface->Surface(ThisSurf).Vertex(2).y - BaseYLLC; - Zp = state.dataSurface->Surface(ThisSurf).Vertex(2).z - BaseZLLC; + Xp = surf.Vertex(2).x - BaseXLLC; + Yp = surf.Vertex(2).y - BaseYLLC; + Zp = surf.Vertex(2).z - BaseZLLC; XLLC = -Xp * BaseCosAzimuth + Yp * BaseSinAzimuth; YLLC = -Xp * BaseSinAzimuth * BaseCosTilt - Yp * BaseCosAzimuth * BaseCosTilt + Zp * BaseSinTilt; ZLLC = Xp * BaseSinAzimuth * BaseSinTilt + Yp * BaseCosAzimuth * BaseSinTilt + Zp * BaseCosTilt; - TVect = state.dataSurface->Surface(ThisSurf).Vertex(3) - state.dataSurface->Surface(ThisSurf).Vertex(2); + TVect = surf.Vertex(3) - surf.Vertex(2); ThisWidth = VecLength(TVect); - TVect = state.dataSurface->Surface(ThisSurf).Vertex(2) - state.dataSurface->Surface(ThisSurf).Vertex(1); + TVect = surf.Vertex(2) - surf.Vertex(1); ThisHeight = VecLength(TVect); - state.dataSurface->Surface(ThisSurf).Width = ThisWidth; - state.dataSurface->Surface(ThisSurf).Height = ThisHeight; + surf.Width = ThisWidth; + surf.Height = ThisHeight; state.dataSurfaceGeometry->Xpsv(1) = XLLC; state.dataSurfaceGeometry->Xpsv(2) = XLLC; state.dataSurfaceGeometry->Xpsv(3) = XLLC; state.dataSurfaceGeometry->Xpsv(4) = XLLC; - state.dataSurfaceGeometry->Ypsv(1) = YLLC + state.dataSurface->Surface(ThisSurf).Width; - state.dataSurfaceGeometry->Ypsv(2) = YLLC + state.dataSurface->Surface(ThisSurf).Width; + state.dataSurfaceGeometry->Ypsv(1) = YLLC + surf.Width; + state.dataSurfaceGeometry->Ypsv(2) = YLLC + surf.Width; state.dataSurfaceGeometry->Ypsv(3) = YLLC; state.dataSurfaceGeometry->Ypsv(4) = YLLC; - state.dataSurfaceGeometry->Zpsv(1) = state.dataSurface->Surface(ThisSurf).Height; - state.dataSurfaceGeometry->Zpsv(4) = state.dataSurface->Surface(ThisSurf).Height; + state.dataSurfaceGeometry->Zpsv(1) = surf.Height; + state.dataSurfaceGeometry->Zpsv(4) = surf.Height; state.dataSurfaceGeometry->Zpsv(2) = 0.0; state.dataSurfaceGeometry->Zpsv(3) = 0.0; } break; @@ -13684,7 +13643,7 @@ namespace SurfaceGeometry { } break; } - for (n = 1; n <= state.dataSurface->Surface(ThisSurf).Sides; ++n) { + for (n = 1; n <= surf.Sides; ++n) { // if less than 1/10 inch state.dataSurfaceGeometry->Xpsv(n) = nint64(10000.0 * state.dataSurfaceGeometry->Xpsv(n)) / 10000.0; if (std::abs(state.dataSurfaceGeometry->Xpsv(n)) < 0.0025) state.dataSurfaceGeometry->Xpsv(n) = 0.0; @@ -13694,7 +13653,7 @@ namespace SurfaceGeometry { if (std::abs(state.dataSurfaceGeometry->Zpsv(n)) < 0.0025) state.dataSurfaceGeometry->Zpsv(n) = 0.0; } - state.dataSurface->Surface(ThisSurf).Shape = ThisShape; + surf.Shape = ThisShape; } // End of check if ThisSurf is a base surface @@ -13705,12 +13664,12 @@ namespace SurfaceGeometry { // Transfer to XV,YV,ZV arrays - state.dataSurface->ShadeV(ThisSurf).NVert = state.dataSurface->Surface(ThisSurf).Sides; - state.dataSurface->ShadeV(ThisSurf).XV.allocate(state.dataSurface->Surface(ThisSurf).Sides); - state.dataSurface->ShadeV(ThisSurf).YV.allocate(state.dataSurface->Surface(ThisSurf).Sides); - state.dataSurface->ShadeV(ThisSurf).ZV.allocate(state.dataSurface->Surface(ThisSurf).Sides); + state.dataSurface->ShadeV(ThisSurf).NVert = surf.Sides; + state.dataSurface->ShadeV(ThisSurf).XV.allocate(surf.Sides); + state.dataSurface->ShadeV(ThisSurf).YV.allocate(surf.Sides); + state.dataSurface->ShadeV(ThisSurf).ZV.allocate(surf.Sides); - for (n = 1; n <= state.dataSurface->Surface(ThisSurf).Sides; ++n) { + for (n = 1; n <= surf.Sides; ++n) { // if less than 1/10 inch state.dataSurface->ShadeV(ThisSurf).XV(n) = state.dataSurfaceGeometry->Xpsv(n); state.dataSurface->ShadeV(ThisSurf).YV(n) = state.dataSurfaceGeometry->Ypsv(n); @@ -13753,11 +13712,11 @@ namespace SurfaceGeometry { // BY CTRAN AND SET DIRECTION COSINES SAME AS BASE SURFACE. if (!state.dataSurface->Surface(ThisBaseSurface).VerticesProcessed) { - if (state.dataSurface->Surface(ThisSurf).IsAirBoundarySurf) { + if (surf.IsAirBoundarySurf) { ProcessSurfaceVertices(state, ThisBaseSurface, ErrorsFound); } else { - ShowSevereError(state, format("{}Developer error for Subsurface={}", RoutineName, state.dataSurface->Surface(ThisSurf).Name)); + ShowSevereError(state, format("{}Developer error for Subsurface={}", RoutineName, surf.Name)); ShowContinueError(state, format("Base surface={} vertices must be processed before any subsurfaces.", state.dataSurface->Surface(ThisBaseSurface).Name)); @@ -13765,7 +13724,7 @@ namespace SurfaceGeometry { } } - for (n = 1; n <= state.dataSurface->Surface(ThisSurf).Sides; ++n) { + for (n = 1; n <= surf.Sides; ++n) { state.dataSurface->ShadeV(ThisSurf).XV(n) += state.dataSurface->Surface(ThisBaseSurface).XShift; state.dataSurface->ShadeV(ThisSurf).YV(n) += state.dataSurface->Surface(ThisBaseSurface).YShift; } @@ -13811,17 +13770,17 @@ namespace SurfaceGeometry { Vector x23; // Determine Components of the Coordinate Translation Vector. + auto const &surf = state.dataSurface->Surface(SurfNum); - x21 = state.dataSurface->Surface(SurfNum).Vertex(2) - state.dataSurface->Surface(SurfNum).Vertex(1); - x23 = state.dataSurface->Surface(SurfNum).Vertex(2) - state.dataSurface->Surface(SurfNum).Vertex(3); + x21 = surf.Vertex(2) - surf.Vertex(1); + x23 = surf.Vertex(2) - surf.Vertex(3); DotSelfX23 = magnitude_squared(x23); if (DotSelfX23 <= .1e-6) { - ShowSevereError(state, - format("CalcCoordinateTransformation: Invalid dot product, surface=\"{}\":", state.dataSurface->Surface(SurfNum).Name)); - for (I = 1; I <= state.dataSurface->Surface(SurfNum).Sides; ++I) { - auto const &point = state.dataSurface->Surface(SurfNum).Vertex(I); + ShowSevereError(state, format("CalcCoordinateTransformation: Invalid dot product, surface=\"{}\":", surf.Name)); + for (I = 1; I <= surf.Sides; ++I) { + auto const &point = surf.Vertex(I); ShowContinueError(state, format(" ({:8.3F},{:8.3F},{:8.3F})", point.x, point.y, point.z)); } ShowFatalError( @@ -13831,8 +13790,7 @@ namespace SurfaceGeometry { Gamma = dot(x21, x23) / magnitude_squared(x23); - CompCoordTranslVector = state.dataSurface->Surface(SurfNum).Vertex(2) + - Gamma * (state.dataSurface->Surface(SurfNum).Vertex(3) - state.dataSurface->Surface(SurfNum).Vertex(2)); + CompCoordTranslVector = surf.Vertex(2) + Gamma * (surf.Vertex(3) - surf.Vertex(2)); } void CreateShadedWindowConstruction(EnergyPlusData &state, @@ -13998,12 +13956,11 @@ namespace SurfaceGeometry { for (int StormWinNum = 1; StormWinNum <= state.dataSurface->TotStormWin; ++StormWinNum) { int SurfNum = state.dataSurface->StormWindow(StormWinNum).BaseWindowNum; // Surface number - int ConstrNum = state.dataSurface->Surface(SurfNum).Construction; // Number of unshaded construction + auto &surf = state.dataSurface->Surface(SurfNum); + int ConstrNum = surf.Construction; // Number of unshaded construction // Fatal error if base construction has more than three glass layers if (state.dataConstruction->Construct(ConstrNum).TotGlassLayers > 3) { - ShowFatalError( - state, - format("Window={} has more than 3 glass layers; a storm window cannot be applied.", state.dataSurface->Surface(SurfNum).Name)); + ShowFatalError(state, format("Window={} has more than 3 glass layers; a storm window cannot be applied.", surf.Name)); } // create unshaded construction with storm window @@ -14022,11 +13979,10 @@ namespace SurfaceGeometry { state.dataSurface->SurfWinStormWinConstr(SurfNum) = ConstrNewSt; // create shaded constructions with storm window - state.dataSurface->Surface(SurfNum).shadedStormWinConstructionList.resize( - state.dataSurface->Surface(SurfNum).shadedConstructionList.size(), - 0); // make the shaded storm window size the same size as the number of shaded constructions - for (std::size_t iConstruction = 0; iConstruction < state.dataSurface->Surface(SurfNum).shadedConstructionList.size(); ++iConstruction) { - int curConstruction = state.dataSurface->Surface(SurfNum).shadedConstructionList[iConstruction]; + surf.shadedStormWinConstructionList.resize(surf.shadedConstructionList.size(), + 0); // make the shaded storm window size the same size as the number of shaded constructions + for (std::size_t iConstruction = 0; iConstruction < surf.shadedConstructionList.size(); ++iConstruction) { + int curConstruction = surf.shadedConstructionList[iConstruction]; // Set ShAndSt, which is true if the window has a shaded construction to which a storm window // can be added. (A storm window can be added if there is an interior shade or blind and up to three // glass layers, or there is a between-glass shade or blind and two glass layers.) @@ -14045,9 +14001,7 @@ namespace SurfaceGeometry { state.dataMaterial->Material(MatBetweenGlassSh)->group == Material::Group::WindowBlind) { ShAndSt = true; } else { - ShowContinueError(state, - format("Window={} has a shaded construction to which a storm window cannot be applied.", - state.dataSurface->Surface(SurfNum).Name)); + ShowContinueError(state, format("Window={} has a shaded construction to which a storm window cannot be applied.", surf.Name)); ShowContinueError(state, "Storm windows can only be applied to shaded constructions that:"); ShowContinueError(state, "have an interior shade or blind and up to three glass layers, or"); ShowContinueError(state, "have a between-glass shade or blind and two glass layers."); @@ -14055,12 +14009,12 @@ namespace SurfaceGeometry { } } if (ShAndSt) { + auto &surf = state.dataSurface->Surface(SurfNum); std::string ConstrNameStSh = "SHADEDCONSTRUCTIONWITHSTORMWIN:" + state.dataConstruction->Construct(iConstruction).Name + ":" + ChrNum; // Name of shaded construction with storm window int ConstrNewStSh = createConstructionWithStorm( state, ConstrNum, ConstrNameStSh, state.dataSurface->StormWindow(StormWinNum).StormWinMaterialNum, MatNewStAir); - state.dataSurface->Surface(SurfNum).shadedStormWinConstructionList[iConstruction] = - ConstrNewStSh; // put in same index as the shaded constuction + surf.shadedStormWinConstructionList[iConstruction] = ConstrNewStSh; // put in same index as the shaded constuction } } // end of loop for shaded constructions } // end of loop over storm window objects @@ -15245,20 +15199,20 @@ namespace SurfaceGeometry { // loop through all the surfaces for (SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; ++SurfNum) { - - Found = Util::FindItemInList(state.dataSurface->Surface(SurfNum).Name, TmpCandidateSurfaceNames, NumCandidateNames); + auto &surf = state.dataSurface->Surface(SurfNum); + Found = Util::FindItemInList(surf.Name, TmpCandidateSurfaceNames, NumCandidateNames); if (Found > 0) { - if (!state.dataSurface->Surface(SurfNum).HeatTransSurf) { // not BIPV, must be a shading surf with solar device + if (!surf.HeatTransSurf) { // not BIPV, must be a shading surf with solar device // Setup missing values to allow shading surfaces to model incident solar and wind - state.dataSurface->Surface(SurfNum).ExtSolar = true; - state.dataSurface->Surface(SurfNum).ExtWind = true; - state.dataSurface->Surface(SurfNum).ViewFactorGround = 0.5 * (1.0 - state.dataSurface->Surface(SurfNum).CosTilt); + surf.ExtSolar = true; + surf.ExtWind = true; + surf.ViewFactorGround = 0.5 * (1.0 - surf.CosTilt); } // check if this surface is used for ICS collector mounting and has OthersideCondictionsModel as its // boundary condition if (NumOfICSUnits > 0) { for (CollectorNum = 1; CollectorNum <= NumOfCollectors; ++CollectorNum) { - if (Util::SameString(state.dataSurface->Surface(SurfNum).Name, TmpCandidateICSSurfaceNames(CollectorNum)) && + if (Util::SameString(surf.Name, TmpCandidateICSSurfaceNames(CollectorNum)) && Util::SameString(TmpCandidateICSBCTypeNames(CollectorNum), "OTHERSIDECONDITIONSMODEL")) { state.dataSurface->SurfIsICS(SurfNum) = true; state.dataSurface->SurfICSPtr(SurfNum) = CollectorNum; @@ -15600,7 +15554,7 @@ namespace SurfaceGeometry { for (auto &thisEnclosure : state.dataViewFactor->EnclRadInfo) { SetupOutputVariable(state, "Enclosure Mean Radiant Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, thisEnclosure.MRT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -15891,12 +15845,13 @@ namespace SurfaceGeometry { Vector Vect32; // normalized vector from vertex 3 to vertex 2 Vector Vect21; // normalized vector from vertex 2 to vertex 1 - Diagonal1 = VecLength(state.dataSurface->Surface(ThisSurf).Vertex(1) - state.dataSurface->Surface(ThisSurf).Vertex(3)); - Diagonal2 = VecLength(state.dataSurface->Surface(ThisSurf).Vertex(2) - state.dataSurface->Surface(ThisSurf).Vertex(4)); + auto &surf = state.dataSurface->Surface(ThisSurf); + Diagonal1 = VecLength(surf.Vertex(1) - surf.Vertex(3)); + Diagonal2 = VecLength(surf.Vertex(2) - surf.Vertex(4)); // Test for rectangularity if (std::abs(Diagonal1 - Diagonal2) < 0.020) { // This tolerance based on coincident vertex tolerance of 0.01 - Vect32 = VecNormalize(state.dataSurface->Surface(ThisSurf).Vertex(3) - state.dataSurface->Surface(ThisSurf).Vertex(2)); - Vect21 = VecNormalize(state.dataSurface->Surface(ThisSurf).Vertex(2) - state.dataSurface->Surface(ThisSurf).Vertex(1)); + Vect32 = VecNormalize(surf.Vertex(3) - surf.Vertex(2)); + Vect21 = VecNormalize(surf.Vertex(2) - surf.Vertex(1)); DotProd = dot(Vect32, Vect21); if (std::abs(DotProd) <= cos89deg) { return true; @@ -15949,7 +15904,10 @@ namespace SurfaceGeometry { // invalid surface ErrorsFound = true; return; - } else if (state.dataSurface->Surface(SurfNum).Sides != 4) { + } + + auto &surf = state.dataSurface->Surface(SurfNum); + if (surf.Sides != 4) { // the method is designed for 4-sided surface return; } else if (isRectangle(state, SurfNum)) { @@ -15957,13 +15915,13 @@ namespace SurfaceGeometry { return; } - SurfWorldAz = state.dataSurface->Surface(SurfNum).Azimuth; - SurfTilt = state.dataSurface->Surface(SurfNum).Tilt; + SurfWorldAz = surf.Azimuth; + SurfTilt = surf.Tilt; BaseCosAzimuth = std::cos(SurfWorldAz * Constant::DegToRadians); BaseSinAzimuth = std::sin(SurfWorldAz * Constant::DegToRadians); BaseCosTilt = std::cos(SurfTilt * Constant::DegToRadians); BaseSinTilt = std::sin(SurfTilt * Constant::DegToRadians); - NumSurfSides = state.dataSurface->Surface(SurfNum).Sides; + NumSurfSides = surf.Sides; // Calculate WidthMax and HeightMax WidthMax = 0.0; @@ -15971,9 +15929,9 @@ namespace SurfaceGeometry { for (int i = 1; i < NumSurfSides; ++i) { for (int j = i + 1; j <= NumSurfSides; ++j) { - Xp = state.dataSurface->Surface(SurfNum).Vertex(j).x - state.dataSurface->Surface(SurfNum).Vertex(i).x; - Yp = state.dataSurface->Surface(SurfNum).Vertex(j).y - state.dataSurface->Surface(SurfNum).Vertex(i).y; - Zp = state.dataSurface->Surface(SurfNum).Vertex(j).z - state.dataSurface->Surface(SurfNum).Vertex(i).z; + Xp = surf.Vertex(j).x - surf.Vertex(i).x; + Yp = surf.Vertex(j).y - surf.Vertex(i).y; + Zp = surf.Vertex(j).z - surf.Vertex(i).z; XLLC = -Xp * BaseCosAzimuth + Yp * BaseSinAzimuth; YLLC = -Xp * BaseSinAzimuth * BaseCosTilt - Yp * BaseCosAzimuth * BaseCosTilt + Zp * BaseSinTilt; @@ -15990,12 +15948,12 @@ namespace SurfaceGeometry { } else { AspectRatio = 1; } - WidthEff = std::sqrt(state.dataSurface->Surface(SurfNum).Area * AspectRatio); - HeightEff = std::sqrt(state.dataSurface->Surface(SurfNum).Area / AspectRatio); + WidthEff = std::sqrt(surf.Area * AspectRatio); + HeightEff = std::sqrt(surf.Area / AspectRatio); // Assign the effective width and length to the surface - state.dataSurface->Surface(SurfNum).Width = WidthEff; - state.dataSurface->Surface(SurfNum).Height = HeightEff; + surf.Width = WidthEff; + surf.Height = HeightEff; } void CheckForReversedLayers(EnergyPlusData &state, diff --git a/src/EnergyPlus/SurfaceGeometry.hh b/src/EnergyPlus/SurfaceGeometry.hh index 4693b69ce5a..866c121047f 100644 --- a/src/EnergyPlus/SurfaceGeometry.hh +++ b/src/EnergyPlus/SurfaceGeometry.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SurfaceGroundHeatExchanger.cc b/src/EnergyPlus/SurfaceGroundHeatExchanger.cc index 9f6dbdf68b0..b7583eca88e 100644 --- a/src/EnergyPlus/SurfaceGroundHeatExchanger.cc +++ b/src/EnergyPlus/SurfaceGroundHeatExchanger.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -351,84 +351,84 @@ namespace SurfaceGroundHeatExchanger { for (Item = 1; Item <= NumOfSurfaceGHEs; ++Item) { SetupOutputVariable(state, "Ground Heat Exchanger Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).HeatTransferRate, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).Name); SetupOutputVariable(state, "Ground Heat Exchanger Surface Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).SurfHeatTransferRate, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).Name); SetupOutputVariable(state, "Ground Heat Exchanger Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).Energy, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Summed, state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).Name); SetupOutputVariable(state, "Ground Heat Exchanger Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).MassFlowRate, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).Name); SetupOutputVariable(state, "Ground Heat Exchanger Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).InletTemp, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).Name); SetupOutputVariable(state, "Ground Heat Exchanger Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).OutletTemp, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).Name); SetupOutputVariable(state, "Ground Heat Exchanger Top Surface Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).TopSurfaceTemp, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).Name); SetupOutputVariable(state, "Ground Heat Exchanger Bottom Surface Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).BtmSurfaceTemp, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).Name); SetupOutputVariable(state, "Ground Heat Exchanger Top Surface Heat Transfer Energy per Area", - OutputProcessor::Unit::J_m2, + Constant::Units::J_m2, state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).TopSurfaceFlux, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).Name); SetupOutputVariable(state, "Ground Heat Exchanger Bottom Surface Heat Transfer Energy per Area", - OutputProcessor::Unit::J_m2, + Constant::Units::J_m2, state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).BtmSurfaceFlux, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).Name); SetupOutputVariable(state, "Ground Heat Exchanger Surface Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).SurfEnergy, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Summed, state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).Name); SetupOutputVariable(state, "Ground Heat Exchanger Source Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).SourceTemp, OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/SurfaceGroundHeatExchanger.hh b/src/EnergyPlus/SurfaceGroundHeatExchanger.hh index efdb988c7e9..78b82b08a7f 100644 --- a/src/EnergyPlus/SurfaceGroundHeatExchanger.hh +++ b/src/EnergyPlus/SurfaceGroundHeatExchanger.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SurfaceOctree.cc b/src/EnergyPlus/SurfaceOctree.cc index 9703fd7e2be..f388639d418 100644 --- a/src/EnergyPlus/SurfaceOctree.cc +++ b/src/EnergyPlus/SurfaceOctree.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SurfaceOctree.hh b/src/EnergyPlus/SurfaceOctree.hh index eddd8d693f5..e33dacadebf 100644 --- a/src/EnergyPlus/SurfaceOctree.hh +++ b/src/EnergyPlus/SurfaceOctree.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SwimmingPool.cc b/src/EnergyPlus/SwimmingPool.cc index bf4a93bd902..cf3c0c418a4 100644 --- a/src/EnergyPlus/SwimmingPool.cc +++ b/src/EnergyPlus/SwimmingPool.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -643,164 +643,162 @@ void SwimmingPoolData::setupOutputVars(EnergyPlusData &state) { SetupOutputVariable(state, "Indoor Pool Makeup Water Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->MakeUpWaterVolFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Indoor Pool Makeup Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->MakeUpWaterVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::MainsWater, + OutputProcessor::SOVEndUseCat::Heating, {}, - "MainsWater", - "Heating", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Indoor Pool Makeup Water Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->CurMakeupWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Indoor Pool Water Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->PoolWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Indoor Pool Inlet Water Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->WaterInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Indoor Pool Inlet Water Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->WaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Indoor Pool Miscellaneous Equipment Power", - OutputProcessor::Unit::W, + Constant::Units::W, this->MiscEquipPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Indoor Pool Miscellaneous Equipment Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->MiscEquipEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name); SetupOutputVariable(state, "Indoor Pool Water Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->HeatPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Indoor Pool Water Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->HeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "ENERGYTRANSFER", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Indoor Pool Radiant to Convection by Cover", - OutputProcessor::Unit::W, + Constant::Units::W, this->RadConvertToConvect, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Indoor Pool People Heat Gain", - OutputProcessor::Unit::W, + Constant::Units::W, this->PeopleHeatGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Indoor Pool Current Activity Factor", - OutputProcessor::Unit::None, + Constant::Units::None, this->CurActivityFactor, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Indoor Pool Current Cover Factor", - OutputProcessor::Unit::None, + Constant::Units::None, this->CurCoverSchedVal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Indoor Pool Evaporative Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->EvapHeatLossRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Indoor Pool Evaporative Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->EvapEnergyLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name); SetupOutputVariable(state, "Indoor Pool Saturation Pressure at Pool Temperature", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, this->SatPressPoolWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Indoor Pool Partial Pressure of Water Vapor in Air", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, this->PartPressZoneAirTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Indoor Pool Current Cover Evaporation Factor", - OutputProcessor::Unit::None, + Constant::Units::None, this->CurCoverEvapFac, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Indoor Pool Current Cover Convective Factor", - OutputProcessor::Unit::None, + Constant::Units::None, this->CurCoverConvFac, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Indoor Pool Current Cover SW Radiation Factor", - OutputProcessor::Unit::None, + Constant::Units::None, this->CurCoverSWRadFac, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Indoor Pool Current Cover LW Radiation Factor", - OutputProcessor::Unit::None, + Constant::Units::None, this->CurCoverLWRadFac, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/SwimmingPool.hh b/src/EnergyPlus/SwimmingPool.hh index da0443f9428..57432f0e514 100644 --- a/src/EnergyPlus/SwimmingPool.hh +++ b/src/EnergyPlus/SwimmingPool.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SystemAvailabilityManager.cc b/src/EnergyPlus/SystemAvailabilityManager.cc index e7985de2f0d..74559ed2b25 100644 --- a/src/EnergyPlus/SystemAvailabilityManager.cc +++ b/src/EnergyPlus/SystemAvailabilityManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -461,7 +461,7 @@ namespace SystemAvailabilityManager { SetupOutputVariable(state, "Availability Manager Scheduled Control Status", - OutputProcessor::Unit::None, + Constant::Units::None, schedMgr.AvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -506,7 +506,7 @@ namespace SystemAvailabilityManager { SetupOutputVariable(state, "Availability Manager Scheduled On Control Status", - OutputProcessor::Unit::None, + Constant::Units::None, schedOnMgr.AvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -551,7 +551,7 @@ namespace SystemAvailabilityManager { SetupOutputVariable(state, "Availability Manager Scheduled Off Control Status", - OutputProcessor::Unit::None, + Constant::Units::None, schedOffMgr.AvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -751,7 +751,7 @@ namespace SystemAvailabilityManager { SetupOutputVariable(state, "Availability Manager Night Cycle Control Status", - OutputProcessor::Unit::None, + Constant::Units::None, nightCycleMgr.AvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -868,7 +868,7 @@ namespace SystemAvailabilityManager { SetupOutputVariable(state, "Availability Manager Optimum Start Control Status", - OutputProcessor::Unit::None, + Constant::Units::None, optimumStartMgr.AvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -877,12 +877,22 @@ namespace SystemAvailabilityManager { // add SetupOutputVariable(state, "Availability Manager Optimum Start Time Before Occupancy", - OutputProcessor::Unit::hr, + Constant::Units::hr, optimumStartMgr.NumHoursBeforeOccupancy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, optimumStartMgr.Name, - "Daily"); + Constant::eResource::Invalid, + OutputProcessor::SOVEndUseCat::Invalid, + {}, + OutputProcessor::SOVGroup::Invalid, + {}, // Zone + 1, + 1, + -999, + {}, // custom units + {}, // space type + OutputProcessor::ReportFreq::Day); } } @@ -958,7 +968,7 @@ namespace SystemAvailabilityManager { SetupOutputVariable(state, "Availability Manager Differential Thermostat Control Status", - OutputProcessor::Unit::None, + Constant::Units::None, diffThermoMgr.AvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1012,7 +1022,7 @@ namespace SystemAvailabilityManager { SetupOutputVariable(state, "Availability Manager High Temperature Turn Off Control Status", - OutputProcessor::Unit::None, + Constant::Units::None, hiTurnOffMgr.AvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1067,7 +1077,7 @@ namespace SystemAvailabilityManager { SetupOutputVariable(state, "Availability Manager High Temperature Turn On Control Status", - OutputProcessor::Unit::None, + Constant::Units::None, hiTurnOnMgr.AvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1133,7 +1143,7 @@ namespace SystemAvailabilityManager { SetupOutputVariable(state, "Availability Manager Low Temperature Turn Off Control Status", - OutputProcessor::Unit::None, + Constant::Units::None, loTurnOffMgr.AvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1188,7 +1198,7 @@ namespace SystemAvailabilityManager { SetupOutputVariable(state, "Availability Manager Low Temperature Turn On Control Status", - OutputProcessor::Unit::None, + Constant::Units::None, loTurnOnMgr.AvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1257,7 +1267,7 @@ namespace SystemAvailabilityManager { SetupOutputVariable(state, "Availability Manager Night Ventilation Control Status", - OutputProcessor::Unit::None, + Constant::Units::None, nightVentMgr.AvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -4287,14 +4297,14 @@ namespace SystemAvailabilityManager { if (state.dataSystemAvailabilityManager->HybridVentData(SysAvailNum).HybridVentMgrConnectedToAirLoop) { SetupOutputVariable(state, "Availability Manager Hybrid Ventilation Control Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSystemAvailabilityManager->HybridVentData(SysAvailNum).VentilationCtrl, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataSystemAvailabilityManager->HybridVentData(SysAvailNum).AirLoopName); SetupOutputVariable(state, "Availability Manager Hybrid Ventilation Control Mode", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSystemAvailabilityManager->HybridVentData(SysAvailNum).ControlMode, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -4302,14 +4312,14 @@ namespace SystemAvailabilityManager { } else { SetupOutputVariable(state, "Availability Manager Hybrid Ventilation Control Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSystemAvailabilityManager->HybridVentData(SysAvailNum).VentilationCtrl, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataSystemAvailabilityManager->HybridVentData(SysAvailNum).ControlZoneName); SetupOutputVariable(state, "Availability Manager Hybrid Ventilation Control Mode", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataSystemAvailabilityManager->HybridVentData(SysAvailNum).ControlMode, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -4319,7 +4329,7 @@ namespace SystemAvailabilityManager { if (state.dataSystemAvailabilityManager->HybridVentData(SysAvailNum).MinOperTime > 0) { SetupOutputVariable(state, "Hybrid Ventilation Control HVAC System Operation Elapsed Time", - OutputProcessor::Unit::min, + Constant::Units::min, state.dataSystemAvailabilityManager->HybridVentData(SysAvailNum).TimeOperDuration, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -4329,7 +4339,7 @@ namespace SystemAvailabilityManager { if (state.dataSystemAvailabilityManager->HybridVentData(SysAvailNum).MinVentTime > 0) { SetupOutputVariable(state, "Hybrid Ventilation Control Natural Ventilation Elapsed Time", - OutputProcessor::Unit::min, + Constant::Units::min, state.dataSystemAvailabilityManager->HybridVentData(SysAvailNum).TimeVentDuration, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -4342,21 +4352,21 @@ namespace SystemAvailabilityManager { state, state.dataSystemAvailabilityManager->HybridVentData(SysAvailNum).ControlModeSchedPtr, HybridVentMode_OperT90)) { SetupOutputVariable(state, "Hybrid Ventilation Operative Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSystemAvailabilityManager->HybridVentData(SysAvailNum).OperativeTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataSystemAvailabilityManager->HybridVentData(SysAvailNum).Name); SetupOutputVariable(state, "Hybrid Ventilation Lower Limit Operative Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSystemAvailabilityManager->HybridVentData(SysAvailNum).minAdaTem, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataSystemAvailabilityManager->HybridVentData(SysAvailNum).Name); SetupOutputVariable(state, "Hybrid Ventilation Upper Limit Operative Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataSystemAvailabilityManager->HybridVentData(SysAvailNum).maxAdaTem, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -4366,7 +4376,7 @@ namespace SystemAvailabilityManager { if (CheckScheduleValue(state, state.dataSystemAvailabilityManager->HybridVentData(SysAvailNum).ControlModeSchedPtr, HybridVentMode_CO2)) { SetupOutputVariable(state, "Hybrid Ventilation CO2 Concentration", - OutputProcessor::Unit::ppm, + Constant::Units::ppm, state.dataSystemAvailabilityManager->HybridVentData(SysAvailNum).CO2, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/SystemAvailabilityManager.hh b/src/EnergyPlus/SystemAvailabilityManager.hh index 3d7a294fd48..2e25c0f1580 100644 --- a/src/EnergyPlus/SystemAvailabilityManager.hh +++ b/src/EnergyPlus/SystemAvailabilityManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SystemReports.cc b/src/EnergyPlus/SystemReports.cc index 07a37a65c1e..6b0224d10b7 100644 --- a/src/EnergyPlus/SystemReports.cc +++ b/src/EnergyPlus/SystemReports.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -313,7 +313,7 @@ void InitEnergyReports(EnergyPlusData &state) if (ListNum > 0 && AirDistUnitNum > 0) { auto &thisZoneEquipList = state.dataZoneEquip->ZoneEquipList(ListNum); for (int VarNum = 1; VarNum <= thisZoneEquipList.EquipData(AirDistUnitNum).NumMeteredVars; ++VarNum) { - if (thisZoneEquipList.EquipData(AirDistUnitNum).MeteredVar(VarNum).ResourceType == Constant::eResource::EnergyTransfer) { + if (thisZoneEquipList.EquipData(AirDistUnitNum).MeteredVar(VarNum).resource == Constant::eResource::EnergyTransfer) { thisZoneEquipList.EquipData(AirDistUnitNum).EnergyTransComp = EnergyTransfer; const std::string &CompType = thisZoneEquipList.EquipData(AirDistUnitNum).TypeOf; const std::string &CompName = thisZoneEquipList.EquipData(AirDistUnitNum).Name; @@ -333,7 +333,7 @@ void InitEnergyReports(EnergyPlusData &state) for (int SubEquipNum = 1; SubEquipNum <= thisZoneEquipList.EquipData(AirDistUnitNum).NumSubEquip; ++SubEquipNum) { for (int VarNum = 1; VarNum <= thisZoneEquipList.EquipData(AirDistUnitNum).SubEquipData(SubEquipNum).NumMeteredVars; ++VarNum) { - if (thisZoneEquipList.EquipData(AirDistUnitNum).SubEquipData(SubEquipNum).MeteredVar(VarNum).ResourceType == + if (thisZoneEquipList.EquipData(AirDistUnitNum).SubEquipData(SubEquipNum).MeteredVar(VarNum).resource == Constant::eResource::EnergyTransfer) { thisZoneEquipList.EquipData(AirDistUnitNum).SubEquipData(SubEquipNum).EnergyTransComp = EnergyTransfer; const std::string &CompType = thisZoneEquipList.EquipData(AirDistUnitNum).SubEquipData(SubEquipNum).TypeOf; @@ -363,7 +363,7 @@ void InitEnergyReports(EnergyPlusData &state) .SubEquipData(SubEquipNum) .SubSubEquipData(SubSubEquipNum) .MeteredVar(VarNum) - .ResourceType == Constant::eResource::EnergyTransfer) { + .resource == Constant::eResource::EnergyTransfer) { thisZoneEquipList.EquipData(AirDistUnitNum) .SubEquipData(SubEquipNum) .SubSubEquipData(SubSubEquipNum) @@ -910,25 +910,25 @@ void InitEnergyReports(EnergyPlusData &state) auto &pasBranchComp = pasBranch.Comp(CompNum); for (int VarNum = 1; VarNum <= pasBranchComp.NumMeteredVars; ++VarNum) { auto &pasBranchCompMeter = pasBranchComp.MeteredVar(VarNum); - OutputProcessor::VariableType VarType = pasBranchCompMeter.ReportVarType; - int VarIndex = pasBranchCompMeter.ReportVarIndex; - pasBranchCompMeter.CurMeterReading = GetInternalVariableValue(state, VarType, VarIndex); + OutputProcessor::VariableType VarType = pasBranchCompMeter.varType; + int VarIndex = pasBranchCompMeter.num; + pasBranchCompMeter.curMeterReading = GetInternalVariableValue(state, VarType, VarIndex); } for (int SubCompNum = 1; SubCompNum <= pasBranchComp.NumSubComps; ++SubCompNum) { auto &pasBranchSubComp = pasBranchComp.SubComp(SubCompNum); for (int VarNum = 1; VarNum <= pasBranchSubComp.NumMeteredVars; ++VarNum) { auto &pasBranchSubCompMeter = pasBranchSubComp.MeteredVar(VarNum); - OutputProcessor::VariableType VarType = pasBranchSubCompMeter.ReportVarType; - int VarIndex = pasBranchSubCompMeter.ReportVarIndex; - pasBranchSubCompMeter.CurMeterReading = GetInternalVariableValue(state, VarType, VarIndex); + OutputProcessor::VariableType VarType = pasBranchSubCompMeter.varType; + int VarIndex = pasBranchSubCompMeter.num; + pasBranchSubCompMeter.curMeterReading = GetInternalVariableValue(state, VarType, VarIndex); } for (int SubSubCompNum = 1; SubSubCompNum <= pasBranchSubComp.NumSubSubComps; ++SubSubCompNum) { auto &pasBranchSubSubComp = pasBranchSubComp.SubSubComp(SubSubCompNum); for (int VarNum = 1; VarNum <= pasBranchSubSubComp.NumMeteredVars; ++VarNum) { auto &pasBranchSubSubCompMeter = pasBranchSubSubComp.MeteredVar(VarNum); - OutputProcessor::VariableType VarType = pasBranchSubSubCompMeter.ReportVarType; - int VarIndex = pasBranchSubSubCompMeter.ReportVarIndex; - pasBranchSubSubCompMeter.CurMeterReading = GetInternalVariableValue(state, VarType, VarIndex); + OutputProcessor::VariableType VarType = pasBranchSubSubCompMeter.varType; + int VarIndex = pasBranchSubSubCompMeter.num; + pasBranchSubSubCompMeter.curMeterReading = GetInternalVariableValue(state, VarType, VarIndex); } } } @@ -944,25 +944,25 @@ void InitEnergyReports(EnergyPlusData &state) auto &zelEquipData = zel.EquipData(CompNum); for (int VarNum = 1; VarNum <= zelEquipData.NumMeteredVars; ++VarNum) { auto &zelEquipDataMeter = zelEquipData.MeteredVar(VarNum); - OutputProcessor::VariableType VarType = zelEquipDataMeter.ReportVarType; - int VarIndex = zelEquipDataMeter.ReportVarIndex; - zelEquipDataMeter.CurMeterReading = GetInternalVariableValue(state, VarType, VarIndex); + OutputProcessor::VariableType VarType = zelEquipDataMeter.varType; + int VarIndex = zelEquipDataMeter.num; + zelEquipDataMeter.curMeterReading = GetInternalVariableValue(state, VarType, VarIndex); } for (int SubCompNum = 1; SubCompNum <= zelEquipData.NumSubEquip; ++SubCompNum) { auto &zelSubEquipData = zelEquipData.SubEquipData(SubCompNum); for (int VarNum = 1; VarNum <= zelSubEquipData.NumMeteredVars; ++VarNum) { auto &zelSubEquipDataMeter = zelSubEquipData.MeteredVar(VarNum); - OutputProcessor::VariableType VarType = zelSubEquipDataMeter.ReportVarType; - int VarIndex = zelSubEquipDataMeter.ReportVarIndex; - zelSubEquipDataMeter.CurMeterReading = GetInternalVariableValue(state, VarType, VarIndex); + OutputProcessor::VariableType VarType = zelSubEquipDataMeter.varType; + int VarIndex = zelSubEquipDataMeter.num; + zelSubEquipDataMeter.curMeterReading = GetInternalVariableValue(state, VarType, VarIndex); } for (int SubSubCompNum = 1; SubSubCompNum <= zelSubEquipData.NumSubSubEquip; ++SubSubCompNum) { auto &zelSubSubEquipData = zelSubEquipData.SubSubEquipData(SubSubCompNum); for (int VarNum = 1; VarNum <= zelSubSubEquipData.NumMeteredVars; ++VarNum) { auto &zelSubSubEquipDataMeter = zelSubSubEquipData.MeteredVar(VarNum); - OutputProcessor::VariableType VarType = zelSubSubEquipDataMeter.ReportVarType; - int VarIndex = zelSubSubEquipDataMeter.ReportVarIndex; - zelSubSubEquipDataMeter.CurMeterReading = GetInternalVariableValue(state, VarType, VarIndex); // Sankar Corrected zone array + OutputProcessor::VariableType VarType = zelSubSubEquipDataMeter.varType; + int VarIndex = zelSubSubEquipDataMeter.num; + zelSubSubEquipDataMeter.curMeterReading = GetInternalVariableValue(state, VarType, VarIndex); // Sankar Corrected zone array } } } @@ -979,9 +979,9 @@ void InitEnergyReports(EnergyPlusData &state) auto &vrpBranchComp = vrpBranch.Comp(CompNum); for (int VarNum = 1; VarNum <= vrpBranchComp.NumMeteredVars; ++VarNum) { auto &vrpBranchCompMeter = vrpBranchComp.MeteredVar(VarNum); - OutputProcessor::VariableType VarType = vrpBranchCompMeter.ReportVarType; - int VarIndex = vrpBranchCompMeter.ReportVarIndex; - vrpBranchCompMeter.CurMeterReading = GetInternalVariableValue(state, VarType, VarIndex); + OutputProcessor::VariableType VarType = vrpBranchCompMeter.varType; + int VarIndex = vrpBranchCompMeter.num; + vrpBranchCompMeter.curMeterReading = GetInternalVariableValue(state, VarType, VarIndex); } } } @@ -996,9 +996,9 @@ void InitEnergyReports(EnergyPlusData &state) auto &vrcBranchComp = vrcBranch.Comp(CompNum); for (int VarNum = 1; VarNum <= vrcBranchComp.NumMeteredVars; ++VarNum) { auto &vrcBranchCompMeter = vrcBranchComp.MeteredVar(VarNum); - OutputProcessor::VariableType VarType = vrcBranchCompMeter.ReportVarType; - int VarIndex = vrcBranchCompMeter.ReportVarIndex; - vrcBranchCompMeter.CurMeterReading = GetInternalVariableValue(state, VarType, VarIndex); + OutputProcessor::VariableType VarType = vrcBranchCompMeter.varType; + int VarIndex = vrcBranchCompMeter.num; + vrcBranchCompMeter.curMeterReading = GetInternalVariableValue(state, VarType, VarIndex); } } } @@ -1613,7 +1613,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) // SYSTEM LOADS REPORT SetupOutputVariable(state, "Air System Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.TotHTNG, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1621,7 +1621,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.TotCLNG, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1630,7 +1630,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) // SYSTEM ENERGY USE REPORT SetupOutputVariable(state, "Air System Hot Water Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.TotH2OHOT, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1638,7 +1638,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Steam Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.TotSteam, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1646,7 +1646,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Chilled Water Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.TotH2OCOLD, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1654,7 +1654,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.TotElec, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1662,7 +1662,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System NaturalGas Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.TotNaturalGas, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1670,7 +1670,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Propane Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.TotPropane, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1678,7 +1678,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisSysLoadRepVars.DomesticH2O, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1687,7 +1687,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) // SYSTEM COMPONENT LOAD REPORT SetupOutputVariable(state, "Air System Fan Air Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.FANCompHTNG, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1695,7 +1695,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Cooling Coil Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.CCCompCLNG, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1703,7 +1703,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Heating Coil Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.HCCompHTNG, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1711,7 +1711,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Heat Exchanger Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.HeatExHTNG, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1719,7 +1719,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Heat Exchanger Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.HeatExCLNG, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1727,7 +1727,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Solar Collector Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.SolarCollectHeating, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1735,7 +1735,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Solar Collector Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.SolarCollectCooling, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1743,7 +1743,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System User Defined Air Terminal Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.UserDefinedTerminalHeating, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1751,7 +1751,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System User Defined Air Terminal Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.UserDefinedTerminalCooling, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1759,7 +1759,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Humidifier Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.HumidHTNG, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1767,7 +1767,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Evaporative Cooler Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.EvapCLNG, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1775,7 +1775,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Desiccant Dehumidifier Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.DesDehumidCLNG, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1784,7 +1784,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) // SYSTEM COMPONENT ENERGY REPORT SetupOutputVariable(state, "Air System Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.FANCompElec, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1792,7 +1792,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Heating Coil Hot Water Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.HCCompH2OHOT, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1800,7 +1800,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Cooling Coil Chilled Water Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.CCCompH2OCOLD, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1808,7 +1808,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System DX Heating Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.HCCompElec, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1816,7 +1816,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System DX Cooling Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.CCCompElec, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1824,7 +1824,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Heating Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.HCCompElecRes, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1832,7 +1832,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Heating Coil NaturalGas Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.HCCompNaturalGas, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1840,7 +1840,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Heating Coil Propane Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.HCCompPropane, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1848,7 +1848,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Heating Coil Steam Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.HCCompSteam, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1856,7 +1856,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Humidifier Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.HumidElec, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1864,7 +1864,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Humidifier NaturalGas Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.HumidNaturalGas, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1872,7 +1872,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Humidifier Propane Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.HumidPropane, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1880,7 +1880,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Evaporative Cooler Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.EvapElec, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1888,7 +1888,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Desiccant Dehumidifier Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisSysLoadRepVars.DesDehumidElec, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1896,7 +1896,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Mechanical Ventilation Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, thisSysVentRepVars.MechVentFlow, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, @@ -1904,7 +1904,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Natural Ventilation Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, thisSysVentRepVars.NatVentFlow, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, @@ -1912,7 +1912,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Target Voz Ventilation Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, thisSysVentRepVars.TargetVentilationFlowVoz, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, @@ -1920,7 +1920,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Ventilation Below Target Voz Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, thisSysVentRepVars.TimeBelowVozDyn, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1928,7 +1928,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Ventilation At Target Voz Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, thisSysVentRepVars.TimeAtVozDyn, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1936,7 +1936,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Ventilation Above Target Voz Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, thisSysVentRepVars.TimeAboveVozDyn, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1944,7 +1944,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Air System Ventilation When Unoccupied Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, thisSysVentRepVars.TimeVentUnocc, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1960,7 +1960,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) // Cooling Loads SetupOutputVariable(state, "Zone Mechanical Ventilation No Load Heat Removal Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZoneVentRepVars.NoLoadCoolingByVent, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1968,7 +1968,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Zone Mechanical Ventilation Cooling Load Increase Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZoneVentRepVars.CoolingLoadAddedByVent, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1976,7 +1976,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Zone Mechanical Ventilation Cooling Load Increase Due to Overheating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZoneVentRepVars.OverheatingByVent, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1984,7 +1984,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Zone Mechanical Ventilation Cooling Load Decrease Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZoneVentRepVars.CoolingLoadMetByVent, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -1992,7 +1992,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) // Heating Loads SetupOutputVariable(state, "Zone Mechanical Ventilation No Load Heat Addition Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZoneVentRepVars.NoLoadHeatingByVent, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -2000,7 +2000,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Zone Mechanical Ventilation Heating Load Increase Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZoneVentRepVars.HeatingLoadAddedByVent, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -2008,7 +2008,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Zone Mechanical Ventilation Heating Load Increase Due to Overcooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZoneVentRepVars.OvercoolingByVent, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -2016,7 +2016,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Zone Mechanical Ventilation Heating Load Decrease Energy", - OutputProcessor::Unit::J, + Constant::Units::J, thisZoneVentRepVars.HeatingLoadMetByVent, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -2025,7 +2025,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Zone Mechanical Ventilation Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, thisZoneVentRepVars.OAMassFlow, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, @@ -2033,7 +2033,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Zone Mechanical Ventilation Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, thisZoneVentRepVars.OAMass, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -2041,7 +2041,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Zone Mechanical Ventilation Standard Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, thisZoneVentRepVars.OAVolFlowStdRho, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, @@ -2049,7 +2049,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Zone Mechanical Ventilation Standard Density Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisZoneVentRepVars.OAVolStdRho, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -2057,7 +2057,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Zone Mechanical Ventilation Current Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, thisZoneVentRepVars.OAVolFlowCrntRho, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, @@ -2065,7 +2065,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Zone Mechanical Ventilation Current Density Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, thisZoneVentRepVars.OAVolCrntRho, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -2073,7 +2073,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Zone Mechanical Ventilation Air Changes per Hour", - OutputProcessor::Unit::ach, + Constant::Units::ach, thisZoneVentRepVars.MechACH, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, @@ -2081,7 +2081,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Zone Target Voz Ventilation Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, thisZoneVentRepVars.TargetVentilationFlowVoz, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Average, @@ -2089,7 +2089,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Zone Ventilation Below Target Voz Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, thisZoneVentRepVars.TimeBelowVozDyn, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -2097,7 +2097,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Zone Ventilation At Target Voz Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, thisZoneVentRepVars.TimeAtVozDyn, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -2105,7 +2105,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Zone Ventilation Above Target Voz Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, thisZoneVentRepVars.TimeAboveVozDyn, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -2113,7 +2113,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Zone Ventilation When Unoccupied Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, thisZoneVentRepVars.TimeVentUnocc, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -2123,7 +2123,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) // Facility outputs SetupOutputVariable(state, "Facility Any Zone Ventilation Below Target Voz Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataSysRpts->AnyZoneTimeBelowVozDyn, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -2131,7 +2131,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Facility All Zones Ventilation At Target Voz Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataSysRpts->AllZonesTimeAtVozDyn, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -2139,7 +2139,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Facility Any Zone Ventilation Above Target Voz Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataSysRpts->AnyZoneTimeAboveVozDyn, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -2147,7 +2147,7 @@ void AllocateAndSetUpVentReports(EnergyPlusData &state) SetupOutputVariable(state, "Facility Any Zone Ventilation When Unoccupied Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataSysRpts->AnyZoneTimeVentUnocc, OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::SOVStoreType::Summed, @@ -2198,16 +2198,7 @@ void CreateEnergyReportStructure(EnergyPlusData &state) bool IsParent; // Dimension GetMeteredVariables arrays - Array1D_int VarIndexes; // Variable Numbers - Array1D VarTypes; // Variable Types (1=integer, 2=real, 3=meter) - Array1D_string UnitsStrings; // UnitsStrings for each variable - Array1D IndexTypes; // Variable Idx Types (1=Zone,2=HVAC) - Array1D unitsForVar; // units from enum for each variable - Array1D ResourceTypes; // ResourceTypes for each variable - Array1D_string EndUses; // EndUses for each variable - Array1D_string Groups; // Groups for each variable - Array1D_string Names; // Variable Names for each variable - int NumFound; // Number Found + Array1D meteredVars; int NumVariables; int NumLeft; // Counter for deeper components @@ -2357,65 +2348,33 @@ void CreateEnergyReportStructure(EnergyPlusData &state) std::string &NameOfComp = thisComp.Name; NumVariables = GetNumMeteredVariables(state, TypeOfComp, NameOfComp); if (NumVariables > 0) { - VarIndexes.allocate(NumVariables); - VarTypes.allocate(NumVariables); - IndexTypes.allocate(NumVariables); - unitsForVar.allocate(NumVariables); - ResourceTypes.allocate(NumVariables); - EndUses.allocate(NumVariables); - Groups.allocate(NumVariables); - Names.allocate(NumVariables); + meteredVars.allocate(NumVariables); thisComp.MeteredVar.allocate(NumVariables); thisComp.NumMeteredVars = NumVariables; - GetMeteredVariables(state, - TypeOfComp, - NameOfComp, - VarIndexes, - VarTypes, - IndexTypes, - unitsForVar, - ResourceTypes, - EndUses, - Groups, - Names, - NumFound); + GetMeteredVariables(state, NameOfComp, meteredVars); ModeFlagOn = true; for (VarNum = 1; VarNum <= NumVariables; ++VarNum) { { + thisComp.MeteredVar(VarNum) = meteredVars(VarNum); // Copy auto &thisVar = thisComp.MeteredVar(VarNum); - thisVar.ReportVarName = Names(VarNum); - thisVar.ReportVarUnits = unitsForVar(VarNum); - thisVar.ReportVarIndex = VarIndexes(VarNum); - thisVar.ReportVarIndexType = IndexTypes(VarNum); - thisVar.ReportVarType = VarTypes(VarNum); - thisVar.ResourceType = ResourceTypes(VarNum); - thisVar.EndUse = EndUses(VarNum); - if (thisVar.EndUse == "HEATINGCOILS" && ModeFlagOn) { + if (thisVar.sovEndUseCat == OutputProcessor::SOVEndUseCat::HeatingCoils && ModeFlagOn) { for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { - thisComp.MeteredVar(VarNum1).EndUse_CompMode = EndUseType::HeatingOnly; + thisComp.MeteredVar(VarNum1).heatOrCool = Constant::HeatOrCool::HeatingOnly; } ModeFlagOn = false; - } else if (thisVar.EndUse == "COOLINGCOILS" && ModeFlagOn) { + } else if (thisVar.sovEndUseCat == OutputProcessor::SOVEndUseCat::CoolingCoils && ModeFlagOn) { for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { - thisComp.MeteredVar(VarNum1).EndUse_CompMode = EndUseType::CoolingOnly; + thisComp.MeteredVar(VarNum1).heatOrCool = Constant::HeatOrCool::CoolingOnly; } ModeFlagOn = false; } else if (ModeFlagOn) { - thisVar.EndUse_CompMode = EndUseType::NoHeatNoCool; + thisVar.heatOrCool = Constant::HeatOrCool::NoHeatNoCool; } - thisVar.Group = Groups(VarNum); } } - VarIndexes.deallocate(); - VarTypes.deallocate(); - IndexTypes.deallocate(); - unitsForVar.deallocate(); - ResourceTypes.deallocate(); - EndUses.deallocate(); - Groups.deallocate(); - Names.deallocate(); + meteredVars.deallocate(); } for (SubCompNum = 1; SubCompNum <= thisComp.NumSubComps; ++SubCompNum) { // Get complete list of components for complex branches @@ -2423,64 +2382,32 @@ void CreateEnergyReportStructure(EnergyPlusData &state) std::string &NameOfSubComp = thisComp.SubComp(SubCompNum).Name; NumVariables = GetNumMeteredVariables(state, TypeOfSubComp, NameOfSubComp); if (NumVariables > 0) { - VarIndexes.allocate(NumVariables); - VarTypes.allocate(NumVariables); - IndexTypes.allocate(NumVariables); - unitsForVar.allocate(NumVariables); - ResourceTypes.allocate(NumVariables); - EndUses.allocate(NumVariables); - Groups.allocate(NumVariables); - Names.allocate(NumVariables); + meteredVars.allocate(NumVariables); thisComp.SubComp(SubCompNum).MeteredVar.allocate(NumVariables); - GetMeteredVariables(state, - TypeOfSubComp, - NameOfSubComp, - VarIndexes, - VarTypes, - IndexTypes, - unitsForVar, - ResourceTypes, - EndUses, - Groups, - Names, - NumFound); - + GetMeteredVariables(state, NameOfSubComp, meteredVars); ModeFlagOn = true; for (VarNum = 1; VarNum <= NumVariables; ++VarNum) { { + thisComp.SubComp(SubCompNum).MeteredVar(VarNum) = meteredVars(VarNum); auto &thisVar = thisComp.SubComp(SubCompNum).MeteredVar(VarNum); - thisVar.ReportVarName = Names(VarNum); - thisVar.ReportVarUnits = unitsForVar(VarNum); - thisVar.ReportVarIndex = VarIndexes(VarNum); - thisVar.ReportVarIndexType = IndexTypes(VarNum); - thisVar.ReportVarType = VarTypes(VarNum); - thisVar.ResourceType = ResourceTypes(VarNum); - thisVar.EndUse = EndUses(VarNum); - if (thisVar.EndUse == "HEATINGCOILS" && ModeFlagOn) { + if (thisVar.sovEndUseCat == OutputProcessor::SOVEndUseCat::HeatingCoils && ModeFlagOn) { for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { - thisComp.SubComp(SubCompNum).MeteredVar(VarNum1).EndUse_CompMode = EndUseType::HeatingOnly; + thisComp.SubComp(SubCompNum).MeteredVar(VarNum1).heatOrCool = Constant::HeatOrCool::HeatingOnly; } ModeFlagOn = false; - } else if (thisVar.EndUse == "COOLINGCOILS" && ModeFlagOn) { + } else if (thisVar.sovEndUseCat == OutputProcessor::SOVEndUseCat::CoolingCoils && ModeFlagOn) { for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { - thisComp.SubComp(SubCompNum).MeteredVar(VarNum1).EndUse_CompMode = EndUseType::CoolingOnly; + thisComp.SubComp(SubCompNum).MeteredVar(VarNum1).heatOrCool = Constant::HeatOrCool::CoolingOnly; } ModeFlagOn = false; } else if (ModeFlagOn) { - thisVar.EndUse_CompMode = EndUseType::NoHeatNoCool; + thisVar.heatOrCool = Constant::HeatOrCool::NoHeatNoCool; } - thisVar.Group = Groups(VarNum); } } - VarIndexes.deallocate(); - VarTypes.deallocate(); - IndexTypes.deallocate(); - unitsForVar.deallocate(); - EndUses.deallocate(); - Groups.deallocate(); - Names.deallocate(); + meteredVars.deallocate(); } thisComp.SubComp(SubCompNum).NumMeteredVars = NumVariables; @@ -2491,66 +2418,34 @@ void CreateEnergyReportStructure(EnergyPlusData &state) std::string &NameOfSubSubComp = thisComp.SubComp(SubCompNum).SubSubComp(SubSubCompNum).Name; NumVariables = GetNumMeteredVariables(state, TypeOfSubSubComp, NameOfSubSubComp); if (NumVariables > 0) { - VarIndexes.allocate(NumVariables); - VarTypes.allocate(NumVariables); - IndexTypes.allocate(NumVariables); - unitsForVar.allocate(NumVariables); - ResourceTypes.allocate(NumVariables); - EndUses.allocate(NumVariables); - Groups.allocate(NumVariables); - Names.allocate(NumVariables); + meteredVars.allocate(NumVariables); thisComp.SubComp(SubCompNum).SubSubComp(SubSubCompNum).MeteredVar.allocate(NumVariables); - GetMeteredVariables(state, - TypeOfSubSubComp, - NameOfSubSubComp, - VarIndexes, - VarTypes, - IndexTypes, - unitsForVar, - ResourceTypes, - EndUses, - Groups, - Names, - NumFound); - + GetMeteredVariables(state, NameOfSubSubComp, meteredVars); ModeFlagOn = true; for (VarNum = 1; VarNum <= NumVariables; ++VarNum) { { + thisComp.SubComp(SubCompNum).SubSubComp(SubSubCompNum).MeteredVar(VarNum) = meteredVars(VarNum); auto &thisVar = thisComp.SubComp(SubCompNum).SubSubComp(SubSubCompNum).MeteredVar(VarNum); - thisVar.ReportVarName = Names(VarNum); - thisVar.ReportVarUnits = unitsForVar(VarNum); - thisVar.ReportVarIndex = VarIndexes(VarNum); - thisVar.ReportVarIndexType = IndexTypes(VarNum); - thisVar.ReportVarType = VarTypes(VarNum); - thisVar.ResourceType = ResourceTypes(VarNum); - thisVar.EndUse = EndUses(VarNum); - if (thisVar.EndUse == "HEATINGCOILS" && ModeFlagOn) { + if (thisVar.sovEndUseCat == OutputProcessor::SOVEndUseCat::HeatingCoils && ModeFlagOn) { for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { - thisComp.SubComp(SubCompNum).SubSubComp(SubSubCompNum).MeteredVar(VarNum1).EndUse_CompMode = - EndUseType::HeatingOnly; + thisComp.SubComp(SubCompNum).SubSubComp(SubSubCompNum).MeteredVar(VarNum1).heatOrCool = + Constant::HeatOrCool::HeatingOnly; } ModeFlagOn = false; - } else if (thisVar.EndUse == "COOLINGCOILS" && ModeFlagOn) { + } else if (thisVar.sovEndUseCat == OutputProcessor::SOVEndUseCat::CoolingCoils && ModeFlagOn) { for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { - thisComp.SubComp(SubCompNum).SubSubComp(SubSubCompNum).MeteredVar(VarNum1).EndUse_CompMode = - EndUseType::CoolingOnly; + thisComp.SubComp(SubCompNum).SubSubComp(SubSubCompNum).MeteredVar(VarNum1).heatOrCool = + Constant::HeatOrCool::CoolingOnly; } ModeFlagOn = false; } else if (ModeFlagOn) { - thisVar.EndUse_CompMode = EndUseType::NoHeatNoCool; + thisVar.heatOrCool = Constant::HeatOrCool::NoHeatNoCool; } - thisVar.Group = Groups(VarNum); } } - VarIndexes.deallocate(); - VarTypes.deallocate(); - IndexTypes.deallocate(); - unitsForVar.deallocate(); - EndUses.deallocate(); - Groups.deallocate(); - Names.deallocate(); + meteredVars.deallocate(); } thisComp.SubComp(SubCompNum).SubSubComp(SubSubCompNum).NumMeteredVars = NumVariables; } @@ -2602,64 +2497,33 @@ void CreateEnergyReportStructure(EnergyPlusData &state) OutletNodeNumbers.deallocate(); OutletFluidStreams.deallocate(); - VarIndexes.allocate(NumVariables); - VarTypes.allocate(NumVariables); - IndexTypes.allocate(NumVariables); - unitsForVar.allocate(NumVariables); - ResourceTypes.allocate(NumVariables); - EndUses.allocate(NumVariables); - Groups.allocate(NumVariables); - Names.allocate(NumVariables); + meteredVars.allocate(NumVariables); thisEquipData.MeteredVar.allocate(NumVariables); - GetMeteredVariables(state, - TypeOfComp, - NameOfComp, - VarIndexes, - VarTypes, - IndexTypes, - unitsForVar, - ResourceTypes, - EndUses, - Groups, - Names, - NumFound); + GetMeteredVariables(state, NameOfComp, meteredVars); ModeFlagOn = true; for (VarNum = 1; VarNum <= NumVariables; ++VarNum) { { + thisEquipData.MeteredVar(VarNum) = meteredVars(VarNum); auto &thisVar = thisEquipData.MeteredVar(VarNum); - thisVar.ReportVarName = Names(VarNum); - thisVar.ReportVarUnits = unitsForVar(VarNum); - thisVar.ReportVarIndex = VarIndexes(VarNum); - thisVar.ReportVarIndexType = IndexTypes(VarNum); - thisVar.ReportVarType = VarTypes(VarNum); - thisVar.ResourceType = ResourceTypes(VarNum); - thisVar.EndUse = EndUses(VarNum); - if (thisVar.EndUse == "HEATINGCOILS" && ModeFlagOn) { + if (thisVar.sovEndUseCat == OutputProcessor::SOVEndUseCat::HeatingCoils && ModeFlagOn) { for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { - thisEquipData.MeteredVar(VarNum1).EndUse_CompMode = EndUseType::HeatingOnly; + thisEquipData.MeteredVar(VarNum1).heatOrCool = Constant::HeatOrCool::HeatingOnly; } ModeFlagOn = false; - } else if (thisVar.EndUse == "COOLINGCOILS" && ModeFlagOn) { + } else if (thisVar.sovEndUseCat == OutputProcessor::SOVEndUseCat::CoolingCoils && ModeFlagOn) { for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { - thisEquipData.MeteredVar(VarNum1).EndUse_CompMode = EndUseType::CoolingOnly; + thisEquipData.MeteredVar(VarNum1).heatOrCool = Constant::HeatOrCool::CoolingOnly; } ModeFlagOn = false; } else if (ModeFlagOn) { - thisVar.EndUse_CompMode = EndUseType::NoHeatNoCool; + thisVar.heatOrCool = Constant::HeatOrCool::NoHeatNoCool; } - thisVar.Group = Groups(VarNum); } } - VarIndexes.deallocate(); - VarTypes.deallocate(); - IndexTypes.deallocate(); - unitsForVar.deallocate(); - EndUses.deallocate(); - Groups.deallocate(); - Names.deallocate(); + meteredVars.deallocate(); } if (BranchNodeConnections::IsParentObject(state, TypeOfCompNum, NameOfComp)) { @@ -2748,156 +2612,87 @@ void CreateEnergyReportStructure(EnergyPlusData &state) } else { NumGrandChildren = 0; } - } + } // for (SubCompNum) } - } - } + } // for (CompNum) + } // for (CtrlZoneNum) for (CtrlZoneNum = 1; CtrlZoneNum <= state.dataGlobal->NumOfZones; ++CtrlZoneNum) { if (!state.dataZoneEquip->ZoneEquipConfig(CtrlZoneNum).IsControlled) continue; for (CompNum = 1; CompNum <= state.dataZoneEquip->ZoneEquipList(CtrlZoneNum).NumOfEquipTypes; ++CompNum) { for (SubCompNum = 1; SubCompNum <= state.dataZoneEquip->ZoneEquipList(CtrlZoneNum).EquipData(CompNum).NumSubEquip; ++SubCompNum) { - { - auto &thisSubEquipData = state.dataZoneEquip->ZoneEquipList(CtrlZoneNum).EquipData(CompNum).SubEquipData(SubCompNum); - std::string &TypeOfSubComp = thisSubEquipData.TypeOf; - std::string &NameOfSubComp = thisSubEquipData.Name; + auto &thisSubEquipData = state.dataZoneEquip->ZoneEquipList(CtrlZoneNum).EquipData(CompNum).SubEquipData(SubCompNum); + std::string &TypeOfSubComp = thisSubEquipData.TypeOf; + std::string &NameOfSubComp = thisSubEquipData.Name; - NumVariables = GetNumMeteredVariables(state, TypeOfSubComp, NameOfSubComp); - thisSubEquipData.NumMeteredVars = NumVariables; // Sankar added this line - if (NumVariables > 0) { - VarIndexes.allocate(NumVariables); - VarTypes.allocate(NumVariables); - IndexTypes.allocate(NumVariables); - unitsForVar.allocate(NumVariables); - ResourceTypes.allocate(NumVariables); - EndUses.allocate(NumVariables); - Groups.allocate(NumVariables); - Names.allocate(NumVariables); - thisSubEquipData.MeteredVar.allocate(NumVariables); - - GetMeteredVariables(state, - TypeOfSubComp, - NameOfSubComp, - VarIndexes, - VarTypes, - IndexTypes, - unitsForVar, - ResourceTypes, - EndUses, - Groups, - Names, - NumFound); + NumVariables = GetNumMeteredVariables(state, TypeOfSubComp, NameOfSubComp); + thisSubEquipData.NumMeteredVars = NumVariables; // Sankar added this line + if (NumVariables > 0) { + meteredVars.allocate(NumVariables); + thisSubEquipData.MeteredVar.allocate(NumVariables); - ModeFlagOn = true; - for (VarNum = 1; VarNum <= NumVariables; ++VarNum) { - { - auto &thisVar = thisSubEquipData.MeteredVar(VarNum); - thisVar.ReportVarName = Names(VarNum); - thisVar.ReportVarUnits = unitsForVar(VarNum); - thisVar.ReportVarIndex = VarIndexes(VarNum); - thisVar.ReportVarIndexType = IndexTypes(VarNum); - thisVar.ReportVarType = VarTypes(VarNum); - thisVar.ResourceType = ResourceTypes(VarNum); - thisVar.EndUse = EndUses(VarNum); - if (thisVar.EndUse == "HEATINGCOILS" && ModeFlagOn) { - for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { - thisSubEquipData.MeteredVar(VarNum1).EndUse_CompMode = EndUseType::HeatingOnly; - } - ModeFlagOn = false; - } else if (thisVar.EndUse == "COOLINGCOILS" && ModeFlagOn) { - for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { - thisSubEquipData.MeteredVar(VarNum1).EndUse_CompMode = EndUseType::CoolingOnly; - } - ModeFlagOn = false; - } else if (ModeFlagOn) { - thisVar.EndUse_CompMode = EndUseType::NoHeatNoCool; - } - thisVar.Group = Groups(VarNum); + GetMeteredVariables(state, NameOfSubComp, meteredVars); + + ModeFlagOn = true; + for (VarNum = 1; VarNum <= NumVariables; ++VarNum) { + thisSubEquipData.MeteredVar(VarNum) = meteredVars(VarNum); + auto &thisVar = thisSubEquipData.MeteredVar(VarNum); + if (thisVar.sovEndUseCat == OutputProcessor::SOVEndUseCat::HeatingCoils && ModeFlagOn) { + for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { + thisSubEquipData.MeteredVar(VarNum1).heatOrCool = Constant::HeatOrCool::HeatingOnly; + } + ModeFlagOn = false; + } else if (thisVar.sovEndUseCat == OutputProcessor::SOVEndUseCat::CoolingCoils && ModeFlagOn) { + for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { + thisSubEquipData.MeteredVar(VarNum1).heatOrCool = Constant::HeatOrCool::CoolingOnly; } + ModeFlagOn = false; + } else if (ModeFlagOn) { + thisVar.heatOrCool = Constant::HeatOrCool::NoHeatNoCool; } - - VarIndexes.deallocate(); - VarTypes.deallocate(); - IndexTypes.deallocate(); - unitsForVar.deallocate(); - EndUses.deallocate(); - Groups.deallocate(); - Names.deallocate(); } - for (SubSubCompNum = 1; SubSubCompNum <= thisSubEquipData.NumSubSubEquip; ++SubSubCompNum) { - std::string &TypeOfSubSubComp = thisSubEquipData.SubSubEquipData(SubSubCompNum).TypeOf; - std::string &NameOfSubSubComp = thisSubEquipData.SubSubEquipData(SubSubCompNum).Name; + meteredVars.deallocate(); + } // if (NumVariables > 0) - NumVariables = GetNumMeteredVariables(state, TypeOfSubSubComp, NameOfSubSubComp); - thisSubEquipData.SubSubEquipData(SubSubCompNum).NumMeteredVars = NumVariables; // Sankar added this line - if (NumVariables > 0) { - VarIndexes.allocate(NumVariables); - VarTypes.allocate(NumVariables); - IndexTypes.allocate(NumVariables); - unitsForVar.allocate(NumVariables); - ResourceTypes.allocate(NumVariables); - EndUses.allocate(NumVariables); - Groups.allocate(NumVariables); - Names.allocate(NumVariables); - thisSubEquipData.SubSubEquipData(SubSubCompNum).MeteredVar.allocate(NumVariables); - - GetMeteredVariables(state, - TypeOfSubSubComp, - NameOfSubSubComp, - VarIndexes, - VarTypes, - IndexTypes, - unitsForVar, - ResourceTypes, - EndUses, - Groups, - Names, - NumFound); + for (SubSubCompNum = 1; SubSubCompNum <= thisSubEquipData.NumSubSubEquip; ++SubSubCompNum) { + std::string &TypeOfSubSubComp = thisSubEquipData.SubSubEquipData(SubSubCompNum).TypeOf; + std::string &NameOfSubSubComp = thisSubEquipData.SubSubEquipData(SubSubCompNum).Name; - ModeFlagOn = true; - for (VarNum = 1; VarNum <= NumVariables; ++VarNum) { - { - auto &thisVar = thisSubEquipData.SubSubEquipData(SubSubCompNum).MeteredVar(VarNum); - thisVar.ReportVarName = Names(VarNum); - thisVar.ReportVarUnits = unitsForVar(VarNum); - thisVar.ReportVarIndex = VarIndexes(VarNum); - thisVar.ReportVarIndexType = IndexTypes(VarNum); - thisVar.ReportVarType = VarTypes(VarNum); - thisVar.ResourceType = ResourceTypes(VarNum); - thisVar.EndUse = EndUses(VarNum); - if (thisVar.EndUse == "HEATINGCOILS" && ModeFlagOn) { - for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { - thisSubEquipData.SubSubEquipData(SubSubCompNum).MeteredVar(VarNum1).EndUse_CompMode = - EndUseType::HeatingOnly; - } - ModeFlagOn = false; - } else if (thisVar.EndUse == "COOLINGCOILS" && ModeFlagOn) { - for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { - thisSubEquipData.SubSubEquipData(SubSubCompNum).MeteredVar(VarNum1).EndUse_CompMode = - EndUseType::CoolingOnly; - } - ModeFlagOn = false; - } else if (ModeFlagOn) { - thisVar.EndUse_CompMode = EndUseType::NoHeatNoCool; - } - thisVar.Group = Groups(VarNum); + NumVariables = GetNumMeteredVariables(state, TypeOfSubSubComp, NameOfSubSubComp); + thisSubEquipData.SubSubEquipData(SubSubCompNum).NumMeteredVars = NumVariables; // Sankar added this line + if (NumVariables > 0) { + meteredVars.allocate(NumVariables); + thisSubEquipData.SubSubEquipData(SubSubCompNum).MeteredVar.allocate(NumVariables); + + GetMeteredVariables(state, NameOfSubSubComp, meteredVars); + ModeFlagOn = true; + for (VarNum = 1; VarNum <= NumVariables; ++VarNum) { + thisSubEquipData.SubSubEquipData(SubSubCompNum).MeteredVar(VarNum) = meteredVars(VarNum); + auto &thisVar = thisSubEquipData.SubSubEquipData(SubSubCompNum).MeteredVar(VarNum); + if (thisVar.sovEndUseCat == OutputProcessor::SOVEndUseCat::HeatingCoils && ModeFlagOn) { + for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { + thisSubEquipData.SubSubEquipData(SubSubCompNum).MeteredVar(VarNum1).heatOrCool = + Constant::HeatOrCool::HeatingOnly; } + ModeFlagOn = false; + } else if (thisVar.sovEndUseCat == OutputProcessor::SOVEndUseCat::CoolingCoils && ModeFlagOn) { + for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { + thisSubEquipData.SubSubEquipData(SubSubCompNum).MeteredVar(VarNum1).heatOrCool = + Constant::HeatOrCool::CoolingOnly; + } + ModeFlagOn = false; + } else if (ModeFlagOn) { + thisVar.heatOrCool = Constant::HeatOrCool::NoHeatNoCool; } - - VarIndexes.deallocate(); - VarTypes.deallocate(); - IndexTypes.deallocate(); - unitsForVar.deallocate(); - EndUses.deallocate(); - Groups.deallocate(); - Names.deallocate(); } - } - } - } - } - } + + meteredVars.deallocate(); + } // if (NumVariables > 0) + } // for (SubSubCompNum) + } // for (SubCompNum) + } // for (CompNum) + } // for (CtrlZoneNum) //***Plant Loops @@ -3061,145 +2856,79 @@ void CreateEnergyReportStructure(EnergyPlusData &state) for (BranchNum = 1; BranchNum <= ThisReportData.TotalBranches; ++BranchNum) { for (CompNum = 1; CompNum <= ThisReportData.Branch(BranchNum).TotalComponents; ++CompNum) { // Get complete list of components for complex branches - { - auto &thisComp = ThisReportData.Branch(BranchNum).Comp(CompNum); - std::string &TypeOfComp = thisComp.TypeOf; - std::string &NameOfComp = thisComp.Name; - NumVariables = GetNumMeteredVariables(state, TypeOfComp, NameOfComp); + auto &thisComp = ThisReportData.Branch(BranchNum).Comp(CompNum); + std::string &TypeOfComp = thisComp.TypeOf; + std::string &NameOfComp = thisComp.Name; + NumVariables = GetNumMeteredVariables(state, TypeOfComp, NameOfComp); + if (NumVariables > 0) { + meteredVars.allocate(NumVariables); + thisComp.MeteredVar.allocate(NumVariables); + + thisComp.NumMeteredVars = NumVariables; + GetMeteredVariables(state, NameOfComp, meteredVars); + ModeFlagOn = true; + + for (VarNum = 1; VarNum <= NumVariables; ++VarNum) { + thisComp.MeteredVar(VarNum) = meteredVars(VarNum); + auto &thisVar = thisComp.MeteredVar(VarNum); + if (thisVar.sovEndUseCat == OutputProcessor::SOVEndUseCat::HeatingCoils && ModeFlagOn) { + for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { + thisComp.MeteredVar(VarNum1).heatOrCool = Constant::HeatOrCool::HeatingOnly; + } + ModeFlagOn = false; + } else if (thisVar.sovEndUseCat == OutputProcessor::SOVEndUseCat::CoolingCoils && ModeFlagOn) { + for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { + thisComp.MeteredVar(VarNum1).heatOrCool = Constant::HeatOrCool::CoolingOnly; + } + ModeFlagOn = false; + } else if (ModeFlagOn) { + thisVar.heatOrCool = Constant::HeatOrCool::NoHeatNoCool; + } + } + + meteredVars.deallocate(); + } // if (NumVariables > 0) + + for (SubCompNum = 1; SubCompNum <= thisComp.NumSubComps; ++SubCompNum) { + // Get complete list of components for complex branches + std::string &TypeOfSubComp = thisComp.SubComp(SubCompNum).TypeOf; + std::string &NameOfSubComp = thisComp.SubComp(SubCompNum).Name; + NumVariables = GetNumMeteredVariables(state, TypeOfSubComp, NameOfSubComp); if (NumVariables > 0) { - VarIndexes.allocate(NumVariables); - VarTypes.allocate(NumVariables); - IndexTypes.allocate(NumVariables); - unitsForVar.allocate(NumVariables); - ResourceTypes.allocate(NumVariables); - EndUses.allocate(NumVariables); - Groups.allocate(NumVariables); - Names.allocate(NumVariables); - thisComp.MeteredVar.allocate(NumVariables); - - thisComp.NumMeteredVars = NumVariables; - GetMeteredVariables(state, - TypeOfComp, - NameOfComp, - VarIndexes, - VarTypes, - IndexTypes, - unitsForVar, - ResourceTypes, - EndUses, - Groups, - Names, - NumFound); + meteredVars.allocate(NumVariables); + thisComp.SubComp(SubCompNum).MeteredVar.allocate(NumVariables); + GetMeteredVariables(state, NameOfSubComp, meteredVars); ModeFlagOn = true; + for (VarNum = 1; VarNum <= NumVariables; ++VarNum) { - { - auto &thisVar = thisComp.MeteredVar(VarNum); - thisVar.ReportVarName = Names(VarNum); - thisVar.ReportVarUnits = unitsForVar(VarNum); - thisVar.ReportVarIndex = VarIndexes(VarNum); - thisVar.ReportVarIndexType = IndexTypes(VarNum); - thisVar.ReportVarType = VarTypes(VarNum); - thisVar.ResourceType = ResourceTypes(VarNum); - thisVar.EndUse = EndUses(VarNum); - if (thisVar.EndUse == "HEATINGCOILS" && ModeFlagOn) { - for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { - thisComp.MeteredVar(VarNum1).EndUse_CompMode = EndUseType::HeatingOnly; - } - ModeFlagOn = false; - } else if (thisVar.EndUse == "COOLINGCOILS" && ModeFlagOn) { - for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { - thisComp.MeteredVar(VarNum1).EndUse_CompMode = EndUseType::CoolingOnly; - } - ModeFlagOn = false; - } else if (ModeFlagOn) { - thisVar.EndUse_CompMode = EndUseType::NoHeatNoCool; + thisComp.SubComp(SubCompNum).MeteredVar(VarNum) = meteredVars(VarNum); + auto &thisVar = thisComp.SubComp(SubCompNum).MeteredVar(VarNum); + if (thisVar.sovEndUseCat == OutputProcessor::SOVEndUseCat::HeatingCoils && ModeFlagOn) { + for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { + thisComp.SubComp(SubCompNum).MeteredVar(VarNum1).heatOrCool = Constant::HeatOrCool::HeatingOnly; + } + ModeFlagOn = false; + } else if (thisVar.sovEndUseCat == OutputProcessor::SOVEndUseCat::CoolingCoils && ModeFlagOn) { + for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { + thisComp.SubComp(SubCompNum).MeteredVar(VarNum1).heatOrCool = Constant::HeatOrCool::CoolingOnly; } - thisVar.Group = Groups(VarNum); + ModeFlagOn = false; + } else if (ModeFlagOn) { + thisVar.heatOrCool = Constant::HeatOrCool::NoHeatNoCool; } } - VarIndexes.deallocate(); - VarTypes.deallocate(); - IndexTypes.deallocate(); - unitsForVar.deallocate(); - EndUses.deallocate(); - Groups.deallocate(); - Names.deallocate(); - } - for (SubCompNum = 1; SubCompNum <= thisComp.NumSubComps; ++SubCompNum) { - // Get complete list of components for complex branches - std::string &TypeOfSubComp = thisComp.SubComp(SubCompNum).TypeOf; - std::string &NameOfSubComp = thisComp.SubComp(SubCompNum).Name; - NumVariables = GetNumMeteredVariables(state, TypeOfSubComp, NameOfSubComp); - if (NumVariables > 0) { - VarIndexes.allocate(NumVariables); - VarTypes.allocate(NumVariables); - IndexTypes.allocate(NumVariables); - unitsForVar.allocate(NumVariables); - ResourceTypes.allocate(NumVariables); - EndUses.allocate(NumVariables); - Groups.allocate(NumVariables); - Names.allocate(NumVariables); - thisComp.SubComp(SubCompNum).MeteredVar.allocate(NumVariables); - - GetMeteredVariables(state, - TypeOfSubComp, - NameOfSubComp, - VarIndexes, - VarTypes, - IndexTypes, - unitsForVar, - ResourceTypes, - EndUses, - Groups, - Names, - NumFound); - - ModeFlagOn = true; - for (VarNum = 1; VarNum <= NumVariables; ++VarNum) { - { - auto &thisVar = thisComp.SubComp(SubCompNum).MeteredVar(VarNum); - thisVar.ReportVarName = Names(VarNum); - thisVar.ReportVarUnits = unitsForVar(VarNum); - thisVar.ReportVarIndex = VarIndexes(VarNum); - thisVar.ReportVarIndexType = IndexTypes(VarNum); - thisVar.ReportVarType = VarTypes(VarNum); - thisVar.ResourceType = ResourceTypes(VarNum); - thisVar.EndUse = EndUses(VarNum); - if (thisVar.EndUse == "HEATINGCOILS" && ModeFlagOn) { - for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { - thisComp.SubComp(SubCompNum).MeteredVar(VarNum1).EndUse_CompMode = EndUseType::HeatingOnly; - } - ModeFlagOn = false; - } else if (thisVar.EndUse == "COOLINGCOILS" && ModeFlagOn) { - for (VarNum1 = 1; VarNum1 <= NumVariables; ++VarNum1) { - thisComp.SubComp(SubCompNum).MeteredVar(VarNum1).EndUse_CompMode = EndUseType::CoolingOnly; - } - ModeFlagOn = false; - } else if (ModeFlagOn) { - thisVar.EndUse_CompMode = EndUseType::NoHeatNoCool; - } - thisVar.Group = Groups(VarNum); - } - } + meteredVars.deallocate(); + } // if (NumVariables > 0) - VarIndexes.deallocate(); - VarTypes.deallocate(); - IndexTypes.deallocate(); - unitsForVar.deallocate(); - EndUses.deallocate(); - Groups.deallocate(); - Names.deallocate(); - } - thisComp.SubComp(SubCompNum).NumMeteredVars = NumVariables; - } - } - } - } - } - } -} + thisComp.SubComp(SubCompNum).NumMeteredVars = NumVariables; + } // for (SubCompNum) + } // for (CompNum) + } // for (BranchNum) + } // for (LoopSide) + } // for (PlantLoopNum) +} // CreateEnergyReportStructure() // End Initialization Section of the Module //****************************************************************************** @@ -3227,7 +2956,7 @@ void ReportSystemEnergyUse(EnergyPlusData &state) int CompNum; int SubCompNum; int SubSubCompNum; - EndUseType CompMode; + Constant::HeatOrCool CompMode; int InletNodeNum; int OutletNodeNum; int ADUNum; @@ -3314,9 +3043,9 @@ void ReportSystemEnergyUse(EnergyPlusData &state) CompLoadFlag = false; for (VarNum = 1; VarNum <= pasBranchComp.NumMeteredVars; ++VarNum) { auto const &pasBranchCompMeter = pasBranchComp.MeteredVar(VarNum); - CompMode = pasBranchCompMeter.EndUse_CompMode; - CompEnergyUse = pasBranchCompMeter.CurMeterReading; - EnergyType = pasBranchCompMeter.ResourceType; + CompMode = pasBranchCompMeter.heatOrCool; + CompEnergyUse = pasBranchCompMeter.curMeterReading; + EnergyType = pasBranchCompMeter.resource; CalcSystemEnergyUse(state, CompLoadFlag, AirLoopNum, pasBranchComp.TypeOf, EnergyType, CompLoad, CompEnergyUse); } @@ -3335,9 +3064,9 @@ void ReportSystemEnergyUse(EnergyPlusData &state) CompLoadFlag = false; for (VarNum = 1; VarNum <= pasBranchSubComp.NumMeteredVars; ++VarNum) { auto const &pasBranchSubCompMeter = pasBranchSubComp.MeteredVar(VarNum); - CompMode = pasBranchSubCompMeter.EndUse_CompMode; - CompEnergyUse = pasBranchSubCompMeter.CurMeterReading; - EnergyType = pasBranchSubCompMeter.ResourceType; + CompMode = pasBranchSubCompMeter.heatOrCool; + CompEnergyUse = pasBranchSubCompMeter.curMeterReading; + EnergyType = pasBranchSubCompMeter.resource; CalcSystemEnergyUse(state, CompLoadFlag, AirLoopNum, pasBranchSubComp.TypeOf, EnergyType, CompLoad, CompEnergyUse); } @@ -3357,16 +3086,16 @@ void ReportSystemEnergyUse(EnergyPlusData &state) CompLoadFlag = false; for (VarNum = 1; VarNum <= pasBranchSubSubComp.NumMeteredVars; ++VarNum) { auto const &pasBranchSubSubCompMeter = pasBranchSubSubComp.MeteredVar(VarNum); - CompMode = pasBranchSubSubCompMeter.EndUse_CompMode; - CompEnergyUse = pasBranchSubSubCompMeter.CurMeterReading; - EnergyType = pasBranchSubSubCompMeter.ResourceType; + CompMode = pasBranchSubSubCompMeter.heatOrCool; + CompEnergyUse = pasBranchSubSubCompMeter.curMeterReading; + EnergyType = pasBranchSubSubCompMeter.resource; CalcSystemEnergyUse(state, CompLoadFlag, AirLoopNum, pasBranchSubSubComp.TypeOf, EnergyType, CompLoad, CompEnergyUse); } - } - } - } - } - } + } // for (SubSubCompNum) + } // for (SubCompNum) + } // for (CompNum) + } // for (BranchNum) + } // for (AirLoopNum) for (int CtrlZoneNum = 1; CtrlZoneNum <= state.dataGlobal->NumOfZones; ++CtrlZoneNum) { auto const &zecCtrlZone = state.dataZoneEquip->ZoneEquipConfig(CtrlZoneNum); @@ -3435,8 +3164,8 @@ void ReportSystemEnergyUse(EnergyPlusData &state) CalcSystemEnergyUse(state, CompLoadFlag, AirLoopNum, zelEquipData.TypeOf, EnergyType, CompLoad, CompEnergyUse); CompLoadFlag = false; for (VarNum = 1; VarNum <= zelEquipData.NumMeteredVars; ++VarNum) { - CompEnergyUse = zelEquipData.MeteredVar(VarNum).CurMeterReading; - EnergyType = zelEquipData.MeteredVar(VarNum).ResourceType; + CompEnergyUse = zelEquipData.MeteredVar(VarNum).curMeterReading; + EnergyType = zelEquipData.MeteredVar(VarNum).resource; CalcSystemEnergyUse(state, CompLoadFlag, AirLoopNum, zelEquipData.TypeOf, EnergyType, CompLoad, CompEnergyUse); } @@ -3454,8 +3183,8 @@ void ReportSystemEnergyUse(EnergyPlusData &state) CalcSystemEnergyUse(state, CompLoadFlag, AirLoopNum, zelSubEquipData.TypeOf, EnergyType, CompLoad, CompEnergyUse); CompLoadFlag = false; for (VarNum = 1; VarNum <= zelSubEquipData.NumMeteredVars; ++VarNum) { - CompEnergyUse = zelSubEquipData.MeteredVar(VarNum).CurMeterReading; - EnergyType = zelSubEquipData.MeteredVar(VarNum).ResourceType; + CompEnergyUse = zelSubEquipData.MeteredVar(VarNum).curMeterReading; + EnergyType = zelSubEquipData.MeteredVar(VarNum).resource; CalcSystemEnergyUse(state, CompLoadFlag, AirLoopNum, zelSubEquipData.TypeOf, EnergyType, CompLoad, CompEnergyUse); } @@ -3474,8 +3203,8 @@ void ReportSystemEnergyUse(EnergyPlusData &state) CalcSystemEnergyUse(state, CompLoadFlag, AirLoopNum, zelSubSubEquipData.TypeOf, EnergyType, CompLoad, CompEnergyUse); CompLoadFlag = false; for (VarNum = 1; VarNum <= zelSubSubEquipData.NumMeteredVars; ++VarNum) { - CompEnergyUse = zelSubSubEquipData.MeteredVar(VarNum).CurMeterReading; - EnergyType = zelSubSubEquipData.MeteredVar(VarNum).ResourceType; + CompEnergyUse = zelSubSubEquipData.MeteredVar(VarNum).curMeterReading; + EnergyType = zelSubSubEquipData.MeteredVar(VarNum).resource; CalcSystemEnergyUse(state, CompLoadFlag, AirLoopNum, zelSubSubEquipData.TypeOf, EnergyType, CompLoad, CompEnergyUse); } } // SubSubCompNum @@ -4636,7 +4365,7 @@ void MatchPlantSys(EnergyPlusData &state, { auto &thisComp = state.dataAirSystemsData->PrimaryAirSystems(AirLoopNum).Branch(BranchNum).Comp(CompNum); for (int VarNum = 1; VarNum <= thisComp.NumMeteredVars; ++VarNum) { - if (thisComp.MeteredVar(VarNum).ResourceType == Constant::eResource::EnergyTransfer) { + if (thisComp.MeteredVar(VarNum).resource == Constant::eResource::EnergyTransfer) { thisComp.EnergyTransComp = EnergyTrans; const std::string &CompType = thisComp.TypeOf; const std::string &CompName = thisComp.Name; @@ -4658,7 +4387,7 @@ void MatchPlantSys(EnergyPlusData &state, { auto &thisSubComp(thisComp.SubComp(SubCompNum)); for (int VarNum = 1; VarNum <= thisSubComp.NumMeteredVars; ++VarNum) { - if (thisSubComp.MeteredVar(VarNum).ResourceType == Constant::eResource::EnergyTransfer) { + if (thisSubComp.MeteredVar(VarNum).resource == Constant::eResource::EnergyTransfer) { thisSubComp.EnergyTransComp = EnergyTrans; const std::string &CompType = thisComp.TypeOf; const std::string &CompName = thisComp.Name; @@ -4681,7 +4410,7 @@ void MatchPlantSys(EnergyPlusData &state, { auto &thisSubSubComp = thisSubComp.SubSubComp(SubSubCompNum); for (int VarNum = 1; VarNum <= thisSubSubComp.NumMeteredVars; ++VarNum) { - if (thisSubSubComp.MeteredVar(VarNum).ResourceType == Constant::eResource::EnergyTransfer) { + if (thisSubSubComp.MeteredVar(VarNum).resource == Constant::eResource::EnergyTransfer) { thisSubSubComp.EnergyTransComp = EnergyTrans; const std::string &CompType = thisComp.TypeOf; const std::string &CompName = thisComp.Name; diff --git a/src/EnergyPlus/SystemReports.hh b/src/EnergyPlus/SystemReports.hh index 96c3274fb93..4300aa3e7fb 100644 --- a/src/EnergyPlus/SystemReports.hh +++ b/src/EnergyPlus/SystemReports.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -64,16 +64,6 @@ struct EnergyPlusData; namespace SystemReports { - enum class EndUseType - { - Invalid = -1, - NoHeatNoCool, - CoolingOnly, - HeatingOnly, - HeatAndCool, - Num - }; - struct Energy { // Members diff --git a/src/EnergyPlus/TARCOGArgs.cc b/src/EnergyPlus/TARCOGArgs.cc index d6e244bcdd1..33df57c9608 100644 --- a/src/EnergyPlus/TARCOGArgs.cc +++ b/src/EnergyPlus/TARCOGArgs.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGArgs.hh b/src/EnergyPlus/TARCOGArgs.hh index 154647eabec..483968f00b3 100644 --- a/src/EnergyPlus/TARCOGArgs.hh +++ b/src/EnergyPlus/TARCOGArgs.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGCommon.cc b/src/EnergyPlus/TARCOGCommon.cc index 18bb1498850..42e97465ccf 100644 --- a/src/EnergyPlus/TARCOGCommon.cc +++ b/src/EnergyPlus/TARCOGCommon.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGCommon.hh b/src/EnergyPlus/TARCOGCommon.hh index 4326ca88677..0c847671f4e 100644 --- a/src/EnergyPlus/TARCOGCommon.hh +++ b/src/EnergyPlus/TARCOGCommon.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGDeflection.cc b/src/EnergyPlus/TARCOGDeflection.cc index 302492f72ce..aa2f18d005c 100644 --- a/src/EnergyPlus/TARCOGDeflection.cc +++ b/src/EnergyPlus/TARCOGDeflection.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGDeflection.hh b/src/EnergyPlus/TARCOGDeflection.hh index d2c7d4469f5..7f969afbd12 100644 --- a/src/EnergyPlus/TARCOGDeflection.hh +++ b/src/EnergyPlus/TARCOGDeflection.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGGasses90.cc b/src/EnergyPlus/TARCOGGasses90.cc index ec8ca628ebf..5232008a40b 100644 --- a/src/EnergyPlus/TARCOGGasses90.cc +++ b/src/EnergyPlus/TARCOGGasses90.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGGasses90.hh b/src/EnergyPlus/TARCOGGasses90.hh index 0f84cc0ca08..09a939e07b2 100644 --- a/src/EnergyPlus/TARCOGGasses90.hh +++ b/src/EnergyPlus/TARCOGGasses90.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGGassesParams.hh b/src/EnergyPlus/TARCOGGassesParams.hh index c6e3db853ac..c1f143f6860 100644 --- a/src/EnergyPlus/TARCOGGassesParams.hh +++ b/src/EnergyPlus/TARCOGGassesParams.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGMain.cc b/src/EnergyPlus/TARCOGMain.cc index fd0bc95a291..3b07d1d8c6b 100644 --- a/src/EnergyPlus/TARCOGMain.cc +++ b/src/EnergyPlus/TARCOGMain.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGMain.hh b/src/EnergyPlus/TARCOGMain.hh index 18522cbd999..2b79c34d397 100644 --- a/src/EnergyPlus/TARCOGMain.hh +++ b/src/EnergyPlus/TARCOGMain.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGOutput.cc b/src/EnergyPlus/TARCOGOutput.cc index 724275adad4..d42e230c7d5 100644 --- a/src/EnergyPlus/TARCOGOutput.cc +++ b/src/EnergyPlus/TARCOGOutput.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGOutput.hh b/src/EnergyPlus/TARCOGOutput.hh index 4adeed92f7d..fd47d090056 100644 --- a/src/EnergyPlus/TARCOGOutput.hh +++ b/src/EnergyPlus/TARCOGOutput.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGParams.cc b/src/EnergyPlus/TARCOGParams.cc index 9dfc0fa0adf..fd517848863 100644 --- a/src/EnergyPlus/TARCOGParams.cc +++ b/src/EnergyPlus/TARCOGParams.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGParams.hh b/src/EnergyPlus/TARCOGParams.hh index 9b1c93a936c..beada723739 100644 --- a/src/EnergyPlus/TARCOGParams.hh +++ b/src/EnergyPlus/TARCOGParams.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TarcogShading.cc b/src/EnergyPlus/TarcogShading.cc index 39a70d0939c..b9350f56fbb 100644 --- a/src/EnergyPlus/TarcogShading.cc +++ b/src/EnergyPlus/TarcogShading.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TarcogShading.hh b/src/EnergyPlus/TarcogShading.hh index 73944cb1e1b..d9829d6b715 100644 --- a/src/EnergyPlus/TarcogShading.hh +++ b/src/EnergyPlus/TarcogShading.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ThermalChimney.cc b/src/EnergyPlus/ThermalChimney.cc index 334508ea762..5549a765984 100644 --- a/src/EnergyPlus/ThermalChimney.cc +++ b/src/EnergyPlus/ThermalChimney.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -371,28 +371,28 @@ namespace ThermalChimney { for (Loop = 1; Loop <= state.dataThermalChimneys->TotThermalChimney; ++Loop) { SetupOutputVariable(state, "Zone Thermal Chimney Current Density Air Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataThermalChimneys->ThermalChimneyReport(Loop).OverallTCVolumeFlow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataThermalChimneys->ThermalChimneySys(Loop).Name); SetupOutputVariable(state, "Zone Thermal Chimney Standard Density Air Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataThermalChimneys->ThermalChimneyReport(Loop).OverallTCVolumeFlowStd, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataThermalChimneys->ThermalChimneySys(Loop).Name); SetupOutputVariable(state, "Zone Thermal Chimney Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataThermalChimneys->ThermalChimneyReport(Loop).OverallTCMassFlow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataThermalChimneys->ThermalChimneySys(Loop).Name); SetupOutputVariable(state, "Zone Thermal Chimney Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataThermalChimneys->ThermalChimneyReport(Loop).OutletAirTempThermalChim, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -411,7 +411,7 @@ namespace ThermalChimney { for (TCZoneNum = 1; TCZoneNum <= state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib; ++TCZoneNum) { SetupOutputVariable(state, "Zone Thermal Chimney Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataThermalChimneys->ZnRptThermChim(state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum)) .ThermalChimneyHeatLoss, OutputProcessor::SOVTimeStepType::System, @@ -419,7 +419,7 @@ namespace ThermalChimney { state.dataHeatBal->Zone(state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum)).Name); SetupOutputVariable(state, "Zone Thermal Chimney Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataThermalChimneys->ZnRptThermChim(state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum)) .ThermalChimneyHeatGain, OutputProcessor::SOVTimeStepType::System, @@ -427,7 +427,7 @@ namespace ThermalChimney { state.dataHeatBal->Zone(state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum)).Name); SetupOutputVariable(state, "Zone Thermal Chimney Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataThermalChimneys->ZnRptThermChim(state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum)) .ThermalChimneyVolume, OutputProcessor::SOVTimeStepType::System, @@ -435,7 +435,7 @@ namespace ThermalChimney { state.dataHeatBal->Zone(state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum)).Name); SetupOutputVariable(state, "Zone Thermal Chimney Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, state.dataThermalChimneys->ZnRptThermChim(state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum)) .ThermalChimneyMass, OutputProcessor::SOVTimeStepType::System, @@ -445,7 +445,7 @@ namespace ThermalChimney { SetupOutputVariable( state, "Zone Infiltration Sensible Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum)).InfilHeatLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -453,7 +453,7 @@ namespace ThermalChimney { SetupOutputVariable( state, "Zone Infiltration Sensible Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum)).InfilHeatGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -461,7 +461,7 @@ namespace ThermalChimney { SetupOutputVariable( state, "Zone Infiltration Latent Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum)).InfilLatentLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -469,7 +469,7 @@ namespace ThermalChimney { SetupOutputVariable( state, "Zone Infiltration Latent Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum)).InfilLatentGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -477,7 +477,7 @@ namespace ThermalChimney { SetupOutputVariable( state, "Zone Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum)).InfilTotalLoss, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -485,7 +485,7 @@ namespace ThermalChimney { SetupOutputVariable( state, "Zone Infiltration Total Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZnAirRpt(state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum)).InfilTotalGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -493,7 +493,7 @@ namespace ThermalChimney { SetupOutputVariable( state, "Zone Infiltration Current Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZnAirRpt(state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum)).InfilVdotCurDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -501,7 +501,7 @@ namespace ThermalChimney { SetupOutputVariable( state, "Zone Infiltration Standard Density Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZnAirRpt(state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum)).InfilVdotStdDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -509,7 +509,7 @@ namespace ThermalChimney { SetupOutputVariable( state, "Zone Infiltration Current Density Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataHeatBal->ZnAirRpt(state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum)).InfilVolumeCurDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -517,21 +517,21 @@ namespace ThermalChimney { SetupOutputVariable( state, "Zone Infiltration Standard Density Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataHeatBal->ZnAirRpt(state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum)).InfilVolumeStdDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum)).Name); SetupOutputVariable(state, "Zone Infiltration Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, state.dataHeatBal->ZnAirRpt(state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum)).InfilMass, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum)).Name); SetupOutputVariable(state, "Zone Infiltration Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataHeatBal->ZnAirRpt(state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum)).InfilMdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -539,7 +539,7 @@ namespace ThermalChimney { SetupOutputVariable( state, "Zone Infiltration Air Change Rate", - OutputProcessor::Unit::ach, + Constant::Units::ach, state.dataHeatBal->ZnAirRpt(state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum)).InfilAirChangeRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/ThermalChimney.hh b/src/EnergyPlus/ThermalChimney.hh index 28ea147d3c1..fd685eb1209 100644 --- a/src/EnergyPlus/ThermalChimney.hh +++ b/src/EnergyPlus/ThermalChimney.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ThermalComfort.cc b/src/EnergyPlus/ThermalComfort.cc index 7b3a1b3f5f6..40b0ea8af7f 100644 --- a/src/EnergyPlus/ThermalComfort.cc +++ b/src/EnergyPlus/ThermalComfort.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -174,21 +174,21 @@ namespace ThermalComfort { if (state.dataHeatBal->People(Loop).Fanger) { SetupOutputVariable(state, "Zone Thermal Comfort Fanger Model PMV", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataThermalComforts->ThermalComfortData(Loop).FangerPMV, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataHeatBal->People(Loop).Name); SetupOutputVariable(state, "Zone Thermal Comfort Fanger Model PPD", - OutputProcessor::Unit::Perc, + Constant::Units::Perc, state.dataThermalComforts->ThermalComfortData(Loop).FangerPPD, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataHeatBal->People(Loop).Name); SetupOutputVariable(state, "Zone Thermal Comfort Clothing Surface Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataThermalComforts->ThermalComfortData(Loop).CloSurfTemp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -198,35 +198,35 @@ namespace ThermalComfort { if (state.dataHeatBal->People(Loop).Pierce) { SetupOutputVariable(state, "Zone Thermal Comfort Pierce Model Effective Temperature PMV", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataThermalComforts->ThermalComfortData(Loop).PiercePMVET, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataHeatBal->People(Loop).Name); SetupOutputVariable(state, "Zone Thermal Comfort Pierce Model Standard Effective Temperature PMV", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataThermalComforts->ThermalComfortData(Loop).PiercePMVSET, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataHeatBal->People(Loop).Name); SetupOutputVariable(state, "Zone Thermal Comfort Pierce Model Discomfort Index", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataThermalComforts->ThermalComfortData(Loop).PierceDISC, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataHeatBal->People(Loop).Name); SetupOutputVariable(state, "Zone Thermal Comfort Pierce Model Thermal Sensation Index", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataThermalComforts->ThermalComfortData(Loop).PierceTSENS, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataHeatBal->People(Loop).Name); SetupOutputVariable(state, "Zone Thermal Comfort Pierce Model Standard Effective Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataThermalComforts->ThermalComfortData(Loop).PierceSET, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -236,7 +236,7 @@ namespace ThermalComfort { if (state.dataHeatBal->People(Loop).KSU) { SetupOutputVariable(state, "Zone Thermal Comfort KSU Model Thermal Sensation Vote", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataThermalComforts->ThermalComfortData(Loop).KsuTSV, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -246,21 +246,21 @@ namespace ThermalComfort { if ((state.dataHeatBal->People(Loop).Fanger) || (state.dataHeatBal->People(Loop).Pierce) || (state.dataHeatBal->People(Loop).KSU)) { SetupOutputVariable(state, "Zone Thermal Comfort Mean Radiant Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataThermalComforts->ThermalComfortData(Loop).ThermalComfortMRT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataHeatBal->People(Loop).Name); SetupOutputVariable(state, "Zone Thermal Comfort Operative Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataThermalComforts->ThermalComfortData(Loop).ThermalComfortOpTemp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataHeatBal->People(Loop).Name); SetupOutputVariable(state, "Zone Thermal Comfort Clothing Value", - OutputProcessor::Unit::clo, + Constant::Units::clo, state.dataThermalComforts->ThermalComfortData(Loop).ClothingValue, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -270,28 +270,28 @@ namespace ThermalComfort { if (state.dataHeatBal->People(Loop).AdaptiveASH55) { SetupOutputVariable(state, "Zone Thermal Comfort ASHRAE 55 Adaptive Model 90% Acceptability Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataThermalComforts->ThermalComfortData(Loop).ThermalComfortAdaptiveASH5590, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataHeatBal->People(Loop).Name); SetupOutputVariable(state, "Zone Thermal Comfort ASHRAE 55 Adaptive Model 80% Acceptability Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataThermalComforts->ThermalComfortData(Loop).ThermalComfortAdaptiveASH5580, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataHeatBal->People(Loop).Name); SetupOutputVariable(state, "Zone Thermal Comfort ASHRAE 55 Adaptive Model Running Average Outdoor Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataThermalComforts->ThermalComfortData(Loop).ASHRAE55RunningMeanOutdoorTemp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataHeatBal->People(Loop).Name); SetupOutputVariable(state, "Zone Thermal Comfort ASHRAE 55 Adaptive Model Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataThermalComforts->ThermalComfortData(Loop).TComfASH55, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -301,35 +301,35 @@ namespace ThermalComfort { if (state.dataHeatBal->People(Loop).AdaptiveCEN15251) { SetupOutputVariable(state, "Zone Thermal Comfort CEN 15251 Adaptive Model Category I Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataThermalComforts->ThermalComfortData(Loop).ThermalComfortAdaptiveCEN15251CatI, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataHeatBal->People(Loop).Name); SetupOutputVariable(state, "Zone Thermal Comfort CEN 15251 Adaptive Model Category II Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataThermalComforts->ThermalComfortData(Loop).ThermalComfortAdaptiveCEN15251CatII, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataHeatBal->People(Loop).Name); SetupOutputVariable(state, "Zone Thermal Comfort CEN 15251 Adaptive Model Category III Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataThermalComforts->ThermalComfortData(Loop).ThermalComfortAdaptiveCEN15251CatIII, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataHeatBal->People(Loop).Name); SetupOutputVariable(state, "Zone Thermal Comfort CEN 15251 Adaptive Model Running Average Outdoor Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataThermalComforts->ThermalComfortData(Loop).CEN15251RunningMeanOutdoorTemp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataHeatBal->People(Loop).Name); SetupOutputVariable(state, "Zone Thermal Comfort CEN 15251 Adaptive Model Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataThermalComforts->ThermalComfortData(Loop).TComfCEN15251, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -338,21 +338,21 @@ namespace ThermalComfort { if (state.dataHeatBal->People(Loop).CoolingEffectASH55) { SetupOutputVariable(state, "Zone Thermal Comfort ASHRAE 55 Elevated Air Speed Cooling Effect", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataThermalComforts->ThermalComfortData(Loop).CoolingEffectASH55, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataHeatBal->People(Loop).Name); SetupOutputVariable(state, "Zone Thermal Comfort ASHRAE 55 Elevated Air Speed Cooling Effect Adjusted PMV", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataThermalComforts->ThermalComfortData(Loop).CoolingEffectAdjustedPMVASH55, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, state.dataHeatBal->People(Loop).Name); SetupOutputVariable(state, "Zone Thermal Comfort ASHRAE 55 Elevated Air Speed Cooling Effect Adjusted PPD", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataThermalComforts->ThermalComfortData(Loop).CoolingEffectAdjustedPPDASH55, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -361,7 +361,7 @@ namespace ThermalComfort { if (state.dataHeatBal->People(Loop).AnkleDraftASH55) { SetupOutputVariable(state, "Zone Thermal Comfort ASHRAE 55 Ankle Draft PPD", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataThermalComforts->ThermalComfortData(Loop).AnkleDraftPPDASH55, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -381,21 +381,21 @@ namespace ThermalComfort { for (Loop = 1; Loop <= state.dataGlobal->NumOfZones; ++Loop) { SetupOutputVariable(state, "Zone Thermal Comfort ASHRAE 55 Simple Model Summer Clothes Not Comfortable Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataThermalComforts->ThermalComfortInASH55(Loop).timeNotSummer, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(Loop).Name); SetupOutputVariable(state, "Zone Thermal Comfort ASHRAE 55 Simple Model Winter Clothes Not Comfortable Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataThermalComforts->ThermalComfortInASH55(Loop).timeNotWinter, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(Loop).Name); SetupOutputVariable(state, "Zone Thermal Comfort ASHRAE 55 Simple Model Summer or Winter Clothes Not Comfortable Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataThermalComforts->ThermalComfortInASH55(Loop).timeNotEither, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -403,21 +403,21 @@ namespace ThermalComfort { } SetupOutputVariable(state, "Facility Thermal Comfort ASHRAE 55 Simple Model Summer Clothes Not Comfortable Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataThermalComforts->AnyZoneTimeNotSimpleASH55Summer, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Facility"); SetupOutputVariable(state, "Facility Thermal Comfort ASHRAE 55 Simple Model Winter Clothes Not Comfortable Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataThermalComforts->AnyZoneTimeNotSimpleASH55Winter, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Facility"); SetupOutputVariable(state, "Facility Thermal Comfort ASHRAE 55 Simple Model Summer or Winter Clothes Not Comfortable Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataThermalComforts->AnyZoneTimeNotSimpleASH55Either, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -427,28 +427,28 @@ namespace ThermalComfort { for (Loop = 1; Loop <= state.dataGlobal->NumOfZones; ++Loop) { SetupOutputVariable(state, "Zone Heating Setpoint Not Met Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataThermalComforts->ThermalComfortSetPoint(Loop).notMetHeating, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(Loop).Name); SetupOutputVariable(state, "Zone Heating Setpoint Not Met While Occupied Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataThermalComforts->ThermalComfortSetPoint(Loop).notMetHeatingOccupied, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(Loop).Name); SetupOutputVariable(state, "Zone Cooling Setpoint Not Met Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataThermalComforts->ThermalComfortSetPoint(Loop).notMetCooling, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->Zone(Loop).Name); SetupOutputVariable(state, "Zone Cooling Setpoint Not Met While Occupied Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataThermalComforts->ThermalComfortSetPoint(Loop).notMetCoolingOccupied, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -457,28 +457,28 @@ namespace ThermalComfort { SetupOutputVariable(state, "Facility Heating Setpoint Not Met Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataThermalComforts->AnyZoneNotMetHeating, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Facility"); SetupOutputVariable(state, "Facility Cooling Setpoint Not Met Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataThermalComforts->AnyZoneNotMetCooling, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Facility"); SetupOutputVariable(state, "Facility Heating Setpoint Not Met While Occupied Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataThermalComforts->AnyZoneNotMetHeatingOccupied, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Facility"); SetupOutputVariable(state, "Facility Cooling Setpoint Not Met While Occupied Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataThermalComforts->AnyZoneNotMetCoolingOccupied, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, diff --git a/src/EnergyPlus/ThermalComfort.hh b/src/EnergyPlus/ThermalComfort.hh index 4f0248aff29..5400a5c7ae5 100644 --- a/src/EnergyPlus/ThermalComfort.hh +++ b/src/EnergyPlus/ThermalComfort.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ThermalEN673Calc.cc b/src/EnergyPlus/ThermalEN673Calc.cc index 0882e71321d..c1a4ef1bdd1 100644 --- a/src/EnergyPlus/ThermalEN673Calc.cc +++ b/src/EnergyPlus/ThermalEN673Calc.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ThermalEN673Calc.hh b/src/EnergyPlus/ThermalEN673Calc.hh index 0283209e189..243a4199d9d 100644 --- a/src/EnergyPlus/ThermalEN673Calc.hh +++ b/src/EnergyPlus/ThermalEN673Calc.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ThermalISO15099Calc.cc b/src/EnergyPlus/ThermalISO15099Calc.cc index fbf931c5b3f..2318fc0eaee 100644 --- a/src/EnergyPlus/ThermalISO15099Calc.cc +++ b/src/EnergyPlus/ThermalISO15099Calc.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ThermalISO15099Calc.hh b/src/EnergyPlus/ThermalISO15099Calc.hh index 37e3216b9cf..3c1453df5d6 100644 --- a/src/EnergyPlus/ThermalISO15099Calc.hh +++ b/src/EnergyPlus/ThermalISO15099Calc.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TranspiredCollector.cc b/src/EnergyPlus/TranspiredCollector.cc index 6e889dab3c6..8b1d42d85b9 100644 --- a/src/EnergyPlus/TranspiredCollector.cc +++ b/src/EnergyPlus/TranspiredCollector.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -746,104 +746,103 @@ namespace TranspiredCollector { SetupOutputVariable(state, "Solar Collector Heat Exchanger Effectiveness", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataTranspiredCollector->UTSC(Item).HXeff, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataTranspiredCollector->UTSC(Item).Name); SetupOutputVariable(state, "Solar Collector Leaving Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataTranspiredCollector->UTSC(Item).TairHX, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataTranspiredCollector->UTSC(Item).Name); SetupOutputVariable(state, "Solar Collector Outside Face Suction Velocity", - OutputProcessor::Unit::m_s, + Constant::Units::m_s, state.dataTranspiredCollector->UTSC(Item).Vsuction, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataTranspiredCollector->UTSC(Item).Name); SetupOutputVariable(state, "Solar Collector Surface Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataTranspiredCollector->UTSC(Item).Tcoll, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataTranspiredCollector->UTSC(Item).Name); SetupOutputVariable(state, "Solar Collector Plenum Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataTranspiredCollector->UTSC(Item).Tplen, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataTranspiredCollector->UTSC(Item).Name); SetupOutputVariable(state, "Solar Collector Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataTranspiredCollector->UTSC(Item).SensHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataTranspiredCollector->UTSC(Item).Name); SetupOutputVariable(state, "Solar Collector Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataTranspiredCollector->UTSC(Item).SensHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataTranspiredCollector->UTSC(Item).Name, + Constant::eResource::SolarAir, + OutputProcessor::SOVEndUseCat::HeatProduced, {}, - "SolarAir", - "HeatProduced", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Solar Collector Natural Ventilation Air Change Rate", - OutputProcessor::Unit::ach, + Constant::Units::ach, state.dataTranspiredCollector->UTSC(Item).PassiveACH, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataTranspiredCollector->UTSC(Item).Name); SetupOutputVariable(state, "Solar Collector Natural Ventilation Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataTranspiredCollector->UTSC(Item).PassiveMdotVent, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataTranspiredCollector->UTSC(Item).Name); SetupOutputVariable(state, "Solar Collector Wind Natural Ventilation Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataTranspiredCollector->UTSC(Item).PassiveMdotWind, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataTranspiredCollector->UTSC(Item).Name); SetupOutputVariable(state, "Solar Collector Buoyancy Natural Ventilation Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataTranspiredCollector->UTSC(Item).PassiveMdotTherm, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataTranspiredCollector->UTSC(Item).Name); SetupOutputVariable(state, "Solar Collector Incident Solar Radiation", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataTranspiredCollector->UTSC(Item).Isc, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataTranspiredCollector->UTSC(Item).Name); SetupOutputVariable(state, "Solar Collector System Efficiency", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataTranspiredCollector->UTSC(Item).UTSCEfficiency, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataTranspiredCollector->UTSC(Item).Name); SetupOutputVariable(state, "Solar Collector Surface Efficiency", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataTranspiredCollector->UTSC(Item).UTSCCollEff, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/TranspiredCollector.hh b/src/EnergyPlus/TranspiredCollector.hh index 1932a47c1dc..a114724dbd7 100644 --- a/src/EnergyPlus/TranspiredCollector.hh +++ b/src/EnergyPlus/TranspiredCollector.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/UFADManager.cc b/src/EnergyPlus/UFADManager.cc index 1bb028d342c..6363a68fe0b 100644 --- a/src/EnergyPlus/UFADManager.cc +++ b/src/EnergyPlus/UFADManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -674,7 +674,7 @@ namespace RoomAir { } // END FLOOR } - static constexpr std::array IntGainTypesOccupied = { + static constexpr std::array IntGainTypesOccupied = { DataHeatBalance::IntGainType::People, DataHeatBalance::IntGainType::WaterHeaterMixed, DataHeatBalance::IntGainType::WaterHeaterStratified, @@ -686,6 +686,7 @@ namespace RoomAir { DataHeatBalance::IntGainType::HotWaterEquipment, DataHeatBalance::IntGainType::SteamEquipment, DataHeatBalance::IntGainType::OtherEquipment, + DataHeatBalance::IntGainType::IndoorGreen, DataHeatBalance::IntGainType::ZoneBaseboardOutdoorTemperatureControlled, DataHeatBalance::IntGainType::GeneratorFuelCell, DataHeatBalance::IntGainType::WaterUseEquipment, diff --git a/src/EnergyPlus/UFADManager.hh b/src/EnergyPlus/UFADManager.hh index a0ed2d8455c..edea2297172 100644 --- a/src/EnergyPlus/UFADManager.hh +++ b/src/EnergyPlus/UFADManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/UnitHeater.cc b/src/EnergyPlus/UnitHeater.cc index 11ff5102a02..89859c180b3 100644 --- a/src/EnergyPlus/UnitHeater.cc +++ b/src/EnergyPlus/UnitHeater.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -674,21 +674,21 @@ namespace UnitHeater { for (UnitHeatNum = 1; UnitHeatNum <= state.dataUnitHeaters->NumOfUnitHeats; ++UnitHeatNum) { SetupOutputVariable(state, "Zone Unit Heater Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitHeaters->UnitHeat(UnitHeatNum).HeatPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name); SetupOutputVariable(state, "Zone Unit Heater Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitHeaters->UnitHeat(UnitHeatNum).HeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name); SetupOutputVariable(state, "Zone Unit Heater Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitHeaters->UnitHeat(UnitHeatNum).ElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -696,14 +696,14 @@ namespace UnitHeater { // Note that the unit heater fan electric is NOT metered because this value is already metered through the fan component SetupOutputVariable(state, "Zone Unit Heater Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitHeaters->UnitHeat(UnitHeatNum).ElecEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name); SetupOutputVariable(state, "Zone Unit Heater Fan Availability Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitHeaters->UnitHeat(UnitHeatNum).AvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -711,7 +711,7 @@ namespace UnitHeater { if (state.dataUnitHeaters->UnitHeat(UnitHeatNum).FanType_Num == FanType_SimpleOnOff) { SetupOutputVariable(state, "Zone Unit Heater Fan Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitHeaters->UnitHeat(UnitHeatNum).FanPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/UnitHeater.hh b/src/EnergyPlus/UnitHeater.hh index 57e1c35aef4..33e9950cdf9 100644 --- a/src/EnergyPlus/UnitHeater.hh +++ b/src/EnergyPlus/UnitHeater.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/UnitVentilator.cc b/src/EnergyPlus/UnitVentilator.cc index 1ac010a21f8..dff841a922f 100644 --- a/src/EnergyPlus/UnitVentilator.cc +++ b/src/EnergyPlus/UnitVentilator.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -947,49 +947,49 @@ namespace UnitVentilator { SetupOutputVariable(state, "Zone Unit Ventilator Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, unitVent.HeatPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, unitVent.Name); SetupOutputVariable(state, "Zone Unit Ventilator Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, unitVent.HeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, unitVent.Name); SetupOutputVariable(state, "Zone Unit Ventilator Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, unitVent.TotCoolPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, unitVent.Name); SetupOutputVariable(state, "Zone Unit Ventilator Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, unitVent.TotCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, unitVent.Name); SetupOutputVariable(state, "Zone Unit Ventilator Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, unitVent.SensCoolPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, unitVent.Name); SetupOutputVariable(state, "Zone Unit Ventilator Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, unitVent.SensCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, unitVent.Name); SetupOutputVariable(state, "Zone Unit Ventilator Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, unitVent.ElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -997,14 +997,14 @@ namespace UnitVentilator { // Note that the unit vent fan electric is NOT metered because this value is already metered through the fan component SetupOutputVariable(state, "Zone Unit Ventilator Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, unitVent.ElecEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, unitVent.Name); SetupOutputVariable(state, "Zone Unit Ventilator Fan Availability Status", - OutputProcessor::Unit::None, + Constant::Units::None, unitVent.AvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1012,7 +1012,7 @@ namespace UnitVentilator { if (unitVent.FanType_Num == DataHVACGlobals::FanType_SimpleOnOff) { SetupOutputVariable(state, "Zone Unit Ventilator Fan Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, unitVent.FanPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/UnitVentilator.hh b/src/EnergyPlus/UnitVentilator.hh index e08ea6e0814..26aeaeacabb 100644 --- a/src/EnergyPlus/UnitVentilator.hh +++ b/src/EnergyPlus/UnitVentilator.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/UnitarySystem.cc b/src/EnergyPlus/UnitarySystem.cc index 9d8a50a558f..de0b23e9ec3 100644 --- a/src/EnergyPlus/UnitarySystem.cc +++ b/src/EnergyPlus/UnitarySystem.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -2114,24 +2114,81 @@ namespace UnitarySystems { this->m_NoLoadAirFlowRateRatio = min(NoLoadCoolingAirFlowRateRatio, NoLoadHeatingAirFlowRateRatio); } } else { - if (this->m_CoolingCoilType_Num == DataHVACGlobals::Coil_CoolingAirToAirVariableSpeed || - this->m_HeatingCoilType_Num == DataHVACGlobals::Coil_HeatingAirToAirVariableSpeed) { - if (this->m_CoolCoilExists && this->m_CoolingCoilType_Num == DataHVACGlobals::Coil_CoolingAirToAirVariableSpeed) { + if ((this->m_CoolCoilExists || this->m_HeatCoilExists) && this->m_useNoLoadLowSpeedAirFlow) { + if (this->m_CoolingCoilType_Num == DataHVACGlobals::Coil_CoolingAirToAirVariableSpeed || + this->m_CoolingCoilType_Num == DataHVACGlobals::Coil_CoolingWaterToAirHPVSEquationFit) { Real64 MaxSpeedFlowRate = state.dataVariableSpeedCoils->VarSpeedCoil(this->m_CoolingCoilIndex) .MSRatedAirVolFlowRate(state.dataVariableSpeedCoils->VarSpeedCoil(this->m_CoolingCoilIndex).NumOfSpeeds); - if (MaxSpeedFlowRate > 0.0) { + if (MaxSpeedFlowRate > 0.0 && state.dataVariableSpeedCoils->VarSpeedCoil(this->m_CoolingCoilIndex).MSRatedAirVolFlowRate(1) > + 0.0) { // these are the air flow at speed fields, and could be 0 NoLoadCoolingAirFlowRateRatio = state.dataVariableSpeedCoils->VarSpeedCoil(this->m_CoolingCoilIndex).MSRatedAirVolFlowRate(1) / MaxSpeedFlowRate; + } else { + NoLoadCoolingAirFlowRateRatio = 1.0 / state.dataVariableSpeedCoils->VarSpeedCoil(this->m_CoolingCoilIndex).NumOfSpeeds; + } + } else if (this->m_CoolingCoilType_Num == DataHVACGlobals::CoilDX_CoolingTwoStageWHumControl) { + // for (DehumidModeNum = 0; DehumidModeNum <= thisDXCoil.NumDehumidModes; ++DehumidModeNum) + // for (CapacityStageNum = 1; CapacityStageNum <= thisDXCoil.NumCapacityStages; ++CapacityStageNum) + // PerfModeNum = DehumidModeNum * 2 + CapacityStageNum + // RatedAirVolFlowRate(PerfModeNum) so PerfModeNum = 1 to NumCapacityStages to find air flow rate + Real64 MaxSpeedFlowRate = state.dataDXCoils->DXCoil(this->m_CoolingCoilIndex) + .RatedAirVolFlowRate(state.dataDXCoils->DXCoil(this->m_CoolingCoilIndex).NumCapacityStages); + if (MaxSpeedFlowRate > 0.0 && + state.dataDXCoils->DXCoil(this->m_CoolingCoilIndex).RatedAirVolFlowRate(1) != DataSizing::AutoSize) { + NoLoadCoolingAirFlowRateRatio = + state.dataDXCoils->DXCoil(this->m_CoolingCoilIndex).RatedAirVolFlowRate(1) / MaxSpeedFlowRate; + } else { // if any flow rates are autosized use the ratio of number of capacity stages + NoLoadCoolingAirFlowRateRatio = 1.0 / state.dataDXCoils->DXCoil(this->m_CoolingCoilIndex).NumCapacityStages; + } + } else if (this->m_CoolingCoilType_Num == DataHVACGlobals::CoilDX_CoolingTwoSpeed) { + // RatedAirVolFlowRate(1) = high speed, RatedAirVolFlowRate2= low speed + Real64 MaxSpeedFlowRate = state.dataDXCoils->DXCoil(this->m_CoolingCoilIndex).RatedAirVolFlowRate(1); + if (MaxSpeedFlowRate > 0.0 && + state.dataDXCoils->DXCoil(this->m_CoolingCoilIndex).RatedAirVolFlowRate2 != DataSizing::AutoSize) { + NoLoadCoolingAirFlowRateRatio = + state.dataDXCoils->DXCoil(this->m_CoolingCoilIndex).RatedAirVolFlowRate2 / MaxSpeedFlowRate; + } else { // above flow rates for this coil could be autosized, use 1/2 for two speed coil + NoLoadCoolingAirFlowRateRatio = 0.5; + } + } else if (this->m_CoolingCoilType_Num == DataHVACGlobals::CoilDX_MultiSpeedCooling) { + // MSRatedAirVolFlowRate + Real64 MaxSpeedFlowRate = state.dataDXCoils->DXCoil(this->m_CoolingCoilIndex) + .MSRatedAirVolFlowRate(state.dataDXCoils->DXCoil(this->m_CoolingCoilIndex).NumOfSpeeds); + if (MaxSpeedFlowRate > 0.0 && + state.dataDXCoils->DXCoil(this->m_CoolingCoilIndex).MSRatedAirVolFlowRate(1) != DataSizing::AutoSize) { + NoLoadCoolingAirFlowRateRatio = + state.dataDXCoils->DXCoil(this->m_CoolingCoilIndex).MSRatedAirVolFlowRate(1) / MaxSpeedFlowRate; + } else { // if any flow rates are autosized use the ratio of number of speeds + NoLoadCoolingAirFlowRateRatio = 1.0 / state.dataDXCoils->DXCoil(this->m_CoolingCoilIndex).NumOfSpeeds; } + } else if (this->m_CoolingCoilType_Num == DataHVACGlobals::CoilDX_Cooling) { + NoLoadCoolingAirFlowRateRatio = state.dataCoilCooingDX->coilCoolingDXs[this->m_CoolingCoilIndex] + .performance.normalMode.speeds[0] + .original_input_specs.evaporator_air_flow_fraction; } - if (this->m_HeatCoilExists && this->m_HeatingCoilType_Num == DataHVACGlobals::Coil_HeatingAirToAirVariableSpeed) { + if (this->m_HeatingCoilType_Num == DataHVACGlobals::Coil_HeatingAirToAirVariableSpeed || + this->m_HeatingCoilType_Num == DataHVACGlobals::Coil_HeatingWaterToAirHPVSEquationFit) { Real64 MaxSpeedFlowRate = state.dataVariableSpeedCoils->VarSpeedCoil(this->m_HeatingCoilIndex) .MSRatedAirVolFlowRate(state.dataVariableSpeedCoils->VarSpeedCoil(this->m_HeatingCoilIndex).NumOfSpeeds); - if (MaxSpeedFlowRate > 0.0) { + if (MaxSpeedFlowRate > 0.0 && state.dataVariableSpeedCoils->VarSpeedCoil(this->m_HeatingCoilIndex).MSRatedAirVolFlowRate(1) > + 0.0) { // these are the air flow at speed fields, and could be 0 NoLoadHeatingAirFlowRateRatio = state.dataVariableSpeedCoils->VarSpeedCoil(this->m_HeatingCoilIndex).MSRatedAirVolFlowRate(1) / MaxSpeedFlowRate; + } else { + NoLoadCoolingAirFlowRateRatio = 1.0 / state.dataVariableSpeedCoils->VarSpeedCoil(this->m_CoolingCoilIndex).NumOfSpeeds; + } + } else if (this->m_HeatingCoilType_Num == DataHVACGlobals::CoilDX_MultiSpeedHeating) { + // MSRatedAirVolFlowRate + Real64 MaxSpeedFlowRate = state.dataDXCoils->DXCoil(this->m_HeatingCoilIndex) + .MSRatedAirVolFlowRate(state.dataDXCoils->DXCoil(this->m_HeatingCoilIndex).NumOfSpeeds); + if (MaxSpeedFlowRate > 0.0 && + state.dataDXCoils->DXCoil(this->m_HeatingCoilIndex).MSRatedAirVolFlowRate(1) != DataSizing::AutoSize) { + NoLoadHeatingAirFlowRateRatio = + state.dataDXCoils->DXCoil(this->m_HeatingCoilIndex).MSRatedAirVolFlowRate(1) / MaxSpeedFlowRate; + } else { // if any flow rates are autosized use the ratio of number of speeds + NoLoadHeatingAirFlowRateRatio = 1.0 / state.dataDXCoils->DXCoil(this->m_HeatingCoilIndex).NumOfSpeeds; } } this->m_NoLoadAirFlowRateRatio = min(NoLoadCoolingAirFlowRateRatio, NoLoadHeatingAirFlowRateRatio); @@ -2392,6 +2449,7 @@ namespace UnitarySystems { if (this->m_sysType == SysType::PackagedAC || this->m_sysType == SysType::PackagedHP || this->m_sysType == SysType::PackagedWSHP) { if (this->m_AirFlowControl == UseCompFlow::On) { this->m_MaxNoCoolHeatAirVolFlow = min(this->m_MaxCoolAirVolFlow, this->m_MaxHeatAirVolFlow); + this->m_NoLoadAirFlowRateRatio = 1.0; } if (this->m_CoolingCoilType_Num == DataHVACGlobals::Coil_CoolingAirToAirVariableSpeed || this->m_HeatingCoilType_Num == DataHVACGlobals::Coil_HeatingAirToAirVariableSpeed) { @@ -6084,6 +6142,9 @@ namespace UnitarySystems { } } } + if (this->input_specs.no_load_supply_air_flow_rate_low_speed == "NO") { + this->m_useNoLoadLowSpeedAirFlow = false; + } // check supply air flow calculation method if (this->m_FanExists) { @@ -6150,10 +6211,10 @@ namespace UnitarySystems { if (!ScheduleManager::CheckScheduleValueMinMax(state, this->m_FanOpModeSchedPtr, ">=", 0.0, "<=", 0.0)) { // set fan operating mode to continuous so sizing can set VS coil data this->m_FanOpMode = DataHVACGlobals::ContFanCycCoil; - // set air flow control mode: - // UseCompressorOnFlow = operate at last cooling or heating air flow requested when compressor is off - // UseCompressorOffFlow = operate at value specified by user - // AirFlowControl only valid if fan opmode = ContFanCycComp + // set air flow control mode: + // m_AirFlowControl = UseCompFlow::On means operate at last cooling or heating air flow requested when compressor is off + // m_AirFlowControl = UseCompFlow::Off means operate at no load air flow value specified by user + // AirFlowControl only valid if fan opmode = ContFanCycComp if (this->m_MaxNoCoolHeatAirVolFlow == 0.0) { this->m_AirFlowControl = UseCompFlow::On; } else { @@ -6523,10 +6584,10 @@ namespace UnitarySystems { if (this->m_FanOpModeSchedPtr > 0) { if (!ScheduleManager::CheckScheduleValueMinMax(state, this->m_FanOpModeSchedPtr, ">=", 0.0, "<=", 0.0)) { - // set air flow control mode: - // UseCompressorOnFlow = operate at last cooling or heating air flow requested when compressor is off - // UseCompressorOffFlow = operate at value specified by user - // AirFlowControl only valid IF fan opmode = ContFanCycComp + // set air flow control mode: + // m_AirFlowControl = UseCompFlow::On means operate at last cooling or heating air flow requested when compressor is off + // m_AirFlowControl = UseCompFlow::Off means operate at no load air flow value specified by user + // AirFlowControl only valid if fan opmode = ContFanCycComp if (this->m_MaxNoCoolHeatAirVolFlow == 0.0) { this->m_AirFlowControl = UseCompFlow::On; } else { @@ -7187,6 +7248,8 @@ namespace UnitarySystems { ip->getRealFieldValue(fields, objectSchemaProps, "heating_supply_air_flow_rate"); thisSys.input_specs.no_load_supply_air_flow_rate = ip->getRealFieldValue(fields, objectSchemaProps, "no_load_supply_air_flow_rate"); + thisSys.input_specs.no_load_supply_air_flow_rate_low_speed = + ip->getAlphaFieldValue(fields, objectSchemaProps, "no_load_supply_air_flow_rate_control_set_to_low_speed"); thisSys.input_specs.cooling_oa_flow_rate = ip->getRealFieldValue(fields, objectSchemaProps, "cooling_outdoor_air_flow_rate"); thisSys.input_specs.heating_oa_flow_rate = ip->getRealFieldValue(fields, objectSchemaProps, "heating_outdoor_air_flow_rate"); thisSys.input_specs.no_load_oa_flow_rate = ip->getRealFieldValue(fields, objectSchemaProps, "no_load_outdoor_air_flow_rate"); @@ -7465,6 +7528,7 @@ namespace UnitarySystems { errorsFound = true; } else if (instances != state.dataInputProcessing->inputProcessor->epJSON.end()) { auto &instancesValue = instances.value(); + auto const &objectSchemaProps = state.dataInputProcessing->inputProcessor->getObjectSchemaProps(state, cCurrentModuleObject); for (auto instance = instancesValue.begin(); instance != instancesValue.end(); ++instance) { std::string const &thisObjectName = Util::makeUPPER(instance.key()); @@ -7642,6 +7706,8 @@ namespace UnitarySystems { thisSys.input_specs.no_load_supply_air_flow_rate_per_unit_of_capacity_during_heating_operation = fields.at("no_load_supply_air_flow_rate_per_unit_of_capacity_during_heating_operation").get(); } + thisSys.input_specs.no_load_supply_air_flow_rate_low_speed = state.dataInputProcessing->inputProcessor->getAlphaFieldValue( + fields, objectSchemaProps, "no_load_supply_air_flow_rate_control_set_to_low_speed"); if (fields.find("maximum_supply_air_temperature") != fields.end()) { // not required field, has default of 80 C auto const &tempFieldVal = fields.at("maximum_supply_air_temperature"); if (tempFieldVal == "Autosize") { @@ -15933,7 +15999,9 @@ namespace UnitarySystems { thisOASysEqSizing.HeatingCapacity = false; this->m_FirstPass = false; } else if (state.dataSize->CurSysNum > 0) { - state.dataAirLoop->AirLoopControlInfo(state.dataSize->CurSysNum).UnitarySysSimulating = false; + if (state.dataSize->CurSysNum <= state.dataHVACGlobal->NumPrimaryAirSys) { + state.dataAirLoop->AirLoopControlInfo(state.dataSize->CurSysNum).UnitarySysSimulating = false; + } DataSizing::resetHVACSizingGlobals(state, state.dataSize->CurZoneEqNum, state.dataSize->CurSysNum, this->m_FirstPass); } else if (state.dataSize->CurZoneEqNum > 0) { DataSizing::resetHVACSizingGlobals(state, state.dataSize->CurZoneEqNum, state.dataSize->CurSysNum, this->m_FirstPass); @@ -16976,56 +17044,56 @@ namespace UnitarySystems { // Setup Report variables for the Unitary System that are not reported in the components themselves SetupOutputVariable(state, "Unitary System Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_PartLoadFrac, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Unitary System Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_TotCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Unitary System Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_SensCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Unitary System Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_LatCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Unitary System Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_TotHeatEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Unitary System Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_SensHeatEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Unitary System Latent Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_LatHeatEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Unitary System Ancillary Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_TotalAuxElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -17033,43 +17101,41 @@ namespace UnitarySystems { if (state.dataUnitarySystems->unitarySys[sysNum].m_CoolCoilExists) { SetupOutputVariable(state, "Unitary System Cooling Ancillary Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_CoolingAuxElecConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitarySystems->unitarySys[sysNum].Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } if (state.dataUnitarySystems->unitarySys[sysNum].m_HeatCoilExists || state.dataUnitarySystems->unitarySys[sysNum].m_SuppCoilExists) { SetupOutputVariable(state, "Unitary System Heating Ancillary Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_HeatingAuxElecConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitarySystems->unitarySys[sysNum].Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "Heating", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } SetupOutputVariable(state, "Unitary System Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_ElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Unitary System Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_ElecPowerConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -17079,14 +17145,14 @@ namespace UnitarySystems { if (state.dataUnitarySystems->unitarySys[sysNum].m_ControlType != UnitarySys::UnitarySysCtrlType::Setpoint) { SetupOutputVariable(state, "Unitary System Predicted Sensible Load to Setpoint Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_SensibleLoadPredicted, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Unitary System Predicted Moisture Load to Setpoint Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_MoistureLoadPredicted, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -17096,7 +17162,7 @@ namespace UnitarySystems { // IF(UnitarySystem(UnitarySysNum)%m_DehumidControlType_Num .EQ. dehumidm_ControlType::CoolReheat)THEN SetupOutputVariable(state, "Unitary System Dehumidification Induced Heating Demand Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_DehumidInducedHeatingDemandRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -17106,7 +17172,7 @@ namespace UnitarySystems { if (state.dataUnitarySystems->unitarySys[sysNum].m_FanExists) { SetupOutputVariable(state, "Unitary System Fan Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].FanPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -17115,7 +17181,7 @@ namespace UnitarySystems { SetupOutputVariable(state, "Unitary System Compressor Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_CompPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -17123,7 +17189,7 @@ namespace UnitarySystems { SetupOutputVariable(state, "Unitary System Frost Control Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_FrostControlStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -17135,35 +17201,35 @@ namespace UnitarySystems { if (state.dataUnitarySystems->unitarySys[sysNum].m_HeatRecActive) { SetupOutputVariable(state, "Unitary System Heat Recovery Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_HeatRecoveryRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Unitary System Heat Recovery Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataUnitarySystems->unitarySys[sysNum].m_HeatRecoveryInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Unitary System Heat Recovery Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataUnitarySystems->unitarySys[sysNum].m_HeatRecoveryOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Unitary System Heat Recovery Fluid Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataUnitarySystems->unitarySys[sysNum].m_HeatRecoveryMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Unitary System Heat Recovery Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_HeatRecoveryEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -17176,14 +17242,14 @@ namespace UnitarySystems { case DataHVACGlobals::Coil_CoolingWaterToAirHP: { SetupOutputVariable(state, "Unitary System Requested Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_CoolingCoilSensDemand, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Unitary System Requested Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_CoolingCoilLatentDemand, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -17199,14 +17265,14 @@ namespace UnitarySystems { .SubcoolReheatFlag) { SetupOutputVariable(state, "Unitary System Zone Load Sensible Heat Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].LoadSHR, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Unitary System Cooling Coil Load Sensible Heat Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].CoilSHR, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -17221,7 +17287,7 @@ namespace UnitarySystems { case DataHVACGlobals::Coil_HeatingWaterToAirHP: { SetupOutputVariable(state, "Unitary System Requested Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_HeatingCoilSensDemand, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -17239,21 +17305,21 @@ namespace UnitarySystems { state.dataUnitarySystems->unitarySys[sysNum].m_HeatingCoilType_Num == DataHVACGlobals::Coil_HeatingGas_MultiStage) { SetupOutputVariable(state, "Unitary System DX Coil Cycling Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_CycRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Unitary System DX Coil Speed Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_SpeedRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Unitary System DX Coil Speed Level", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_SpeedNum, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -17267,21 +17333,21 @@ namespace UnitarySystems { state.dataUnitarySystems->unitarySys[sysNum].m_MultiSpeedHeatingCoil)) { SetupOutputVariable(state, "Unitary System Water Coil Cycling Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_CycRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Unitary System Water Coil Speed Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_SpeedRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Unitary System Water Coil Speed Level", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_SpeedNum, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -17373,14 +17439,14 @@ namespace UnitarySystems { if (state.dataUnitarySystems->unitarySys[sysNum].m_CoolingCoilType_Num == DataHVACGlobals::CoilDX_CoolingTwoSpeed) { SetupOutputVariable(state, "Coil System Cycling Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_CoolingCycRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Coil System Compressor Speed Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_CoolingSpeedRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -17389,21 +17455,21 @@ namespace UnitarySystems { DataHVACGlobals::Coil_CoolingAirToAirVariableSpeed) { SetupOutputVariable(state, "Coil System Cycling Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_CoolingCycRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Coil System Compressor Speed Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_CoolingSpeedRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Coil System Compressor Speed Number", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_CoolingSpeedNum, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -17411,7 +17477,7 @@ namespace UnitarySystems { } else { SetupOutputVariable(state, "Coil System Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_CoolingPartLoadFrac, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -17419,7 +17485,7 @@ namespace UnitarySystems { } SetupOutputVariable(state, "Coil System Frost Control Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_FrostControlStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -17429,28 +17495,28 @@ namespace UnitarySystems { // Setup Report variables for the CoilSystemWater SetupOutputVariable(state, "Coil System Water Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_PartLoadFrac, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Coil System Water Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_TotCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Coil System Water Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_SensCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Coil System Water Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_LatCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -17459,7 +17525,7 @@ namespace UnitarySystems { if (state.dataUnitarySystems->unitarySys[sysNum].m_TemperatureOffsetControlActive) { SetupOutputVariable(state, "Coil System Water Control Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].temperatureOffsetControlStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -17470,119 +17536,119 @@ namespace UnitarySystems { // CurrentModuleObject = 'ZoneHVAC:PackagedTerminalAirConditioner' SetupOutputVariable(state, "Zone Packaged Terminal Air Conditioner Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_TotHeatEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Air Conditioner Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_TotHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Air Conditioner Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_TotCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Air Conditioner Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_TotCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Air Conditioner Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_SensHeatEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Air Conditioner Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_SensHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Air Conditioner Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_SensCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Air Conditioner Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_SensCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Air Conditioner Latent Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_LatHeatEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Air Conditioner Latent Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_LatHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Air Conditioner Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_LatCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Air Conditioner Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_LatCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Air Conditioner Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_ElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Air Conditioner Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_ElecPowerConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Air Conditioner Fan Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].FanPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Air Conditioner Compressor Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_CompPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Air Conditioner Fan Availability Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_AvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -17592,119 +17658,119 @@ namespace UnitarySystems { // CurrentModuleObject = 'ZoneHVAC:PackagedTerminalHeatPump' SetupOutputVariable(state, "Zone Packaged Terminal Heat Pump Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_TotHeatEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Heat Pump Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_TotHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Heat Pump Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_TotCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Heat Pump Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_TotCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Heat Pump Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_SensHeatEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Heat Pump Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_SensHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Heat Pump Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_SensCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Heat Pump Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_SensCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Heat Pump Latent Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_LatHeatEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Heat Pump Latent Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_LatHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Heat Pump Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_LatCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Heat Pump Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_LatCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Heat Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_ElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Heat Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_ElecPowerConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Heat Pump Fan Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].FanPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Heat Pump Compressor Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_CompPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Packaged Terminal Heat Pump Fan Availability Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_AvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -17714,119 +17780,119 @@ namespace UnitarySystems { // CurrentModuleObject = 'ZoneHVAC:WaterToAirHeatPump' SetupOutputVariable(state, "Zone Water to Air Heat Pump Total Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_TotHeatEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Water to Air Heat Pump Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_TotHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Water to Air Heat Pump Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_TotCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Water to Air Heat Pump Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_TotCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Water to Air Heat Pump Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_SensHeatEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Water to Air Heat Pump Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_SensHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Water to Air Heat Pump Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_SensCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Water to Air Heat Pump Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_SensCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Water to Air Heat Pump Latent Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_LatHeatEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Water to Air Heat Pump Latent Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_LatHeatEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Water to Air Heat Pump Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_LatCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Water to Air Heat Pump Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_LatCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Water to Air Heat Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataUnitarySystems->unitarySys[sysNum].m_ElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Water to Air Heat Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataUnitarySystems->unitarySys[sysNum].m_ElecPowerConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Water to Air Heat Pump Fan Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].FanPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Water to Air Heat Pump Compressor Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_CompPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Zone Water to Air Heat Pump Fan Availability Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_AvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -17841,21 +17907,21 @@ namespace UnitarySystems { state.dataUnitarySystems->unitarySys[sysNum].m_NumOfSpeedHeating > 1)) { SetupOutputVariable(state, "Unitary System Water Coil Multispeed Fan Cycling Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_CycRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Unitary System Water Coil Multispeed Fan Speed Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_SpeedRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataUnitarySystems->unitarySys[sysNum].Name); SetupOutputVariable(state, "Unitary System Water Coil Multispeed Fan Speed Level", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataUnitarySystems->unitarySys[sysNum].m_SpeedNum, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/UnitarySystem.hh b/src/EnergyPlus/UnitarySystem.hh index 98c3a456814..0f501bb3e16 100644 --- a/src/EnergyPlus/UnitarySystem.hh +++ b/src/EnergyPlus/UnitarySystem.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -124,6 +124,7 @@ namespace UnitarySystems { Real64 heating_supply_air_flow_rate_per_unit_of_capacity = -999.0; std::string no_load_supply_air_flow_rate_method; Real64 no_load_supply_air_flow_rate = -999.0; + std::string no_load_supply_air_flow_rate_low_speed; Real64 no_load_supply_air_flow_rate_per_floor_area = -999.0; Real64 no_load_fraction_of_autosized_cooling_supply_air_flow_rate = -999.0; Real64 no_load_fraction_of_autosized_heating_supply_air_flow_rate = -999.0; @@ -328,6 +329,7 @@ namespace UnitarySystems { int m_HeatRecoveryOutletNodeNum = 0; int m_DesignSpecMSHPIndex = -1; Real64 m_NoLoadAirFlowRateRatio = 1.0; + bool m_useNoLoadLowSpeedAirFlow = true; int m_SingleMode = 0; bool m_MultiOrVarSpeedHeatCoil = false; bool m_MultiOrVarSpeedCoolCoil = false; diff --git a/src/EnergyPlus/UserDefinedComponents.cc b/src/EnergyPlus/UserDefinedComponents.cc index 1250ce0138b..edce549a41f 100644 --- a/src/EnergyPlus/UserDefinedComponents.cc +++ b/src/EnergyPlus/UserDefinedComponents.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -131,6 +131,8 @@ namespace UserDefinedComponents { EMSManager::ManageEMS(state, EMSManager::EMSCallFrom::UserDefinedComponentModel, anyEMSRan, this->Loop(thisLoop).ErlInitProgramMngr); } else if (this->Loop(thisLoop).initPluginLocation > -1) { state.dataPluginManager->pluginManager->runSingleUserDefinedPlugin(state, this->Loop(thisLoop).initPluginLocation); + } else if (this->Loop(thisLoop).initCallbackIndex > -1) { + state.dataPluginManager->pluginManager->runSingleUserDefinedCallback(state, this->Loop(thisLoop).initCallbackIndex); } PlantUtilities::InitComponentNodes(state, @@ -201,6 +203,8 @@ namespace UserDefinedComponents { EMSManager::ManageEMS(state, EMSManager::EMSCallFrom::UserDefinedComponentModel, anyEMSRan, this->Loop(thisLoop).ErlSimProgramMngr); } else if (this->Loop(thisLoop).simPluginLocation > -1) { state.dataPluginManager->pluginManager->runSingleUserDefinedPlugin(state, this->Loop(thisLoop).simPluginLocation); + } else if (this->Loop(thisLoop).simCallbackIndex > -1) { + state.dataPluginManager->pluginManager->runSingleUserDefinedCallback(state, this->Loop(thisLoop).simCallbackIndex); } } @@ -208,6 +212,8 @@ namespace UserDefinedComponents { EMSManager::ManageEMS(state, EMSManager::EMSCallFrom::UserDefinedComponentModel, anyEMSRan, this->ErlSimProgramMngr); } else if (this->simPluginLocation > -1) { state.dataPluginManager->pluginManager->runSingleUserDefinedPlugin(state, this->simPluginLocation); + } else if (this->simCallbackIndex > -1) { + state.dataPluginManager->pluginManager->runSingleUserDefinedCallback(state, this->simCallbackIndex); } this->report(state, thisLoop); @@ -272,6 +278,9 @@ namespace UserDefinedComponents { } else if (state.dataUserDefinedComponents->UserCoil(CompNum).initPluginLocation > -1) { state.dataPluginManager->pluginManager->runSingleUserDefinedPlugin( state, state.dataUserDefinedComponents->UserCoil(CompNum).initPluginLocation); + } else if (state.dataUserDefinedComponents->UserCoil(CompNum).initCallbackIndex > -1) { + state.dataPluginManager->pluginManager->runSingleUserDefinedCallback( + state, state.dataUserDefinedComponents->UserCoil(CompNum).initCallbackIndex); } if (state.dataUserDefinedComponents->UserCoil(CompNum).PlantIsConnected) { @@ -298,6 +307,9 @@ namespace UserDefinedComponents { } else if (state.dataUserDefinedComponents->UserCoil(CompNum).simPluginLocation > -1) { state.dataPluginManager->pluginManager->runSingleUserDefinedPlugin(state, state.dataUserDefinedComponents->UserCoil(CompNum).simPluginLocation); + } else if (state.dataUserDefinedComponents->UserCoil(CompNum).simCallbackIndex > -1) { + state.dataPluginManager->pluginManager->runSingleUserDefinedCallback(state, + state.dataUserDefinedComponents->UserCoil(CompNum).simCallbackIndex); } state.dataUserDefinedComponents->UserCoil(CompNum).report(state); @@ -379,6 +391,9 @@ namespace UserDefinedComponents { } else if (state.dataUserDefinedComponents->UserZoneAirHVAC(CompNum).initPluginLocation > -1) { state.dataPluginManager->pluginManager->runSingleUserDefinedPlugin( state, state.dataUserDefinedComponents->UserZoneAirHVAC(CompNum).initPluginLocation); + } else if (state.dataUserDefinedComponents->UserZoneAirHVAC(CompNum).initCallbackIndex > -1) { + state.dataPluginManager->pluginManager->runSingleUserDefinedCallback( + state, state.dataUserDefinedComponents->UserZoneAirHVAC(CompNum).initCallbackIndex); } if (state.dataUserDefinedComponents->UserZoneAirHVAC(CompNum).NumPlantConnections > 0) { for (int Loop = 1; Loop <= state.dataUserDefinedComponents->UserZoneAirHVAC(CompNum).NumPlantConnections; ++Loop) { @@ -408,6 +423,9 @@ namespace UserDefinedComponents { } else if (state.dataUserDefinedComponents->UserZoneAirHVAC(CompNum).simPluginLocation > -1) { state.dataPluginManager->pluginManager->runSingleUserDefinedPlugin( state, state.dataUserDefinedComponents->UserZoneAirHVAC(CompNum).simPluginLocation); + } else if (state.dataUserDefinedComponents->UserZoneAirHVAC(CompNum).simCallbackIndex > -1) { + state.dataPluginManager->pluginManager->runSingleUserDefinedCallback( + state, state.dataUserDefinedComponents->UserZoneAirHVAC(CompNum).simCallbackIndex); } state.dataUserDefinedComponents->UserZoneAirHVAC(CompNum).report(state); @@ -495,6 +513,9 @@ namespace UserDefinedComponents { } else if (state.dataUserDefinedComponents->UserAirTerminal(CompNum).initPluginLocation > -1) { state.dataPluginManager->pluginManager->runSingleUserDefinedPlugin( state, state.dataUserDefinedComponents->UserAirTerminal(CompNum).initPluginLocation); + } else if (state.dataUserDefinedComponents->UserAirTerminal(CompNum).initCallbackIndex > -1) { + state.dataPluginManager->pluginManager->runSingleUserDefinedCallback( + state, state.dataUserDefinedComponents->UserAirTerminal(CompNum).initCallbackIndex); } if (state.dataUserDefinedComponents->UserAirTerminal(CompNum).NumPlantConnections > 0) { for (int Loop = 1; Loop <= state.dataUserDefinedComponents->UserAirTerminal(CompNum).NumPlantConnections; ++Loop) { @@ -524,6 +545,9 @@ namespace UserDefinedComponents { } else if (state.dataUserDefinedComponents->UserAirTerminal(CompNum).simPluginLocation > -1) { state.dataPluginManager->pluginManager->runSingleUserDefinedPlugin( state, state.dataUserDefinedComponents->UserAirTerminal(CompNum).simPluginLocation); + } else if (state.dataUserDefinedComponents->UserAirTerminal(CompNum).simCallbackIndex > -1) { + state.dataPluginManager->pluginManager->runSingleUserDefinedCallback( + state, state.dataUserDefinedComponents->UserAirTerminal(CompNum).simCallbackIndex); } state.dataUserDefinedComponents->UserAirTerminal(CompNum).report(state); @@ -584,10 +608,16 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserPlantComp(CompLoop).simPluginLocation = state.dataPluginManager->pluginManager->getLocationOfUserDefinedPlugin(state, cAlphaArgs(2)); if (state.dataUserDefinedComponents->UserPlantComp(CompLoop).simPluginLocation == -1) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, "Program Manager Name not found as an EMS Program Manager or a Python Plugin Instance object."); - ErrorsFound = true; + state.dataUserDefinedComponents->UserPlantComp(CompLoop).simCallbackIndex = + state.dataPluginManager->pluginManager->getUserDefinedCallbackIndex(state, cAlphaArgs(2)); + if (state.dataUserDefinedComponents->UserPlantComp(CompLoop).simCallbackIndex == -1) { + ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError( + state, + "Program Manager Name not found as an EMS Program Manager, API callback or a Python Plugin Instance object."); + ErrorsFound = true; + } } } } @@ -666,11 +696,16 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserPlantComp(CompLoop).Loop(ConnectionLoop).initPluginLocation = state.dataPluginManager->pluginManager->getLocationOfUserDefinedPlugin(state, cAlphaArgs(aArgCount + 4)); if (state.dataUserDefinedComponents->UserPlantComp(CompLoop).Loop(ConnectionLoop).initPluginLocation == -1) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(aArgCount + 4), cAlphaArgs(aArgCount + 4))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, - "Program Manager Name not found as an EMS Program Manager or a Python Plugin Instance object."); - ErrorsFound = true; + state.dataUserDefinedComponents->UserPlantComp(CompLoop).Loop(ConnectionLoop).initCallbackIndex = + state.dataPluginManager->pluginManager->getUserDefinedCallbackIndex(state, cAlphaArgs(aArgCount + 4)); + if (state.dataUserDefinedComponents->UserPlantComp(CompLoop).Loop(ConnectionLoop).initCallbackIndex == -1) { + ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(aArgCount + 4), cAlphaArgs(aArgCount + 4))); + ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, + "Program Manager Name not found as an EMS Program Manager, API callback, or a Python " + "Plugin Instance object."); + ErrorsFound = true; + } } } } @@ -684,10 +719,14 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserPlantComp(CompLoop).Loop(ConnectionLoop).simPluginLocation = state.dataPluginManager->pluginManager->getLocationOfUserDefinedPlugin(state, cAlphaArgs(aArgCount + 5)); if (state.dataUserDefinedComponents->UserPlantComp(CompLoop).Loop(ConnectionLoop).simPluginLocation == -1) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(aArgCount + 4), cAlphaArgs(aArgCount + 4))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, "Program Manager Name not found."); - ErrorsFound = true; + state.dataUserDefinedComponents->UserPlantComp(CompLoop).Loop(ConnectionLoop).simCallbackIndex = + state.dataPluginManager->pluginManager->getUserDefinedCallbackIndex(state, cAlphaArgs(aArgCount + 5)); + if (state.dataUserDefinedComponents->UserPlantComp(CompLoop).Loop(ConnectionLoop).simCallbackIndex == -1) { + ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(aArgCount + 4), cAlphaArgs(aArgCount + 4))); + ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, "Program Manager Name not found as EMS Program, API callback, or Python Plugin."); + ErrorsFound = true; + } } } } @@ -975,6 +1014,8 @@ namespace UserDefinedComponents { if (state.dataUserDefinedComponents->UserPlantComp(CompLoop).Loop(ConnectionLoop).ErlSimProgramMngr > 0) ++MgrCountTest; if (state.dataUserDefinedComponents->UserPlantComp(CompLoop).Loop(ConnectionLoop).initPluginLocation >= 0) ++MgrCountTest; if (state.dataUserDefinedComponents->UserPlantComp(CompLoop).Loop(ConnectionLoop).simPluginLocation >= 0) ++MgrCountTest; + if (state.dataUserDefinedComponents->UserPlantComp(CompLoop).Loop(ConnectionLoop).initCallbackIndex >= 0) ++MgrCountTest; + if (state.dataUserDefinedComponents->UserPlantComp(CompLoop).Loop(ConnectionLoop).simCallbackIndex >= 0) ++MgrCountTest; } if (MgrCountTest == 0) { ShowSevereError(state, format("Invalid {}={}", cCurrentModuleObject, cAlphaArgs(1))); @@ -1030,10 +1071,16 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserCoil(CompLoop).simPluginLocation = state.dataPluginManager->pluginManager->getLocationOfUserDefinedPlugin(state, cAlphaArgs(2)); if (state.dataUserDefinedComponents->UserCoil(CompLoop).simPluginLocation == -1) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, "Program Manager Name not found as an EMS Program Manager or a Python Plugin Instance object."); - ErrorsFound = true; + state.dataUserDefinedComponents->UserCoil(CompLoop).simCallbackIndex = + state.dataPluginManager->pluginManager->getUserDefinedCallbackIndex(state, cAlphaArgs(2)); + if (state.dataUserDefinedComponents->UserCoil(CompLoop).simCallbackIndex == -1) { + ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError( + state, + "Program Manager Name not found as an EMS Program Manager, API callback, or a Python Plugin Instance object."); + ErrorsFound = true; + } } } } @@ -1047,10 +1094,16 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserCoil(CompLoop).initPluginLocation = state.dataPluginManager->pluginManager->getLocationOfUserDefinedPlugin(state, cAlphaArgs(3)); if (state.dataUserDefinedComponents->UserCoil(CompLoop).initPluginLocation == -1) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, "Program Manager Name not found as an EMS Program Manager or a Python Plugin Instance object."); - ErrorsFound = true; + state.dataUserDefinedComponents->UserCoil(CompLoop).initCallbackIndex = + state.dataPluginManager->pluginManager->getUserDefinedCallbackIndex(state, cAlphaArgs(3)); + if (state.dataUserDefinedComponents->UserCoil(CompLoop).initCallbackIndex == -1) { + ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); + ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError( + state, + "Program Manager Name not found as an EMS Program Manager, API callback or a Python Plugin Instance object."); + ErrorsFound = true; + } } } } @@ -1419,10 +1472,16 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserZoneAirHVAC(CompLoop).simPluginLocation = state.dataPluginManager->pluginManager->getLocationOfUserDefinedPlugin(state, cAlphaArgs(2)); if (state.dataUserDefinedComponents->UserZoneAirHVAC(CompLoop).simPluginLocation == -1) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, "Program Manager Name not found as an EMS Program Manager or a Python Plugin Instance object."); - ErrorsFound = true; + state.dataUserDefinedComponents->UserZoneAirHVAC(CompLoop).simCallbackIndex = + state.dataPluginManager->pluginManager->getUserDefinedCallbackIndex(state, cAlphaArgs(2)); + if (state.dataUserDefinedComponents->UserZoneAirHVAC(CompLoop).simCallbackIndex == -1) { + ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError( + state, + "Program Manager Name not found as an EMS Program Manager, API callback or a Python Plugin Instance object."); + ErrorsFound = true; + } } } } @@ -1436,10 +1495,16 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserZoneAirHVAC(CompLoop).initPluginLocation = state.dataPluginManager->pluginManager->getLocationOfUserDefinedPlugin(state, cAlphaArgs(3)); if (state.dataUserDefinedComponents->UserZoneAirHVAC(CompLoop).initPluginLocation == -1) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, "Program Manager Name not found as an EMS Program Manager or a Python Plugin Instance object."); - ErrorsFound = true; + state.dataUserDefinedComponents->UserZoneAirHVAC(CompLoop).initCallbackIndex = + state.dataPluginManager->pluginManager->getUserDefinedCallbackIndex(state, cAlphaArgs(3)); + if (state.dataUserDefinedComponents->UserZoneAirHVAC(CompLoop).initCallbackIndex == -1) { + ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); + ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError( + state, + "Program Manager Name not found as an EMS Program Manager, API callback or a Python Plugin Instance object."); + ErrorsFound = true; + } } } } @@ -1868,10 +1933,16 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserAirTerminal(CompLoop).simPluginLocation = state.dataPluginManager->pluginManager->getLocationOfUserDefinedPlugin(state, cAlphaArgs(2)); if (state.dataUserDefinedComponents->UserAirTerminal(CompLoop).simPluginLocation == -1) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, "Program Manager Name not found as an EMS Program Manager or a Python Plugin Instance object."); - ErrorsFound = true; + state.dataUserDefinedComponents->UserAirTerminal(CompLoop).simCallbackIndex = + state.dataPluginManager->pluginManager->getUserDefinedCallbackIndex(state, cAlphaArgs(2)); + if (state.dataUserDefinedComponents->UserAirTerminal(CompLoop).simCallbackIndex == -1) { + ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError( + state, + "Program Manager Name not found as an EMS Program Manager, API callback or a Python Plugin Instance object."); + ErrorsFound = true; + } } } } @@ -1885,10 +1956,16 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserAirTerminal(CompLoop).initPluginLocation = state.dataPluginManager->pluginManager->getLocationOfUserDefinedPlugin(state, cAlphaArgs(3)); if (state.dataUserDefinedComponents->UserAirTerminal(CompLoop).initPluginLocation == -1) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, "Program Manager Name not found as an EMS Program Manager or a Python Plugin Instance object."); - ErrorsFound = true; + state.dataUserDefinedComponents->UserAirTerminal(CompLoop).initCallbackIndex = + state.dataPluginManager->pluginManager->getUserDefinedCallbackIndex(state, cAlphaArgs(3)); + if (state.dataUserDefinedComponents->UserAirTerminal(CompLoop).initCallbackIndex == -1) { + ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); + ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError( + state, + "Program Manager Name not found as an EMS Program Manager, API callback or a Python Plugin Instance object."); + ErrorsFound = true; + } } } } diff --git a/src/EnergyPlus/UserDefinedComponents.hh b/src/EnergyPlus/UserDefinedComponents.hh index f9105e6fe2b..ff4aef5842d 100644 --- a/src/EnergyPlus/UserDefinedComponents.hh +++ b/src/EnergyPlus/UserDefinedComponents.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -69,10 +69,12 @@ namespace UserDefinedComponents { struct PlantConnectionStruct { // Members - int ErlInitProgramMngr; // points to an EMS:ProgramManager to run for setup and sizing - int ErlSimProgramMngr; // points to an EMS:ProgramManager to run only when this connection is called - int simPluginLocation; // If Python Plugins are used to simulate this, this defines the location in the plugin structure - int initPluginLocation; // If Python Plugins are used to init this, this defines the location in the plugin structure + int ErlInitProgramMngr; // points to an EMS:ProgramManager to run for setup and sizing + int ErlSimProgramMngr; // points to an EMS:ProgramManager to run only when this connection is called + int simPluginLocation; // If Python Plugins are used to simulate this, this defines the location in the plugin structure + int initPluginLocation; // If Python Plugins are used to init this, this defines the location in the plugin structure + int simCallbackIndex = -1; // If API Callbacks are used to simulate this, this defines the index in the user-defined callbacks vector + int initCallbackIndex = -1; // If API Callbacks are used to init this, this defines the index in the user-defined callbacks vector PlantLocation plantLoc; int InletNodeNum; // plant loop inlet node index int OutletNodeNum; // plant loop outlet node index @@ -170,9 +172,10 @@ namespace UserDefinedComponents { struct UserPlantComponentStruct : PlantComponent { // Members - std::string Name; // user identifier - int ErlSimProgramMngr; // EMS:ProgramManager to always run when this model is called - int simPluginLocation; // If Python Plugins are used to simulate this, this defines the location in the plugin structure + std::string Name; // user identifier + int ErlSimProgramMngr; // EMS:ProgramManager to always run when this model is called + int simPluginLocation; // If Python Plugins are used to simulate this, this defines the location in the plugin structure + int simCallbackIndex = -1; int NumPlantConnections; // count of how many plant loop connections there are Array1D Loop; // collect data for each plant loop connection AirConnectionStruct Air; @@ -205,12 +208,14 @@ namespace UserDefinedComponents { struct UserCoilComponentStruct { // Members - std::string Name; // user identifier - int ErlSimProgramMngr; // EMS:ProgramManager to always run when this model is called - int ErlInitProgramMngr; // EMS:ProgramManager to run when this model is initialized and setup - int initPluginLocation; // If Python Plugins are used to init this, this defines the location in the plugin structure - int simPluginLocation; // If Python Plugins are used to simulate this, this defines the location in the plugin structure - int NumAirConnections; // count of how many air connections there are + std::string Name; // user identifier + int ErlSimProgramMngr; // EMS:ProgramManager to always run when this model is called + int ErlInitProgramMngr; // EMS:ProgramManager to run when this model is initialized and setup + int initPluginLocation; // If Python Plugins are used to init this, this defines the location in the plugin structure + int simPluginLocation; // If Python Plugins are used to simulate this, this defines the location in the plugin structure + int initCallbackIndex = -1; // If API callbacks are used to init this, this defines the location in the vector + int simCallbackIndex = -1; // If API callbacks are used to simulate this, this defines the location in the vector + int NumAirConnections; // count of how many air connections there are bool PlantIsConnected; Array1D Air; PlantConnectionStruct Loop; @@ -233,11 +238,13 @@ namespace UserDefinedComponents { struct UserZoneHVACForcedAirComponentStruct { // Members - std::string Name; // user identifier - int ErlSimProgramMngr; // EMS:ProgramManager to always run when this model is called - int ErlInitProgramMngr; // EMS:ProgramManager to run when this model is initialized and setup - int initPluginLocation; // If Python Plugins are used to init this, this defines the location in the plugin structure - int simPluginLocation; // If Python Plugins are used to simulate this, this defines the location in the plugin structure + std::string Name; // user identifier + int ErlSimProgramMngr; // EMS:ProgramManager to always run when this model is called + int ErlInitProgramMngr; // EMS:ProgramManager to run when this model is initialized and setup + int initPluginLocation; // If Python Plugins are used to init this, this defines the location in the plugin structure + int simPluginLocation; // If Python Plugins are used to simulate this, this defines the location in the plugin structure + int initCallbackIndex = -1; // If API callbacks are used to init this, this defines the location in the vector + int simCallbackIndex = -1; // If API callbacks are used to simulate this, this defines the location in the vector AirConnectionStruct ZoneAir; AirConnectionStruct SourceAir; int NumPlantConnections; // count of how many plant loop (demand) connections there are @@ -268,11 +275,13 @@ namespace UserDefinedComponents { // Members std::string Name; // user identifier int ActualCtrlZoneNum; - int ADUNum; // index of corresponding air distribution unit - int ErlSimProgramMngr; // EMS:ProgramManager to always run when this model is called - int ErlInitProgramMngr; // EMS:ProgramManager to run when this model is initialized and setup - int initPluginLocation; // If Python Plugins are used to init this, this defines the location in the plugin structure - int simPluginLocation; // If Python Plugins are used to simulate this, this defines the location in the plugin structure + int ADUNum; // index of corresponding air distribution unit + int ErlSimProgramMngr; // EMS:ProgramManager to always run when this model is called + int ErlInitProgramMngr; // EMS:ProgramManager to run when this model is initialized and setup + int initPluginLocation; // If Python Plugins are used to init this, this defines the location in the plugin structure + int simPluginLocation; // If Python Plugins are used to simulate this, this defines the location in the plugin structure + int initCallbackIndex = -1; // If API callbacks are used to init this, this defines the location in the vector + int simCallbackIndex = -1; // If API callbacks are used to simulate this, this defines the location in the vector AirConnectionStruct AirLoop; AirConnectionStruct SourceAir; int NumPlantConnections; // count of how many plant loop (demand) connections there are diff --git a/src/EnergyPlus/UtilityRoutines.cc b/src/EnergyPlus/UtilityRoutines.cc index 8d1fe259496..024782a1607 100644 --- a/src/EnergyPlus/UtilityRoutines.cc +++ b/src/EnergyPlus/UtilityRoutines.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -1658,6 +1658,14 @@ void ShowSevereDuplicateName(EnergyPlusData &state, ErrorObjectHeader const &eoh ShowSevereError(state, format("{}: {} = {}, duplicate name.", eoh.routineName, eoh.objectType, eoh.objectName)); } +void ShowSevereEmptyField( + EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view depFieldName, std::string_view depFieldVal) +{ + ShowSevereError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, + format("{} cannot be empty{}.", fieldName, depFieldName.empty() ? "" : format(" when {} = {}", depFieldName, depFieldVal))); +} + void ShowSevereItemNotFound(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldVal) { ShowSevereError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); @@ -1676,12 +1684,22 @@ void ShowSevereInvalidBool(EnergyPlusData &state, ErrorObjectHeader const &eoh, ShowContinueError(state, format("{} = {}, invalid boolean (\"Yes\"/\"No\").", fieldName, fieldVal)); } -void ShowSevereEmptyField( - EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view depFieldName, std::string_view depFieldVal) +void ShowSevereCustomMessage(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view msg) { ShowSevereError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, - format("{} cannot be empty{}.", fieldName, depFieldName.empty() ? "" : format(" when {} = {}", depFieldName, depFieldVal))); + ShowContinueError(state, format("{}", msg)); +} + +void ShowWarningItemNotFound(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldVal) +{ + ShowWarningError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, format("{} = {}, item not found", fieldName, fieldVal)); +} + +void ShowWarningCustomMessage(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view msg) +{ + ShowWarningError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, format("{}", msg)); } void ShowWarningInvalidKey( diff --git a/src/EnergyPlus/UtilityRoutines.hh b/src/EnergyPlus/UtilityRoutines.hh index a566f3dd6f3..295d5334fbb 100644 --- a/src/EnergyPlus/UtilityRoutines.hh +++ b/src/EnergyPlus/UtilityRoutines.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -227,36 +227,31 @@ struct ErrorObjectHeader std::string_view objectName; }; -// Wrappers for common errors void ShowSevereDuplicateName(EnergyPlusData &state, ErrorObjectHeader const &eoh); - void ShowSevereEmptyField(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view depFieldName = {}, std::string_view depFieldValue = {}); - void ShowSevereItemNotFound(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldValue); - void ShowSevereInvalidKey(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldValue); - void ShowSevereInvalidBool(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldValue); +void ShowSevereCustomMessage(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view msg); +void ShowWarningDuplicateName(EnergyPlusData &state, ErrorObjectHeader const &eoh); void ShowWarningEmptyField(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view defaultValue, std::string_view depFieldName = {}, std::string_view depFieldValue = {}); - void ShowWarningItemNotFound( EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldValue, std::string_view defaultValue); - -void ShowWarningInvalidBool( - EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldValue, std::string_view defaultValue); - void ShowWarningInvalidKey( EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldValue, std::string_view defaultValue); +void ShowWarningInvalidBool( + EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldValue, std::string_view defaultValue); +void ShowWarningCustomMessage(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view msg); namespace Util { diff --git a/src/EnergyPlus/VariableSpeedCoils.cc b/src/EnergyPlus/VariableSpeedCoils.cc index 7f65a7237fa..20c7a2e502a 100644 --- a/src/EnergyPlus/VariableSpeedCoils.cc +++ b/src/EnergyPlus/VariableSpeedCoils.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -805,54 +805,51 @@ namespace VariableSpeedCoils { // CurrentModuleObject = "Coil:Cooling:WaterToAirHeatPump:VariableSpeedEquationFit" SetupOutputVariable(state, "Cooling Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).EnergyLoadTotal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "ENERGYTRANSFER", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).EnergySensible, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).EnergyLatent, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Source Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).EnergySource, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name, + Constant::eResource::PlantLoopCoolingDemand, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "PLANTLOOPCOOLINGDEMAND", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); // for table output, being consistent with outher water-to-air coils // IF (VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal /= AutoSize) THEN @@ -1365,45 +1362,43 @@ namespace VariableSpeedCoils { // CurrentModuleObject = "Coil:Cooling:DX:VariableSpeed" SetupOutputVariable(state, "Cooling Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).EnergyLoadTotal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "ENERGYTRANSFER", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).EnergySensible, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).EnergyLatent, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Source Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).EnergySource, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -1914,40 +1909,37 @@ namespace VariableSpeedCoils { // CurrentModuleObject = "Coil:Heating:WaterToAirHeatPump:VariableSpeedEquationFit" SetupOutputVariable(state, "Heating Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "Heating", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).EnergyLoadTotal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "ENERGYTRANSFER", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Source Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).EnergySource, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name, + Constant::eResource::PlantLoopHeatingDemand, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "PLANTLOOPHEATINGDEMAND", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); // create predefined report entries PreDefTableEntry( @@ -2403,31 +2395,29 @@ namespace VariableSpeedCoils { // CurrentModuleObject = "Coil:Heating:DX:Variablespeed " SetupOutputVariable(state, "Heating Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "Heating", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).EnergyLoadTotal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "ENERGYTRANSFER", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Source Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).EnergySource, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -3037,60 +3027,57 @@ namespace VariableSpeedCoils { // CurrentModuleObject = "Coil:Waterheating:Airtowaterheatpump:Variablespeed" SetupOutputVariable(state, "Cooling Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "Heating", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).EnergySensible, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).EnergyLatent, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Water Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).EnergySource, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name, + Constant::eResource::PlantLoopHeatingDemand, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "PLANTLOOPHEATINGDEMAND", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); if (state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).IsDXCoilInZone) { SetupOutputVariable(state, "Cooling Coil Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).EnergyLoadTotal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "ENERGYTRANSFER", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } else { SetupOutputVariable(state, "Cooling Coil Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).EnergyLoadTotal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -3123,98 +3110,98 @@ namespace VariableSpeedCoils { // air source cooling coils SetupOutputVariable(state, "Cooling Coil Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).AirMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Air Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletAirDBTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Air Inlet Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletAirHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).QLatent, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Air Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).OutletAirDBTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Air Outlet Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).OutletAirHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).QSensible, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).QLoadTotal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).PartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RunFrac, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Source Side Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).QSource, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Upper Speed Level", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).SpeedNumReport, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Neighboring Speed Levels Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).SpeedRatioReport, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3223,186 +3210,180 @@ namespace VariableSpeedCoils { if (state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).CondensateCollectMode == CondensateToTank) { SetupOutputVariable(state, "Cooling Coil Condensate Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).CondensateVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Condensate Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).CondensateVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name, + Constant::eResource::OnSiteWater, + OutputProcessor::SOVEndUseCat::Condensate, {}, - "OnSiteWater", - "Condensate", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } if (state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).ReportEvapCondVars) { SetupOutputVariable(state, "Cooling Coil Condenser Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).CondInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).EvapWaterConsump, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name, + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Water", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Mains Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).EvapWaterConsump, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name, + Constant::eResource::MainsWater, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "MainsWater", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).EvapCondPumpElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Evaporative Condenser Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).EvapCondPumpElecConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); if (state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).BasinHeaterPowerFTempDiff > 0.0) { SetupOutputVariable(state, "Cooling Coil Basin Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).BasinHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Basin Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).BasinHeaterConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } } SetupOutputVariable(state, "Cooling Coil Crankcase Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).CrankcaseHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Crankcase Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).CrankcaseHeaterConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } else { // air source heating coils SetupOutputVariable(state, "Heating Coil Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).AirMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Air Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletAirDBTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Air Inlet Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletAirHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Air Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).OutletAirDBTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Air Outlet Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).OutletAirHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).QSensible, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).QLoadTotal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).PartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RunFrac, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3410,21 +3391,21 @@ namespace VariableSpeedCoils { SetupOutputVariable(state, "Heating Coil Source Side Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).QSource, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Upper Speed Level", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).SpeedNumReport, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Neighboring Speed Levels Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).SpeedRatioReport, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3432,42 +3413,40 @@ namespace VariableSpeedCoils { SetupOutputVariable(state, "Heating Coil Defrost Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).DefrostPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Defrost Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).DefrostConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "HEATING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Crankcase Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).CrankcaseHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Crankcase Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).CrankcaseHeaterConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "HEATING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } } else { @@ -3476,49 +3455,49 @@ namespace VariableSpeedCoils { // Setup Report variables for water source Heat Pump SetupOutputVariable(state, "Cooling Coil Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).QLoadTotal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).QSensible, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).QLatent, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Source Side Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).QSource, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).PartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RunFrac, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3526,56 +3505,56 @@ namespace VariableSpeedCoils { SetupOutputVariable(state, "Cooling Coil Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).AirMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Air Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletAirDBTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Air Inlet Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletAirHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Air Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).OutletAirDBTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Air Outlet Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).OutletAirHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Source Side Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).WaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Source Side Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Source Side Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).OutletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3583,21 +3562,21 @@ namespace VariableSpeedCoils { SetupOutputVariable(state, "Cooling Coil Upper Speed Level", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).SpeedNumReport, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Neighboring Speed Levels Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).SpeedRatioReport, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Recoverable Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).QWasteHeat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3608,21 +3587,21 @@ namespace VariableSpeedCoils { // Setup Report variables for water source Heat Pump SetupOutputVariable(state, "Heating Coil Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).QLoadTotal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).QSensible, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3630,21 +3609,21 @@ namespace VariableSpeedCoils { SetupOutputVariable(state, "Heating Coil Source Side Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).QSource, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).PartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RunFrac, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3652,56 +3631,56 @@ namespace VariableSpeedCoils { SetupOutputVariable(state, "Heating Coil Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).AirMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Air Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletAirDBTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Air Inlet Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletAirHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Air Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).OutletAirDBTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Air Outlet Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).OutletAirHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Source Side Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).WaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Source Side Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Source Side Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).OutletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3709,21 +3688,21 @@ namespace VariableSpeedCoils { SetupOutputVariable(state, "Heating Coil Upper Speed Level", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).SpeedNumReport, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Neighboring Speed Levels Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).SpeedRatioReport, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Heating Coil Recoverable Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).QWasteHeat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3732,49 +3711,49 @@ namespace VariableSpeedCoils { // air source water heating coil SetupOutputVariable(state, "Cooling Coil Water Heating Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).QLoadTotal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).QSensible, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).QLatent, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Total Water Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).TotalHeatingEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).PartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RunFrac, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3782,56 +3761,56 @@ namespace VariableSpeedCoils { SetupOutputVariable(state, "Cooling Coil Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).AirMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Air Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletAirDBTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Air Inlet Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletAirHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Air Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).OutletAirDBTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Air Outlet Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).OutletAirHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Water Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).WaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Water Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Water Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).OutletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3839,34 +3818,33 @@ namespace VariableSpeedCoils { SetupOutputVariable(state, "Cooling Coil Crankcase Heater Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).CrankcaseHeaterPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Crankcase Heater Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).CrankcaseHeaterConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "HEATING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Upper Speed Level", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).SpeedNumReport, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Neighboring Speed Levels Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).SpeedRatioReport, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3874,23 +3852,22 @@ namespace VariableSpeedCoils { SetupOutputVariable(state, "Cooling Coil Water Heating Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).HPWHCondPumpElecNomPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name); SetupOutputVariable(state, "Cooling Coil Water Heating Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).EvapCondPumpElecConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "HEATING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } } } @@ -4748,10 +4725,16 @@ namespace VariableSpeedCoils { } } else { CheckSysSizing(state, format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name); - if (state.dataSize->FinalSysSizing(state.dataSize->CurSysNum).DesMainVolFlow >= DataHVACGlobals::SmallAirVolFlow) { - RatedAirVolFlowRateDes = state.dataSize->FinalSysSizing(state.dataSize->CurSysNum).DesMainVolFlow; + if (state.dataSize->CurOASysNum > 0 && state.dataAirLoop->OutsideAirSys(state.dataSize->CurOASysNum).AirLoopDOASNum > -1) { + auto &thisAirloopDOAS = + state.dataAirLoopHVACDOAS->airloopDOAS[state.dataAirLoop->OutsideAirSys(state.dataSize->CurOASysNum).AirLoopDOASNum]; + RatedAirVolFlowRateDes = thisAirloopDOAS.SizingMassFlow / state.dataEnvrn->StdRhoAir; } else { - RatedAirVolFlowRateDes = 0.0; + if (state.dataSize->FinalSysSizing(state.dataSize->CurSysNum).DesMainVolFlow >= DataHVACGlobals::SmallAirVolFlow) { + RatedAirVolFlowRateDes = state.dataSize->FinalSysSizing(state.dataSize->CurSysNum).DesMainVolFlow; + } else { + RatedAirVolFlowRateDes = 0.0; + } } } } @@ -4800,72 +4783,95 @@ namespace VariableSpeedCoils { } } else { CheckSysSizing(state, format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name); - auto &finalSysSizing = state.dataSize->FinalSysSizing(state.dataSize->CurSysNum); - VolFlowRate = varSpeedCoil.RatedAirVolFlowRate; - if (VolFlowRate >= DataHVACGlobals::SmallAirVolFlow) { - if (state.dataSize->CurOASysNum > 0) { // coil is in the OA stream - MixTemp = finalSysSizing.OutTempAtCoolPeak; - MixHumRat = finalSysSizing.OutHumRatAtCoolPeak; - SupTemp = finalSysSizing.PrecoolTemp; - SupHumRat = finalSysSizing.PrecoolHumRat; - } else { // coil is on the main air loop - SupTemp = finalSysSizing.CoolSupTemp; - SupHumRat = finalSysSizing.CoolSupHumRat; - if (state.dataAirSystemsData->PrimaryAirSystems(state.dataSize->CurSysNum).NumOACoolCoils == - 0) { // there is no precooling of the OA stream - MixTemp = finalSysSizing.MixTempAtCoolPeak; - MixHumRat = finalSysSizing.MixHumRatAtCoolPeak; - } else { // there is precooling of OA stream - if (VolFlowRate > 0.0) { - OutAirFrac = finalSysSizing.DesOutAirVolFlow / VolFlowRate; - } else { - OutAirFrac = 1.0; - } - OutAirFrac = min(1.0, max(0.0, OutAirFrac)); - MixTemp = OutAirFrac * finalSysSizing.PrecoolTemp + (1.0 - OutAirFrac) * finalSysSizing.RetTempAtCoolPeak; - MixHumRat = OutAirFrac * finalSysSizing.PrecoolHumRat + (1.0 - OutAirFrac) * finalSysSizing.RetHumRatAtCoolPeak; + if (state.dataSize->CurOASysNum > 0 && state.dataAirLoop->OutsideAirSys(state.dataSize->CurOASysNum).AirLoopDOASNum > -1) { + auto &thisAirloopDOAS = + state.dataAirLoopHVACDOAS->airloopDOAS[state.dataAirLoop->OutsideAirSys(state.dataSize->CurOASysNum).AirLoopDOASNum]; + VolFlowRate = varSpeedCoil.RatedAirVolFlowRate; + MixTemp = thisAirloopDOAS.SizingCoolOATemp; + SupTemp = thisAirloopDOAS.PrecoolTemp; + MixHumRat = thisAirloopDOAS.SizingCoolOAHumRat; + SupHumRat = thisAirloopDOAS.PrecoolHumRat; + RatedCapCoolTotalDes = VolFlowRate * state.dataEnvrn->StdRhoAir * + (Psychrometrics::PsyHFnTdbW(MixTemp, MixHumRat) - Psychrometrics::PsyHFnTdbW(SupTemp, SupHumRat)); + if (varSpeedCoil.MSCCapFTemp(varSpeedCoil.NormSpedLevel) > 0) { + MixWetBulb = Psychrometrics::PsyTwbFnTdbWPb(state, MixTemp, MixHumRat, state.dataEnvrn->StdBaroPress, RoutineName); + if (varSpeedCoil.CondenserType == DataHeatBalance::RefrigCondenserType::Air) { + RatedSourceTempCool = thisAirloopDOAS.SizingCoolOATemp; + } else { + RatedSourceTempCool = GetVSCoilRatedSourceTemp(state, DXCoilNum); } + TotCapTempModFac = + Curve::CurveValue(state, varSpeedCoil.MSCCapFTemp(varSpeedCoil.NormSpedLevel), MixWetBulb, RatedSourceTempCool); + RatedCapCoolTotalDes /= TotCapTempModFac; } - OutTemp = finalSysSizing.OutTempAtCoolPeak; - MixEnth = Psychrometrics::PsyHFnTdbW(MixTemp, MixHumRat); - SupEnth = Psychrometrics::PsyHFnTdbW(SupTemp, SupHumRat); - - // design fan heat will be added to coil load - Real64 FanCoolLoad = - DataAirSystems::calcFanDesignHeatGain(state, state.dataSize->DataFanEnumType, state.dataSize->DataFanIndex, VolFlowRate); - // inlet/outlet temp is adjusted after enthalpy is calculcated so fan heat is not double counted - Real64 CpAir = Psychrometrics::PsyCpAirFnW(MixHumRat); - if (state.dataAirSystemsData->PrimaryAirSystems(state.dataSize->CurSysNum).supFanLocation == - DataAirSystems::FanPlacement::BlowThru) { - MixTemp += FanCoolLoad / (CpAir * rhoair * VolFlowRate); - } else if (state.dataAirSystemsData->PrimaryAirSystems(state.dataSize->CurSysNum).supFanLocation == - DataAirSystems::FanPlacement::DrawThru) { - SupTemp -= FanCoolLoad / (CpAir * rhoair * VolFlowRate); - } - MixWetBulb = Psychrometrics::PsyTwbFnTdbWPb(state, MixTemp, MixHumRat, state.dataEnvrn->StdBaroPress, RoutineName); - if (varSpeedCoil.CondenserType == DataHeatBalance::RefrigCondenserType::Air) { - RatedSourceTempCool = OutTemp; - } else { - RatedSourceTempCool = GetVSCoilRatedSourceTemp(state, DXCoilNum); - } - TotCapTempModFac = - Curve::CurveValue(state, varSpeedCoil.MSCCapFTemp(varSpeedCoil.NormSpedLevel), MixWetBulb, RatedSourceTempCool); + } else { + auto &finalSysSizing = state.dataSize->FinalSysSizing(state.dataSize->CurSysNum); + VolFlowRate = varSpeedCoil.RatedAirVolFlowRate; + if (VolFlowRate >= DataHVACGlobals::SmallAirVolFlow) { + if (state.dataSize->CurOASysNum > 0) { // coil is in the OA stream + MixTemp = finalSysSizing.OutTempAtCoolPeak; + MixHumRat = finalSysSizing.OutHumRatAtCoolPeak; + SupTemp = finalSysSizing.PrecoolTemp; + SupHumRat = finalSysSizing.PrecoolHumRat; + } else { // coil is on the main air loop + SupTemp = finalSysSizing.CoolSupTemp; + SupHumRat = finalSysSizing.CoolSupHumRat; + if (state.dataAirSystemsData->PrimaryAirSystems(state.dataSize->CurSysNum).NumOACoolCoils == + 0) { // there is no precooling of the OA stream + MixTemp = finalSysSizing.MixTempAtCoolPeak; + MixHumRat = finalSysSizing.MixHumRatAtCoolPeak; + } else { // there is precooling of OA stream + if (VolFlowRate > 0.0) { + OutAirFrac = finalSysSizing.DesOutAirVolFlow / VolFlowRate; + } else { + OutAirFrac = 1.0; + } + OutAirFrac = min(1.0, max(0.0, OutAirFrac)); + MixTemp = OutAirFrac * finalSysSizing.PrecoolTemp + (1.0 - OutAirFrac) * finalSysSizing.RetTempAtCoolPeak; + MixHumRat = OutAirFrac * finalSysSizing.PrecoolHumRat + (1.0 - OutAirFrac) * finalSysSizing.RetHumRatAtCoolPeak; + } + } + OutTemp = finalSysSizing.OutTempAtCoolPeak; + MixEnth = Psychrometrics::PsyHFnTdbW(MixTemp, MixHumRat); + SupEnth = Psychrometrics::PsyHFnTdbW(SupTemp, SupHumRat); + + // design fan heat will be added to coil load + Real64 FanCoolLoad = + DataAirSystems::calcFanDesignHeatGain(state, state.dataSize->DataFanEnumType, state.dataSize->DataFanIndex, VolFlowRate); + // inlet/outlet temp is adjusted after enthalpy is calculcated so fan heat is not double counted + Real64 CpAir = Psychrometrics::PsyCpAirFnW(MixHumRat); + if (state.dataAirSystemsData->PrimaryAirSystems(state.dataSize->CurSysNum).supFanLocation == + DataAirSystems::FanPlacement::BlowThru) { + MixTemp += FanCoolLoad / (CpAir * rhoair * VolFlowRate); + } else if (state.dataAirSystemsData->PrimaryAirSystems(state.dataSize->CurSysNum).supFanLocation == + DataAirSystems::FanPlacement::DrawThru) { + SupTemp -= FanCoolLoad / (CpAir * rhoair * VolFlowRate); + } + MixWetBulb = Psychrometrics::PsyTwbFnTdbWPb(state, MixTemp, MixHumRat, state.dataEnvrn->StdBaroPress, RoutineName); + if (varSpeedCoil.CondenserType == DataHeatBalance::RefrigCondenserType::Air) { + RatedSourceTempCool = OutTemp; + } else { + RatedSourceTempCool = GetVSCoilRatedSourceTemp(state, DXCoilNum); + } + TotCapTempModFac = + Curve::CurveValue(state, varSpeedCoil.MSCCapFTemp(varSpeedCoil.NormSpedLevel), MixWetBulb, RatedSourceTempCool); - // The mixed air temp for zone equipment without an OA mixer is 0. - // This test avoids a negative capacity until a solution can be found. - if (MixEnth > SupEnth) { - CoolCapAtPeak = (rhoair * VolFlowRate * (MixEnth - SupEnth)) + FanCoolLoad; - } else { - CoolCapAtPeak = (rhoair * VolFlowRate * (48000.0 - SupEnth)) + FanCoolLoad; - } - CoolCapAtPeak = max(0.0, CoolCapAtPeak); - if (TotCapTempModFac > 0.0) { - RatedCapCoolTotalDes = CoolCapAtPeak / TotCapTempModFac; + // The mixed air temp for zone equipment without an OA mixer is 0. + // This test avoids a negative capacity until a solution can be found. + if (MixEnth > SupEnth) { + CoolCapAtPeak = (rhoair * VolFlowRate * (MixEnth - SupEnth)) + FanCoolLoad; + } else { + CoolCapAtPeak = (rhoair * VolFlowRate * (48000.0 - SupEnth)) + FanCoolLoad; + } + CoolCapAtPeak = max(0.0, CoolCapAtPeak); + if (TotCapTempModFac > 0.0) { + RatedCapCoolTotalDes = CoolCapAtPeak / TotCapTempModFac; + } else { + RatedCapCoolTotalDes = CoolCapAtPeak; + } } else { - RatedCapCoolTotalDes = CoolCapAtPeak; + RatedCapCoolTotalDes = 0.0; } - } else { - RatedCapCoolTotalDes = 0.0; } } @@ -5014,6 +5020,8 @@ namespace VariableSpeedCoils { state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgAirTemp(state, varSpeedCoil.Name, varSpeedCoil.VarSpeedCoilType, SupTemp); state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgAirHumRat( state, varSpeedCoil.Name, varSpeedCoil.VarSpeedCoilType, SupHumRat); + state.dataRptCoilSelection->coilSelectionReportObj->setCoilAirFlow( + state, varSpeedCoil.Name, varSpeedCoil.VarSpeedCoilType, varSpeedCoil.RatedAirVolFlowRate, RatedAirFlowAutoSized); state.dataRptCoilSelection->coilSelectionReportObj->setCoilCoolingCapacity(state, varSpeedCoil.Name, varSpeedCoil.VarSpeedCoilType, diff --git a/src/EnergyPlus/VariableSpeedCoils.hh b/src/EnergyPlus/VariableSpeedCoils.hh index feb952314ce..cb8d526a9b4 100644 --- a/src/EnergyPlus/VariableSpeedCoils.hh +++ b/src/EnergyPlus/VariableSpeedCoils.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Vectors.cc b/src/EnergyPlus/Vectors.cc index 22562a9a38c..357fdc9c49f 100644 --- a/src/EnergyPlus/Vectors.cc +++ b/src/EnergyPlus/Vectors.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Vectors.hh b/src/EnergyPlus/Vectors.hh index cfd2a8ff0b9..09d1aad3e5e 100644 --- a/src/EnergyPlus/Vectors.hh +++ b/src/EnergyPlus/Vectors.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/VentilatedSlab.cc b/src/EnergyPlus/VentilatedSlab.cc index d583c57df30..6e50944431f 100644 --- a/src/EnergyPlus/VentilatedSlab.cc +++ b/src/EnergyPlus/VentilatedSlab.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -1316,98 +1316,98 @@ namespace VentilatedSlab { auto &ventSlab = state.dataVentilatedSlab->VentSlab(Item); SetupOutputVariable(state, "Zone Ventilated Slab Radiant Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, ventSlab.RadHeatingPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ventSlab.Name); SetupOutputVariable(state, "Zone Ventilated Slab Radiant Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, ventSlab.RadHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, ventSlab.Name); SetupOutputVariable(state, "Zone Ventilated Slab Radiant Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, ventSlab.RadCoolingPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ventSlab.Name); SetupOutputVariable(state, "Zone Ventilated Slab Radiant Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, ventSlab.RadCoolingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, ventSlab.Name); SetupOutputVariable(state, "Zone Ventilated Slab Coil Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, ventSlab.HeatCoilPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ventSlab.Name); SetupOutputVariable(state, "Zone Ventilated Slab Coil Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, ventSlab.HeatCoilEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, ventSlab.Name); SetupOutputVariable(state, "Zone Ventilated Slab Coil Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, ventSlab.TotCoolCoilPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ventSlab.Name); SetupOutputVariable(state, "Zone Ventilated Slab Coil Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, ventSlab.TotCoolCoilEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, ventSlab.Name); SetupOutputVariable(state, "Zone Ventilated Slab Coil Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, ventSlab.SensCoolCoilPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ventSlab.Name); SetupOutputVariable(state, "Zone Ventilated Slab Coil Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, ventSlab.SensCoolCoilEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, ventSlab.Name); SetupOutputVariable(state, "Zone Ventilated Slab Coil Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, ventSlab.LateCoolCoilPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ventSlab.Name); SetupOutputVariable(state, "Zone Ventilated Slab Coil Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, ventSlab.LateCoolCoilEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, ventSlab.Name); SetupOutputVariable(state, "Zone Ventilated Slab Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, ventSlab.AirMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ventSlab.Name); SetupOutputVariable(state, "Zone Ventilated Slab Fan Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, ventSlab.ElecFanPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1415,49 +1415,49 @@ namespace VentilatedSlab { //! Note that the ventilated slab fan electric is NOT metered because this value is already metered through the fan component SetupOutputVariable(state, "Zone Ventilated Slab Fan Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, ventSlab.ElecFanEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, ventSlab.Name); SetupOutputVariable(state, "Zone Ventilated Slab Inlet Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, ventSlab.SlabInTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ventSlab.Name); SetupOutputVariable(state, "Zone Ventilated Slab Outlet Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, ventSlab.SlabOutTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ventSlab.Name); SetupOutputVariable(state, "Zone Ventilated Slab Zone Inlet Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, ventSlab.ZoneInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ventSlab.Name); SetupOutputVariable(state, "Zone Ventilated Slab Return Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, ventSlab.ReturnAirTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ventSlab.Name); SetupOutputVariable(state, "Zone Ventilated Slab Fan Outlet Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, ventSlab.FanOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ventSlab.Name); SetupOutputVariable(state, "Zone Ventilated Slab Fan Availability Status", - OutputProcessor::Unit::None, + Constant::Units::None, ventSlab.AvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/VentilatedSlab.hh b/src/EnergyPlus/VentilatedSlab.hh index 394adc7dac8..276d487f058 100644 --- a/src/EnergyPlus/VentilatedSlab.hh +++ b/src/EnergyPlus/VentilatedSlab.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WaterCoils.cc b/src/EnergyPlus/WaterCoils.cc index 9c196e4bad1..ea90bb15595 100644 --- a/src/EnergyPlus/WaterCoils.cc +++ b/src/EnergyPlus/WaterCoils.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -441,38 +441,36 @@ void GetWaterCoilInput(EnergyPlusData &state) // CurrentModuleObject = "Coil:Heating:Water" SetupOutputVariable(state, "Heating Coil Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, waterCoil.TotWaterHeatingCoilEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, waterCoil.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "ENERGYTRANSFER", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Source Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, waterCoil.TotWaterHeatingCoilEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, waterCoil.Name, + Constant::eResource::PlantLoopHeatingDemand, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "PLANTLOOPHEATINGDEMAND", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, waterCoil.TotWaterHeatingCoilRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, waterCoil.Name); SetupOutputVariable(state, "Heating Coil U Factor Times Area Value", - OutputProcessor::Unit::W_K, + Constant::Units::W_K, waterCoil.UACoilVariable, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -630,45 +628,43 @@ void GetWaterCoilInput(EnergyPlusData &state) // CurrentModuleObject = "Coil:Cooling:Water:DetailedGeometry" SetupOutputVariable(state, "Cooling Coil Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, waterCoil.TotWaterCoolingCoilEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, waterCoil.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "ENERGYTRANSFER", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Source Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, waterCoil.TotWaterCoolingCoilEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, waterCoil.Name, + Constant::eResource::PlantLoopCoolingDemand, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "PLANTLOOPCOOLINGDEMAND", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, waterCoil.SenWaterCoolingCoilEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, waterCoil.Name); SetupOutputVariable(state, "Cooling Coil Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, waterCoil.TotWaterCoolingCoilRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, waterCoil.Name); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, waterCoil.SenWaterCoolingCoilRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -678,23 +674,22 @@ void GetWaterCoilInput(EnergyPlusData &state) SetupOutputVariable(state, "Cooling Coil Condensate Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, waterCoil.CondensateVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, waterCoil.Name); SetupOutputVariable(state, "Cooling Coil Condensate Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, waterCoil.CondensateVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, waterCoil.Name, + Constant::eResource::OnSiteWater, + OutputProcessor::SOVEndUseCat::Condensate, {}, - "OnSiteWater", - "Condensate", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } } @@ -841,52 +836,50 @@ void GetWaterCoilInput(EnergyPlusData &state) // CurrentModuleObject = "Coil:Cooling:Water" SetupOutputVariable(state, "Cooling Coil Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, waterCoil.TotWaterCoolingCoilEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, waterCoil.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "ENERGYTRANSFER", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Source Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, waterCoil.TotWaterCoolingCoilEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, waterCoil.Name, + Constant::eResource::PlantLoopCoolingDemand, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "PLANTLOOPCOOLINGDEMAND", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, waterCoil.SenWaterCoolingCoilEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, waterCoil.Name); SetupOutputVariable(state, "Cooling Coil Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, waterCoil.TotWaterCoolingCoilRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, waterCoil.Name); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, waterCoil.SenWaterCoolingCoilRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, waterCoil.Name); SetupOutputVariable(state, "Cooling Coil Wetted Area Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, waterCoil.SurfAreaWetFraction, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -896,23 +889,22 @@ void GetWaterCoilInput(EnergyPlusData &state) SetupOutputVariable(state, "Cooling Coil Condensate Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, waterCoil.CondensateVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, waterCoil.Name); SetupOutputVariable(state, "Cooling Coil Condensate Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, waterCoil.CondensateVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, waterCoil.Name, + Constant::eResource::OnSiteWater, + OutputProcessor::SOVEndUseCat::Condensate, {}, - "OnSiteWater", - "Condensate", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } } diff --git a/src/EnergyPlus/WaterCoils.hh b/src/EnergyPlus/WaterCoils.hh index e838c8e58f6..bd6739879ee 100644 --- a/src/EnergyPlus/WaterCoils.hh +++ b/src/EnergyPlus/WaterCoils.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WaterManager.cc b/src/EnergyPlus/WaterManager.cc index b059546819a..ec8f8839e66 100644 --- a/src/EnergyPlus/WaterManager.cc +++ b/src/EnergyPlus/WaterManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -755,61 +755,60 @@ namespace WaterManager { // this next one is a measure of the state of water in the tank, not a flux of m3 that needs to be summed SetupOutputVariable(state, "Water System Storage Tank Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataWaterData->WaterStorage(Item).ThisTimeStepVolume, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataWaterData->WaterStorage(Item).Name); SetupOutputVariable(state, "Water System Storage Tank Net Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataWaterData->WaterStorage(Item).NetVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataWaterData->WaterStorage(Item).Name); SetupOutputVariable(state, "Water System Storage Tank Inlet Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataWaterData->WaterStorage(Item).VdotToTank, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataWaterData->WaterStorage(Item).Name); SetupOutputVariable(state, "Water System Storage Tank Outlet Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataWaterData->WaterStorage(Item).VdotFromTank, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataWaterData->WaterStorage(Item).Name); SetupOutputVariable(state, "Water System Storage Tank Mains Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataWaterData->WaterStorage(Item).MainsDrawVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataWaterData->WaterStorage(Item).Name, - {}, - "MainsWater", - "WaterSystems", + Constant::eResource::MainsWater, + OutputProcessor::SOVEndUseCat::WaterSystem, state.dataWaterData->WaterStorage(Item).QualitySubCategoryName, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Water System Storage Tank Mains Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataWaterData->WaterStorage(Item).MainsDrawVdot, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataWaterData->WaterStorage(Item).Name); SetupOutputVariable(state, "Water System Storage Tank Water Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataWaterData->WaterStorage(Item).Twater, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataWaterData->WaterStorage(Item).Name); SetupOutputVariable(state, "Water System Storage Tank Overflow Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataWaterData->WaterStorage(Item).VdotOverflow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -817,7 +816,7 @@ namespace WaterManager { if (state.dataWaterData->WaterStorage(Item).OverflowMode == DataWater::Overflow::Discarded) { SetupOutputVariable(state, "Water System Storage Tank Overflow Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataWaterData->WaterStorage(Item).VolOverflow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -825,7 +824,7 @@ namespace WaterManager { } else { SetupOutputVariable(state, "Water System Storage Tank Overflow Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataWaterData->WaterStorage(Item).VolOverflow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -833,7 +832,7 @@ namespace WaterManager { } SetupOutputVariable(state, "Water System Storage Tank Overflow Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataWaterData->WaterStorage(Item).TwaterOverflow, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -843,14 +842,14 @@ namespace WaterManager { if (NumIrrigation == 1) { // CurrentModuleObject='RoofIrrigation' SetupOutputVariable(state, "Water System Roof Irrigation Scheduled Depth", - OutputProcessor::Unit::m, + Constant::Units::m, state.dataWaterData->Irrigation.ScheduledAmount, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, "RoofIrrigation"); SetupOutputVariable(state, "Water System Roof Irrigation Actual Depth", - OutputProcessor::Unit::m, + Constant::Units::m, state.dataWaterData->Irrigation.ActualAmount, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -860,71 +859,68 @@ namespace WaterManager { for (Item = 1; Item <= state.dataWaterData->NumRainCollectors; ++Item) { // CurrentModuleObject='WaterUse:RainCollector' SetupOutputVariable(state, "Water System Rainwater Collector Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataWaterData->RainCollector(Item).VdotAvail, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataWaterData->RainCollector(Item).Name); SetupOutputVariable(state, "Water System Rainwater Collector Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataWaterData->RainCollector(Item).VolCollected, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataWaterData->RainCollector(Item).Name, + Constant::eResource::OnSiteWater, + OutputProcessor::SOVEndUseCat::RainWater, {}, - "OnSiteWater", - "Rainwater", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } for (Item = 1; Item <= state.dataWaterData->NumGroundWaterWells; ++Item) { // CurrentModuleObject='WaterUse:Well' SetupOutputVariable(state, "Water System Groundwater Well Requested Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataWaterData->GroundwaterWell(Item).VdotRequest, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataWaterData->GroundwaterWell(Item).Name); SetupOutputVariable(state, "Water System Groundwater Well Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataWaterData->GroundwaterWell(Item).VdotDelivered, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataWaterData->GroundwaterWell(Item).Name); SetupOutputVariable(state, "Water System Groundwater Well Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataWaterData->GroundwaterWell(Item).VolDelivered, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataWaterData->GroundwaterWell(Item).Name, + Constant::eResource::OnSiteWater, + OutputProcessor::SOVEndUseCat::WellWater, {}, - "OnSiteWater", - "Wellwater", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Water System Groundwater Well Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataWaterData->GroundwaterWell(Item).PumpPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataWaterData->GroundwaterWell(Item).Name); SetupOutputVariable(state, "Water System Groundwater Well Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataWaterData->GroundwaterWell(Item).PumpEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataWaterData->GroundwaterWell(Item).Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::WaterSystem, {}, - "Electricity", - "WaterSystems", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } } // my one time flag block diff --git a/src/EnergyPlus/WaterManager.hh b/src/EnergyPlus/WaterManager.hh index 11c208908bb..203c3b1d5d1 100644 --- a/src/EnergyPlus/WaterManager.hh +++ b/src/EnergyPlus/WaterManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WaterThermalTanks.cc b/src/EnergyPlus/WaterThermalTanks.cc index 87c0dba4f03..fd0a2527d4e 100644 --- a/src/EnergyPlus/WaterThermalTanks.cc +++ b/src/EnergyPlus/WaterThermalTanks.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -2451,6 +2451,14 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) if (state.dataIPShortCut->rNumericArgs(8) > 0.0) { Tank.Efficiency = state.dataIPShortCut->rNumericArgs(8); + if (state.dataIPShortCut->rNumericArgs(8) > 1.0) { + ShowWarningError(state, + fmt::format("{} = {}: {}={} should not typically be greater than 1.", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(8), + state.dataIPShortCut->rNumericArgs(8))); + } } else { ShowSevereError(state, format("{} = {}: Heater Thermal Efficiency must be greater than zero", @@ -3016,6 +3024,14 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) if (state.dataIPShortCut->rNumericArgs(11) > 0.0) { Tank.Efficiency = state.dataIPShortCut->rNumericArgs(11); + if (state.dataIPShortCut->rNumericArgs(11) > 1.0) { + ShowWarningError(state, + fmt::format("{} = {}: {}={} should not typically be greater than 1.", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(11), + state.dataIPShortCut->rNumericArgs(11))); + } } else { ShowSevereError(state, format("{} = {}: Heater Thermal Efficiency must be greater than zero", @@ -5001,7 +5017,7 @@ void WaterThermalTankData::setupChilledWaterTankOutputVars(EnergyPlusData &state // CurrentModuleObject='ThermalStorage:ChilledWater:Mixed/ThermalStorage:ChilledWater:Stratified' SetupOutputVariable(state, "Chilled Water Thermal Storage Tank Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->TankTempAvg, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5009,7 +5025,7 @@ void WaterThermalTankData::setupChilledWaterTankOutputVars(EnergyPlusData &state SetupOutputVariable(state, "Chilled Water Thermal Storage Final Tank Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->TankTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5017,14 +5033,14 @@ void WaterThermalTankData::setupChilledWaterTankOutputVars(EnergyPlusData &state SetupOutputVariable(state, "Chilled Water Thermal Storage Tank Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->LossRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chilled Water Thermal Storage Tank Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->LossEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -5032,7 +5048,7 @@ void WaterThermalTankData::setupChilledWaterTankOutputVars(EnergyPlusData &state SetupOutputVariable(state, "Chilled Water Thermal Storage Use Side Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->UseMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5040,7 +5056,7 @@ void WaterThermalTankData::setupChilledWaterTankOutputVars(EnergyPlusData &state SetupOutputVariable(state, "Chilled Water Thermal Storage Use Side Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->UseInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5048,7 +5064,7 @@ void WaterThermalTankData::setupChilledWaterTankOutputVars(EnergyPlusData &state SetupOutputVariable(state, "Chilled Water Thermal Storage Use Side Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->UseOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5056,14 +5072,14 @@ void WaterThermalTankData::setupChilledWaterTankOutputVars(EnergyPlusData &state SetupOutputVariable(state, "Chilled Water Thermal Storage Use Side Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->UseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chilled Water Thermal Storage Use Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->UseEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -5071,7 +5087,7 @@ void WaterThermalTankData::setupChilledWaterTankOutputVars(EnergyPlusData &state SetupOutputVariable(state, "Chilled Water Thermal Storage Source Side Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->SourceMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5079,7 +5095,7 @@ void WaterThermalTankData::setupChilledWaterTankOutputVars(EnergyPlusData &state SetupOutputVariable(state, "Chilled Water Thermal Storage Source Side Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->SourceInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5087,7 +5103,7 @@ void WaterThermalTankData::setupChilledWaterTankOutputVars(EnergyPlusData &state SetupOutputVariable(state, "Chilled Water Thermal Storage Source Side Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->SourceOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5095,14 +5111,14 @@ void WaterThermalTankData::setupChilledWaterTankOutputVars(EnergyPlusData &state SetupOutputVariable(state, "Chilled Water Thermal Storage Source Side Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->SourceRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Chilled Water Thermal Storage Source Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->SourceEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -5113,7 +5129,7 @@ void WaterThermalTankData::setupChilledWaterTankOutputVars(EnergyPlusData &state for (int NodeNum = 1; NodeNum <= this->Nodes; ++NodeNum) { SetupOutputVariable(state, format("Chilled Water Thermal Storage Temperature Node {}", NodeNum), - OutputProcessor::Unit::C, + Constant::Units::C, this->Node(NodeNum).TempAvg, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5123,7 +5139,7 @@ void WaterThermalTankData::setupChilledWaterTankOutputVars(EnergyPlusData &state for (int NodeNum = 1; NodeNum <= this->Nodes; ++NodeNum) { SetupOutputVariable(state, format("Chilled Water Thermal Storage Final Temperature Node {}", NodeNum), - OutputProcessor::Unit::C, + Constant::Units::C, this->Node(NodeNum).Temp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5185,7 +5201,7 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) // CurrentModuleObject='WaterHeater:Mixed' SetupOutputVariable(state, "Water Heater Tank Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->TankTempAvg, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5193,7 +5209,7 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Water Heater Final Tank Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->TankTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5201,14 +5217,14 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Water Heater Heat Loss Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->LossRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Water Heater Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->LossEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -5216,7 +5232,7 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Water Heater Use Side Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->UseMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5224,7 +5240,7 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Water Heater Use Side Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->UseInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5232,7 +5248,7 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Water Heater Use Side Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->UseOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5240,14 +5256,14 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Water Heater Use Side Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->UseRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Water Heater Use Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->UseEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -5255,7 +5271,7 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Water Heater Source Side Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->SourceMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5263,7 +5279,7 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Water Heater Source Side Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->SourceInletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5271,7 +5287,7 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Water Heater Source Side Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->SourceOutletTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5279,34 +5295,33 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Water Heater Source Side Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->SourceRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Water Heater Source Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->SourceEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - "PLANTLOOPHEATINGDEMAND", - "WaterSystems", // "DHW", + Constant::eResource::PlantLoopHeatingDemand, + OutputProcessor::SOVEndUseCat::WaterSystem, // "DHW", this->EndUseSubcategoryName, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Water Heater Off Cycle Parasitic Tank Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->OffCycParaRateToTank, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Water Heater Off Cycle Parasitic Tank Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->OffCycParaEnergyToTank, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -5314,14 +5329,14 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Water Heater On Cycle Parasitic Tank Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->OnCycParaRateToTank, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Water Heater On Cycle Parasitic Tank Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->OnCycParaEnergyToTank, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -5329,14 +5344,14 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Water Heater Total Demand Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->TotalDemandRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Water Heater Total Demand Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->TotalDemandEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -5344,14 +5359,14 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Water Heater Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->HeaterRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Water Heater Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->HeaterEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -5359,14 +5374,14 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Water Heater Unmet Demand Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->UnmetRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Water Heater Unmet Demand Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->UnmetEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -5374,14 +5389,14 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Water Heater Venting Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->VentRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Water Heater Venting Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->VentEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -5389,14 +5404,14 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Water Heater Net Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->NetHeatTransferRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Water Heater Net Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->NetHeatTransferEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -5404,21 +5419,21 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Water Heater Cycle On Count", - OutputProcessor::Unit::None, + Constant::Units::None, this->CycleOnCount, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name); SetupOutputVariable(state, "Water Heater Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, this->RuntimeFraction, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Water Heater Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, this->PartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5426,154 +5441,147 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) SetupOutputVariable(state, format("Water Heater {} Rate", Constant::eFuelNames[static_cast(this->FuelType)]), - OutputProcessor::Unit::W, + Constant::Units::W, this->FuelRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, format("Water Heater {} Energy", Constant::eFuelNames[static_cast(this->FuelType)]), - OutputProcessor::Unit::J, + Constant::Units::J, this->FuelEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - Constant::eFuelNames[static_cast(this->FuelType)], - "WaterSystems", // "DHW", + Constant::eFuel2eResource[(int)this->FuelType], + OutputProcessor::SOVEndUseCat::WaterSystem, // "DHW", this->EndUseSubcategoryName, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, format("Water Heater Off Cycle Parasitic {} Rate", Constant::eFuelNames[static_cast(this->OffCycParaFuelType)]), - OutputProcessor::Unit::W, + Constant::Units::W, this->OffCycParaFuelRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, format("Water Heater Off Cycle Parasitic {} Energy", Constant::eFuelNames[static_cast(this->OffCycParaFuelType)]), - OutputProcessor::Unit::J, + Constant::Units::J, this->OffCycParaFuelEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - Constant::eFuelNames[static_cast(this->OffCycParaFuelType)], - "WaterSystems", // "DHW", + Constant::eFuel2eResource[(int)this->OffCycParaFuelType], + OutputProcessor::SOVEndUseCat::WaterSystem, // "DHW", this->EndUseSubcategoryName, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, format("Water Heater On Cycle Parasitic {} Rate", Constant::eFuelNames[static_cast(this->OnCycParaFuelType)]), - OutputProcessor::Unit::W, + Constant::Units::W, this->OnCycParaFuelRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, format("Water Heater On Cycle Parasitic {} Energy", Constant::eFuelNames[static_cast(this->OnCycParaFuelType)]), - OutputProcessor::Unit::J, + Constant::Units::J, this->OnCycParaFuelEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - Constant::eFuelNames[static_cast(this->OnCycParaFuelType)], - "WaterSystems", // "DHW", + Constant::eFuel2eResource[(int)this->OnCycParaFuelType], + OutputProcessor::SOVEndUseCat::WaterSystem, // "DHW", this->EndUseSubcategoryName, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Water Heater Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->VolFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Water Heater Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->VolumeConsumed, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - "Water", - "WaterSystems", // "DHW", + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::WaterSystem, // "DHW", this->EndUseSubcategoryName, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Water Heater Mains Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->VolumeConsumed, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - "MainsWater", - "WaterSystems", // "DHW", + Constant::eResource::MainsWater, + OutputProcessor::SOVEndUseCat::WaterSystem, // "DHW", this->EndUseSubcategoryName, - "Plant"); + OutputProcessor::SOVGroup::Plant); if (this->HeatPumpNum > 0) { // CurrentModuleObject='WaterHeater:HeatPump:PumpedCondenser' HeatPumpWaterHeaterData &HPWH = state.dataWaterThermalTanks->HPWaterHeater(this->HeatPumpNum); SetupOutputVariable(state, "Water Heater Compressor Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, HPWH.HeatingPLR, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, HPWH.Name); SetupOutputVariable(state, "Water Heater Off Cycle Ancillary Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, HPWH.OffCycParaFuelRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, HPWH.Name); SetupOutputVariable(state, "Water Heater Off Cycle Ancillary Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, HPWH.OffCycParaFuelEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, HPWH.Name, - {}, - "Electricity", - "WaterSystems", // "DHW", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::WaterSystem, // "DHW", "Water Heater Parasitic", - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Water Heater On Cycle Ancillary Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, HPWH.OnCycParaFuelRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, HPWH.Name); SetupOutputVariable(state, "Water Heater On Cycle Ancillary Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, HPWH.OnCycParaFuelEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, HPWH.Name, - {}, - "Electricity", - "WaterSystems", // "DHW", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::WaterSystem, // "DHW", "Water Heater Parasitic", - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Water Heater Heat Pump Control Tank Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, HPWH.ControlTempAvg, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, HPWH.Name); SetupOutputVariable(state, "Water Heater Heat Pump Control Tank Final Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, HPWH.ControlTempFinal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5584,94 +5592,90 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) // CurrentModuleObject='Coil:WaterHeating:Desuperheater' SetupOutputVariable(state, "Water Heater Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataWaterThermalTanks->WaterHeaterDesuperheater(this->DesuperheaterNum).DesuperheaterPLR, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataWaterThermalTanks->WaterHeaterDesuperheater(this->DesuperheaterNum).Name); SetupOutputVariable(state, "Water Heater On Cycle Parasitic Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataWaterThermalTanks->WaterHeaterDesuperheater(this->DesuperheaterNum).OnCycParaFuelRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataWaterThermalTanks->WaterHeaterDesuperheater(this->DesuperheaterNum).Name); SetupOutputVariable(state, "Water Heater On Cycle Parasitic Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataWaterThermalTanks->WaterHeaterDesuperheater(this->DesuperheaterNum).OnCycParaFuelEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataWaterThermalTanks->WaterHeaterDesuperheater(this->DesuperheaterNum).Name, - {}, - "Electricity", - "WaterSystems", // "DHW", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::WaterSystem, // "DHW", "Water Heater Parasitic", - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Water Heater Off Cycle Parasitic Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataWaterThermalTanks->WaterHeaterDesuperheater(this->DesuperheaterNum).OffCycParaFuelRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataWaterThermalTanks->WaterHeaterDesuperheater(this->DesuperheaterNum).Name); SetupOutputVariable(state, "Water Heater Off Cycle Parasitic Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataWaterThermalTanks->WaterHeaterDesuperheater(this->DesuperheaterNum).OffCycParaFuelEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataWaterThermalTanks->WaterHeaterDesuperheater(this->DesuperheaterNum).Name, - {}, - "Electricity", - "WaterSystems", // "DHW", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::WaterSystem, // "DHW", "Water Heater Parasitic", - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Water Heater Heat Reclaim Efficiency Modifier Multiplier", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataWaterThermalTanks->WaterHeaterDesuperheater(this->DesuperheaterNum).HEffFTempOutput, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataWaterThermalTanks->WaterHeaterDesuperheater(this->DesuperheaterNum).Name); SetupOutputVariable(state, "Water Heater Pump Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataWaterThermalTanks->WaterHeaterDesuperheater(this->DesuperheaterNum).PumpPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataWaterThermalTanks->WaterHeaterDesuperheater(this->DesuperheaterNum).Name); SetupOutputVariable(state, "Water Heater Pump Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataWaterThermalTanks->WaterHeaterDesuperheater(this->DesuperheaterNum).PumpEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataWaterThermalTanks->WaterHeaterDesuperheater(this->DesuperheaterNum).Name, - {}, - "Electricity", - "WaterSystems", // "DHW", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::WaterSystem, // "DHW", "Desuperheater Pump", - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Water Heater Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataWaterThermalTanks->WaterHeaterDesuperheater(this->DesuperheaterNum).HeaterRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataWaterThermalTanks->WaterHeaterDesuperheater(this->DesuperheaterNum).Name); SetupOutputVariable(state, "Water Heater Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataWaterThermalTanks->WaterHeaterDesuperheater(this->DesuperheaterNum).HeaterEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataWaterThermalTanks->WaterHeaterDesuperheater(this->DesuperheaterNum).Name, - {}, - "EnergyTransfer", - "WaterSystems", // "DHW", + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::WaterSystem, // "DHW", "Water Heater", - "Plant"); + OutputProcessor::SOVGroup::Plant); } // Setup report variables for WaterHeater:Stratified @@ -5680,14 +5684,14 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Water Heater Heater 1 Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->HeaterRate1, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Water Heater Heater 2 Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->HeaterRate2, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5695,14 +5699,14 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Water Heater Heater 1 Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->HeaterEnergy1, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name); SetupOutputVariable(state, "Water Heater Heater 2 Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->HeaterEnergy2, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -5710,14 +5714,14 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Water Heater Heater 1 Cycle On Count", - OutputProcessor::Unit::None, + Constant::Units::None, this->CycleOnCount1, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name); SetupOutputVariable(state, "Water Heater Heater 2 Cycle On Count", - OutputProcessor::Unit::None, + Constant::Units::None, this->CycleOnCount2, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -5725,14 +5729,14 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) SetupOutputVariable(state, "Water Heater Heater 1 Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, this->RuntimeFraction1, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Water Heater Heater 2 Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, this->RuntimeFraction2, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5741,7 +5745,7 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) for (int NodeNum = 1; NodeNum <= this->Nodes; ++NodeNum) { SetupOutputVariable(state, format("Water Heater Temperature Node {}", NodeNum), - OutputProcessor::Unit::C, + Constant::Units::C, this->Node(NodeNum).TempAvg, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -5751,7 +5755,7 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) for (int NodeNum = 1; NodeNum <= this->Nodes; ++NodeNum) { SetupOutputVariable(state, format("Water Heater Final Temperature Node {}", NodeNum), - OutputProcessor::Unit::C, + Constant::Units::C, this->Node(NodeNum).Temp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/WaterThermalTanks.hh b/src/EnergyPlus/WaterThermalTanks.hh index 057b70a480c..27a488f56c3 100644 --- a/src/EnergyPlus/WaterThermalTanks.hh +++ b/src/EnergyPlus/WaterThermalTanks.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WaterToAirHeatPump.cc b/src/EnergyPlus/WaterToAirHeatPump.cc index 9393c433fb9..958c7a2572d 100644 --- a/src/EnergyPlus/WaterToAirHeatPump.cc +++ b/src/EnergyPlus/WaterToAirHeatPump.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -459,54 +459,51 @@ namespace WaterToAirHeatPump { // CurrentModuleObject = "Coil:Cooling:WaterToAirHeatPump:ParameterEstimation" SetupOutputVariable(state, "Cooling Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, heatPump.Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, heatPump.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, heatPump.EnergyLoadTotal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, heatPump.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "ENERGYTRANSFER", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, heatPump.EnergySensible, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, heatPump.Name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, heatPump.EnergyLatent, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, heatPump.Name); SetupOutputVariable(state, "Cooling Coil Source Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, heatPump.EnergySource, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, heatPump.Name, + Constant::eResource::PlantLoopCoolingDemand, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "PLANTLOOPCOOLINGDEMAND", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); // save the design source side flow rate for use by plant loop sizing algorithms RegisterPlantCompDesignFlow(state, heatPump.WaterInletNodeNum, 0.5 * heatPump.DesignWaterVolFlowRate); @@ -702,40 +699,37 @@ namespace WaterToAirHeatPump { // CurrentModuleObject = "Coil:Heating:WaterToAirHeatPump:ParameterEstimation" SetupOutputVariable(state, "Heating Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, heatPump.Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, heatPump.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "Heating", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, heatPump.EnergyLoadTotal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, heatPump.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "ENERGYTRANSFER", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Source Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, heatPump.EnergySource, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, heatPump.Name, + Constant::eResource::PlantLoopHeatingDemand, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "PLANTLOOPHEATINGDEMAND", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); // save the design source side flow rate for use by plant loop sizing algorithms RegisterPlantCompDesignFlow(state, heatPump.WaterInletNodeNum, 0.5 * heatPump.DesignWaterVolFlowRate); @@ -764,7 +758,7 @@ namespace WaterToAirHeatPump { // COOLING COIL: Setup Report variables for the Heat Pump SetupOutputVariable(state, "Cooling Coil Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, heatPump.Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -772,7 +766,7 @@ namespace WaterToAirHeatPump { SetupOutputVariable(state, "Cooling Coil Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, heatPump.QLoadTotal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -780,7 +774,7 @@ namespace WaterToAirHeatPump { SetupOutputVariable(state, "Cooling Coil Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, heatPump.QSensible, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -788,7 +782,7 @@ namespace WaterToAirHeatPump { SetupOutputVariable(state, "Cooling Coil Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, heatPump.QLatent, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -796,7 +790,7 @@ namespace WaterToAirHeatPump { SetupOutputVariable(state, "Cooling Coil Source Side Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, heatPump.QSource, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -804,14 +798,14 @@ namespace WaterToAirHeatPump { SetupOutputVariable(state, "Cooling Coil Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, heatPump.PartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatPump.Name); SetupOutputVariable(state, "Cooling Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, heatPump.RunFrac, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -819,35 +813,35 @@ namespace WaterToAirHeatPump { SetupOutputVariable(state, "Cooling Coil Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, heatPump.OutletAirMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatPump.Name); SetupOutputVariable(state, "Cooling Coil Air Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, heatPump.InletAirDBTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatPump.Name); SetupOutputVariable(state, "Cooling Coil Air Inlet Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, heatPump.InletAirHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatPump.Name); SetupOutputVariable(state, "Cooling Coil Air Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, heatPump.OutletAirDBTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatPump.Name); SetupOutputVariable(state, "Cooling Coil Air Outlet Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, heatPump.OutletAirHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -855,21 +849,21 @@ namespace WaterToAirHeatPump { SetupOutputVariable(state, "Cooling Coil Source Side Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, heatPump.OutletWaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatPump.Name); SetupOutputVariable(state, "Cooling Coil Source Side Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, heatPump.InletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatPump.Name); SetupOutputVariable(state, "Cooling Coil Source Side Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, heatPump.OutletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -878,7 +872,7 @@ namespace WaterToAirHeatPump { // HEATING COIL Setup Report variables for the Heat Pump SetupOutputVariable(state, "Heating Coil Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, heatPump.Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -886,7 +880,7 @@ namespace WaterToAirHeatPump { SetupOutputVariable(state, "Heating Coil Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, heatPump.QLoadTotal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -894,7 +888,7 @@ namespace WaterToAirHeatPump { SetupOutputVariable(state, "Heating Coil Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, heatPump.QSensible, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -902,7 +896,7 @@ namespace WaterToAirHeatPump { SetupOutputVariable(state, "Heating Coil Source Side Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, heatPump.QSource, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -910,14 +904,14 @@ namespace WaterToAirHeatPump { SetupOutputVariable(state, "Heating Coil Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, heatPump.PartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatPump.Name); SetupOutputVariable(state, "Heating Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, heatPump.RunFrac, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -925,35 +919,35 @@ namespace WaterToAirHeatPump { SetupOutputVariable(state, "Heating Coil Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, heatPump.OutletAirMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatPump.Name); SetupOutputVariable(state, "Heating Coil Air Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, heatPump.InletAirDBTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatPump.Name); SetupOutputVariable(state, "Heating Coil Air Inlet Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, heatPump.InletAirHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatPump.Name); SetupOutputVariable(state, "Heating Coil Air Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, heatPump.OutletAirDBTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatPump.Name); SetupOutputVariable(state, "Heating Coil Air Outlet Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, heatPump.OutletAirHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -961,21 +955,21 @@ namespace WaterToAirHeatPump { SetupOutputVariable(state, "Heating Coil Source Side Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, heatPump.OutletWaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatPump.Name); SetupOutputVariable(state, "Heating Coil Source Side Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, heatPump.InletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, heatPump.Name); SetupOutputVariable(state, "Heating Coil Source Side Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, heatPump.OutletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/WaterToAirHeatPump.hh b/src/EnergyPlus/WaterToAirHeatPump.hh index c62e3a4fe35..710c9f9f0be 100644 --- a/src/EnergyPlus/WaterToAirHeatPump.hh +++ b/src/EnergyPlus/WaterToAirHeatPump.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WaterToAirHeatPumpSimple.cc b/src/EnergyPlus/WaterToAirHeatPumpSimple.cc index fcaef0516bf..1acbd3ecc5f 100644 --- a/src/EnergyPlus/WaterToAirHeatPumpSimple.cc +++ b/src/EnergyPlus/WaterToAirHeatPumpSimple.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -477,54 +477,51 @@ namespace WaterToAirHeatPumpSimple { // CurrentModuleObject = "Coil:Cooling:WaterToAirHeatPump:EquationFit" SetupOutputVariable(state, "Cooling Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, simpleWAHP.Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, simpleWAHP.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "Cooling", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, simpleWAHP.EnergyLoadTotal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, simpleWAHP.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "ENERGYTRANSFER", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, simpleWAHP.EnergySensible, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, simpleWAHP.Name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, simpleWAHP.EnergyLatent, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, simpleWAHP.Name); SetupOutputVariable(state, "Cooling Coil Source Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, simpleWAHP.EnergySource, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, simpleWAHP.Name, + Constant::eResource::PlantLoopCoolingDemand, + OutputProcessor::SOVEndUseCat::CoolingCoils, {}, - "PLANTLOOPCOOLINGDEMAND", - "COOLINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); // create predefined report entries OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchCoolCoilType, simpleWAHP.Name, CurrentModuleObject); @@ -712,40 +709,37 @@ namespace WaterToAirHeatPumpSimple { // CurrentModuleObject = "Coil:Cooling:WaterToAirHeatPump:EquationFit" SetupOutputVariable(state, "Heating Coil Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, simpleWAHP.Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, simpleWAHP.Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Heating, {}, - "Electricity", - "Heating", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, simpleWAHP.EnergyLoadTotal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, simpleWAHP.Name, + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "ENERGYTRANSFER", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Heating Coil Source Side Heat Transfer Energy", - OutputProcessor::Unit::J, + Constant::Units::J, simpleWAHP.EnergySource, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, simpleWAHP.Name, + Constant::eResource::PlantLoopHeatingDemand, + OutputProcessor::SOVEndUseCat::HeatingCoils, {}, - "PLANTLOOPHEATINGDEMAND", - "HEATINGCOILS", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); // create predefined report entries OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchHeatCoilType, simpleWAHP.Name, CurrentModuleObject); @@ -773,49 +767,49 @@ namespace WaterToAirHeatPumpSimple { // COOLING COIL Setup Report variables for the Heat Pump SetupOutputVariable(state, "Cooling Coil Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, simpleWAHP.Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Cooling Coil Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, simpleWAHP.QLoadTotal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Cooling Coil Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, simpleWAHP.QSensible, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Cooling Coil Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, simpleWAHP.QLatent, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Cooling Coil Source Side Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, simpleWAHP.QSource, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Cooling Coil Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, simpleWAHP.PartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Cooling Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, simpleWAHP.RunFrac, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -823,56 +817,56 @@ namespace WaterToAirHeatPumpSimple { SetupOutputVariable(state, "Cooling Coil Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, simpleWAHP.AirMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Cooling Coil Air Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, simpleWAHP.InletAirDBTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Cooling Coil Air Inlet Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, simpleWAHP.InletAirHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Cooling Coil Air Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, simpleWAHP.OutletAirDBTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Cooling Coil Air Outlet Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, simpleWAHP.OutletAirHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Cooling Coil Source Side Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, simpleWAHP.WaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Cooling Coil Source Side Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, simpleWAHP.InletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Cooling Coil Source Side Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, simpleWAHP.OutletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -882,21 +876,21 @@ namespace WaterToAirHeatPumpSimple { // HEATING COIL Setup Report variables for the Heat Pump SetupOutputVariable(state, "Heating Coil Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, simpleWAHP.Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Heating Coil Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, simpleWAHP.QLoadTotal, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Heating Coil Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, simpleWAHP.QSensible, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -904,21 +898,21 @@ namespace WaterToAirHeatPumpSimple { SetupOutputVariable(state, "Heating Coil Source Side Heat Transfer Rate", - OutputProcessor::Unit::W, + Constant::Units::W, simpleWAHP.QSource, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Heating Coil Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, simpleWAHP.PartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Heating Coil Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, simpleWAHP.RunFrac, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -926,56 +920,56 @@ namespace WaterToAirHeatPumpSimple { SetupOutputVariable(state, "Heating Coil Air Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, simpleWAHP.AirMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Heating Coil Air Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, simpleWAHP.InletAirDBTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Heating Coil Air Inlet Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, simpleWAHP.InletAirHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Heating Coil Air Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, simpleWAHP.OutletAirDBTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Heating Coil Air Outlet Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, simpleWAHP.OutletAirHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Heating Coil Source Side Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, simpleWAHP.WaterMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Heating Coil Source Side Inlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, simpleWAHP.InletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, simpleWAHP.Name); SetupOutputVariable(state, "Heating Coil Source Side Outlet Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, simpleWAHP.OutletWaterTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/WaterToAirHeatPumpSimple.hh b/src/EnergyPlus/WaterToAirHeatPumpSimple.hh index c07f2d6220c..45c0d442115 100644 --- a/src/EnergyPlus/WaterToAirHeatPumpSimple.hh +++ b/src/EnergyPlus/WaterToAirHeatPumpSimple.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WaterUse.cc b/src/EnergyPlus/WaterUse.cc index f3c59b9f966..e515d45dbf8 100644 --- a/src/EnergyPlus/WaterUse.cc +++ b/src/EnergyPlus/WaterUse.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -595,7 +595,7 @@ namespace WaterUse { { SetupOutputVariable(state, "Water Use Equipment Hot Water Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->HotMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -603,7 +603,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Equipment Cold Water Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->ColdMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -611,7 +611,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Equipment Total Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->TotalMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -619,7 +619,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Equipment Hot Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->HotVolFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -627,7 +627,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Equipment Cold Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->ColdVolFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -635,7 +635,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Equipment Total Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->TotalVolFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -643,7 +643,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Equipment Hot Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->HotVolume, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -651,7 +651,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Equipment Cold Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->ColdVolume, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -659,32 +659,30 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Equipment Total Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->TotalVolume, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - "Water", - "WATERSYSTEMS", + Constant::eResource::Water, + OutputProcessor::SOVEndUseCat::WaterSystem, this->EndUseSubcatName, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Water Use Equipment Mains Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->TotalVolume, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - "MainsWater", - "WATERSYSTEMS", + Constant::eResource::MainsWater, + OutputProcessor::SOVEndUseCat::WaterSystem, this->EndUseSubcatName, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Water Use Equipment Hot Water Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->HotTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -692,7 +690,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Equipment Cold Water Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->ColdTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -700,7 +698,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Equipment Target Water Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->TargetTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -708,7 +706,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Equipment Mixed Water Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->MixedTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -716,7 +714,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Equipment Drain Water Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->DrainTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -724,7 +722,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Equipment Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -733,57 +731,54 @@ namespace WaterUse { if (this->Connections == 0) { SetupOutputVariable(state, "Water Use Equipment Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - "DISTRICTHEATINGWATER", - "WATERSYSTEMS", + Constant::eResource::DistrictHeatingWater, + OutputProcessor::SOVEndUseCat::WaterSystem, this->EndUseSubcatName, - "Plant"); + OutputProcessor::SOVGroup::Plant); } else if (state.dataWaterUse->WaterConnections(this->Connections).StandAlone) { SetupOutputVariable(state, "Water Use Equipment Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - "DISTRICTHEATINGWATER", - "WATERSYSTEMS", + Constant::eResource::DistrictHeatingWater, + OutputProcessor::SOVEndUseCat::WaterSystem, this->EndUseSubcatName, - "Plant"); + OutputProcessor::SOVGroup::Plant); } else { // The EQUIPMENT is coupled to a plant loop via a CONNECTIONS object SetupOutputVariable(state, "Water Use Equipment Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, - {}, - "ENERGYTRANSFER", - "WATERSYSTEMS", + Constant::eResource::EnergyTransfer, + OutputProcessor::SOVEndUseCat::WaterSystem, this->EndUseSubcatName, - "Plant"); + OutputProcessor::SOVGroup::Plant); } if (this->Zone > 0) { SetupOutputVariable(state, "Water Use Equipment Zone Sensible Heat Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->SensibleRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Water Use Equipment Zone Sensible Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->SensibleEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -791,14 +786,14 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Equipment Zone Latent Gain Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->LatentRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Water Use Equipment Zone Latent Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->LatentEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -806,14 +801,14 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Equipment Zone Moisture Gain Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->MoistureRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Water Use Equipment Zone Moisture Gain Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, this->MoistureMass, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -834,7 +829,7 @@ namespace WaterUse { { SetupOutputVariable(state, "Water Use Connections Hot Water Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->HotMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -842,7 +837,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Connections Cold Water Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->ColdMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -850,7 +845,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Connections Total Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->TotalMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -858,7 +853,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Connections Drain Water Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->DrainMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -866,7 +861,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Connections Heat Recovery Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, this->RecoveryMassFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -874,7 +869,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Connections Hot Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->HotVolFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -882,7 +877,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Connections Cold Water Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->ColdVolFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -890,7 +885,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Connections Total Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, this->TotalVolFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -898,7 +893,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Connections Hot Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->HotVolume, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -906,7 +901,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Connections Cold Water Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->ColdVolume, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -914,7 +909,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Connections Total Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, this->TotalVolume, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -924,7 +919,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Connections Hot Water Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->HotTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -932,7 +927,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Connections Cold Water Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->ColdTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -940,7 +935,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Connections Drain Water Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->DrainTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -948,7 +943,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Connections Return Water Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->ReturnTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -956,7 +951,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Connections Waste Water Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->WasteTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -964,7 +959,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Connections Heat Recovery Water Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, this->RecoveryTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -972,7 +967,7 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Connections Heat Recovery Effectiveness", - OutputProcessor::Unit::None, + Constant::Units::None, this->Effectiveness, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -980,14 +975,14 @@ namespace WaterUse { SetupOutputVariable(state, "Water Use Connections Heat Recovery Rate", - OutputProcessor::Unit::W, + Constant::Units::W, this->RecoveryRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, this->Name); SetupOutputVariable(state, "Water Use Connections Heat Recovery Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->RecoveryEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -999,16 +994,15 @@ namespace WaterUse { if (!this->StandAlone) { SetupOutputVariable(state, "Water Use Connections Plant Hot Water Energy", - OutputProcessor::Unit::J, + Constant::Units::J, this->Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, this->Name, + Constant::eResource::PlantLoopHeatingDemand, + OutputProcessor::SOVEndUseCat::WaterSystem, {}, - "PLANTLOOPHEATINGDEMAND", - "WATERSYSTEMS", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); } } diff --git a/src/EnergyPlus/WaterUse.hh b/src/EnergyPlus/WaterUse.hh index ac38699828b..46f6cfa649d 100644 --- a/src/EnergyPlus/WaterUse.hh +++ b/src/EnergyPlus/WaterUse.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WeatherManager.cc b/src/EnergyPlus/WeatherManager.cc index c4a044069f4..726df34a7a9 100644 --- a/src/EnergyPlus/WeatherManager.cc +++ b/src/EnergyPlus/WeatherManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -358,273 +358,273 @@ namespace Weather { SetupOutputVariable(state, "Site Outdoor Air Drybulb Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataEnvrn->OutDryBulbTemp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Outdoor Air Dewpoint Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataEnvrn->OutDewPointTemp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Outdoor Air Wetbulb Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataEnvrn->OutWetBulbTemp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Outdoor Air Humidity Ratio", - OutputProcessor::Unit::kgWater_kgDryAir, + Constant::Units::kgWater_kgDryAir, state.dataEnvrn->OutHumRat, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Outdoor Air Relative Humidity", - OutputProcessor::Unit::Perc, + Constant::Units::Perc, state.dataEnvrn->OutRelHum, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Outdoor Air Barometric Pressure", - OutputProcessor::Unit::Pa, + Constant::Units::Pa, state.dataEnvrn->OutBaroPress, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Wind Speed", - OutputProcessor::Unit::m_s, + Constant::Units::m_s, state.dataEnvrn->WindSpeed, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Wind Direction", - OutputProcessor::Unit::deg, + Constant::Units::deg, state.dataEnvrn->WindDir, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Sky Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataEnvrn->SkyTemp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Horizontal Infrared Radiation Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataWeather->HorizIRSky, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Diffuse Solar Radiation Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataEnvrn->DifSolarRad, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Direct Solar Radiation Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataEnvrn->BeamSolarRad, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Liquid Precipitation Depth", - OutputProcessor::Unit::m, + Constant::Units::m, state.dataEnvrn->LiquidPrecipitation, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Environment"); SetupOutputVariable(state, "Site Precipitation Rate", - OutputProcessor::Unit::m_s, + Constant::Units::m_s, state.dataWaterData->RainFall.CurrentRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Precipitation Depth", - OutputProcessor::Unit::m, + Constant::Units::m, state.dataWaterData->RainFall.CurrentAmount, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Environment"); SetupOutputVariable(state, "Site Ground Reflected Solar Radiation Rate per Area", - OutputProcessor::Unit::W_m2, + Constant::Units::W_m2, state.dataEnvrn->GndSolarRad, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Ground Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataEnvrn->GroundTemp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Surface Ground Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataEnvrn->GroundTemp_Surface, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Deep Ground Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataEnvrn->GroundTemp_Deep, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Simple Factor Model Ground Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataEnvrn->GroundTempFC, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Total Sky Cover", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataEnvrn->TotalCloudCover, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Opaque Sky Cover", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataEnvrn->OpaqueCloudCover, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Outdoor Air Enthalpy", - OutputProcessor::Unit::J_kg, + Constant::Units::J_kg, state.dataEnvrn->OutEnthalpy, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Outdoor Air Density", - OutputProcessor::Unit::kg_m3, + Constant::Units::kg_m3, state.dataEnvrn->OutAirDensity, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Solar Azimuth Angle", - OutputProcessor::Unit::deg, + Constant::Units::deg, state.dataWeather->SolarAzimuthAngle, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Solar Altitude Angle", - OutputProcessor::Unit::deg, + Constant::Units::deg, state.dataWeather->SolarAltitudeAngle, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Solar Hour Angle", - OutputProcessor::Unit::deg, + Constant::Units::deg, state.dataWeather->HrAngle, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Rain Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataWeather->RptIsRain, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Snow on Ground Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataWeather->RptIsSnow, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Exterior Horizontal Sky Illuminance", - OutputProcessor::Unit::lux, + Constant::Units::lux, state.dataEnvrn->HISKF, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Exterior Horizontal Beam Illuminance", - OutputProcessor::Unit::lux, + Constant::Units::lux, state.dataEnvrn->HISUNF, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Exterior Beam Normal Illuminance", - OutputProcessor::Unit::lux, + Constant::Units::lux, state.dataEnvrn->HISUNFnorm, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Sky Diffuse Solar Radiation Luminous Efficacy", - OutputProcessor::Unit::lum_W, + Constant::Units::lum_W, state.dataEnvrn->PDIFLW, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Beam Solar Radiation Luminous Efficacy", - OutputProcessor::Unit::lum_W, + Constant::Units::lum_W, state.dataEnvrn->PDIRLW, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Daylighting Model Sky Clearness", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataEnvrn->SkyClearness, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Daylighting Model Sky Brightness", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataEnvrn->SkyBrightness, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Environment"); SetupOutputVariable(state, "Site Daylight Saving Time Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataEnvrn->DSTIndicator, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, "Environment"); SetupOutputVariable(state, "Site Day Type Index", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataWeather->RptDayType, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, "Environment"); SetupOutputVariable(state, "Site Mains Water Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataEnvrn->WaterMainsTemp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -4418,16 +4418,22 @@ namespace Weather { // incremented. Finally, the header information for the report must // be sent to the output file. + using OutputProcessor::ReportFreq; + static constexpr std::string_view EnvironmentString(",5,Environment Title[],Latitude[deg],Longitude[deg],Time Zone[],Elevation[m]"); - static constexpr std::string_view TimeStepString( - ",8,Day of Simulation[],Month[],Day of Month[],DST Indicator[1=yes 0=no],Hour[],StartMinute[],EndMinute[],DayType"); - static constexpr std::string_view DailyString( - ",5,Cumulative Day of Simulation[],Month[],Day of Month[],DST Indicator[1=yes 0=no],DayType ! When Daily "); - static constexpr std::string_view MonthlyString(",2,Cumulative Days of Simulation[],Month[] ! When Monthly "); - static constexpr std::string_view RunPeriodString(",1,Cumulative Days of Simulation[] ! When Run Period "); - static constexpr std::string_view YearlyString(",1,Calendar Year of Simulation[] ! When Annual "); - - AssignReportNumber(state, state.dataWeather->EnvironmentReportNbr); + + static constexpr std::array freqStrings = { + "", // No EachCall string + ",8,Day of Simulation[],Month[],Day of Month[],DST Indicator[1=yes 0=no],Hour[],StartMinute[],EndMinute[],DayType", + "", // No Hour string + ",5,Cumulative Day of Simulation[],Month[],Day of Month[],DST Indicator[1=yes 0=no],DayType ! When Daily ", + ",2,Cumulative Days of Simulation[],Month[] ! When Monthly ", + ",1,Cumulative Days of Simulation[] ! When Run Period ", + ",1,Calendar Year of Simulation[] ! When Annual "}; + + auto &op = state.dataOutputProcessor; + + state.dataWeather->EnvironmentReportNbr = ++op->ReportNumberCounter; if (state.dataWeather->EnvironmentReportNbr != 1) { // problem ShowFatalError(state, "ReportOutputFileHeaders: Assigned report number for Environment title is not 1. Contact Support."); } @@ -4436,35 +4442,16 @@ namespace Weather { print(state.files.eso, "{}{}\n", state.dataWeather->EnvironmentReportChr, EnvironmentString); print(state.files.mtr, "{}{}\n", state.dataWeather->EnvironmentReportChr, EnvironmentString); - AssignReportNumber(state, state.dataOutputProcessor->TimeStepStampReportNbr); - state.dataOutputProcessor->TimeStepStampReportChr = fmt::to_string(state.dataOutputProcessor->TimeStepStampReportNbr); - strip(state.dataOutputProcessor->TimeStepStampReportChr); - print(state.files.eso, "{}{}\n", state.dataOutputProcessor->TimeStepStampReportChr, TimeStepString); - print(state.files.mtr, "{}{}\n", state.dataOutputProcessor->TimeStepStampReportChr, TimeStepString); - - AssignReportNumber(state, state.dataOutputProcessor->DailyStampReportNbr); - state.dataOutputProcessor->DailyStampReportChr = fmt::to_string(state.dataOutputProcessor->DailyStampReportNbr); - strip(state.dataOutputProcessor->DailyStampReportChr); - print(state.files.eso, "{}{}{}\n", state.dataOutputProcessor->DailyStampReportChr, DailyString, "Report Variables Requested"); - print(state.files.mtr, "{}{}{}\n", state.dataOutputProcessor->DailyStampReportChr, DailyString, "Meters Requested"); - - AssignReportNumber(state, state.dataOutputProcessor->MonthlyStampReportNbr); - state.dataOutputProcessor->MonthlyStampReportChr = fmt::to_string(state.dataOutputProcessor->MonthlyStampReportNbr); - strip(state.dataOutputProcessor->MonthlyStampReportChr); - print(state.files.eso, "{}{}{}\n", state.dataOutputProcessor->MonthlyStampReportChr, MonthlyString, "Report Variables Requested"); - print(state.files.mtr, "{}{}{}\n", state.dataOutputProcessor->MonthlyStampReportChr, MonthlyString, "Meters Requested"); - - AssignReportNumber(state, state.dataOutputProcessor->RunPeriodStampReportNbr); - state.dataOutputProcessor->RunPeriodStampReportChr = fmt::to_string(state.dataOutputProcessor->RunPeriodStampReportNbr); - strip(state.dataOutputProcessor->RunPeriodStampReportChr); - print(state.files.eso, "{}{}{}\n", state.dataOutputProcessor->RunPeriodStampReportChr, RunPeriodString, "Report Variables Requested"); - print(state.files.mtr, "{}{}{}\n", state.dataOutputProcessor->RunPeriodStampReportChr, RunPeriodString, "Meters Requested"); - - AssignReportNumber(state, state.dataOutputProcessor->YearlyStampReportNbr); - state.dataOutputProcessor->YearlyStampReportChr = fmt::to_string(state.dataOutputProcessor->YearlyStampReportNbr); - strip(state.dataOutputProcessor->YearlyStampReportChr); - print(state.files.eso, "{}{}{}\n", state.dataOutputProcessor->YearlyStampReportChr, YearlyString, "Report Variables Requested"); - print(state.files.mtr, "{}{}{}\n", state.dataOutputProcessor->YearlyStampReportChr, YearlyString, "Meters Requested"); + // TImeStep and Hour share a stamp + op->freqStampReportNums[(int)ReportFreq::Hour] = op->freqStampReportNums[(int)ReportFreq::TimeStep] = ++op->ReportNumberCounter; + print(state.files.eso, "{}{}\n", op->freqStampReportNums[(int)ReportFreq::TimeStep], freqStrings[(int)ReportFreq::TimeStep]); + print(state.files.mtr, "{}{}\n", op->freqStampReportNums[(int)ReportFreq::TimeStep], freqStrings[(int)ReportFreq::TimeStep]); + + for (ReportFreq freq : {ReportFreq::Day, ReportFreq::Month, ReportFreq::Simulation, ReportFreq::Year}) { + op->freqStampReportNums[(int)freq] = ++op->ReportNumberCounter; + print(state.files.eso, "{}{}{}\n", op->freqStampReportNums[(int)freq], freqStrings[(int)freq], "Report Variables Requested"); + print(state.files.mtr, "{}{}{}\n", op->freqStampReportNums[(int)freq], freqStrings[(int)freq], "Meters Requested"); + } } void ReportWeatherAndTimeInformation(EnergyPlusData &state, bool &printEnvrnStamp) // Set to true when the environment header should be printed @@ -5791,7 +5778,7 @@ namespace Weather { // SUBROUTINE LOCAL VARIABLE DECLARATIONS: std::string units; - OutputProcessor::Unit unitType; + Constant::Units unitType; state.dataWeather->DesDayInput.allocate(TotDesDays); // Allocate the array to the # of DD's state.dataWeather->desDayMods.allocate(TotDesDays); @@ -5930,13 +5917,13 @@ namespace Weather { if (desDayInput.dryBulbRangeType == DesDayDryBulbRangeType::Multiplier) { units = "[]"; - unitType = OutputProcessor::Unit::None; + unitType = Constant::Units::None; } else if (desDayInput.dryBulbRangeType == DesDayDryBulbRangeType::Difference) { units = "[deltaC]"; - unitType = OutputProcessor::Unit::deltaC; + unitType = Constant::Units::deltaC; } else if (desDayInput.dryBulbRangeType == DesDayDryBulbRangeType::Profile) { units = "[C]"; - unitType = OutputProcessor::Unit::C; + unitType = Constant::Units::C; } if (desDayInput.dryBulbRangeType != DesDayDryBulbRangeType::Profile && !MaxDryBulbEntered && ipsc->cAlphaArgs(3) != "invalid field") { @@ -6119,12 +6106,12 @@ namespace Weather { case DesDayHumIndType::RelHumSch: { units = "[%]"; - unitType = OutputProcessor::Unit::Perc; + unitType = Constant::Units::Perc; } break; case DesDayHumIndType::WBProfMul: { units = "[]"; - unitType = OutputProcessor::Unit::None; + unitType = Constant::Units::None; if (ipsc->lNumericFieldBlanks(5)) { ShowSevereEmptyField(state, eoh, ipsc->cNumericFieldNames(5), ipsc->cAlphaFieldNames(5), ipsc->cAlphaArgs(5)); ErrorsFound = true; @@ -6135,7 +6122,7 @@ namespace Weather { case DesDayHumIndType::WBProfDif: { units = "[]"; - unitType = OutputProcessor::Unit::None; + unitType = Constant::Units::None; if (ipsc->lNumericFieldBlanks(5)) { ShowSevereEmptyField(state, eoh, ipsc->cNumericFieldNames(5), ipsc->cAlphaFieldNames(5), ipsc->cAlphaArgs(5)); ErrorsFound = true; @@ -6289,7 +6276,7 @@ namespace Weather { for (int iTS = 1; iTS <= state.dataGlobal->NumOfTimeStepInHour; ++iTS) desDayModsEnvrn(iTS, iHr).BeamSolarRad = tmp(iTS, iHr); - unitType = OutputProcessor::Unit::W_m2; + unitType = Constant::Units::W_m2; units = "[W/m2]"; if (std::find(state.dataWeather->spSiteSchedNums.begin(), state.dataWeather->spSiteSchedNums.end(), @@ -6329,7 +6316,7 @@ namespace Weather { desDayModsEnvrn(iTS, iHr).DifSolarRad = tmp(iTS, iHr); units = "[W/m2]"; - unitType = OutputProcessor::Unit::W_m2; + unitType = Constant::Units::W_m2; if (std::find(state.dataWeather->spSiteSchedNums.begin(), state.dataWeather->spSiteSchedNums.end(), desDayInput.DiffuseSolarSchPtr) == state.dataWeather->spSiteSchedNums.end()) { @@ -6615,20 +6602,20 @@ namespace Weather { // Validate Calculation Type. std::string units; - OutputProcessor::Unit unitType; + Constant::Units unitType; wpSkyTemp.skyTempModel = static_cast(getEnumValue(Weather::SkyTempModelNamesUC, ipsc->cAlphaArgs(2))); switch (wpSkyTemp.skyTempModel) { case SkyTempModel::ScheduleValue: { wpSkyTemp.IsSchedule = true; units = "[C]"; - unitType = OutputProcessor::Unit::C; + unitType = Constant::Units::C; } break; case SkyTempModel::DryBulbDelta: case SkyTempModel::DewPointDelta: { wpSkyTemp.IsSchedule = true; units = "[deltaC]"; - unitType = OutputProcessor::Unit::deltaC; + unitType = Constant::Units::deltaC; } break; case SkyTempModel::Brunt: case SkyTempModel::Idso: diff --git a/src/EnergyPlus/WeatherManager.hh b/src/EnergyPlus/WeatherManager.hh index d2a5e9d4e9e..90f66560b88 100644 --- a/src/EnergyPlus/WeatherManager.hh +++ b/src/EnergyPlus/WeatherManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindTurbine.cc b/src/EnergyPlus/WindTurbine.cc index 27f8e787e5d..a8ceafebd34 100644 --- a/src/EnergyPlus/WindTurbine.cc +++ b/src/EnergyPlus/WindTurbine.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -677,40 +677,39 @@ namespace WindTurbine { auto &windTurbine = state.dataWindTurbine->WindTurbineSys(WindTurbineNum); SetupOutputVariable(state, "Generator Produced AC Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, windTurbine.Power, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, windTurbine.Name); SetupOutputVariable(state, "Generator Produced AC Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, windTurbine.Energy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, windTurbine.Name, + Constant::eResource::ElectricityProduced, + OutputProcessor::SOVEndUseCat::WindTurbine, {}, - "ElectricityProduced", - "WINDTURBINE", - {}, - "Plant"); + OutputProcessor::SOVGroup::Plant); SetupOutputVariable(state, "Generator Turbine Local Wind Speed", - OutputProcessor::Unit::m_s, + Constant::Units::m_s, windTurbine.LocalWindSpeed, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, windTurbine.Name); SetupOutputVariable(state, "Generator Turbine Local Air Density", - OutputProcessor::Unit::kg_m3, + Constant::Units::kg_m3, windTurbine.LocalAirDensity, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, windTurbine.Name); SetupOutputVariable(state, "Generator Turbine Tip Speed Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, windTurbine.TipSpeedRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -719,7 +718,7 @@ namespace WindTurbine { case RotorType::HorizontalAxis: { SetupOutputVariable(state, "Generator Turbine Power Coefficient", - OutputProcessor::Unit::None, + Constant::Units::None, windTurbine.PowerCoeff, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -728,28 +727,28 @@ namespace WindTurbine { case RotorType::VerticalAxis: { SetupOutputVariable(state, "Generator Turbine Chordal Component Velocity", - OutputProcessor::Unit::m_s, + Constant::Units::m_s, windTurbine.ChordalVel, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, windTurbine.Name); SetupOutputVariable(state, "Generator Turbine Normal Component Velocity", - OutputProcessor::Unit::m_s, + Constant::Units::m_s, windTurbine.NormalVel, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, windTurbine.Name); SetupOutputVariable(state, "Generator Turbine Relative Flow Velocity", - OutputProcessor::Unit::m_s, + Constant::Units::m_s, windTurbine.RelFlowVel, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, windTurbine.Name); SetupOutputVariable(state, "Generator Turbine Attack Angle", - OutputProcessor::Unit::deg, + Constant::Units::deg, windTurbine.AngOfAttack, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/WindTurbine.hh b/src/EnergyPlus/WindTurbine.hh index 44e2c732643..adcfc15eaa2 100644 --- a/src/EnergyPlus/WindTurbine.hh +++ b/src/EnergyPlus/WindTurbine.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowAC.cc b/src/EnergyPlus/WindowAC.cc index bde19976705..1d52ce242fe 100644 --- a/src/EnergyPlus/WindowAC.cc +++ b/src/EnergyPlus/WindowAC.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -680,77 +680,77 @@ namespace WindowAC { // Setup Report variables for the Fan Coils SetupOutputVariable(state, "Zone Window Air Conditioner Total Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataWindowAC->WindAC(WindACNum).TotCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataWindowAC->WindAC(WindACNum).Name); SetupOutputVariable(state, "Zone Window Air Conditioner Total Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataWindowAC->WindAC(WindACNum).TotCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataWindowAC->WindAC(WindACNum).Name); SetupOutputVariable(state, "Zone Window Air Conditioner Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataWindowAC->WindAC(WindACNum).SensCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataWindowAC->WindAC(WindACNum).Name); SetupOutputVariable(state, "Zone Window Air Conditioner Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataWindowAC->WindAC(WindACNum).SensCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataWindowAC->WindAC(WindACNum).Name); SetupOutputVariable(state, "Zone Window Air Conditioner Latent Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataWindowAC->WindAC(WindACNum).LatCoolEnergyRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataWindowAC->WindAC(WindACNum).Name); SetupOutputVariable(state, "Zone Window Air Conditioner Latent Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataWindowAC->WindAC(WindACNum).LatCoolEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataWindowAC->WindAC(WindACNum).Name); SetupOutputVariable(state, "Zone Window Air Conditioner Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataWindowAC->WindAC(WindACNum).ElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataWindowAC->WindAC(WindACNum).Name); SetupOutputVariable(state, "Zone Window Air Conditioner Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataWindowAC->WindAC(WindACNum).ElecConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataWindowAC->WindAC(WindACNum).Name); SetupOutputVariable(state, "Zone Window Air Conditioner Fan Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataWindowAC->WindAC(WindACNum).FanPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataWindowAC->WindAC(WindACNum).Name); SetupOutputVariable(state, "Zone Window Air Conditioner Compressor Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataWindowAC->WindAC(WindACNum).CompPartLoadRatio, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataWindowAC->WindAC(WindACNum).Name); SetupOutputVariable(state, "Zone Window Air Conditioner Fan Availability Status", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataWindowAC->WindAC(WindACNum).AvailStatus, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/WindowAC.hh b/src/EnergyPlus/WindowAC.hh index b9cdae3b1fd..84647791c8f 100644 --- a/src/EnergyPlus/WindowAC.hh +++ b/src/EnergyPlus/WindowAC.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowComplexManager.cc b/src/EnergyPlus/WindowComplexManager.cc index b75586f705e..9a425b47b66 100644 --- a/src/EnergyPlus/WindowComplexManager.cc +++ b/src/EnergyPlus/WindowComplexManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -627,7 +627,7 @@ namespace WindowComplexManager { // skip surfaces that face away from the ground point if (dot(SunDir, state.dataSurface->Surface(JSurf).NewellSurfaceNormalVector) >= 0.0) continue; // Looking for surfaces between GndPt and sun - PierceSurface(state, JSurf, gndPt, SunDir, HitPt, hit); + hit = PierceSurface(state, JSurf, gndPt, SunDir, HitPt); if (hit) { // Are not going into the details of whether a hit surface is transparent // Since this is ultimately simply weighting the transmittance, so great @@ -680,7 +680,7 @@ namespace WindowComplexManager { // skip surfaces that face away from the ground point if (dot(SunDir, state.dataSurface->Surface(JSurf).NewellSurfaceNormalVector) >= 0.0) continue; // Looking for surfaces between GndPt and sun - PierceSurface(state, JSurf, gndPt, SunDir, HitPt, hit); + hit = PierceSurface(state, JSurf, gndPt, SunDir, HitPt); if (hit) { // Are not going into the details of whether a hit surface is transparent // Since this is ultimately simply weighting the transmittance, so great @@ -1375,7 +1375,7 @@ namespace WindowComplexManager { // skip surfaces that face away from the window DotProd = dot(Geom.sInc(IRay), state.dataSurface->Surface(JSurf).NewellSurfaceNormalVector); if (DotProd >= 0.0) continue; - PierceSurface(state, JSurf, state.dataSurface->Surface(ISurf).Centroid, Geom.sInc(IRay), HitPt, hit); + hit = PierceSurface(state, JSurf, state.dataSurface->Surface(ISurf).Centroid, Geom.sInc(IRay), HitPt); if (!hit) continue; // Miss: Try next surface if (TotHits == 0) { // First hit for this ray @@ -1559,7 +1559,7 @@ namespace WindowComplexManager { for (KBkSurf = 1; KBkSurf <= NBkSurf; ++KBkSurf) { // back surf loop BaseSurf = state.dataSurface->Surface(ISurf).BaseSurf; // ShadowComb is organized by base surface JSurf = state.dataShadowComb->ShadowComb(BaseSurf).BackSurf(KBkSurf); // these are all proper back surfaces - PierceSurface(state, JSurf, state.dataSurface->Surface(ISurf).Centroid, Geom.sTrn(IRay), HitPt, hit); + hit = PierceSurface(state, JSurf, state.dataSurface->Surface(ISurf).Centroid, Geom.sTrn(IRay), HitPt); if (!hit) continue; // Miss: Try next surface if (TotHits == 0) { // First hit for this ray @@ -3006,7 +3006,7 @@ namespace WindowComplexManager { // Instead of doing temperature guess get solution from previous iteration. That should be much better than guess for (k = 1; k <= 2 * nlayer; ++k) { - theta(k) = state.dataSurface->SurfaceWindow(SurfNum).ThetaFace(k); + theta(k) = state.dataSurface->SurfaceWindow(SurfNum).thetaFace[k]; } } @@ -3047,10 +3047,7 @@ namespace WindowComplexManager { theta = 273.15; } - if (SurfNum != 0) - edgeGlCorrFac = state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum); - else - edgeGlCorrFac = 1; + edgeGlCorrFac = (SurfNum != 0) ? state.dataSurface->SurfaceWindow(SurfNum).edgeGlassCorrFac : 1; // call TARCOG int constexpr Debug_mode = 0; @@ -3378,8 +3375,8 @@ namespace WindowComplexManager { // // Get properties of inside shading layer - Real64 EffShBlEmiss = state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss[0]; - Real64 EffGlEmiss = state.dataSurface->SurfaceWindow(SurfNum).EffGlassEmiss[0]; + Real64 EffShBlEmiss = state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss[1]; + Real64 EffGlEmiss = state.dataSurface->SurfaceWindow(SurfNum).EffGlassEmiss[1]; state.dataSurface->SurfWinEffInsSurfTemp(SurfNum) = (EffShBlEmiss * SurfInsideTemp + EffGlEmiss * (theta(2 * ngllayer) - Constant::Kelvin)) / (EffShBlEmiss + EffGlEmiss); @@ -3388,8 +3385,8 @@ namespace WindowComplexManager { } for (k = 1; k <= nlayer; ++k) { - state.dataSurface->SurfaceWindow(SurfNum).ThetaFace(2 * k - 1) = theta(2 * k - 1); - state.dataSurface->SurfaceWindow(SurfNum).ThetaFace(2 * k) = theta(2 * k); + state.dataSurface->SurfaceWindow(SurfNum).thetaFace[2 * k - 1] = theta(2 * k - 1); + state.dataSurface->SurfaceWindow(SurfNum).thetaFace[2 * k] = theta(2 * k); // temperatures for reporting state.dataHeatBal->SurfWinFenLaySurfTempFront(SurfNum, k) = theta(2 * k - 1) - Constant::Kelvin; diff --git a/src/EnergyPlus/WindowComplexManager.hh b/src/EnergyPlus/WindowComplexManager.hh index 7514b192af5..9b05ebc3b53 100644 --- a/src/EnergyPlus/WindowComplexManager.hh +++ b/src/EnergyPlus/WindowComplexManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowEquivalentLayer.cc b/src/EnergyPlus/WindowEquivalentLayer.cc index 240b7bdc06a..b6e89275701 100644 --- a/src/EnergyPlus/WindowEquivalentLayer.cc +++ b/src/EnergyPlus/WindowEquivalentLayer.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -8137,9 +8137,9 @@ void CalcEQLOpticalProperty(EnergyPlusData &state, for (Lay = 1; Lay <= CFS(EQLNum).NL; ++Lay) { if (IsVBLayer(CFS(EQLNum).L(Lay))) { if (CFS(EQLNum).L(Lay).LTYPE == LayerType::VBHOR) { - ProfileAngle(state, SurfNum, state.dataEnvrn->SOLCOS, DataWindowEquivalentLayer::Orientation::Horizontal, ProfAngVer); + ProfAngVer = ProfileAngle(state, SurfNum, state.dataEnvrn->SOLCOS, DataWindowEquivalentLayer::Orientation::Horizontal); } else if (CFS(EQLNum).L(Lay).LTYPE == LayerType::VBVER) { - ProfileAngle(state, SurfNum, state.dataEnvrn->SOLCOS, DataWindowEquivalentLayer::Orientation::Vertical, ProfAngHor); + ProfAngHor = ProfileAngle(state, SurfNum, state.dataEnvrn->SOLCOS, DataWindowEquivalentLayer::Orientation::Vertical); } } } @@ -8153,9 +8153,9 @@ void CalcEQLOpticalProperty(EnergyPlusData &state, for (Lay = 1; Lay <= CFS(EQLNum).NL; ++Lay) { if (IsVBLayer(CFS(EQLNum).L(Lay))) { if (CFS(EQLNum).L(Lay).LTYPE == LayerType::VBHOR) { - ProfileAngle(state, SurfNum, state.dataEnvrn->SOLCOS, DataWindowEquivalentLayer::Orientation::Horizontal, ProfAngVer); + ProfAngVer = ProfileAngle(state, SurfNum, state.dataEnvrn->SOLCOS, DataWindowEquivalentLayer::Orientation::Horizontal); } else if (CFS(EQLNum).L(Lay).LTYPE == LayerType::VBVER) { - ProfileAngle(state, SurfNum, state.dataEnvrn->SOLCOS, DataWindowEquivalentLayer::Orientation::Vertical, ProfAngHor); + ProfAngHor = ProfileAngle(state, SurfNum, state.dataEnvrn->SOLCOS, DataWindowEquivalentLayer::Orientation::Vertical); } } } diff --git a/src/EnergyPlus/WindowEquivalentLayer.hh b/src/EnergyPlus/WindowEquivalentLayer.hh index 131913ce03e..a7baf5e0a05 100644 --- a/src/EnergyPlus/WindowEquivalentLayer.hh +++ b/src/EnergyPlus/WindowEquivalentLayer.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowManager.cc b/src/EnergyPlus/WindowManager.cc index ed57e35debc..f32c7905f1b 100644 --- a/src/EnergyPlus/WindowManager.cc +++ b/src/EnergyPlus/WindowManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -1498,17 +1498,17 @@ namespace WindowManager { TauShIR = thisMaterialShade->TransThermal; EpsShIR = thisMaterialShade->AbsorpThermal; RhoShIR = max(0.0, 1.0 - TauShIR - EpsShIR); - state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss(1) = + state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss[1] = EpsShIR * (1.0 + RhoGlIR * TauShIR / (1.0 - RhoGlIR * RhoShIR)); - state.dataSurface->SurfaceWindow(SurfNum).EffGlassEmiss(1) = EpsGlIR * TauShIR / (1.0 - RhoGlIR * RhoShIR); + state.dataSurface->SurfaceWindow(SurfNum).EffGlassEmiss[1] = EpsGlIR * TauShIR / (1.0 - RhoGlIR * RhoShIR); } if (IntBlind) { TauShIR = state.dataMaterial->Blind(BlNum).IRFrontTrans(ISlatAng); EpsShIR = state.dataMaterial->Blind(BlNum).IRBackEmiss(ISlatAng); RhoShIR = max(0.0, 1.0 - TauShIR - EpsShIR); - state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss(ISlatAng) = + state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss[ISlatAng] = EpsShIR * (1.0 + RhoGlIR * TauShIR / (1.0 - RhoGlIR * RhoShIR)); - state.dataSurface->SurfaceWindow(SurfNum).EffGlassEmiss(ISlatAng) = EpsGlIR * TauShIR / (1.0 - RhoGlIR * RhoShIR); + state.dataSurface->SurfaceWindow(SurfNum).EffGlassEmiss[ISlatAng] = EpsGlIR * TauShIR / (1.0 - RhoGlIR * RhoShIR); } // Loop over remaining slat angles only if blind with movable slats if (IntShade) break; // Loop over remaining slat angles only if blind @@ -1637,53 +1637,55 @@ namespace WindowManager { // Set some static exterior-window frame and divider SurfaceWindow values // from values in FrameDivider derived type for (SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; ++SurfNum) { + auto &surf = state.dataSurface->Surface(SurfNum); FrDivNum = state.dataSurface->Surface(SurfNum).FrameDivider; - if (FrDivNum > 0) { // Surface is a window with a frame and/or divider - FrWidth = state.dataSurface->FrameDivider(FrDivNum).FrameWidth; - GlHeight = state.dataSurface->Surface(SurfNum).Height; - GlWidth = state.dataSurface->Surface(SurfNum).Width; - NumVertDividers = state.dataSurface->FrameDivider(FrDivNum).VertDividers; - NumHorDividers = state.dataSurface->FrameDivider(FrDivNum).HorDividers; - BaseSurfNum = state.dataSurface->Surface(SurfNum).BaseSurf; - state.dataSurface->SurfWinFrameConductance(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).FrameConductance; - state.dataSurface->SurfWinFrameSolAbsorp(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).FrameSolAbsorp; - state.dataSurface->SurfWinFrameVisAbsorp(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).FrameVisAbsorp; - state.dataSurface->SurfWinFrameEmis(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).FrameEmis; - state.dataSurface->SurfWinFrEdgeToCenterGlCondRatio(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).FrEdgeToCenterGlCondRatio; - state.dataSurface->SurfWinDividerType(SurfNum) = DataSurfaces::FrameDividerType::DividedLite; - if (state.dataSurface->FrameDivider(FrDivNum).DividerType == DataSurfaces::FrameDividerType::Suspended) - state.dataSurface->SurfWinDividerType(SurfNum) = DataSurfaces::FrameDividerType::Suspended; - DivWidth = state.dataSurface->FrameDivider(FrDivNum).DividerWidth; - state.dataSurface->SurfWinDividerConductance(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).DividerConductance; - state.dataSurface->SurfWinDividerSolAbsorp(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).DividerSolAbsorp; - state.dataSurface->SurfWinDividerVisAbsorp(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).DividerVisAbsorp; - state.dataSurface->SurfWinDividerEmis(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).DividerEmis; - state.dataSurface->SurfWinDivEdgeToCenterGlCondRatio(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).DivEdgeToCenterGlCondRatio; - - state.dataSurface->SurfWinOutsideRevealSolAbs(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).OutsideRevealSolAbs; - state.dataSurface->SurfWinInsideSillDepth(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).InsideSillDepth; - state.dataSurface->SurfWinInsideReveal(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).InsideReveal; - state.dataSurface->SurfWinInsideSillSolAbs(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).InsideSillSolAbs; - state.dataSurface->SurfWinInsideRevealSolAbs(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).InsideRevealSolAbs; - - FrEdgeWidth = state.dataSurface->FrameDivider(FrDivNum).FrameEdgeWidth; - DivEdgeWidth = state.dataSurface->FrameDivider(FrDivNum).DividerEdgeWidth; - state.dataSurface->SurfWinFrameEdgeArea(SurfNum) = - 2 * FrEdgeWidth * (GlHeight - FrEdgeWidth - NumHorDividers * DivWidth + GlWidth - FrEdgeWidth - NumVertDividers * DivWidth); - state.dataSurface->SurfWinDividerEdgeArea(SurfNum) = - 2 * DivEdgeWidth * (NumHorDividers * (GlWidth - 2 * FrEdgeWidth) + NumVertDividers * (GlHeight - 2 * FrEdgeWidth)) - - NumHorDividers * NumVertDividers * (4 * pow_2(DivEdgeWidth) + 4 * FrEdgeWidth * DivWidth); - state.dataSurface->SurfWinCenterGlArea(SurfNum) = state.dataSurface->Surface(SurfNum).Area - - state.dataSurface->SurfWinFrameEdgeArea(SurfNum) - - state.dataSurface->SurfWinDividerEdgeArea(SurfNum); - state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum) = - (state.dataSurface->SurfWinFrameEdgeArea(SurfNum) * state.dataSurface->SurfWinFrEdgeToCenterGlCondRatio(SurfNum) + - state.dataSurface->SurfWinDividerEdgeArea(SurfNum) * state.dataSurface->SurfWinDivEdgeToCenterGlCondRatio(SurfNum) + - state.dataSurface->SurfWinCenterGlArea(SurfNum)) / - (state.dataSurface->SurfWinFrameEdgeArea(SurfNum) + state.dataSurface->SurfWinDividerEdgeArea(SurfNum) + - state.dataSurface->SurfWinCenterGlArea(SurfNum)); - } - } + if (FrDivNum == 0) continue; + + // Surface is a window with a frame and/or divider + + auto &surfWin = state.dataSurface->SurfaceWindow(SurfNum); + FrWidth = state.dataSurface->FrameDivider(FrDivNum).FrameWidth; + GlHeight = surf.Height; + GlWidth = surf.Width; + NumVertDividers = state.dataSurface->FrameDivider(FrDivNum).VertDividers; + NumHorDividers = state.dataSurface->FrameDivider(FrDivNum).HorDividers; + BaseSurfNum = state.dataSurface->Surface(SurfNum).BaseSurf; + state.dataSurface->SurfWinFrameConductance(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).FrameConductance; + state.dataSurface->SurfWinFrameSolAbsorp(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).FrameSolAbsorp; + state.dataSurface->SurfWinFrameVisAbsorp(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).FrameVisAbsorp; + state.dataSurface->SurfWinFrameEmis(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).FrameEmis; + state.dataSurface->SurfWinFrEdgeToCenterGlCondRatio(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).FrEdgeToCenterGlCondRatio; + state.dataSurface->SurfWinDividerType(SurfNum) = DataSurfaces::FrameDividerType::DividedLite; + if (state.dataSurface->FrameDivider(FrDivNum).DividerType == DataSurfaces::FrameDividerType::Suspended) + state.dataSurface->SurfWinDividerType(SurfNum) = DataSurfaces::FrameDividerType::Suspended; + DivWidth = state.dataSurface->FrameDivider(FrDivNum).DividerWidth; + state.dataSurface->SurfWinDividerConductance(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).DividerConductance; + state.dataSurface->SurfWinDividerSolAbsorp(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).DividerSolAbsorp; + state.dataSurface->SurfWinDividerVisAbsorp(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).DividerVisAbsorp; + state.dataSurface->SurfWinDividerEmis(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).DividerEmis; + state.dataSurface->SurfWinDivEdgeToCenterGlCondRatio(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).DivEdgeToCenterGlCondRatio; + + state.dataSurface->SurfWinOutsideRevealSolAbs(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).OutsideRevealSolAbs; + state.dataSurface->SurfWinInsideSillDepth(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).InsideSillDepth; + state.dataSurface->SurfWinInsideReveal(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).InsideReveal; + state.dataSurface->SurfWinInsideSillSolAbs(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).InsideSillSolAbs; + state.dataSurface->SurfWinInsideRevealSolAbs(SurfNum) = state.dataSurface->FrameDivider(FrDivNum).InsideRevealSolAbs; + + FrEdgeWidth = state.dataSurface->FrameDivider(FrDivNum).FrameEdgeWidth; + DivEdgeWidth = state.dataSurface->FrameDivider(FrDivNum).DividerEdgeWidth; + state.dataSurface->SurfWinFrameEdgeArea(SurfNum) = + 2 * FrEdgeWidth * (GlHeight - FrEdgeWidth - NumHorDividers * DivWidth + GlWidth - FrEdgeWidth - NumVertDividers * DivWidth); + state.dataSurface->SurfWinDividerEdgeArea(SurfNum) = + 2 * DivEdgeWidth * (NumHorDividers * (GlWidth - 2 * FrEdgeWidth) + NumVertDividers * (GlHeight - 2 * FrEdgeWidth)) - + NumHorDividers * NumVertDividers * (4 * pow_2(DivEdgeWidth) + 4 * FrEdgeWidth * DivWidth); + surfWin.centerGlassArea = + surf.Area - state.dataSurface->SurfWinFrameEdgeArea(SurfNum) - state.dataSurface->SurfWinDividerEdgeArea(SurfNum); + surfWin.edgeGlassCorrFac = + (state.dataSurface->SurfWinFrameEdgeArea(SurfNum) * state.dataSurface->SurfWinFrEdgeToCenterGlCondRatio(SurfNum) + + state.dataSurface->SurfWinDividerEdgeArea(SurfNum) * state.dataSurface->SurfWinDivEdgeToCenterGlCondRatio(SurfNum) + + surfWin.centerGlassArea) / + (state.dataSurface->SurfWinFrameEdgeArea(SurfNum) + state.dataSurface->SurfWinDividerEdgeArea(SurfNum) + surfWin.centerGlassArea); + } // for (SurfNum) // Set SolarDiffusing to true for exterior windows that have a construction with an innermost diffusing glass layer DifOverrideCount = 0; @@ -2183,7 +2185,7 @@ namespace WindowManager { state.dataConstruction->Construct(ConstrNum).TotSolidLayers; // Simon: This is necessary to keep for frame calculations // Simon: need to transfer surface temperatures because of frames calculation for (i = 1; i <= 2 * state.dataConstruction->Construct(ConstrNum).TotSolidLayers; ++i) { - state.dataWindowManager->thetas[i - 1] = window.ThetaFace(i); + state.dataWindowManager->thetas[i - 1] = window.thetaFace[i]; } state.dataWindowManager->hcout = HextConvCoeff; state.dataWindowManager->hcin = state.dataHeatBalSurf->SurfHConvInt(SurfNum); @@ -2580,16 +2582,16 @@ namespace WindowManager { SurfInsideTemp = state.dataWindowManager->thetas[2 * state.dataWindowManager->ngllayer + 1] - state.dataWindowManager->TKelvin; if (state.dataSurface->SurfWinMovableSlats(SurfNum)) { EffShBlEmiss = - General::Interp(window.EffShBlindEmiss(state.dataSurface->SurfWinSlatsAngIndex(SurfNum)), - window.EffShBlindEmiss(std::min(Material::MaxSlatAngs, state.dataSurface->SurfWinSlatsAngIndex(SurfNum) + 1)), + General::Interp(window.EffShBlindEmiss[state.dataSurface->SurfWinSlatsAngIndex(SurfNum)], + window.EffShBlindEmiss[std::min(Material::MaxSlatAngs, state.dataSurface->SurfWinSlatsAngIndex(SurfNum) + 1)], state.dataSurface->SurfWinSlatsAngInterpFac(SurfNum)); EffGlEmiss = - General::Interp(window.EffGlassEmiss(state.dataSurface->SurfWinSlatsAngIndex(SurfNum)), - window.EffGlassEmiss(std::min(Material::MaxSlatAngs, state.dataSurface->SurfWinSlatsAngIndex(SurfNum) + 1)), + General::Interp(window.EffGlassEmiss[state.dataSurface->SurfWinSlatsAngIndex(SurfNum)], + window.EffGlassEmiss[std::min(Material::MaxSlatAngs, state.dataSurface->SurfWinSlatsAngIndex(SurfNum) + 1)], state.dataSurface->SurfWinSlatsAngInterpFac(SurfNum)); } else { - EffShBlEmiss = state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss(1); - EffGlEmiss = state.dataSurface->SurfaceWindow(SurfNum).EffGlassEmiss(1); + EffShBlEmiss = state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss[1]; + EffGlEmiss = state.dataSurface->SurfaceWindow(SurfNum).EffGlassEmiss[1]; } state.dataSurface->SurfWinEffInsSurfTemp(SurfNum) = (EffShBlEmiss * SurfInsideTemp + @@ -2611,7 +2613,7 @@ namespace WindowManager { // Save temperatures for use next time step for (k = 1; k <= state.dataWindowManager->nglfacep; ++k) { - window.ThetaFace(k) = state.dataWindowManager->thetas[k - 1]; + window.thetaFace[k] = state.dataWindowManager->thetas[k - 1]; } // Added TH 12/23/2008 for thermochromic windows to save the current TC layer temperature @@ -2723,9 +2725,11 @@ namespace WindowManager { // add values to this array in unexpected places state.dataWindowManager->fvec = {0.0}; + auto const &surfWin = state.dataSurface->SurfaceWindow(SurfNum); + switch (state.dataWindowManager->ngllayer) { - case 1: // single pane + case 1: { // single pane state.dataWindowManager->fvec[0] = state.dataWindowManager->Outir * state.dataWindowManager->emis[0] - state.dataWindowManager->emis[0] * state.dataWindowManager->sigma * pow_4(state.dataWindowManager->thetas[0]) + @@ -2738,11 +2742,11 @@ namespace WindowManager { state.dataWindowManager->scon[0] * (state.dataWindowManager->thetas[0] - state.dataWindowManager->thetas[1]) + state.dataWindowManager->hcin * (state.dataWindowManager->tin - state.dataWindowManager->thetas[1]) + state.dataWindowManager->AbsRadGlassFace[1]; - break; - case 2: // double pane + } break; + case 2: { // double pane WindowGasConductance(state, state.dataWindowManager->thetas[1], state.dataWindowManager->thetas[2], 1, con, pr, gr); NusseltNumber(state, SurfNum, state.dataWindowManager->thetas[1], state.dataWindowManager->thetas[2], 1, gr, pr, nu); - hgap(1) = (con / state.dataWindowManager->gap[0] * nu) * state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum); + hgap(1) = (con / state.dataWindowManager->gap[0] * nu) * surfWin.edgeGlassCorrFac; state.dataWindowManager->fvec[0] = state.dataWindowManager->Outir * state.dataWindowManager->emis[0] - @@ -2765,15 +2769,15 @@ namespace WindowManager { state.dataWindowManager->scon[1] * (state.dataWindowManager->thetas[2] - state.dataWindowManager->thetas[3]) + state.dataWindowManager->hcin * (state.dataWindowManager->tin - state.dataWindowManager->thetas[3]) + state.dataWindowManager->AbsRadGlassFace[3]; - break; - case 3: // Triple Pane + } break; + case 3: { // Triple Pane WindowGasConductance(state, state.dataWindowManager->thetas[1], state.dataWindowManager->thetas[2], 1, con, pr, gr); NusseltNumber(state, SurfNum, state.dataWindowManager->thetas[1], state.dataWindowManager->thetas[2], 1, gr, pr, nu); - hgap(1) = con / state.dataWindowManager->gap[0] * nu * state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum); + hgap(1) = con / state.dataWindowManager->gap[0] * nu * surfWin.edgeGlassCorrFac; WindowGasConductance(state, state.dataWindowManager->thetas[3], state.dataWindowManager->thetas[4], 2, con, pr, gr); NusseltNumber(state, SurfNum, state.dataWindowManager->thetas[3], state.dataWindowManager->thetas[4], 2, gr, pr, nu); - hgap(2) = con / state.dataWindowManager->gap[1] * nu * state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum); + hgap(2) = con / state.dataWindowManager->gap[1] * nu * surfWin.edgeGlassCorrFac; thetas_2_3_4 = pow_4(state.dataWindowManager->thetas[1]) - pow_4(state.dataWindowManager->thetas[2]); thetas_4_5_4 = pow_4(state.dataWindowManager->thetas[3]) - pow_4(state.dataWindowManager->thetas[4]); @@ -2805,19 +2809,19 @@ namespace WindowManager { state.dataWindowManager->scon[2] * (state.dataWindowManager->thetas[4] - state.dataWindowManager->thetas[5]) + state.dataWindowManager->hcin * (state.dataWindowManager->tin - state.dataWindowManager->thetas[5]) + state.dataWindowManager->AbsRadGlassFace[5]; - break; - case 4: // Quad Pane + } break; + case 4: { // Quad Pane WindowGasConductance(state, state.dataWindowManager->thetas[1], state.dataWindowManager->thetas[2], 1, con, pr, gr); NusseltNumber(state, SurfNum, state.dataWindowManager->thetas[1], state.dataWindowManager->thetas[2], 1, gr, pr, nu); - hgap(1) = con / state.dataWindowManager->gap[0] * nu * state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum); + hgap(1) = con / state.dataWindowManager->gap[0] * nu * surfWin.edgeGlassCorrFac; WindowGasConductance(state, state.dataWindowManager->thetas[3], state.dataWindowManager->thetas[4], 2, con, pr, gr); NusseltNumber(state, SurfNum, state.dataWindowManager->thetas[3], state.dataWindowManager->thetas[4], 2, gr, pr, nu); - hgap(2) = con / state.dataWindowManager->gap[1] * nu * state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum); + hgap(2) = con / state.dataWindowManager->gap[1] * nu * surfWin.edgeGlassCorrFac; WindowGasConductance(state, state.dataWindowManager->thetas[5], state.dataWindowManager->thetas[6], 3, con, pr, gr); NusseltNumber(state, SurfNum, state.dataWindowManager->thetas[5], state.dataWindowManager->thetas[6], 3, gr, pr, nu); - hgap(3) = con / state.dataWindowManager->gap[2] * nu * state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum); + hgap(3) = con / state.dataWindowManager->gap[2] * nu * surfWin.edgeGlassCorrFac; thetas_2_3_4 = pow_4(state.dataWindowManager->thetas[1]) - pow_4(state.dataWindowManager->thetas[2]); thetas_4_5_4 = pow_4(state.dataWindowManager->thetas[3]) - pow_4(state.dataWindowManager->thetas[4]); @@ -2858,9 +2862,9 @@ namespace WindowManager { state.dataWindowManager->scon[3] * (state.dataWindowManager->thetas[6] - state.dataWindowManager->thetas[7]) + state.dataWindowManager->hcin * (state.dataWindowManager->tin - state.dataWindowManager->thetas[7]) + state.dataWindowManager->AbsRadGlassFace[7]; - break; - } - } + } break; + } // switch + } // CalcWindowHeatBalanceInternalRoutines() //**************************************************************************** @@ -3059,6 +3063,8 @@ namespace WindowManager { int i; // Counter + auto const &surfWin = state.dataSurface->SurfaceWindow(SurfNum); + if (nglasslayer == 1) { Bface(1) = state.dataWindowManager->Outir * state.dataWindowManager->emis[0] + state.dataWindowManager->hcout * state.dataWindowManager->tout + state.dataWindowManager->AbsRadGlassFace[0]; @@ -3116,11 +3122,10 @@ namespace WindowManager { WindowGasConductance(state, state.dataWindowManager->thetas[1], state.dataWindowManager->thetas[2], 1, con, pr, gr); NusseltNumber(state, SurfNum, state.dataWindowManager->thetas[1], state.dataWindowManager->thetas[2], 1, gr, pr, nu); hgap(1) = con / state.dataWindowManager->gap[0] * nu; - if (state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum) > 1.0) { // Edge of glass correction + if (surfWin.edgeGlassCorrFac > 1.0) { // Edge of glass correction state.dataWindowManager->hrgap[0] = 0.5 * std::abs(state.dataWindowManager->A23) * pow_3(state.dataWindowManager->thetas[1] + state.dataWindowManager->thetas[2]); - hgap(1) = hgap(1) * state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum) + - state.dataWindowManager->hrgap[0] * (state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum) - 1.0); + hgap(1) = hgap(1) * surfWin.edgeGlassCorrFac + state.dataWindowManager->hrgap[0] * (surfWin.edgeGlassCorrFac - 1.0); } Bface(1) = state.dataWindowManager->Outir * state.dataWindowManager->emis[0] + @@ -3228,21 +3233,19 @@ namespace WindowManager { WindowGasConductance(state, state.dataWindowManager->thetas[1], state.dataWindowManager->thetas[2], 1, con, pr, gr); NusseltNumber(state, SurfNum, state.dataWindowManager->thetas[1], state.dataWindowManager->thetas[2], 1, gr, pr, nu); hgap(1) = con / state.dataWindowManager->gap[0] * nu; - if (state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum) > 1.0) { // Edge of glass correction + if (surfWin.edgeGlassCorrFac > 1.0) { // Edge of glass correction state.dataWindowManager->hrgap[0] = 0.5 * std::abs(state.dataWindowManager->A23) * pow_3(state.dataWindowManager->thetas[1] + state.dataWindowManager->thetas[2]); - hgap(1) = hgap(1) * state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum) + - state.dataWindowManager->hrgap[0] * (state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum) - 1.0); + hgap(1) = hgap(1) * surfWin.edgeGlassCorrFac + state.dataWindowManager->hrgap[0] * (surfWin.edgeGlassCorrFac - 1.0); } WindowGasConductance(state, state.dataWindowManager->thetas[3], state.dataWindowManager->thetas[4], 2, con, pr, gr); NusseltNumber(state, SurfNum, state.dataWindowManager->thetas[3], state.dataWindowManager->thetas[4], 2, gr, pr, nu); hgap(2) = con / state.dataWindowManager->gap[1] * nu; - if (state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum) > 1.0) { // Edge of glass correction + if (surfWin.edgeGlassCorrFac > 1.0) { // Edge of glass correction state.dataWindowManager->hrgap[1] = 0.5 * std::abs(state.dataWindowManager->A45) * pow_3(state.dataWindowManager->thetas[3] + state.dataWindowManager->thetas[4]); - hgap(2) = hgap(2) * state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum) + - state.dataWindowManager->hrgap[1] * (state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum) - 1.0); + hgap(2) = hgap(2) * surfWin.edgeGlassCorrFac + state.dataWindowManager->hrgap[1] * (surfWin.edgeGlassCorrFac - 1.0); } Bface(1) = state.dataWindowManager->Outir * state.dataWindowManager->emis[0] + @@ -3356,31 +3359,28 @@ namespace WindowManager { WindowGasConductance(state, state.dataWindowManager->thetas[1], state.dataWindowManager->thetas[2], 1, con, pr, gr); NusseltNumber(state, SurfNum, state.dataWindowManager->thetas[1], state.dataWindowManager->thetas[2], 1, gr, pr, nu); hgap(1) = con / state.dataWindowManager->gap[0] * nu; - if (state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum) > 1.0) { // Edge of glass correction + if (surfWin.edgeGlassCorrFac > 1.0) { // Edge of glass correction state.dataWindowManager->hrgap[0] = 0.5 * std::abs(state.dataWindowManager->A23) * pow_3(state.dataWindowManager->thetas[1] + state.dataWindowManager->thetas[2]); - hgap(1) = hgap(1) * state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum) + - state.dataWindowManager->hrgap[0] * (state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum) - 1.0); + hgap(1) = hgap(1) * surfWin.edgeGlassCorrFac + state.dataWindowManager->hrgap[0] * (surfWin.edgeGlassCorrFac - 1.0); } WindowGasConductance(state, state.dataWindowManager->thetas[3], state.dataWindowManager->thetas[4], 2, con, pr, gr); NusseltNumber(state, SurfNum, state.dataWindowManager->thetas[3], state.dataWindowManager->thetas[4], 2, gr, pr, nu); hgap(2) = con / state.dataWindowManager->gap[1] * nu; - if (state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum) > 1.0) { // Edge of glass correction + if (surfWin.edgeGlassCorrFac > 1.0) { // Edge of glass correction state.dataWindowManager->hrgap[1] = 0.5 * std::abs(state.dataWindowManager->A45) * pow_3(state.dataWindowManager->thetas[3] + state.dataWindowManager->thetas[4]); - hgap(2) = hgap(2) * state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum) + - state.dataWindowManager->hrgap[1] * (state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum) - 1.0); + hgap(2) = hgap(2) * surfWin.edgeGlassCorrFac + state.dataWindowManager->hrgap[1] * (surfWin.edgeGlassCorrFac - 1.0); } WindowGasConductance(state, state.dataWindowManager->thetas[5], state.dataWindowManager->thetas[6], 3, con, pr, gr); NusseltNumber(state, SurfNum, state.dataWindowManager->thetas[5], state.dataWindowManager->thetas[6], 3, gr, pr, nu); hgap(3) = con / state.dataWindowManager->gap[2] * nu; - if (state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum) > 1.0) { // Edge of glass correction + if (surfWin.edgeGlassCorrFac > 1.0) { // Edge of glass correction state.dataWindowManager->hrgap[2] = 0.5 * std::abs(state.dataWindowManager->A67) * pow_3(state.dataWindowManager->thetas[5] + state.dataWindowManager->thetas[6]); - hgap(3) = hgap(3) * state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum) + - state.dataWindowManager->hrgap[2] * (state.dataSurface->SurfWinEdgeGlCorrFac(SurfNum) - 1.0); + hgap(3) = hgap(3) * surfWin.edgeGlassCorrFac + state.dataWindowManager->hrgap[2] * (surfWin.edgeGlassCorrFac - 1.0); } Bface(1) = state.dataWindowManager->Outir * state.dataWindowManager->emis[0] + state.dataWindowManager->hcout * state.dataWindowManager->tout + state.dataWindowManager->AbsRadGlassFace[0]; @@ -5044,7 +5044,7 @@ namespace WindowManager { } else { // Use previous time step values for (i = 1; i <= state.dataWindowManager->nglface; ++i) { - state.dataWindowManager->thetas[i - 1] = state.dataSurface->SurfaceWindow(SurfNum).ThetaFace(i); + state.dataWindowManager->thetas[i - 1] = state.dataSurface->SurfaceWindow(SurfNum).thetaFace[i]; } } @@ -5064,9 +5064,9 @@ namespace WindowManager { if (StormWinFlagPrevDay == 0 && StormWinFlagThisDay == 1) nglfacePrevDay = state.dataWindowManager->nglface - 2; if (StormWinFlagPrevDay == 1 && StormWinFlagThisDay == 0) nglfacePrevDay = state.dataWindowManager->nglface + 2; state.dataWindowManager->thetas[state.dataWindowManager->nglface] = - state.dataSurface->SurfaceWindow(SurfNum).ThetaFace(nglfacePrevDay + 1); + state.dataSurface->SurfaceWindow(SurfNum).thetaFace[nglfacePrevDay + 1]; state.dataWindowManager->thetas[state.dataWindowManager->nglface + 1] = - state.dataSurface->SurfaceWindow(SurfNum).ThetaFace(nglfacePrevDay + 2); + state.dataSurface->SurfaceWindow(SurfNum).thetaFace[nglfacePrevDay + 2]; } else { // No shade or blind previous time step; guess starting values of shade/blind // taking into account short- and long-wave radiation (from solar, lights and zone equipment) @@ -6188,7 +6188,7 @@ namespace WindowManager { // Add long-wave from outside window surface absorbed by frame outside projection state.dataSurface->SurfWinFrameQRadOutAbs(SurfNum) += 0.5 * state.dataSurface->SurfWinProjCorrFrOut(SurfNum) * state.dataSurface->FrameDivider(FrDivNum).FrameEmis * EmisGlassOut * - state.dataWindowManager->sigma * pow_4(state.dataSurface->SurfaceWindow(SurfNum).ThetaFace(1)); + state.dataWindowManager->sigma * pow_4(state.dataSurface->SurfaceWindow(SurfNum).thetaFace[1]); } if (state.dataSurface->FrameDivider(FrDivNum).FrameProjectionIn > 0.0) { HInRad *= (1.0 + ProjCorrFrIn); @@ -6196,7 +6196,7 @@ namespace WindowManager { // Add long-wave from inside window surface absorbed by frame inside projection state.dataSurface->SurfWinFrameQRadInAbs(SurfNum) += 0.5 * state.dataSurface->SurfWinProjCorrFrIn(SurfNum) * state.dataSurface->FrameDivider(FrDivNum).FrameEmis * EmisGlassIn * - state.dataWindowManager->sigma * pow_4(state.dataSurface->SurfaceWindow(SurfNum).ThetaFace(2 * TotGlassLayers)); + state.dataWindowManager->sigma * pow_4(state.dataSurface->SurfaceWindow(SurfNum).thetaFace[2 * TotGlassLayers]); } Afac = (HOutRad * TOutRadFr + HOutConvFr * tout + state.dataSurface->SurfWinFrameQRadOutAbs(SurfNum)) / (HOutRad + FrameCon + HOutConvFr); Bfac = FrameCon / (HOutRad + FrameCon + HOutConvFr); @@ -6258,7 +6258,7 @@ namespace WindowManager { // Add long-wave from outside window surface absorbed by divider outside projection state.dataSurface->SurfWinDividerQRadOutAbs(SurfNum) += state.dataSurface->SurfWinProjCorrDivOut(SurfNum) * state.dataSurface->FrameDivider(FrDivNum).DividerEmis * EmisGlassOut * - state.dataWindowManager->sigma * pow_4(state.dataSurface->SurfaceWindow(SurfNum).ThetaFace(1)); + state.dataWindowManager->sigma * pow_4(state.dataSurface->SurfaceWindow(SurfNum).thetaFace[1]); } HInConvDiv = HInConv; @@ -6271,7 +6271,7 @@ namespace WindowManager { // Add long-wave from inside window surface absorbed by divider inside projection state.dataSurface->SurfWinDividerQRadInAbs(SurfNum) += state.dataSurface->SurfWinProjCorrDivIn(SurfNum) * state.dataSurface->FrameDivider(FrDivNum).DividerEmis * EmisGlassIn * - state.dataWindowManager->sigma * pow_4(state.dataSurface->SurfaceWindow(SurfNum).ThetaFace(2 * TotGlassLayers)); + state.dataWindowManager->sigma * pow_4(state.dataSurface->SurfaceWindow(SurfNum).thetaFace[2 * TotGlassLayers]); } Afac = (HOutRad * TOutRadDiv + HOutConvDiv * tout + state.dataSurface->SurfWinDividerQRadOutAbs(SurfNum)) / (HOutRad + DivCon + HOutConvDiv); @@ -7902,19 +7902,19 @@ namespace WindowManager { PrintTransMap = false; for (SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; ++SurfNum) { - - if (state.dataSurface->Surface(SurfNum).HasShadeControl) { - ConstrNumSh = state.dataSurface->Surface(SurfNum).activeShadedConstruction; + auto &surf = state.dataSurface->Surface(SurfNum); + auto &surfWin = state.dataSurface->SurfaceWindow(SurfNum); + if (surf.HasShadeControl) { + ConstrNumSh = surf.activeShadedConstruction; MatNum = state.dataConstruction->Construct(ConstrNumSh).LayerPoint(1); auto *thisMaterial = dynamic_cast(state.dataMaterial->Material(MatNum)); assert(thisMaterial != nullptr); - WinShadingType ShadingType = - state.dataSurface->WindowShadingControl(state.dataSurface->Surface(SurfNum).activeWindowShadingControl).ShadingType; + WinShadingType ShadingType = state.dataSurface->WindowShadingControl(surf.activeWindowShadingControl).ShadingType; if (ShadingType == WinShadingType::ExtScreen) { if (thisMaterial->ScreenMapResolution > 0) PrintTransMap = true; ++ScreenNum; - state.dataSurface->SurfWinScreenNumber(SurfNum) = ScreenNum; + surfWin.screenNum = ScreenNum; // If a screen material is used more than once, the Material structure's screen data pointer holds the screen number // of the last window surface. Use this method to access the screen parameter's only for static variables such as // diffuse properties (InitGlassOpticalCalculations). For all cases where the screen properties are a function of diff --git a/src/EnergyPlus/WindowManager.hh b/src/EnergyPlus/WindowManager.hh index 79457bd6898..2b0a4e5cac4 100644 --- a/src/EnergyPlus/WindowManager.hh +++ b/src/EnergyPlus/WindowManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowManagerExteriorData.cc b/src/EnergyPlus/WindowManagerExteriorData.cc index 66d15b664c1..ce4e0ed4e13 100644 --- a/src/EnergyPlus/WindowManagerExteriorData.cc +++ b/src/EnergyPlus/WindowManagerExteriorData.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowManagerExteriorData.hh b/src/EnergyPlus/WindowManagerExteriorData.hh index 94fb2471d2f..03920d1bc1f 100644 --- a/src/EnergyPlus/WindowManagerExteriorData.hh +++ b/src/EnergyPlus/WindowManagerExteriorData.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowManagerExteriorOptical.cc b/src/EnergyPlus/WindowManagerExteriorOptical.cc index 1cbd9474f41..46ebd5f9d6b 100644 --- a/src/EnergyPlus/WindowManagerExteriorOptical.cc +++ b/src/EnergyPlus/WindowManagerExteriorOptical.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -252,17 +252,17 @@ namespace WindowManager { Real64 TauShIR = thisMaterialShade->TransThermal; Real64 EpsShIR = thisMaterialShade->AbsorpThermal; Real64 RhoShIR = max(0.0, 1.0 - TauShIR - EpsShIR); - state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss(1) = + state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss[1] = EpsShIR * (1.0 + RhoGlIR * TauShIR / (1.0 - RhoGlIR * RhoShIR)); - state.dataSurface->SurfaceWindow(SurfNum).EffGlassEmiss(1) = EpsGlIR * TauShIR / (1.0 - RhoGlIR * RhoShIR); + state.dataSurface->SurfaceWindow(SurfNum).EffGlassEmiss[1] = EpsGlIR * TauShIR / (1.0 - RhoGlIR * RhoShIR); } if (IntBlind) { Real64 TauShIR = state.dataMaterial->Blind(BlNum).IRFrontTrans(ISlatAng); Real64 EpsShIR = state.dataMaterial->Blind(BlNum).IRBackEmiss(ISlatAng); Real64 RhoShIR = max(0.0, 1.0 - TauShIR - EpsShIR); - state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss(ISlatAng) = + state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss[ISlatAng] = EpsShIR * (1.0 + RhoGlIR * TauShIR / (1.0 - RhoGlIR * RhoShIR)); - state.dataSurface->SurfaceWindow(SurfNum).EffGlassEmiss(ISlatAng) = EpsGlIR * TauShIR / (1.0 - RhoGlIR * RhoShIR); + state.dataSurface->SurfaceWindow(SurfNum).EffGlassEmiss[ISlatAng] = EpsGlIR * TauShIR / (1.0 - RhoGlIR * RhoShIR); } // Loop over remaining slat angles only if blind with movable slats if (IntShade) break; // Loop over remaining slat angles only if blind diff --git a/src/EnergyPlus/WindowManagerExteriorOptical.hh b/src/EnergyPlus/WindowManagerExteriorOptical.hh index 2519443624b..ec1593e9f9e 100644 --- a/src/EnergyPlus/WindowManagerExteriorOptical.hh +++ b/src/EnergyPlus/WindowManagerExteriorOptical.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowManagerExteriorThermal.cc b/src/EnergyPlus/WindowManagerExteriorThermal.cc index e364ec17d9a..34ca798747a 100644 --- a/src/EnergyPlus/WindowManagerExteriorThermal.cc +++ b/src/EnergyPlus/WindowManagerExteriorThermal.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -115,7 +115,7 @@ namespace WindowManager { } for (int k = 1; k <= 2 * totSolidLayers; ++k) { - Guess.push_back(state.dataSurface->SurfaceWindow(SurfNum).ThetaFace(k)); + Guess.push_back(state.dataSurface->SurfaceWindow(SurfNum).thetaFace[k]); } try { @@ -144,16 +144,16 @@ namespace WindowManager { Real64 EffGlEmiss; if (state.dataSurface->SurfWinMovableSlats(SurfNum)) { EffShBlEmiss = - General::Interp(window.EffShBlindEmiss(state.dataSurface->SurfWinSlatsAngIndex(SurfNum)), - window.EffShBlindEmiss(std::min(Material::MaxSlatAngs, state.dataSurface->SurfWinSlatsAngIndex(SurfNum) + 1)), + General::Interp(window.EffShBlindEmiss[state.dataSurface->SurfWinSlatsAngIndex(SurfNum)], + window.EffShBlindEmiss[std::min(Material::MaxSlatAngs, state.dataSurface->SurfWinSlatsAngIndex(SurfNum) + 1)], state.dataSurface->SurfWinSlatsAngInterpFac(SurfNum)); EffGlEmiss = - General::Interp(window.EffGlassEmiss(state.dataSurface->SurfWinSlatsAngIndex(SurfNum)), - window.EffGlassEmiss(std::min(Material::MaxSlatAngs, state.dataSurface->SurfWinSlatsAngIndex(SurfNum) + 1)), + General::Interp(window.EffGlassEmiss[state.dataSurface->SurfWinSlatsAngIndex(SurfNum)], + window.EffGlassEmiss[std::min(Material::MaxSlatAngs, state.dataSurface->SurfWinSlatsAngIndex(SurfNum) + 1)], state.dataSurface->SurfWinSlatsAngInterpFac(SurfNum)); } else { - EffShBlEmiss = state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss(1); - EffGlEmiss = state.dataSurface->SurfaceWindow(SurfNum).EffGlassEmiss(1); + EffShBlEmiss = state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss[1]; + EffGlEmiss = state.dataSurface->SurfaceWindow(SurfNum).EffGlassEmiss[1]; } state.dataSurface->SurfWinEffInsSurfTemp(SurfNum) = (EffShBlEmiss * SurfInsideTemp + @@ -204,10 +204,10 @@ namespace WindowManager { // Effective shade and glass emissivities that are used later for energy calculations. // This needs to be checked as well. (Simon) Real64 EffShBlEmiss = EpsShIR1 * (1.0 + RhoGlIR2 * TauShIR / (1.0 - RhoGlIR2 * RhoShIR2)); - state.dataSurface->SurfaceWindow(SurfNum).EffShBlindEmiss = EffShBlEmiss; + std::fill(window.EffShBlindEmiss.begin(), window.EffShBlindEmiss.end(), EffShBlEmiss); Real64 EffGlEmiss = glassEmiss * TauShIR / (1.0 - RhoGlIR2 * RhoShIR2); - state.dataSurface->SurfaceWindow(SurfNum).EffGlassEmiss = EffGlEmiss; + std::fill(window.EffGlassEmiss.begin(), window.EffGlassEmiss.end(), EffGlEmiss); Real64 glassTemperature = aGlassLayer->getSurface(FenestrationCommon::Side::Back)->getTemperature(); state.dataSurface->SurfWinEffInsSurfTemp(SurfNum) = @@ -232,8 +232,9 @@ namespace WindowManager { state.dataSurface->SurfWinEffInsSurfTemp(SurfNum) = aLayers[totLayers - 1]->getTemperature(FenestrationCommon::Side::Back) - state.dataWindowManager->TKelvin; - state.dataSurface->SurfaceWindow(SurfNum).EffGlassEmiss = - aLayers[totLayers - 1]->getSurface(FenestrationCommon::Side::Back)->getEmissivity(); + std::fill(window.EffGlassEmiss.begin(), + window.EffGlassEmiss.end(), + aLayers[totLayers - 1]->getSurface(FenestrationCommon::Side::Back)->getEmissivity()); state.dataSurface->SurfWinHeatGain(SurfNum) = state.dataSurface->SurfWinTransSolar(SurfNum) + ConvHeatGainFrZoneSideOfGlass + NetIRHeatGainGlass; @@ -247,8 +248,8 @@ namespace WindowManager { state.dataSurface->SurfWinHeatGain(SurfNum) -= state.dataSurface->SurfWinLossSWZoneToOutWinRep(SurfNum); for (int k = 1; k <= surface.getTotLayers(state); ++k) { - state.dataSurface->SurfaceWindow(SurfNum).ThetaFace(2 * k - 1) = state.dataWindowManager->thetas[2 * k - 2]; - state.dataSurface->SurfaceWindow(SurfNum).ThetaFace(2 * k) = state.dataWindowManager->thetas[2 * k - 1]; + window.thetaFace[2 * k - 1] = state.dataWindowManager->thetas[2 * k - 2]; + window.thetaFace[2 * k] = state.dataWindowManager->thetas[2 * k - 1]; // temperatures for reporting state.dataHeatBal->SurfWinFenLaySurfTempFront(SurfNum, k) = state.dataWindowManager->thetas[2 * k - 2] - Constant::Kelvin; diff --git a/src/EnergyPlus/WindowManagerExteriorThermal.hh b/src/EnergyPlus/WindowManagerExteriorThermal.hh index 0becf22958c..a6aa36c9ec6 100644 --- a/src/EnergyPlus/WindowManagerExteriorThermal.hh +++ b/src/EnergyPlus/WindowManagerExteriorThermal.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowModel.cc b/src/EnergyPlus/WindowModel.cc index c4709f261e5..97a37720cc5 100644 --- a/src/EnergyPlus/WindowModel.cc +++ b/src/EnergyPlus/WindowModel.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowModel.hh b/src/EnergyPlus/WindowModel.hh index 8ec87975802..21e38de8bb8 100644 --- a/src/EnergyPlus/WindowModel.hh +++ b/src/EnergyPlus/WindowModel.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ZoneAirLoopEquipmentManager.cc b/src/EnergyPlus/ZoneAirLoopEquipmentManager.cc index 6e612c51fc0..32235de9243 100644 --- a/src/EnergyPlus/ZoneAirLoopEquipmentManager.cc +++ b/src/EnergyPlus/ZoneAirLoopEquipmentManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -413,28 +413,28 @@ namespace ZoneAirLoopEquipmentManager { auto &airDistUnit = state.dataDefineEquipment->AirDistUnit(AirDistUnitNum); SetupOutputVariable(state, "Zone Air Terminal Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, airDistUnit.HeatGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, airDistUnit.Name); SetupOutputVariable(state, "Zone Air Terminal Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, airDistUnit.CoolGain, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, airDistUnit.Name); SetupOutputVariable(state, "Zone Air Terminal Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, airDistUnit.HeatRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, airDistUnit.Name); SetupOutputVariable(state, "Zone Air Terminal Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, airDistUnit.CoolRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/ZoneAirLoopEquipmentManager.hh b/src/EnergyPlus/ZoneAirLoopEquipmentManager.hh index 72cb4f004b5..68c599a8a47 100644 --- a/src/EnergyPlus/ZoneAirLoopEquipmentManager.hh +++ b/src/EnergyPlus/ZoneAirLoopEquipmentManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc b/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc index 6a5352b1e21..5d7cc50ef20 100644 --- a/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc +++ b/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -349,7 +349,7 @@ void GetZoneContaminanInputs(EnergyPlusData &state) // Object report variables SetupOutputVariable(state, "Generic Air Contaminant Constant Source Generation Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataContaminantBalance->ZoneContamGenericConstant(Loop).GCGenRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -361,7 +361,7 @@ void GetZoneContaminanInputs(EnergyPlusData &state) RepVarSet(ZonePtr) = false; SetupOutputVariable(state, "Zone Generic Air Contaminant Generation Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZoneRpt(ZonePtr).GCRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -508,7 +508,7 @@ void GetZoneContaminanInputs(EnergyPlusData &state) // Object report variables SetupOutputVariable(state, "Generic Air Contaminant Pressure Driven Generation Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataContaminantBalance->ZoneContamGenericPDriven(Loop).GCGenRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -526,7 +526,7 @@ void GetZoneContaminanInputs(EnergyPlusData &state) RepVarSet(ZonePtr) = false; SetupOutputVariable(state, "Zone Generic Air Contaminant Generation Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZoneRpt(ZonePtr).GCRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -652,7 +652,7 @@ void GetZoneContaminanInputs(EnergyPlusData &state) // Object report variables SetupOutputVariable(state, "Generic Air Contaminant Cutoff Model Generation Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataContaminantBalance->ZoneContamGenericCutoff(Loop).GCGenRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -664,7 +664,7 @@ void GetZoneContaminanInputs(EnergyPlusData &state) RepVarSet(ZonePtr) = false; SetupOutputVariable(state, "Zone Generic Air Contaminant Generation Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZoneRpt(ZonePtr).GCRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -789,14 +789,14 @@ void GetZoneContaminanInputs(EnergyPlusData &state) // Object report variables SetupOutputVariable(state, "Generic Air Contaminant Decay Model Generation Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataContaminantBalance->ZoneContamGenericDecay(Loop).GCGenRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, state.dataContaminantBalance->ZoneContamGenericDecay(Loop).Name); SetupOutputVariable(state, "Generic Air Contaminant Decay Model Generation Emission Start Elapsed Time", - OutputProcessor::Unit::s, + Constant::Units::s, state.dataContaminantBalance->ZoneContamGenericDecay(Loop).GCTime, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -808,7 +808,7 @@ void GetZoneContaminanInputs(EnergyPlusData &state) RepVarSet(ZonePtr) = false; SetupOutputVariable(state, "Zone Generic Air Contaminant Generation Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZoneRpt(ZonePtr).GCRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -932,7 +932,7 @@ void GetZoneContaminanInputs(EnergyPlusData &state) // Object report variables SetupOutputVariable(state, "Generic Air Contaminant Boundary Layer Diffusion Generation Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataContaminantBalance->ZoneContamGenericBLDiff(Loop).GCGenRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -940,7 +940,7 @@ void GetZoneContaminanInputs(EnergyPlusData &state) if (state.dataContaminantBalance->ZoneContamGenericBLDiff(Loop).SurfNum > 0) { SetupOutputVariable(state, "Generic Air Contaminant Boundary Layer Diffusion Inside Face Concentration", - OutputProcessor::Unit::ppm, + Constant::Units::ppm, state.dataSurface->SurfGenericContam(state.dataContaminantBalance->ZoneContamGenericBLDiff(Loop).SurfNum), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -953,7 +953,7 @@ void GetZoneContaminanInputs(EnergyPlusData &state) RepVarSet(ZonePtr) = false; SetupOutputVariable(state, "Zone Generic Air Contaminant Generation Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZoneRpt(ZonePtr).GCRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -1066,7 +1066,7 @@ void GetZoneContaminanInputs(EnergyPlusData &state) // Object report variables SetupOutputVariable(state, "Generic Air Contaminant Deposition Velocity Removal Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataContaminantBalance->ZoneContamGenericDVS(Loop).GCGenRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -1078,7 +1078,7 @@ void GetZoneContaminanInputs(EnergyPlusData &state) RepVarSet(ZonePtr) = false; SetupOutputVariable(state, "Zone Generic Air Contaminant Generation Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZoneRpt(ZonePtr).GCRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -1192,7 +1192,7 @@ void GetZoneContaminanInputs(EnergyPlusData &state) // Object report variables SetupOutputVariable(state, "Generic Air Contaminant Deposition Rate Removal Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataContaminantBalance->ZoneContamGenericDRS(Loop).GCGenRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -1204,7 +1204,7 @@ void GetZoneContaminanInputs(EnergyPlusData &state) RepVarSet(ZonePtr) = false; SetupOutputVariable(state, "Zone Generic Air Contaminant Generation Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataHeatBal->ZoneRpt(ZonePtr).GCRate, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -1557,28 +1557,28 @@ void InitZoneContSetPoints(EnergyPlusData &state) if (state.dataContaminantBalance->Contaminant.CO2Simulation) { SetupOutputVariable(state, "Zone Air CO2 Concentration", - OutputProcessor::Unit::ppm, + Constant::Units::ppm, state.dataContaminantBalance->ZoneAirCO2(Loop), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(Loop).Name); SetupOutputVariable(state, "Zone Air CO2 Predicted Load to Setpoint Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataContaminantBalance->CO2PredictedRate(Loop), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(Loop).Name); SetupOutputVariable(state, "Zone Air CO2 Setpoint Concentration", - OutputProcessor::Unit::ppm, + Constant::Units::ppm, state.dataContaminantBalance->ZoneCO2SetPoint(Loop), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(Loop).Name); SetupOutputVariable(state, "Zone Air CO2 Internal Gain Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataContaminantBalance->ZoneCO2Gain(Loop), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -1625,21 +1625,21 @@ void InitZoneContSetPoints(EnergyPlusData &state) if (state.dataContaminantBalance->Contaminant.GenericContamSimulation) { SetupOutputVariable(state, "Zone Air Generic Air Contaminant Concentration", - OutputProcessor::Unit::ppm, + Constant::Units::ppm, state.dataContaminantBalance->ZoneAirGC(Loop), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(Loop).Name); SetupOutputVariable(state, "Zone Generic Air Contaminant Predicted Load to Setpoint Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataContaminantBalance->GCPredictedRate(Loop), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->Zone(Loop).Name); SetupOutputVariable(state, "Zone Generic Air Contaminant Setpoint Concentration", - OutputProcessor::Unit::ppm, + Constant::Units::ppm, state.dataContaminantBalance->ZoneGCSetPoint(Loop), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, diff --git a/src/EnergyPlus/ZoneContaminantPredictorCorrector.hh b/src/EnergyPlus/ZoneContaminantPredictorCorrector.hh index 9954b8ca930..bb71f8c9bbc 100644 --- a/src/EnergyPlus/ZoneContaminantPredictorCorrector.hh +++ b/src/EnergyPlus/ZoneContaminantPredictorCorrector.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ZoneDehumidifier.cc b/src/EnergyPlus/ZoneDehumidifier.cc index 3876677bb9a..95aa88d1a5a 100644 --- a/src/EnergyPlus/ZoneDehumidifier.cc +++ b/src/EnergyPlus/ZoneDehumidifier.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -490,82 +490,81 @@ namespace ZoneDehumidifier { // Set up report variables for the dehumidifiers SetupOutputVariable(state, "Zone Dehumidifier Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).SensHeatingRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).Name); SetupOutputVariable(state, "Zone Dehumidifier Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).SensHeatingEnergy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).Name); SetupOutputVariable(state, "Zone Dehumidifier Removed Water Mass Flow Rate", - OutputProcessor::Unit::kg_s, + Constant::Units::kg_s, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).WaterRemovalRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).Name); SetupOutputVariable(state, "Zone Dehumidifier Removed Water Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).WaterRemoved, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).Name); SetupOutputVariable(state, "Zone Dehumidifier Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).ElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).Name); SetupOutputVariable(state, "Zone Dehumidifier Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).ElecConsumption, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).Name, + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::Cooling, {}, - "Electricity", - "COOLING", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); SetupOutputVariable(state, "Zone Dehumidifier Off Cycle Parasitic Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).OffCycleParasiticElecPower, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).Name); SetupOutputVariable(state, "Zone Dehumidifier Off Cycle Parasitic Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).OffCycleParasiticElecCons, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).Name); SetupOutputVariable(state, "Zone Dehumidifier Part Load Ratio", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).DehumidPLR, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).Name); SetupOutputVariable(state, "Zone Dehumidifier Runtime Fraction", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).DehumidRTF, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).Name); SetupOutputVariable(state, "Zone Dehumidifier Outlet Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).OutletAirTemp, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -574,23 +573,22 @@ namespace ZoneDehumidifier { if (state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).CondensateCollectMode == CondensateOutlet::ToTank) { SetupOutputVariable(state, "Zone Dehumidifier Condensate Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).DehumidCondVolFlowRate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).Name); SetupOutputVariable(state, "Zone Dehumidifier Condensate Volume", - OutputProcessor::Unit::m3, + Constant::Units::m3, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).DehumidCondVol, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidIndex).Name, + Constant::eResource::OnSiteWater, + OutputProcessor::SOVEndUseCat::Condensate, {}, - "OnSiteWater", - "Condensate", - {}, - "System"); + OutputProcessor::SOVGroup::HVAC); } } } diff --git a/src/EnergyPlus/ZoneDehumidifier.hh b/src/EnergyPlus/ZoneDehumidifier.hh index 5986dc38054..0444b8b91f2 100644 --- a/src/EnergyPlus/ZoneDehumidifier.hh +++ b/src/EnergyPlus/ZoneDehumidifier.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ZoneEquipmentManager.cc b/src/EnergyPlus/ZoneEquipmentManager.cc index ec9b1255ccf..8c94c2f4f20 100644 --- a/src/EnergyPlus/ZoneEquipmentManager.cc +++ b/src/EnergyPlus/ZoneEquipmentManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -2265,6 +2265,14 @@ void updateZoneSizingEndZoneSizingCalc7(EnergyPlusData &state, zoneSizing.DesCoolVolFlowNoOA = zoneSizing.DesCoolVolFlow; zoneSizing.DesCoolMassFlowNoOA = zoneSizing.DesCoolMassFlow; } + } else { + for (int DDNum = 1; DDNum <= state.dataEnvrn->TotDesDays + state.dataEnvrn->TotRunDesPersDays; ++DDNum) { + // initialize HeatFlowSeqNoOA before any adjustments to HeatFlowSeq + auto &zoneSizing = zsSizing(DDNum, zoneOrSpaceNum); + zoneSizing.CoolFlowSeqNoOA = zoneSizing.CoolFlowSeq; + zoneSizing.DesCoolVolFlowNoOA = zoneSizing.DesCoolVolFlow; + zoneSizing.DesCoolMassFlowNoOA = zoneSizing.DesCoolMassFlow; + } } // Save a set of design cooling air flow rates greater than or equal to the specified minimums without MinOA { @@ -2297,7 +2305,6 @@ void updateZoneSizingEndZoneSizingCalc7(EnergyPlusData &state, zoneSizing.DesCoolMassFlowNoOA = MaxOfMinCoolMassFlowNoOA; } for (int TimeStepIndex = 1; TimeStepIndex <= state.dataZoneEquipmentManager->NumOfTimeStepInDay; ++TimeStepIndex) { - zoneSizing.CoolFlowSeqNoOA(TimeStepIndex) = zoneSizing.CoolFlowSeq(TimeStepIndex); if (MaxOfMinCoolMassFlowNoOA > zoneSizing.CoolFlowSeq(TimeStepIndex)) { zoneSizing.CoolFlowSeqNoOA(TimeStepIndex) = MaxOfMinCoolMassFlowNoOA; } @@ -2446,6 +2453,14 @@ void updateZoneSizingEndZoneSizingCalc7(EnergyPlusData &state, zoneSizingDD.DesHeatVolFlowNoOA = zoneSizingDD.DesHeatVolFlow; zoneSizingDD.DesHeatMassFlowNoOA = zoneSizingDD.DesHeatMassFlow; } + } else { + for (int DDNum = 1; DDNum <= state.dataEnvrn->TotDesDays + state.dataEnvrn->TotRunDesPersDays; ++DDNum) { + // initialize HeatFlowSeqNoOA before any adjustments to HeatFlowSeq + auto &zoneSizing = zsSizing(DDNum, zoneOrSpaceNum); + zoneSizing.HeatFlowSeqNoOA = zoneSizing.HeatFlowSeq; + zoneSizing.DesHeatVolFlowNoOA = zoneSizing.DesHeatVolFlow; + zoneSizing.DesHeatMassFlowNoOA = zoneSizing.DesHeatMassFlow; + } } // Save a set of design heating air flow rates before the MinOA adjustment diff --git a/src/EnergyPlus/ZoneEquipmentManager.hh b/src/EnergyPlus/ZoneEquipmentManager.hh index 99a471f0837..a1df4f0dc29 100644 --- a/src/EnergyPlus/ZoneEquipmentManager.hh +++ b/src/EnergyPlus/ZoneEquipmentManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ZonePlenum.cc b/src/EnergyPlus/ZonePlenum.cc index efde7184d91..bef2827e4df 100644 --- a/src/EnergyPlus/ZonePlenum.cc +++ b/src/EnergyPlus/ZonePlenum.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ZonePlenum.hh b/src/EnergyPlus/ZonePlenum.hh index 6486e1f98b4..a834c53e1ac 100644 --- a/src/EnergyPlus/ZonePlenum.hh +++ b/src/EnergyPlus/ZonePlenum.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ZoneTempPredictorCorrector.cc b/src/EnergyPlus/ZoneTempPredictorCorrector.cc index 76eda94be44..9b0ee545885 100644 --- a/src/EnergyPlus/ZoneTempPredictorCorrector.cc +++ b/src/EnergyPlus/ZoneTempPredictorCorrector.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -1981,7 +1981,7 @@ void GetZoneAirSetPoints(EnergyPlusData &state) // CurrentModuleObject='ZoneControl:Thermostat:OperativeTemperature' SetupOutputVariable(state, "Zone Thermostat Operative Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBal->ZnAirRpt(TempControlledZone(TempControlledZoneNum).ActualZoneNum).ThermOperativeTemp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -2089,7 +2089,7 @@ void GetZoneAirSetPoints(EnergyPlusData &state) // CurrentModuleObject='ZoneControl:Thermostat:OperativeTemperature' SetupOutputVariable(state, "Zone Thermostat Operative Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBal->ZnAirRpt(TempControlledZone(TempControlledZoneNum).ActualZoneNum).ThermOperativeTemp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -2910,42 +2910,42 @@ void InitZoneAirSetPoints(EnergyPlusData &state) } SetupOutputVariable(state, "Zone Thermostat Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBalFanSys->TempTstatAir(zoneNum), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisZone.Name); SetupOutputVariable(state, "Zone Thermostat Control Type", - OutputProcessor::Unit::None, + Constant::Units::None, TempControlTypeRpt(zoneNum), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, thisZone.Name); SetupOutputVariable(state, "Zone Thermostat Heating Setpoint Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, ZoneThermostatSetPointLo(zoneNum), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisZone.Name); SetupOutputVariable(state, "Zone Thermostat Cooling Setpoint Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, ZoneThermostatSetPointHi(zoneNum), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, thisZone.Name); SetupOutputVariable(state, "Zone Adaptive Comfort Operative Temperature Set Point", - OutputProcessor::Unit::C, + Constant::Units::C, state.dataHeatBalFanSys->AdapComfortCoolingSetPoint(zoneNum), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, thisZone.Name); SetupOutputVariable(state, "Zone Predicted Sensible Load Room Air Correction Factor", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataHeatBalFanSys->LoadCorrectionFactor(zoneNum), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -2960,21 +2960,21 @@ void InitZoneAirSetPoints(EnergyPlusData &state) auto &thisZone = state.dataHeatBal->Zone(zoneNum); SetupOutputVariable(state, "Zone Thermal Comfort Control Type", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataHeatBalFanSys->ComfortControlTypeRpt(zoneNum), OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, thisZone.Name); SetupOutputVariable(state, "Zone Thermal Comfort Control Fanger Low Setpoint PMV", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataHeatBalFanSys->ZoneComfortControlsFanger(zoneNum).LowPMV, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, thisZone.Name); SetupOutputVariable(state, "Zone Thermal Comfort Control Fanger High Setpoint PMV", - OutputProcessor::Unit::None, + Constant::Units::None, state.dataHeatBalFanSys->ZoneComfortControlsFanger(zoneNum).HighPMV, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -2986,28 +2986,28 @@ void InitZoneAirSetPoints(EnergyPlusData &state) for (int Loop = 1; Loop <= state.dataHeatBal->NumOfZoneLists; ++Loop) { SetupOutputVariable(state, "Zone List Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneListSNLoadHeatEnergy(Loop), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, ZoneList(Loop).Name); SetupOutputVariable(state, "Zone List Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneListSNLoadCoolEnergy(Loop), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, ZoneList(Loop).Name); SetupOutputVariable(state, "Zone List Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneListSNLoadHeatRate(Loop), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, ZoneList(Loop).Name); SetupOutputVariable(state, "Zone List Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneListSNLoadCoolRate(Loop), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3018,28 +3018,28 @@ void InitZoneAirSetPoints(EnergyPlusData &state) for (int Loop = 1; Loop <= state.dataHeatBal->NumOfZoneGroups; ++Loop) { SetupOutputVariable(state, "Zone Group Sensible Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneGroupSNLoadHeatEnergy(Loop), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneGroup(Loop).Name); SetupOutputVariable(state, "Zone Group Sensible Cooling Energy", - OutputProcessor::Unit::J, + Constant::Units::J, state.dataHeatBal->ZoneGroupSNLoadCoolEnergy(Loop), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, state.dataHeatBal->ZoneGroup(Loop).Name); SetupOutputVariable(state, "Zone Group Sensible Heating Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneGroupSNLoadHeatRate(Loop), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, state.dataHeatBal->ZoneGroup(Loop).Name); SetupOutputVariable(state, "Zone Group Sensible Cooling Rate", - OutputProcessor::Unit::W, + Constant::Units::W, state.dataHeatBal->ZoneGroupSNLoadCoolRate(Loop), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, @@ -3252,32 +3252,32 @@ void ZoneSpaceHeatBalanceData::beginEnvironmentInit(EnergyPlusData &state) this->T1 = 0.0; } -void ZoneSpaceHeatBalanceData::setUpOutputVars(EnergyPlusData &state, std::string_view prefix, std::string_view name) +void ZoneSpaceHeatBalanceData::setUpOutputVars(EnergyPlusData &state, std::string_view prefix, std::string const &name) { SetupOutputVariable(state, format("{} Air Temperature", prefix), - OutputProcessor::Unit::C, + Constant::Units::C, this->ZT, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} Air Humidity Ratio", prefix), - OutputProcessor::Unit::None, + Constant::Units::None, this->airHumRat, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} Air Relative Humidity", prefix), - OutputProcessor::Unit::Perc, + Constant::Units::Perc, this->airRelHum, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Average, name); SetupOutputVariable(state, format("{} Mean Radiant Temperature", prefix), - OutputProcessor::Unit::C, + Constant::Units::C, this->MRT, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::State, @@ -5025,114 +5025,96 @@ void DownInterpolate4HistoryValues(Real64 const OldTimeStep, // The down step ratio, DSRatio = OldTimeStep/ NewTimeStep // is expected to be roughly integer-valued and near 2.0 or 3.0 or 4.0 or more. - // first construct data on timestamps for interpolating with later - Real64 const oldTime0 = 0.0; - Real64 const oldTime1 = oldTime0 - OldTimeStep; - - Real64 const newTime0 = 0.0; - Real64 const newTime1 = newTime0 - NewTimeStep; - Real64 const newTime2 = newTime1 - NewTimeStep; - Real64 const newTime3 = newTime2 - NewTimeStep; - Real64 const newTime4 = newTime3 - NewTimeStep; - + // old math variables + // Real64 const oldTime0 = 0.0; + // Real64 const oldTime1 = oldTime0 - OldTimeStep; + // Real64 const newTime0 = 0.0; + // Real64 const newTime1 = newTime0 - NewTimeStep; + // Real64 const newTime2 = newTime1 - NewTimeStep; + // Real64 const newTime3 = newTime2 - NewTimeStep; + // Real64 const newTime4 = newTime3 - NewTimeStep; + + Real64 constexpr realTWO = 2.0; + Real64 constexpr realTHREE = 3.0; + // first determine the ratio of system time step to zone time step Real64 const DSRatio = OldTimeStep / NewTimeStep; // should pretty much be an integer value 2, 3, 4, etc. newVal0 = oldVal0; - if (std::abs(DSRatio - 2.0) < 0.01) { // DSRatio = 2 + if (std::abs(DSRatio - realTWO) < 0.01) { // DSRatio = 2 + // when DSRatio = 2 the 1st point lies exactly between old points, and 2nd point is old 1st point // first two points lie between oldVal0 and oldVal1 - newVal1 = oldVal0 + (oldVal1 - oldVal0) * ((oldTime0 - newTime1) / (OldTimeStep)); - newVal2 = oldVal0 + (oldVal1 - oldVal0) * ((oldTime0 - newTime2) / (OldTimeStep)); + // old math example + // newVal1 = oldVal0 + (oldVal1 - oldVal0) * ((oldTime0 - newTime1) / (OldTimeStep)); + // newVal2 = oldVal0 + (oldVal1 - oldVal0) * ((oldTime0 - newTime2) / (OldTimeStep)); + newVal1 = (oldVal0 + oldVal1) / realTWO; + newVal2 = oldVal1; + // when DSRatio = 2 the 3rd point lies exactly between old points, and 4th point is old 2nd point // last two points lie between oldVal1 and oldVal2 - newVal3 = oldVal1 + (oldVal2 - oldVal1) * ((oldTime1 - newTime3) / (OldTimeStep)); - newVal4 = oldVal1 + (oldVal2 - oldVal1) * ((oldTime1 - newTime4) / (OldTimeStep)); - } else if (std::abs(DSRatio - 3.0) < 0.01) { // DSRatio = 3 + // newVal3 = oldVal1 + (oldVal2 - oldVal1) * ((oldTime1 - newTime3) / (OldTimeStep)); + // newVal4 = oldVal1 + (oldVal2 - oldVal1) * ((oldTime1 - newTime4) / (OldTimeStep)); + newVal3 = (oldVal1 + oldVal2) / realTWO; + newVal4 = oldVal2; + } else if (std::abs(DSRatio - realTHREE) < 0.01) { // DSRatio = 3 + // when DSRatio = 3 the 1st point lies 1/3 way between old points, and 2nd and 3rd points are 2/3 and 3/3 the way // first three points lie between oldVal0 and oldVal1 - newVal1 = oldVal0 + (oldVal1 - oldVal0) * ((oldTime0 - newTime1) / (OldTimeStep)); - newVal2 = oldVal0 + (oldVal1 - oldVal0) * ((oldTime0 - newTime2) / (OldTimeStep)); - newVal3 = oldVal0 + (oldVal1 - oldVal0) * ((oldTime0 - newTime3) / (OldTimeStep)); - // last point lie between oldVal1 and oldVal2 - newVal4 = oldVal1 + (oldVal2 - oldVal1) * ((oldTime1 - newTime4) / (OldTimeStep)); + // newVal1 = oldVal0 + (oldVal1 - oldVal0) * ((oldTime0 - newTime1) / (OldTimeStep)); + // newVal2 = oldVal0 + (oldVal1 - oldVal0) * ((oldTime0 - newTime2) / (OldTimeStep)); + // newVal3 = oldVal0 + (oldVal1 - oldVal0) * ((oldTime0 - newTime3) / (OldTimeStep)); + Real64 delta10 = (oldVal1 - oldVal0) / realTHREE; + newVal1 = oldVal0 + delta10; + newVal2 = newVal1 + delta10; + newVal3 = oldVal1; + // last point lies 1/3 way between oldVal1 and oldVal2 + // newVal4 = oldVal1 + (oldVal2 - oldVal1) * ((oldTime1 - newTime4) / (OldTimeStep)); + newVal4 = oldVal1 + (oldVal2 - oldVal1) / realTHREE; } else { // DSRatio = 4 or more - // all new points lie between oldVal0 and oldVal1 - newVal1 = oldVal0 + (oldVal1 - oldVal0) * ((oldTime0 - newTime1) / (OldTimeStep)); - newVal2 = oldVal0 + (oldVal1 - oldVal0) * ((oldTime0 - newTime2) / (OldTimeStep)); - newVal3 = oldVal0 + (oldVal1 - oldVal0) * ((oldTime0 - newTime3) / (OldTimeStep)); - newVal4 = oldVal0 + (oldVal1 - oldVal0) * ((oldTime0 - newTime4) / (OldTimeStep)); + // all new points lie between oldVal0 and oldVal1 (if DSRatio = 4, newVal4 = oldVal1) + // newVal1 = oldVal0 + (oldVal1 - oldVal0) * ((oldTime0 - newTime1) / (OldTimeStep)); + // newVal2 = oldVal0 + (oldVal1 - oldVal0) * ((oldTime0 - newTime2) / (OldTimeStep)); + // newVal3 = oldVal0 + (oldVal1 - oldVal0) * ((oldTime0 - newTime3) / (OldTimeStep)); + // newVal4 = oldVal0 + (oldVal1 - oldVal0) * ((oldTime0 - newTime4) / (OldTimeStep)); + Real64 delta10 = (oldVal1 - oldVal0) / DSRatio; + newVal1 = oldVal0 + delta10; + newVal2 = newVal1 + delta10; + newVal3 = newVal2 + delta10; + newVal4 = newVal3 + delta10; } } Real64 DownInterpolate4HistoryValues(Real64 OldTimeStep, Real64 NewTimeStep, std::array const &oldVals, std::array &newVals) { - // first construct data on timestamps for interpolating with later - Real64 const oldTime0 = 0.0; - Real64 const oldTime1 = oldTime0 - OldTimeStep; + Real64 constexpr realTWO = 2.0; + Real64 constexpr realTHREE = 3.0; + // first determine the ratio of system time step to zone time step + Real64 const DSRatio = OldTimeStep / NewTimeStep; // should pretty much be an integer value 2, 3, 4, etc. - Real64 const newTime0 = 0.0; - Real64 const newTime1 = newTime0 - NewTimeStep; - Real64 const newTime2 = newTime1 - NewTimeStep; - Real64 const newTime3 = newTime2 - NewTimeStep; - Real64 const newTime4 = newTime3 - NewTimeStep; + newVals[0] = oldVals[0]; - Real64 const DSRatio = OldTimeStep / NewTimeStep; // should pretty much be an integer value 2, 3, 4, etc. + if (std::abs(DSRatio - realTWO) < 0.01) { // DSRatio = 2 + // first point lies exactly between (oldVals[0] and oldVals[1]) + newVals[1] = (oldVals[0] + oldVals[1]) / realTWO; + // 2nd point is oldVal[1] and last point lies exactly between (oldVals[1] and oldVals[2]) + newVals[2] = oldVals[1]; + newVals[3] = (oldVals[1] + oldVals[2]) / realTWO; - if (std::abs(DSRatio - 2.0) < 0.01) { // DSRatio = 2 - // first two points lie between oldVals[0] and oldVals[1] - Real64 delta10 = oldVals[1] - oldVals[0]; - newVals[0] = oldVals[0] + delta10 * ((oldTime0 - newTime1) / OldTimeStep); - newVals[1] = oldVals[0] + delta10 * ((oldTime0 - newTime2) / OldTimeStep); - // last two points lie between oldVals[1] and oldVals[2] - Real64 delta21 = oldVals[2] - oldVals[1]; - newVals[2] = oldVals[1] + delta21 * ((oldTime1 - newTime3) / OldTimeStep); - newVals[3] = oldVals[1] + delta21 * ((oldTime1 - newTime4) / OldTimeStep); - } else if (std::abs(DSRatio - 3.0) < 0.01) { // DSRatio = 3 - // first three points lie between oldVals[0] and oldVals[1] - Real64 delta10 = oldVals[1] - oldVals[0]; - newVals[0] = oldVals[0] + delta10 * ((oldTime0 - newTime1) / OldTimeStep); - newVals[1] = oldVals[0] + delta10 * ((oldTime0 - newTime2) / OldTimeStep); - newVals[2] = oldVals[0] + delta10 * ((oldTime0 - newTime3) / OldTimeStep); - // last point lie between oldVals[1] and oldVals[2] - Real64 delta21 = (oldVals[2] - oldVals[1]) / OldTimeStep; - newVals[3] = oldVals[1] + delta21 * ((oldTime1 - newTime4) / OldTimeStep); + } else if (std::abs(DSRatio - realTHREE) < 0.01) { // DSRatio = 3 + // first two points lie between (oldVals[0] and oldVals[1]) + Real64 delta10 = (oldVals[1] - oldVals[0]) / realTHREE; + newVals[1] = oldVals[0] + delta10; + newVals[2] = newVals[1] + delta10; + // last point is oldVals[1] + newVals[3] = oldVals[1]; } else { // DSRatio = 4 or more - // all new points lie between oldVals[0] and oldVals[1] - Real64 delta10 = oldVals[1] - oldVals[0]; - newVals[0] = oldVals[0] + delta10 * ((oldTime0 - newTime1) / OldTimeStep); - newVals[1] = oldVals[0] + delta10 * ((oldTime0 - newTime2) / OldTimeStep); - newVals[2] = oldVals[0] + delta10 * ((oldTime0 - newTime3) / OldTimeStep); - newVals[3] = oldVals[0] + delta10 * ((oldTime0 - newTime4) / OldTimeStep); + // all new points lie between (oldVals[0] and oldVals[1]) + Real64 delta10 = (oldVals[1] - oldVals[0]) / DSRatio; + newVals[1] = oldVals[0] + delta10; + newVals[2] = newVals[1] + delta10; + newVals[3] = newVals[2] + delta10; } return oldVals[0]; - - // if (std::abs(DSRatio - 2.0) < 0.01) { // DSRatio = 2 - // // first two points lie between oldVals[0] and oldVals[1] - // Real64 ratio10 = (oldVals[1] - oldVals[0]) / OldTimeStep; - // newVals[0] = oldVals[0] + ratio10 * (oldTime0 - newTime1); - // newVals[1] = oldVals[0] + ratio10 * (oldTime0 - newTime2); - // // last two points lie between oldVals[1] and oldVals[2] - // Real64 ratio21 = (oldVals[2] - oldVals[1]) / OldTimeStep; - // newVals[2] = oldVals[1] + ratio21 * (oldTime1 - newTime3); - // newVals[3] = oldVals[1] + ratio21 * (oldTime1 - newTime4); - // } else if (std::abs(DSRatio - 3.0) < 0.01) { // DSRatio = 3 - // // first three points lie between oldVals[0] and oldVals[1] - // Real64 ratio10 = (oldVals[1] - oldVals[0]) / OldTimeStep; - // newVals[0] = oldVals[0] + ratio10 * (oldTime0 - newTime1); - // newVals[1] = oldVals[0] + ratio10 * (oldTime0 - newTime2); - // newVals[2] = oldVals[0] + ratio10 * (oldTime0 - newTime3); - // // last point lie between oldVals[1] and oldVals[2] - // Real64 ratio21 = (oldVals[2] - oldVals[1]) / OldTimeStep; - // newVals[3] = oldVals[1] + ratio21 * (oldTime1 - newTime4); - - //} else { // DSRatio = 4 or more - // // all new points lie between oldVals[0] and oldVals[1] - // Real64 ratio10 = (oldVals[1] - oldVals[0]) / OldTimeStep; - // newVals[0] = oldVals[0] + ratio10 * (oldTime0 - newTime1); - // newVals[1] = oldVals[0] + ratio10 * (oldTime0 - newTime2); - // newVals[2] = oldVals[0] + ratio10 * (oldTime0 - newTime3); - // newVals[3] = oldVals[0] + ratio10 * (oldTime0 - newTime4); - //} } void InverseModelTemperature(EnergyPlusData &state, int const ZoneNum, // Zone number @@ -6087,21 +6069,21 @@ void DetectOscillatingZoneTemp(EnergyPlusData &state) auto &zone = state.dataHeatBal->Zone(iZone); SetupOutputVariable(state, "Zone Oscillating Temperatures Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataZoneTempPredictorCorrector->ZoneTempOscillate(iZone), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, zone.Name); SetupOutputVariable(state, "Zone Oscillating Temperatures During Occupancy Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataZoneTempPredictorCorrector->ZoneTempOscillateDuringOccupancy(iZone), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, zone.Name); SetupOutputVariable(state, "Zone Oscillating Temperatures in Deadband Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataZoneTempPredictorCorrector->ZoneTempOscillateInDeadband(iZone), OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, @@ -6110,21 +6092,21 @@ void DetectOscillatingZoneTemp(EnergyPlusData &state) // set up a variable covering all zones SetupOutputVariable(state, "Facility Any Zone Oscillating Temperatures Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataZoneTempPredictorCorrector->AnyZoneTempOscillate, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, "Facility"); SetupOutputVariable(state, "Facility Any Zone Oscillating Temperatures During Occupancy Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataZoneTempPredictorCorrector->AnyZoneTempOscillateDuringOccupancy, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, "Facility"); SetupOutputVariable(state, "Facility Any Zone Oscillating Temperatures in Deadband Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, state.dataZoneTempPredictorCorrector->AnyZoneTempOscillateInDeadband, OutputProcessor::SOVTimeStepType::System, OutputProcessor::SOVStoreType::Summed, diff --git a/src/EnergyPlus/ZoneTempPredictorCorrector.hh b/src/EnergyPlus/ZoneTempPredictorCorrector.hh index c79f299048d..1298b64af32 100644 --- a/src/EnergyPlus/ZoneTempPredictorCorrector.hh +++ b/src/EnergyPlus/ZoneTempPredictorCorrector.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -224,7 +224,7 @@ namespace ZoneTempPredictorCorrector { void beginEnvironmentInit(EnergyPlusData &state); - void setUpOutputVars(EnergyPlusData &state, std::string_view prefix, std::string_view name); + void setUpOutputVars(EnergyPlusData &state, std::string_view prefix, std::string const &key); void predictSystemLoad(EnergyPlusData &state, bool shortenTimeStepSys, diff --git a/src/EnergyPlus/api/EnergyPlusAPI.h b/src/EnergyPlus/api/EnergyPlusAPI.h index 1d52cbd30fc..96c7e938aa3 100644 --- a/src/EnergyPlus/api/EnergyPlusAPI.h +++ b/src/EnergyPlus/api/EnergyPlusAPI.h @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/api/EnergyPlusPgm.cc b/src/EnergyPlus/api/EnergyPlusPgm.cc index f93cf9e4076..e0aa2a2167d 100644 --- a/src/EnergyPlus/api/EnergyPlusPgm.cc +++ b/src/EnergyPlus/api/EnergyPlusPgm.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/api/EnergyPlusPgm.hh b/src/EnergyPlus/api/EnergyPlusPgm.hh index ac32eb1e125..7cb75a91235 100644 --- a/src/EnergyPlus/api/EnergyPlusPgm.hh +++ b/src/EnergyPlus/api/EnergyPlusPgm.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/api/TypeDefs.h b/src/EnergyPlus/api/TypeDefs.h index 50c87d0694c..8d561d0e259 100644 --- a/src/EnergyPlus/api/TypeDefs.h +++ b/src/EnergyPlus/api/TypeDefs.h @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/api/api.py b/src/EnergyPlus/api/api.py index aa9a61ad51e..57733daf076 100644 --- a/src/EnergyPlus/api/api.py +++ b/src/EnergyPlus/api/api.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/src/EnergyPlus/api/autosizing.cc b/src/EnergyPlus/api/autosizing.cc index 8ff8e306e94..d3bbef98fd6 100644 --- a/src/EnergyPlus/api/autosizing.cc +++ b/src/EnergyPlus/api/autosizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/api/autosizing.h b/src/EnergyPlus/api/autosizing.h index 2299267a5f5..ecabe77c84d 100644 --- a/src/EnergyPlus/api/autosizing.h +++ b/src/EnergyPlus/api/autosizing.h @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/api/autosizing.py b/src/EnergyPlus/api/autosizing.py index 666d4cbd455..56193632ee4 100644 --- a/src/EnergyPlus/api/autosizing.py +++ b/src/EnergyPlus/api/autosizing.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/src/EnergyPlus/api/common.py b/src/EnergyPlus/api/common.py index f58959bb5ff..ebec6c0ba05 100644 --- a/src/EnergyPlus/api/common.py +++ b/src/EnergyPlus/api/common.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/src/EnergyPlus/api/datatransfer.cc b/src/EnergyPlus/api/datatransfer.cc index 624c3fe2c54..28c07e3ec38 100644 --- a/src/EnergyPlus/api/datatransfer.cc +++ b/src/EnergyPlus/api/datatransfer.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -98,17 +98,18 @@ APIDataEntry *getAPIData(EnergyPlusState state, unsigned int *resultingSize) for (auto const &trend : thisState->dataPluginManager->trends) { localDataEntries.emplace_back("PluginTrendVariable,", "", "", trend.name); } - for (auto const &meter : thisState->dataOutputProcessor->EnergyMeters) { - if (meter.Name.empty()) { + for (auto const *meter : thisState->dataOutputProcessor->meters) { + if (meter->Name.empty()) { break; } - localDataEntries.emplace_back("OutputMeter", "", "", meter.Name); + localDataEntries.emplace_back("OutputMeter", "", "", meter->Name); } - for (auto const &variable : thisState->dataOutputProcessor->RVariableTypes) { - if (variable.VarNameOnly.empty() && variable.KeyNameOnlyUC.empty()) { + for (auto const *variable : thisState->dataOutputProcessor->outVars) { + if (variable->varType != EnergyPlus::OutputProcessor::VariableType::Real) continue; + if (variable->name.empty() && variable->keyUC.empty()) { break; } - localDataEntries.emplace_back("OutputVariable", variable.VarNameOnly, "", variable.KeyNameOnlyUC); + localDataEntries.emplace_back("OutputVariable", variable->name, "", variable->keyUC); } *resultingSize = localDataEntries.size(); auto *data = new APIDataEntry[*resultingSize]; @@ -169,21 +170,22 @@ char *listAllAPIDataCSV(EnergyPlusState state) output.append(trend.name).append("\n"); } output.append("**METERS**\n"); - for (auto const &meter : thisState->dataOutputProcessor->EnergyMeters) { - if (meter.Name.empty()) { + for (auto const *meter : thisState->dataOutputProcessor->meters) { + if (meter->Name.empty()) { break; } output.append("OutputMeter,"); - output.append(meter.Name).append("\n"); + output.append(meter->Name).append("\n"); } output.append("**VARIABLES**\n"); - for (auto const &variable : thisState->dataOutputProcessor->RVariableTypes) { - if (variable.VarNameOnly.empty() && variable.KeyNameOnlyUC.empty()) { + for (auto const *variable : thisState->dataOutputProcessor->outVars) { + if (variable->varType != EnergyPlus::OutputProcessor::VariableType::Real) continue; + if (variable->name.empty() && variable->keyUC.empty()) { break; } output.append("OutputVariable,"); - output.append(variable.VarNameOnly).append(","); - output.append(variable.KeyNameOnlyUC).append("\n"); + output.append(variable->name).append(","); + output.append(variable->keyUC).append("\n"); } // note that we cannot just return a c_str to the local string, as the string will be destructed upon leaving // this function, and undefined behavior will occur. @@ -219,7 +221,7 @@ void resetErrorFlag(EnergyPlusState state) thisState->dataPluginManager->apiErrorFlag = false; } -const char **getObjectNames(EnergyPlusState state, const char *objectType, unsigned int *resultingSize) +char **getObjectNames(EnergyPlusState state, const char *objectType, unsigned int *resultingSize) { auto *thisState = reinterpret_cast(state); auto &epjson = thisState->dataInputProcessing->inputProcessor->epJSON; @@ -230,16 +232,18 @@ const char **getObjectNames(EnergyPlusState state, const char *objectType, unsig } auto &instancesValue = instances.value(); *resultingSize = instancesValue.size(); - auto *data = new const char *[*resultingSize]; + char **data = new char *[*resultingSize]; unsigned int i = -1; for (auto instance = instancesValue.begin(); instance != instancesValue.end(); ++instance) { i++; - data[i] = instance.key().data(); + std::string s = std::string(instance.key().data()); + data[i] = new char[std::strlen(instance.key().data()) + 1]; + std::strcpy(data[i], instance.key().data()); } return data; } -void freeObjectNames(const char **objectNames, unsigned int arraySize) +void freeObjectNames(char **objectNames, unsigned int arraySize) { // as of right now we don't actually need to free the underlying strings, they exist in the epJSON instance, so just delete our array of pointers (void)arraySize; // no op to avoid compiler warning that this variable is unused, in the future, this may be needed so keeping it in the API now @@ -280,31 +284,10 @@ int getVariableHandle(EnergyPlusState state, const char *type, const char *key) auto *thisState = reinterpret_cast(state); std::string const typeUC = EnergyPlus::Util::makeUPPER(type); std::string const keyUC = EnergyPlus::Util::makeUPPER(key); - int handle = -1; // initialize to -1 as a flag - if (thisState->dataOutputProcessor->RVariableTypes.allocated()) { - handle = 0; // initialize to 0 to get a 1 based Array1D index - for (int i = 1; i <= thisState->dataOutputProcessor->NumOfRVariable; i++) { - auto &availOutputVar = thisState->dataOutputProcessor->RVariableTypes(i); - handle++; - if (typeUC == availOutputVar.VarNameOnlyUC && keyUC == availOutputVar.KeyNameOnlyUC) { - return handle; - } - } - } - if (thisState->dataOutputProcessor->IVariableTypes.allocated()) { - // now, if real variables *were* searched, we need to pick up the handle where it left off, otherwise initialize it to zero - if (handle == -1) { - // real variables were not searched, init to zero - handle = 0; - } else { - // real variables where searched, let it just continue where it left off - } - for (int i = 1; i <= thisState->dataOutputProcessor->NumOfIVariable; i++) { - auto &availOutputVar = thisState->dataOutputProcessor->IVariableTypes(i); - handle++; - if (typeUC == availOutputVar.VarNameOnlyUC && keyUC == availOutputVar.KeyNameOnlyUC) { - return handle; - } + for (int i = 0; i < (int)thisState->dataOutputProcessor->outVars.size(); i++) { + auto const *var = thisState->dataOutputProcessor->outVars[i]; + if (typeUC == var->nameUC && keyUC == var->keyUC) { + return i; } } return -1; // return -1 if it wasn't found @@ -320,14 +303,27 @@ Real64 getVariableValue(EnergyPlusState state, const int handle) // - index N+M being the highest integer variable handle // note that this function will return -1 if it cannot auto *thisState = reinterpret_cast(state); - if (handle > 0 && handle <= thisState->dataOutputProcessor->NumOfRVariable) { - auto &thisOutputVar = thisState->dataOutputProcessor->RVariableTypes(handle); - return *thisOutputVar.VarPtr.Which; - } else if (handle > thisState->dataOutputProcessor->NumOfRVariable && - handle <= thisState->dataOutputProcessor->NumOfRVariable + thisState->dataOutputProcessor->NumOfIVariable) { - int thisHandle = handle - thisState->dataOutputProcessor->NumOfRVariable; - auto &thisOutputVar = thisState->dataOutputProcessor->IVariableTypes(thisHandle); - return (Real64)*thisOutputVar.VarPtr.Which; + if (handle >= 0 && handle < (int)thisState->dataOutputProcessor->outVars.size()) { + auto const *thisOutputVar = thisState->dataOutputProcessor->outVars[handle]; + if (thisOutputVar->varType == EnergyPlus::OutputProcessor::VariableType::Real) { + return *(dynamic_cast(thisOutputVar))->Which; + } else if (thisOutputVar->varType == EnergyPlus::OutputProcessor::VariableType::Integer) { + return (Real64) * (dynamic_cast(thisOutputVar))->Which; + } else { + if (thisState->dataGlobal->errorCallback) { + std::cout + << "ERROR: Variable at handle has type other than Real or Integer, returning zero but caller should take note and likely abort." + << std::endl; + } else { + // must be running from python plugin, need to fatal out once the plugin is done + // throw an error, set the fatal flag, and then return zero + EnergyPlus::ShowSevereError(*thisState, fmt::format("Data Exchange API: Error in getVariableValue; received handle: {}", handle)); + EnergyPlus::ShowContinueError( + *thisState, "The getVariableValue function will return 0 for now to allow the plugin to finish, then EnergyPlus will abort"); + } + thisState->dataPluginManager->apiErrorFlag = true; + return 0; + } } else { if (thisState->dataGlobal->errorCallback) { std::cout << "ERROR: Variable handle out of range in getVariableValue, returning zero but caller should take note and likely abort." @@ -360,7 +356,7 @@ int getMeterHandle(EnergyPlusState state, const char *meterName) Real64 getMeterValue(EnergyPlusState state, int handle) { auto *thisState = reinterpret_cast(state); - if (handle >= 1 && handle <= (int)thisState->dataOutputProcessor->EnergyMeters.size()) { + if (handle >= 0 && handle < (int)thisState->dataOutputProcessor->meters.size()) { return EnergyPlus::GetCurrentMeterValue(*thisState, handle); } else { if (thisState->dataGlobal->errorCallback) { diff --git a/src/EnergyPlus/api/datatransfer.h b/src/EnergyPlus/api/datatransfer.h index 3a3a532ef7a..fc7d15aa0fa 100644 --- a/src/EnergyPlus/api/datatransfer.h +++ b/src/EnergyPlus/api/datatransfer.h @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -143,14 +143,13 @@ ENERGYPLUSLIB_API void freeAPIData(struct APIDataEntry *data, unsigned int array /// \param[in] objectType The object type from the input schema, such as "Chiller:Electric", or "Zone" -- casing should match input schema! /// \param[out] resultingSize An integer which will be set to the size of the array upon return /// \return Const char * pointing to an array of const char * with the size set in the by-ref argument. When done, pass to freeObjectNames to clear. -ENERGYPLUSLIB_API const char **getObjectNames(EnergyPlusState state, const char *objectType, unsigned int *resultingSize); +ENERGYPLUSLIB_API char **getObjectNames(EnergyPlusState state, const char *objectType, unsigned int *resultingSize); /// \brief Clears an object names array allocation /// \details This function frees an instance of the object names array, which is returned from getObjectNames /// \param[in] data An array (pointer) of const char * as returned from the getObjectNames function /// \param[in] arraySize The size of the object name array, which is known after the call to getObjectNames. /// \return Nothing, this simply frees the memory -ENERGYPLUSLIB_API void freeObjectNames(const char **objectNames, unsigned int arraySize); - +ENERGYPLUSLIB_API void freeObjectNames(char **objectNames, unsigned int arraySize); // ----- FUNCTIONS RELATED TO VARIABLES /// \brief Gets the number of nodes for a particular CondFD surface layer diff --git a/src/EnergyPlus/api/datatransfer.py b/src/EnergyPlus/api/datatransfer.py index b8098520e6d..e2b8ee1c5f8 100644 --- a/src/EnergyPlus/api/datatransfer.py +++ b/src/EnergyPlus/api/datatransfer.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/src/EnergyPlus/api/func.cc b/src/EnergyPlus/api/func.cc index b037608a9a0..c17d244fb16 100644 --- a/src/EnergyPlus/api/func.cc +++ b/src/EnergyPlus/api/func.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -58,7 +58,9 @@ void initializeFunctionalAPI(EnergyPlusState state) { auto *thisState = reinterpret_cast(state); - thisState->dataInputProcessing->inputProcessor = EnergyPlus::InputProcessor::factory(); + if (!thisState->dataInputProcessing->inputProcessor) { + thisState->dataInputProcessing->inputProcessor = EnergyPlus::InputProcessor::factory(); + } EnergyPlus::Psychrometrics::InitializePsychRoutines(*thisState); EnergyPlus::FluidProperties::InitializeGlycRoutines(); } diff --git a/src/EnergyPlus/api/func.h b/src/EnergyPlus/api/func.h index ead68312336..55c2280e7d3 100644 --- a/src/EnergyPlus/api/func.h +++ b/src/EnergyPlus/api/func.h @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/api/func.py b/src/EnergyPlus/api/func.py index cdd1767a3ec..91be55d9fb1 100644 --- a/src/EnergyPlus/api/func.py +++ b/src/EnergyPlus/api/func.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/src/EnergyPlus/api/plugin.py b/src/EnergyPlus/api/plugin.py index de14aba5a02..1cbb3f98aed 100644 --- a/src/EnergyPlus/api/plugin.py +++ b/src/EnergyPlus/api/plugin.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/src/EnergyPlus/api/plugin_tester.py b/src/EnergyPlus/api/plugin_tester.py index cbe963cc029..d60e9fdcaf0 100644 --- a/src/EnergyPlus/api/plugin_tester.py +++ b/src/EnergyPlus/api/plugin_tester.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/src/EnergyPlus/api/runtime.cc b/src/EnergyPlus/api/runtime.cc index e164ac96533..8792f7ebc48 100644 --- a/src/EnergyPlus/api/runtime.cc +++ b/src/EnergyPlus/api/runtime.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -340,13 +340,17 @@ void callbackEndOfAfterComponentGetInput(EnergyPlusState state, void (*f)(Energy EnergyPlus::PluginManagement::registerNewCallback(*thisState, EnergyPlus::EMSManager::EMSCallFrom::ComponentGetInput, f); } -// void callbackUserDefinedComponentModel(EnergyPlusState state, std::function f) { -// EnergyPlus::PluginManagement::registerNewCallback(EnergyPlus::DataGlobals::emsCallFromUserDefinedComponentModel, f); -//} -// -// void callbackUserDefinedComponentModel(EnergyPlusState state, void (*f)()) { -// callbackUserDefinedComponentModel(std::function(f)); -//} +void callbackUserDefinedComponentModel(EnergyPlusState state, std::function const &f, const char *programNameInInputFile) +{ + auto *thisState = reinterpret_cast(state); // NOLINT(cppcoreguidelines-pro-type-reinterpret-cast) + EnergyPlus::PluginManagement::registerUserDefinedCallback(*thisState, f, programNameInInputFile); +} + +void callbackUserDefinedComponentModel(EnergyPlusState state, void (*f)(EnergyPlusState), const char *programNameInInputFile) +{ + auto *thisState = reinterpret_cast(state); // NOLINT(cppcoreguidelines-pro-type-reinterpret-cast) + EnergyPlus::PluginManagement::registerUserDefinedCallback(*thisState, f, programNameInInputFile); +} void callbackUnitarySystemSizing(EnergyPlusState state, std::function const &f) { diff --git a/src/EnergyPlus/api/runtime.h b/src/EnergyPlus/api/runtime.h index a1b7d8e3b48..7b09a287d74 100644 --- a/src/EnergyPlus/api/runtime.h +++ b/src/EnergyPlus/api/runtime.h @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -77,7 +77,7 @@ ENERGYPLUSLIB_API void callbackUnitarySystemSizing(EnergyPlusState state, const ENERGYPLUSLIB_API void registerStdOutCallback(EnergyPlusState state, std::function); ENERGYPLUSLIB_API void registerProgressCallback(EnergyPlusState state, std::function); ENERGYPLUSLIB_API void registerExternalHVACManager(EnergyPlusState state, std::function f); -// ENERGYPLUSLIB_API void callbackUserDefinedComponentModel(EnergyPlusState state, std::function f); +ENERGYPLUSLIB_API void callbackUserDefinedComponentModel(EnergyPlusState state, std::function f, const char *programName); extern "C" { @@ -388,10 +388,17 @@ ENERGYPLUSLIB_API void callbackEndOfAfterComponentGetInput(EnergyPlusState state /// \remark This function is only allowed during API simulations. For Python Plugin applications, the client will /// create a custom Python class and override specific functions to be called at equivalent points in the simulation. ENERGYPLUSLIB_API void callbackUnitarySystemSizing(EnergyPlusState state, void (*f)(EnergyPlusState)); -// The user defined component model won't actually call out to this API endpoint -- it is coupled with a specific -// plugin instance in the code. -// ENERGYPLUSLIB_API void callbackUserDefinedComponentModel(EnergyPlusState state, void (*f)()); - +/// \brief Register a callback function to be called by a specific user-defined model. +/// \details During an EnergyPlus simulation, a number of predetermined calling points have been established at which +/// any registered callback functions are "called back". This API function allows a client to register a function +/// with no arguments to be called at this specific calling point. From inside this function, the client can +/// leverage other API categories to look up property values or exchange data with the simulation as needed. +/// \param[in] state An active EnergyPlusState instance created with `stateNew`. +/// \param[in] f The function to be called back at this specific calling point in the simulation. The function expects one EnergyPlusState argument. +/// \param[in] programName The name of the program to match up with the user defined equipment object in the input file. +/// \remark This function is only allowed during API simulations. For Python Plugin applications, the client will +/// create a custom Python class and override specific functions to be called at equivalent points in the simulation. +ENERGYPLUSLIB_API void callbackUserDefinedComponentModel(EnergyPlusState state, void (*f)(EnergyPlusState), const char *programName); /// \brief Register a callback function to be used in place of the EnergyPlus ManageHVAC function. /// \details This callback is a placeholder for advanced use cases, and will be supported in a future release. /// \param[in] state An active EnergyPlusState instance created with `stateNew`. @@ -400,6 +407,6 @@ ENERGYPLUSLIB_API void registerExternalHVACManager(EnergyPlusState state, void ( #ifdef __cplusplus } -#endif // __cplusplug +#endif // __cplusplus #endif // EnergyPlusAPIRuntime_h_INCLUDED diff --git a/src/EnergyPlus/api/runtime.py b/src/EnergyPlus/api/runtime.py index c15a6c6806e..b9bfefc3226 100644 --- a/src/EnergyPlus/api/runtime.py +++ b/src/EnergyPlus/api/runtime.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- @@ -137,8 +137,8 @@ def __init__(self, api: cdll): self.api.callbackEndOfSystemSizing.restype = c_void_p self.api.callbackEndOfAfterComponentGetInput.argtypes = [c_void_p, self.py_state_callback_type] self.api.callbackEndOfAfterComponentGetInput.restype = c_void_p - # self.api.callbackUserDefinedComponentModel.argtypes = [self.py_empty_callback_type] - # self.api.callbackUserDefinedComponentModel.restype = c_void_p + self.api.callbackUserDefinedComponentModel.argtypes = [c_void_p, self.py_state_callback_type, c_char_p] + self.api.callbackUserDefinedComponentModel.restype = c_void_p self.api.callbackUnitarySystemSizing.argtypes = [c_void_p, self.py_state_callback_type] self.api.callbackUnitarySystemSizing.restype = c_void_p self.api.registerExternalHVACManager.argtypes = [c_void_p, self.py_state_callback_type] @@ -551,8 +551,24 @@ def callback_after_component_get_input(self, state: c_void_p, f: FunctionType) - all_callbacks.append(cb_ptr) self.api.callbackEndOfAfterComponentGetInput(state, cb_ptr) - # user defined component callbacks are not allowed, they are coupled directly to a specific EMS manager/PythonPlugin - # def callback_user_defined_component_model(self, f: FunctionType) -> None: + def callback_user_defined_component_model(self, state: c_void_p, f: FunctionType, program_name: str) -> None: + """ + This function allows a client to register a function to be called by a specific user-defined equipment object + inside EnergyPlus. This registration function takes a string for the program "name" which should match the + name given in the IDF. + + :param state: An active EnergyPlus "state" that is returned from a call to `api.state_manager.new_state()`. + :param f: A python function which takes one argument, the current state instance, and returns nothing. + :param program_name: The program name which is listed in the IDF on the user-defined object, either as an + initialization program name or a simulation program name. + :return: Nothing + """ + self._check_callback_args(f, 1, 'callback_user_defined_component_model') + cb_ptr = self.py_state_callback_type(f) + all_callbacks.append(cb_ptr) + if isinstance(program_name, str): + program_name = program_name.encode('utf-8') + self.api.callbackUserDefinedComponentModel(state, cb_ptr, program_name) def callback_unitary_system_sizing(self, state: c_void_p, f: FunctionType) -> None: """ diff --git a/src/EnergyPlus/api/state.cc b/src/EnergyPlus/api/state.cc index 664cfba31b9..ee428c64e79 100644 --- a/src/EnergyPlus/api/state.cc +++ b/src/EnergyPlus/api/state.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/api/state.h b/src/EnergyPlus/api/state.h index 06747dfd272..ef832198fab 100644 --- a/src/EnergyPlus/api/state.h +++ b/src/EnergyPlus/api/state.h @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/api/state.py b/src/EnergyPlus/api/state.py index b8a7ca8d673..e47f2202b93 100644 --- a/src/EnergyPlus/api/state.py +++ b/src/EnergyPlus/api/state.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/src/EnergyPlus/fenv_missing.h b/src/EnergyPlus/fenv_missing.h index 35ba3b237d6..3f492b65880 100644 --- a/src/EnergyPlus/fenv_missing.h +++ b/src/EnergyPlus/fenv_missing.h @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/main.cc b/src/EnergyPlus/main.cc index b54263d2dc6..7fe25b07e36 100644 --- a/src/EnergyPlus/main.cc +++ b/src/EnergyPlus/main.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/test_ep_as_library.cc b/src/EnergyPlus/test_ep_as_library.cc index 97e83c341cd..13a23c6d452 100644 --- a/src/EnergyPlus/test_ep_as_library.cc +++ b/src/EnergyPlus/test_ep_as_library.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/ExpandObjects/epfilter.f90 b/src/ExpandObjects/epfilter.f90 index 0b92a36e16f..01f127b2e42 100644 --- a/src/ExpandObjects/epfilter.f90 +++ b/src/ExpandObjects/epfilter.f90 @@ -2114,6 +2114,210 @@ LOGICAL FUNCTION DoesGroundHeatTransferExist() DoesGroundHeatTransferExist = isGHTexist END FUNCTION DoesGroundHeatTransferExist +!---------------------------------------------------------------------------------- + +SUBROUTINE AddEffectCurveHelper(fieldIdx, Eff75, Eff100, prefix) + ! SUBROUTINE INFORMATION: + ! AUTHOR Yujie Xu + ! DATE WRITTEN December 2023 + ! MODIFIED na + ! RE-ENGINEERED na + + ! PURPOSE OF THIS SUBROUTINE: + ! adds the dependent variable of the sensible or latent effectiveness curve + + ! METHODOLOGY EMPLOYED: + + ! REFERENCES: + ! na + + ! USE STATEMENTS: + + IMPLICIT NONE ! Enforce explicit typing of all variables in this routine + + ! SUBROUTINE ARGUMENT DEFINITIONS: + ! the index of the name of the object, so that the generated table etc. can have unique names + INTEGER,INTENT(IN) :: fieldIdx + REAL,INTENT(IN) :: Eff75 + REAL,INTENT(IN) :: Eff100 + CHARACTER(len=*),INTENT(IN) :: prefix ! "Sen" (Sensible) or "Lat" (Latent) + + ! SUBROUTINE PARAMETER DEFINITIONS: + ! na + + ! INTERFACE BLOCK SPECIFICATIONS + ! na + + ! DERIVED TYPE DEFINITIONS + ! na + + ! SUBROUTINE LOCAL VARIABLE DECLARATIONS: + ! na + CALL CreateNewObj('Table:Lookup') + CALL AddToObjFld('Name', fieldIdx,' '//prefix//'EffectivenessTable') + CALL AddToObjFld('Independent Variable List Name', fieldIdx,' effIndVarList') + CALL AddToObjStr('Normalization Method', 'DivisorOnly') + CALL AddToObjStr('Normalization Divisor', RealToStr(Eff100)) + CALL AddToObjStr('Minimum Output', '0.0') + CALL AddToObjStr('Maximum Output', '10.0') + CALL AddToObjStr('Output Unit Type', 'Dimensionless') + CALL AddToObjStr('External File Name', '') + CALL AddToObjStr('External File Column Number', '') + CALL AddToObjStr('External File Starting Row Number', '') + CALL AddToObjStr('Value 1', RealToStr(Eff75)) + CALL AddToObjStr('Value 2', RealToStr(Eff100),.TRUE.) +END SUBROUTINE + +SUBROUTINE AddEffectCurveIndVar(fieldIdx) + ! SUBROUTINE INFORMATION: + ! AUTHOR Yujie Xu + ! DATE WRITTEN December 2023 + ! MODIFIED na + ! RE-ENGINEERED na + + ! PURPOSE OF THIS SUBROUTINE: + ! adds the independent variable of the sensible or latent effectiveness curve + + ! METHODOLOGY EMPLOYED: + + ! REFERENCES: + ! na + + ! USE STATEMENTS: + + IMPLICIT NONE ! Enforce explicit typing of all variables in this routine + + ! SUBROUTINE ARGUMENT DEFINITIONS: + ! the index of the name of the object, so that the generated table etc. can have unique names + INTEGER,INTENT(IN) :: fieldIdx + + ! SUBROUTINE PARAMETER DEFINITIONS: + ! na + + ! INTERFACE BLOCK SPECIFICATIONS + ! na + + ! DERIVED TYPE DEFINITIONS + ! na + + ! SUBROUTINE LOCAL VARIABLE DECLARATIONS: + ! na + + CALL CreateNewObj('Table:IndependentVariable') + CALL AddToObjFld('Name', fieldIdx,' airFlowRatio') + CALL AddToObjStr('Interpolation Method', 'Linear') + CALL AddToObjStr('Extrapolation Method', 'Linear') + CALL AddToObjStr('Minimum Value', '0.0') + CALL AddToObjStr('Maximum Value', '10.0') + CALL AddToObjStr('Normalization Reference Value', '') + CALL AddToObjStr('Unit Type', 'Dimensionless') + CALL AddToObjStr('External File Name', '') + CALL AddToObjStr('External File Column Number', '') + CALL AddToObjStr('External File Starting Row Number', '') + CALL AddToObjStr('Value 1', '0.75') + CALL AddToObjStr('Value 2', '1.0',.TRUE.) + CALL CreateNewObj('Table:IndependentVariableList') + CALL AddToObjFld('Name', fieldIdx,' effIndVarList') + CALL AddToObjFld('Independent Variable 1 Name', fieldIdx,' airFlowRatio',.TRUE.) +END SUBROUTINE + +SUBROUTINE AddSenEffectCurve(fieldIdx, htRecSens75, htRecSens100) + ! SUBROUTINE INFORMATION: + ! AUTHOR Yujie Xu + ! DATE WRITTEN December 2023 + ! MODIFIED na + ! RE-ENGINEERED na + + ! PURPOSE OF THIS SUBROUTINE: + ! Create curves corresponding to the linear relationship specified using the 75% and 100% effectiveness value + + ! METHODOLOGY EMPLOYED: + + ! REFERENCES: + ! na + + ! USE STATEMENTS: + + IMPLICIT NONE ! Enforce explicit typing of all variables in this routine + + ! SUBROUTINE ARGUMENT DEFINITIONS: + ! the index of the name of the object, so that the generated table etc. can have unique names + INTEGER,INTENT(IN) :: fieldIdx + REAL,INTENT(IN) :: htRecSens75 + REAL,INTENT(IN) :: htRecSens100 + + ! SUBROUTINE PARAMETER DEFINITIONS: + ! na + + ! INTERFACE BLOCK SPECIFICATIONS + ! na + + ! DERIVED TYPE DEFINITIONS + ! na + + ! SUBROUTINE LOCAL VARIABLE DECLARATIONS: + ! na + + CALL AddToObjFld('Sensible Effectiveness of Heating Air Flow Curve Name', fieldIdx,' SenEffectivenessTable') + CALL AddToObjStr('Latent Effectiveness of Heating Air Flow Curve Name', '') + CALL AddToObjFld('Sensible Effectiveness of Cooling Air Flow Curve Name', fieldIdx,' SenEffectivenessTable') + CALL AddToObjStr('Latent Effectiveness of Cooling Air Flow Curve Name', '',.TRUE.) + ! create curve objects for the heat exchanger start + CALL AddEffectCurveIndVar(fieldIdx) + CALL AddEffectCurveHelper(fieldIdx, htRecSens75, htRecSens100, 'Sen') + ! create curve objects for the heat exchanger end +END SUBROUTINE + +SUBROUTINE AddSenLatEffectCurve(fieldIdx, htRecSens75, htRecSens100, htRecLat75, htRecLat100) + ! SUBROUTINE INFORMATION: + ! AUTHOR Yujie Xu + ! DATE WRITTEN December 2023 + ! MODIFIED na + ! RE-ENGINEERED na + + ! PURPOSE OF THIS SUBROUTINE: + ! Create curves corresponding to the linear relationship specified using the 75% and 100% effectiveness value + + ! METHODOLOGY EMPLOYED: + + ! REFERENCES: + ! na + + ! USE STATEMENTS: + + IMPLICIT NONE ! Enforce explicit typing of all variables in this routine + + ! SUBROUTINE ARGUMENT DEFINITIONS: + ! the index of the name of the object, so that the generated table etc. can have unique names + INTEGER,INTENT(IN) :: fieldIdx + REAL,INTENT(IN) :: htRecSens75 + REAL,INTENT(IN) :: htRecSens100 + REAL,INTENT(IN) :: htRecLat75 + REAL,INTENT(IN) :: htRecLat100 + + ! SUBROUTINE PARAMETER DEFINITIONS: + ! na + + ! INTERFACE BLOCK SPECIFICATIONS + ! na + + ! DERIVED TYPE DEFINITIONS + ! na + + ! SUBROUTINE LOCAL VARIABLE DECLARATIONS: + ! na + + CALL AddToObjFld('Sensible Effectiveness of Heating Air Flow Curve Name', fieldIdx,' SenEffectivenessTable') + CALL AddToObjFld('Latent Effectiveness of Heating Air Flow Curve Name', fieldIdx,' LatEffectivenessTable') + CALL AddToObjFld('Sensible Effectiveness of Cooling Air Flow Curve Name', fieldIdx,' SenEffectivenessTable') + CALL AddToObjFld('Latent Effectiveness of Cooling Air Flow Curve Name', fieldIdx,' LatEffectivenessTable',.TRUE.) + ! create curve objects for the heat exchanger start + CALL AddEffectCurveIndVar(fieldIdx) + CALL AddEffectCurveHelper(fieldIdx, htRecSens75, htRecSens100, 'Sen') + CALL AddEffectCurveHelper(fieldIdx, htRecLat75, htRecLat100, 'Lat') + ! create curve objects for the heat exchanger end +END SUBROUTINE + !---------------------------------------------------------------------------------- SUBROUTINE testBufferForGroundHeatTrans(doesGHT) ! SUBROUTINE INFORMATION: @@ -8605,7 +8809,9 @@ SUBROUTINE CreateNewVAV INTEGER :: supFanPlacement=0 LOGICAL :: isMinOARateAutosize REAL :: htRecSens75 +REAL :: htRecSens100 REAL :: htRecLat75 +REAL :: htRecLat100 LOGICAL :: isDehumidifyNone INTEGER :: dehumidCtrlKind = 0 LOGICAL :: isHumidifierNone @@ -11370,19 +11576,17 @@ SUBROUTINE CreateNewVAV IF (heatRecovery .EQ. htrecSens) THEN !HEAT EXCHANGER:AIR TO AIR:GENERIC ~ line 685 htRecSens75 = StringToReal(FldVal(base + vsHeatRecSenEffOff)) + 0.05 + htRecSens100 = StringToReal(FldVal(base + vsHeatRecSenEffOff)) IF (htRecSens75 .GT. 1.) htRecSens75 = 1. + IF (htRecSens100 .GT. 1.) htRecSens100 = 1. CALL CreateNewObj('HeatExchanger:AirToAir:SensibleAndLatent') CALL AddToObjFld('Heat exchanger name', base + vsAirHandlerNameOff,' Heat Recovery') CALL AddToObjStr('Availability Schedule Name',' ') CALL AddToObjFld('Nominal supply air flow rate {m3/s}', base + vsMinOutsideFlowOff,'') CALL AddToObjFld('Sensible Effectiveness at 100% Heating Air Flow', base + vsHeatRecSenEffOff,'') CALL AddToObjStr('Latent Effectiveness at 100% Heating Air Flow','0') - CALL AddToObjNum('Sensible Effectiveness at 75% Heating Air Flow', htRecSens75) - CALL AddToObjStr('Latent Effectiveness at 75% Heating Air Flow','0') CALL AddToObjFld('Sensible Effectiveness at 100% Cooling Air Flow', base + vsHeatRecSenEffOff,'') CALL AddToObjStr('Latent Effectiveness at 100% Cooling Air Flow','0') - CALL AddToObjNum('Sensible Effectiveness at 75% Cooling Air Flow', htRecSens75) - CALL AddToObjStr('Latent Effectiveness at 75% Cooling Air Flow','0') CALL AddToObjFld('Supply Air Inlet Node Name', base + vsAirHandlerNameOff,' Outside Air Inlet') CALL AddToObjFld('Supply Air Outlet Node Name', base + vsAirHandlerNameOff,' Heat Recovery Supply Outlet') CALL AddToObjFld('Exhaust Air Inlet Node Name', base + vsAirHandlerNameOff,' Relief Air Outlet') @@ -11393,25 +11597,28 @@ SUBROUTINE CreateNewVAV CALL AddToObjStr('Frost Control Type','ExhaustOnly') CALL AddToObjStr('Threshold Temperature','-1.1') CALL AddToObjStr('Initial Defrost Time Fraction','0.167') - CALL AddToObjStr('Rate of Defrost Time Fraction Increase','0.024',.TRUE.) + CALL AddToObjStr('Rate of Defrost Time Fraction Increase','0.024') + CALL AddToObjStr('Economizer Lockout','') + CALL AddSenEffectCurve(base + vsAirHandlerNameOff, htRecSens75, htRecSens100) ELSEIF (heatRecovery .EQ. htrecEnth) THEN !HEAT EXCHANGER:AIR TO AIR:GENERIC ~ line 708 htRecSens75 = StringToReal(FldVal(base + vsHeatRecSenEffOff)) + 0.05 + htRecSens100 = StringToReal(FldVal(base + vsHeatRecSenEffOff)) IF (htRecSens75 .GT. 1.) htRecSens75 = 1. + IF (htRecSens100 .GT. 1.) htRecSens100 = 1. htRecLat75 = StringToReal(FldVal(base + vsHeatRecLatEffOff)) + 0.05 + htRecLat100 = StringToReal(FldVal(base + vsHeatRecSenEffOff)) + htRecLat100 = StringToReal(FldVal(base + vsHeatRecLatEffOff)) IF (htRecLat75 .GT. 1.) htRecLat75 = 1. + IF (htRecLat100 .GT. 1.) htRecLat100 = 1. CALL CreateNewObj('HeatExchanger:AirToAir:SensibleAndLatent') CALL AddToObjFld('Heat exchanger name', base + vsAirHandlerNameOff,' Heat Recovery') CALL AddToObjStr('Availability Schedule Name',' ') CALL AddToObjFld('Nominal supply air flow rate {m3/s}', base + vsMinOutsideFlowOff,'') CALL AddToObjFld('Sensible Effectiveness at 100% Heating Air Flow', base + vsHeatRecSenEffOff,'') CALL AddToObjFld('Latent Effectiveness at 100% Heating Air Flow', base + vsHeatRecLatEffOff,'') - CALL AddToObjNum('Sensible Effectiveness at 75% Heating Air Flow', htRecSens75) - CALL AddToObjNum('Latent Effectiveness at 75% Heating Air Flow', htRecLat75) CALL AddToObjFld('Sensible Effectiveness at 100% Cooling Air Flow', base + vsHeatRecSenEffOff,'') CALL AddToObjFld('Latent Effectiveness at 100% Cooling Air Flow', base + vsHeatRecLatEffOff,'') - CALL AddToObjNum('Sensible Effectiveness at 75% Cooling Air Flow', htRecSens75) - CALL AddToObjNum('Latent Effectiveness at 75% Cooling Air Flow', htRecLat75) CALL AddToObjFld('Supply Air Inlet Node Name', base + vsAirHandlerNameOff,' Outside Air Inlet') CALL AddToObjFld('Supply Air Outlet Node Name', base + vsAirHandlerNameOff,' Heat Recovery Supply Outlet') CALL AddToObjFld('Exhaust Air Inlet Node Name', base + vsAirHandlerNameOff,' Relief Air Outlet') @@ -11422,7 +11629,9 @@ SUBROUTINE CreateNewVAV CALL AddToObjStr('Frost Control Type','MinimumExhaustTemperature') CALL AddToObjStr('Threshold Temperature','1.7') CALL AddToObjStr('Initial Defrost Time Fraction','') - CALL AddToObjStr('Rate of Defrost Time Fraction Increase','',.TRUE.) + CALL AddToObjStr('Rate of Defrost Time Fraction Increase','') + CALL AddToObjStr('Economizer Lockout','') + CALL AddSenLatEffectCurve(base + vsAirHandlerNameOff, htRecSens75, htRecSens100, htRecLat75, htRecLat100) END IF !SET POINT MANAGER:SCHEDULED ~ line 734 IF (heatRecovery .NE. htrecNone) THEN @@ -12909,7 +13118,9 @@ SUBROUTINE CreateNewVAV ENDIF IF (heatRecovery .EQ. htrecSens) THEN htRecSens75 = StringToReal(FldVal(base + pvavsHeatRecSenEffOff)) + 0.05 + htRecSens100 = StringToReal(FldVal(base + pvavsHeatRecSenEffOff)) IF (htRecSens75 .GT. 1.) htRecSens75 = 1. + IF (htRecSens100 .GT. 1.) htRecSens100 = 1. !Object ==> HeatExchanger:AirToAir:SensibleAndLatent CALL CreateNewObj('HeatExchanger:AirToAir:SensibleAndLatent') CALL AddToObjFld('Heat exchanger name', base + pvavsAirHandlerNameOff,' Heat Recovery') @@ -12917,12 +13128,8 @@ SUBROUTINE CreateNewVAV CALL AddToObjFld('Nominal supply air flow rate {m3/s}', base + pvavsMinOutsideFlowOff,'') CALL AddToObjFld('Sensible Effectiveness at 100% Heating Air Flow', base + pvavsHeatRecSenEffOff,'') CALL AddToObjStr('Latent Effectiveness at 100% Heating Air Flow','0') - CALL AddToObjNum('Sensible Effectiveness at 75% Heating Air Flow', htRecSens75) - CALL AddToObjStr('Latent Effectiveness at 75% Heating Air Flow','0') CALL AddToObjFld('Sensible Effectiveness at 100% Cooling Air Flow', base + pvavsHeatRecSenEffOff,'') CALL AddToObjStr('Latent Effectiveness at 100% Cooling Air Flow','0') - CALL AddToObjNum('Sensible Effectiveness at 75% Cooling Air Flow', htRecSens75) - CALL AddToObjStr('Latent Effectiveness at 75% Cooling Air Flow','0') CALL AddToObjFld('Supply Air Inlet Node Name', base + pvavsAirHandlerNameOff,' Outside Air Inlet') CALL AddToObjFld('Supply Air Outlet Node Name', base + pvavsAirHandlerNameOff,' Heat Recovery Supply Outlet') CALL AddToObjFld('Exhaust Air Inlet Node Name', base + pvavsAirHandlerNameOff,' Relief Air Outlet') @@ -12933,12 +13140,18 @@ SUBROUTINE CreateNewVAV CALL AddToObjStr('Frost Control Type','ExhaustOnly') CALL AddToObjStr('Threshold Temperature','-1.1') CALL AddToObjStr('Initial Defrost Time Fraction','0.167') - CALL AddToObjStr('Rate of Defrost Time Fraction Increase','0.024',.TRUE.) + CALL AddToObjStr('Rate of Defrost Time Fraction Increase','0.024') + CALL AddToObjStr('Economizer Lockout','') + CALL AddSenEffectCurve(base + pvavsAirHandlerNameOff, htRecSens75, htRecSens100) ELSEIF (heatRecovery .EQ. htrecEnth) THEN htRecSens75 = StringToReal(FldVal(base + pvavsHeatRecSenEffOff)) + 0.05 + htRecSens100 = StringToReal(FldVal(base + pvavsHeatRecSenEffOff)) IF (htRecSens75 .GT. 1.) htRecSens75 = 1. + IF (htRecSens100 .GT. 1.) htRecSens100 = 1. htRecLat75 = StringToReal(FldVal(base + pvavsHeatRecLatEffOff)) + 0.05 + htRecLat100 = StringToReal(FldVal(base + pvavsHeatRecLatEffOff)) IF (htRecLat75 .GT. 1.) htRecLat75 = 1. + IF (htRecLat100 .GT. 1.) htRecLat100 = 1. !Object ==> HeatExchanger:AirToAir:SensibleAndLatent CALL CreateNewObj('HeatExchanger:AirToAir:SensibleAndLatent') CALL AddToObjFld('Heat exchanger name', base + pvavsAirHandlerNameOff,' Heat Recovery') @@ -12946,12 +13159,8 @@ SUBROUTINE CreateNewVAV CALL AddToObjFld('Nominal supply air flow rate {m3/s}', base + pvavsMinOutsideFlowOff,'') CALL AddToObjFld('Sensible Effectiveness at 100% Heating Air Flow', base + pvavsHeatRecSenEffOff,'') CALL AddToObjFld('Latent Effectiveness at 100% Heating Air Flow', base + pvavsHeatRecLatEffOff,'') - CALL AddToObjNum('Sensible Effectiveness at 75% Heating Air Flow', htRecSens75) - CALL AddToObjNum('Latent Effectiveness at 75% Heating Air Flow', htRecLat75) CALL AddToObjFld('Sensible Effectiveness at 100% Cooling Air Flow', base + pvavsHeatRecSenEffOff,'') CALL AddToObjFld('Latent Effectiveness at 100% Cooling Air Flow', base + pvavsHeatRecLatEffOff,'') - CALL AddToObjNum('Sensible Effectiveness at 75% Cooling Air Flow', htRecSens75) - CALL AddToObjNum('Latent Effectiveness at 75% Cooling Air Flow', htRecLat75) CALL AddToObjFld('Supply Air Inlet Node Name', base + pvavsAirHandlerNameOff,' Outside Air Inlet') CALL AddToObjFld('Supply Air Outlet Node Name', base + pvavsAirHandlerNameOff,' Heat Recovery Supply Outlet') CALL AddToObjFld('Exhaust Air Inlet Node Name', base + pvavsAirHandlerNameOff,' Relief Air Outlet') @@ -12962,7 +13171,9 @@ SUBROUTINE CreateNewVAV CALL AddToObjStr('Frost Control Type','MinimumExhaustTemperature') CALL AddToObjStr('Threshold Temperature','1.7') CALL AddToObjStr('Initial Defrost Time Fraction','') - CALL AddToObjStr('Rate of Defrost Time Fraction Increase','',.TRUE.) + CALL AddToObjStr('Rate of Defrost Time Fraction Increase','') + CALL AddToObjStr('Economizer Lockout','') + CALL AddSenLatEffectCurve(base + pvavsAirHandlerNameOff, htRecSens75, htRecSens100, htRecLat75, htRecLat100) END IF IF (heatRecovery .NE. htrecNone) THEN IF (isEconoLowLimitBlank) THEN @@ -13105,7 +13316,9 @@ SUBROUTINE CreateNewUnitary LOGICAL :: isEconoLowLimitBlank LOGICAL :: isMinOARateAutosize REAL :: htRecSens75 +REAL :: htRecSens100 REAL :: htRecLat75 +REAL :: htRecLat100 CHARACTER(len=1) :: SchType INTEGER :: supFanPlacement=0 INTEGER :: supFanKind=0 @@ -14460,19 +14673,17 @@ SUBROUTINE CreateNewUnitary !HEAT EXCHANGER:AIR TO AIR:GENERIC IF (isHeatRecSensible) THEN htRecSens75 = StringToReal(FldVal(base + usHeatRecSenEffOff)) + 0.05 + htRecSens100 = StringToReal(FldVal(base + usHeatRecSenEffOff)) IF (htRecSens75 .GT. 1.) htRecSens75 = 1. + IF (htRecSens100 .GT. 1.) htRecSens100 = 1. CALL CreateNewObj('HeatExchanger:AirToAir:SensibleAndLatent') CALL AddToObjFld('Heat exchanger name', base + usAirHandlerNameOff,' Heat Recovery') CALL AddToObjStr('Availability Schedule Name',' ') CALL AddToObjFld('Nominal supply air flow rate {m3/s}', base + usMinOutsideFlowOff,'') CALL AddToObjFld('Sensible Effectiveness at 100% Heating Air Flow', base + usHeatRecSenEffOff,'') CALL AddToObjStr('Latent Effectiveness at 100% Heating Air Flow','0') - CALL AddToObjNum('Sensible Effectiveness at 75% Heating Air Flow', htRecSens75) - CALL AddToObjStr('Latent Effectiveness at 75% Heating Air Flow','0') CALL AddToObjFld('Sensible Effectiveness at 100% Cooling Air Flow', base + usHeatRecSenEffOff,'') CALL AddToObjStr('Latent Effectiveness at 100% Cooling Air Flow','0') - CALL AddToObjNum('Sensible Effectiveness at 75% Cooling Air Flow', htRecSens75) - CALL AddToObjStr('Latent Effectiveness at 75% Cooling Air Flow','0') CALL AddToObjFld('Supply Air Inlet Node Name', base + usAirHandlerNameOff,' Outside Air Inlet') CALL AddToObjFld('Supply Air Outlet Node Name', base + usAirHandlerNameOff,' Heat Recovery Supply Outlet') CALL AddToObjFld('Exhaust Air Inlet Node Name', base + usAirHandlerNameOff,' Relief Air Outlet') @@ -14483,25 +14694,27 @@ SUBROUTINE CreateNewUnitary CALL AddToObjStr('Frost Control Type','ExhaustOnly') CALL AddToObjStr('Threshold Temperature','-1.1') CALL AddToObjStr('Initial Defrost Time Fraction','0.167') - CALL AddToObjStr('Rate of Defrost Time Fraction Increase','0.024',.TRUE.) + CALL AddToObjStr('Rate of Defrost Time Fraction Increase','0.024') + CALL AddToObjStr('Economizer Lockout','') + CALL AddSenEffectCurve(base + usAirHandlerNameOff, htRecSens75, htRecSens100) END IF IF (isHeatRecEnthalpy) THEN htRecSens75 = StringToReal(FldVal(base + usHeatRecSenEffOff)) + 0.05 + htRecSens100 = StringToReal(FldVal(base + usHeatRecSenEffOff)) IF (htRecSens75 .GT. 1.) htRecSens75 = 1. + IF (htRecSens100 .GT. 1.) htRecSens100 = 1. htRecLat75 = StringToReal(FldVal(base + usHeatRecLatEffOff)) + 0.05 + htRecLat100 = StringToReal(FldVal(base + usHeatRecLatEffOff)) IF (htRecLat75 .GT. 1.) htRecLat75 = 1. + IF (htRecLat100 .GT. 1.) htRecLat100 = 1. CALL CreateNewObj('HeatExchanger:AirToAir:SensibleAndLatent') CALL AddToObjFld('Heat exchanger name', base + usAirHandlerNameOff,' Heat Recovery') CALL AddToObjStr('Availability Schedule Name',' ') CALL AddToObjFld('Nominal supply air flow rate {m3/s}', base + usMinOutsideFlowOff,'') CALL AddToObjFld('Sensible Effectiveness at 100% Heating Air Flow', base + usHeatRecSenEffOff,'') CALL AddToObjFld('Latent Effectiveness at 100% Heating Air Flow', base + usHeatRecLatEffOff,'') - CALL AddToObjNum('Sensible Effectiveness at 75% Heating Air Flow',htRecSens75) - CALL AddToObjNum('Latent Effectiveness at 75% Heating Air Flow', htRecLat75) CALL AddToObjFld('Sensible Effectiveness at 100% Cooling Air Flow', base + usHeatRecSenEffOff,'') CALL AddToObjFld('Latent Effectiveness at 100% Cooling Air Flow', base + usHeatRecLatEffOff,'') - CALL AddToObjNum('Sensible Effectiveness at 75% Cooling Air Flow',htRecSens75) - CALL AddToObjNum('Latent Effectiveness at 75% Cooling Air Flow', htRecLat75) CALL AddToObjFld('Supply Air Inlet Node Name', base + usAirHandlerNameOff,' Outside Air Inlet') CALL AddToObjFld('Supply Air Outlet Node Name', base + usAirHandlerNameOff,' Heat Recovery Supply Outlet') CALL AddToObjFld('Exhaust Air Inlet Node Name', base + usAirHandlerNameOff,' Relief Air Outlet') @@ -14512,7 +14725,9 @@ SUBROUTINE CreateNewUnitary CALL AddToObjStr('Frost Control Type','MinimumExhaustTemperature') CALL AddToObjStr('Threshold Temperature','1.7') CALL AddToObjStr('Initial Defrost Time Fraction','') - CALL AddToObjStr('Rate of Defrost Time Fraction Increase','',.TRUE.) + CALL AddToObjStr('Rate of Defrost Time Fraction Increase','') + CALL AddToObjStr('Economizer Lockout','') + CALL AddSenLatEffectCurve(base + usAirHandlerNameOff, htRecSens75, htRecSens100, htRecLat75, htRecLat100) END IF IF (.NOT. isHeatRecNone) THEN IF (isEconoLowLimitBlank) THEN @@ -15392,7 +15607,9 @@ SUBROUTINE CreateNewUnitary ENDIF IF (isHeatRecSensible) THEN htRecSens75 = StringToReal(FldVal(base + uhpsHeatRecSenEffOff)) + 0.05 + htRecSens100 = StringToReal(FldVal(base + uhpsHeatRecSenEffOff)) IF (htRecSens75 .GT. 1.) htRecSens75 = 1. + IF (htRecSens100 .GT. 1.) htRecSens100 = 1. !Object ==> HeatExchanger:AirToAir:SensibleAndLatent CALL CreateNewObj('HeatExchanger:AirToAir:SensibleAndLatent') CALL AddToObjFld('Heat exchanger name', base + uhpsAirHandlerNameOff,' Heat Recovery') @@ -15400,12 +15617,8 @@ SUBROUTINE CreateNewUnitary CALL AddToObjFld('Nominal supply air flow rate {m3/s}', base + uhpsMinOutsideFlowOff,'') CALL AddToObjFld('Sensible Effectiveness at 100% Heating Air Flow', base + uhpsHeatRecSenEffOff,'') CALL AddToObjStr('Latent Effectiveness at 100% Heating Air Flow','0') - CALL AddToObjNum('Sensible Effectiveness at 75% Heating Air Flow', htRecSens75) - CALL AddToObjStr('Latent Effectiveness at 75% Heating Air Flow','0') CALL AddToObjFld('Sensible Effectiveness at 100% Cooling Air Flow', base + uhpsHeatRecSenEffOff,'') CALL AddToObjStr('Latent Effectiveness at 100% Cooling Air Flow','0') - CALL AddToObjNum('Sensible Effectiveness at 75% Cooling Air Flow', htRecSens75) - CALL AddToObjStr('Latent Effectiveness at 75% Cooling Air Flow','0') CALL AddToObjFld('Supply Air Inlet Node Name', base + uhpsAirHandlerNameOff,' Outside Air Inlet') CALL AddToObjFld('Supply Air Outlet Node Name', base + uhpsAirHandlerNameOff,' Heat Recovery Supply Outlet') CALL AddToObjFld('Exhaust Air Inlet Node Name', base + uhpsAirHandlerNameOff,' Relief Air Outlet') @@ -15416,13 +15629,19 @@ SUBROUTINE CreateNewUnitary CALL AddToObjStr('Frost Control Type','ExhaustOnly') CALL AddToObjStr('Threshold Temperature','-1.1') CALL AddToObjStr('Initial Defrost Time Fraction','0.167') - CALL AddToObjStr('Rate of Defrost Time Fraction Increase','0.024',.TRUE.) + CALL AddToObjStr('Rate of Defrost Time Fraction Increase','0.024') + CALL AddToObjStr('Economizer Lockout','') + CALL AddSenEffectCurve(base + uhpsAirHandlerNameOff, htRecSens75, htRecSens100) END IF IF (isHeatRecEnthalpy) THEN htRecSens75 = StringToReal(FldVal(base + uhpsHeatRecSenEffOff)) + 0.05 + htRecSens100 = StringToReal(FldVal(base + uhpsHeatRecSenEffOff)) IF (htRecSens75 .GT. 1.) htRecSens75 = 1. + IF (htRecSens100 .GT. 1.) htRecSens100 = 1. htRecLat75 = StringToReal(FldVal(base + uhpsHeatRecLatEffOff)) + 0.05 + htRecLat100 = StringToReal(FldVal(base + uhpsHeatRecLatEffOff)) IF (htRecLat75 .GT. 1.) htRecLat75 = 1. + IF (htRecLat100 .GT. 1.) htRecLat100 = 1. !Object ==> HeatExchanger:AirToAir:SensibleAndLatent CALL CreateNewObj('HeatExchanger:AirToAir:SensibleAndLatent') CALL AddToObjFld('Heat exchanger name', base + uhpsAirHandlerNameOff,' Heat Recovery') @@ -15430,12 +15649,8 @@ SUBROUTINE CreateNewUnitary CALL AddToObjFld('Nominal supply air flow rate {m3/s}', base + uhpsMinOutsideFlowOff,'') CALL AddToObjFld('Sensible Effectiveness at 100% Heating Air Flow', base + uhpsHeatRecSenEffOff,'') CALL AddToObjFld('Latent Effectiveness at 100% Heating Air Flow', base + uhpsHeatRecLatEffOff,'') - CALL AddToObjNum('Sensible Effectiveness at 75% Heating Air Flow',htRecSens75) - CALL AddToObjNum('Latent Effectiveness at 75% Heating Air Flow', htRecLat75) CALL AddToObjFld('Sensible Effectiveness at 100% Cooling Air Flow', base + uhpsHeatRecSenEffOff,'') CALL AddToObjFld('Latent Effectiveness at 100% Cooling Air Flow', base + uhpsHeatRecLatEffOff,'') - CALL AddToObjNum('Sensible Effectiveness at 75% Cooling Air Flow',htRecSens75) - CALL AddToObjNum('Latent Effectiveness at 75% Cooling Air Flow', htRecLat75) CALL AddToObjFld('Supply Air Inlet Node Name', base + uhpsAirHandlerNameOff,' Outside Air Inlet') CALL AddToObjFld('Supply Air Outlet Node Name', base + uhpsAirHandlerNameOff,' Heat Recovery Supply Outlet') CALL AddToObjFld('Exhaust Air Inlet Node Name', base + uhpsAirHandlerNameOff,' Relief Air Outlet') @@ -15446,7 +15661,9 @@ SUBROUTINE CreateNewUnitary CALL AddToObjStr('Frost Control Type','MinimumExhaustTemperature') CALL AddToObjStr('Threshold Temperature','1.7') CALL AddToObjStr('Initial Defrost Time Fraction','') - CALL AddToObjStr('Rate of Defrost Time Fraction Increase','',.TRUE.) + CALL AddToObjStr('Rate of Defrost Time Fraction Increase','') + CALL AddToObjStr('Economizer Lockout','') + CALL AddSenLatEffectCurve(base + uhpsAirHandlerNameOff, htRecSens75, htRecSens100, htRecLat75, htRecLat100) END IF IF (.NOT. isHeatRecNone) THEN IF (isEconoLowLimitBlank) THEN @@ -16103,6 +16320,7 @@ SUBROUTINE CreateNewUnitary CALL AddToObjStr('No Load Fraction of Autosized Heating Supply Air Flow Rate','') CALL AddToObjStr('No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W','') CALL AddToObjStr('No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W','') + CALL AddToObjStr('No Load Supply Air Flow Rate Control Set To Low Speed','') CALL AddToObjStr('Maximum Supply Air Temperature {C}', 'Autosize') CALL AddToObjFld('Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C}', base + ussSuppReHeatMaxODBOff,'') CALL AddToObjStr('Outdoor Dry-Bulb Temperature Sensor Node Name', '') @@ -16704,12 +16922,8 @@ SUBROUTINE CreateNewUnitary CALL AddToObjStr('Nominal Supply Air Flow Rate {m3/s}','autosize') CALL AddToObjStr('Sensible Effectiveness at 100% Heating Air Flow {dimensionless}','0.7') CALL AddToObjStr('Latent Effectiveness at 100% Heating Air Flow {dimensionless}','0.0') - CALL AddToObjStr('Sensible Effectiveness at 75% Heating Air Flow {dimensionless}','0.75') - CALL AddToObjStr('Latent Effectiveness at 75% Heating Air Flow {dimensionless}','0.0') CALL AddToObjStr('Sensible Effectiveness at 100% Cooling Air Flow {dimensionless}','0.7') CALL AddToObjStr('Latent Effectiveness at 100% Cooling Air Flow {dimensionless}','0.0') - CALL AddToObjStr('Sensible Effectiveness at 75% Cooling Air Flow {dimensionless}','0.75') - CALL AddToObjStr('Latent Effectiveness at 75% Cooling Air Flow {dimensionless}','0.0') CALL AddToObjFld('Supply Air Inlet Node Name', base + ussAirHandlerNameOff, TRIM(coolCoilUnitInlet)) CALL AddToObjFld('Supply Air Outlet Node Name', base + ussAirHandlerNameOff,' HX Supply Outlet Node') CALL AddToObjFld('Exhaust Air Inlet Node Name', base + ussAirHandlerNameOff,' Cooling Coil Outlet Node') @@ -16722,7 +16936,8 @@ SUBROUTINE CreateNewUnitary CALL AddToObjStr('Initial Defrost Time Fraction {dimensionless}','') CALL AddToObjStr('Rate of Defrost Time Fraction Increase {1/K}','') ! MJW ???? - Not sure - CALL AddToObjStr('Economizer Lockout','No',.TRUE.) + CALL AddToObjStr('Economizer Lockout','No') + CALL AddSenEffectCurve(base + ussAirHandlerNameOff, 0.75, 0.7) !***Coil:Cooling:Water CALL CreateNewObj('Coil:Cooling:Water') CALL AddToObjFld('Name', base + ussAirHandlerNameOff,' Cooling Coil') @@ -16755,12 +16970,8 @@ SUBROUTINE CreateNewUnitary CALL AddToObjStr('Nominal Supply Air Flow Rate {m3/s}','autosize') CALL AddToObjStr('Sensible Effectiveness at 100% Heating Air Flow {dimensionless}','0.7') CALL AddToObjStr('Latent Effectiveness at 100% Heating Air Flow {dimensionless}','0.0') - CALL AddToObjStr('Sensible Effectiveness at 75% Heating Air Flow {dimensionless}','0.75') - CALL AddToObjStr('Latent Effectiveness at 75% Heating Air Flow {dimensionless}','0.0') CALL AddToObjStr('Sensible Effectiveness at 100% Cooling Air Flow {dimensionless}','0.7') CALL AddToObjStr('Latent Effectiveness at 100% Cooling Air Flow {dimensionless}','0.0') - CALL AddToObjStr('Sensible Effectiveness at 75% Cooling Air Flow {dimensionless}','0.75') - CALL AddToObjStr('Latent Effectiveness at 75% Cooling Air Flow {dimensionless}','0.0') CALL AddToObjFld('Supply Air Inlet Node Name', base + ussAirHandlerNameOff, TRIM(coolCoilUnitInlet)) CALL AddToObjFld('Supply Air Outlet Node Name', base + ussAirHandlerNameOff,' HX Supply Outlet Node') CALL AddToObjFld('Exhaust Air Inlet Node Name', base + ussAirHandlerNameOff,' Cooling Coil Outlet Node') @@ -16773,7 +16984,8 @@ SUBROUTINE CreateNewUnitary CALL AddToObjStr('Initial Defrost Time Fraction {dimensionless}','') CALL AddToObjStr('Rate of Defrost Time Fraction Increase {1/K}','') ! MJW ???? - Not sure - CALL AddToObjStr('Economizer Lockout','No',.TRUE.) + CALL AddToObjStr('Economizer Lockout','No') + CALL AddSenEffectCurve(base + ussAirHandlerNameOff, 0.75, 0.7) !***Coil:Cooling:DX:SingleSpeed CALL CreateNewObj('Coil:Cooling:DX:SingleSpeed') CALL AddToObjFld('Name', base + ussAirHandlerNameOff,' Cooling Coil') @@ -17965,7 +18177,9 @@ SUBROUTINE CreateNewUnitary ENDIF IF (isHeatRecSensible) THEN htRecSens75 = StringToReal(FldVal(base + ussHeatRecSenEffOff)) + 0.05 + htRecSens100 = StringToReal(FldVal(base + ussHeatRecSenEffOff)) IF (htRecSens75 .GT. 1.) htRecSens75 = 1. + IF (htRecSens100 .GT. 1.) htRecSens100 = 1. !Object ==> HeatExchanger:AirToAir:SensibleAndLatent CALL CreateNewObj('HeatExchanger:AirToAir:SensibleAndLatent') CALL AddToObjFld('Heat exchanger name', base + ussAirHandlerNameOff,' Heat Recovery') @@ -17973,12 +18187,8 @@ SUBROUTINE CreateNewUnitary CALL AddToObjFld('Nominal supply air flow rate {m3/s}', base + ussMinOutsideFlowOff,'') CALL AddToObjFld('Sensible Effectiveness at 100% Heating Air Flow', base + ussHeatRecSenEffOff,'') CALL AddToObjStr('Latent Effectiveness at 100% Heating Air Flow','0') - CALL AddToObjNum('Sensible Effectiveness at 75% Heating Air Flow', htRecSens75) - CALL AddToObjStr('Latent Effectiveness at 75% Heating Air Flow','0') CALL AddToObjFld('Sensible Effectiveness at 100% Cooling Air Flow', base + ussHeatRecSenEffOff,'') CALL AddToObjStr('Latent Effectiveness at 100% Cooling Air Flow','0') - CALL AddToObjNum('Sensible Effectiveness at 75% Cooling Air Flow', htRecSens75) - CALL AddToObjStr('Latent Effectiveness at 75% Cooling Air Flow','0') CALL AddToObjFld('Supply Air Inlet Node Name', base + ussAirHandlerNameOff,' Outdoor Air Inlet') CALL AddToObjFld('Supply Air Outlet Node Name', base + ussAirHandlerNameOff,' Heat Recovery Supply Outlet') CALL AddToObjFld('Exhaust Air Inlet Node Name', base + ussAirHandlerNameOff,' Relief Air Outlet') @@ -17989,13 +18199,19 @@ SUBROUTINE CreateNewUnitary CALL AddToObjStr('Frost Control Type','ExhaustOnly') CALL AddToObjStr('Threshold Temperature','-1.1') CALL AddToObjStr('Initial Defrost Time Fraction','0.167') - CALL AddToObjStr('Rate of Defrost Time Fraction Increase','0.024',.TRUE.) + CALL AddToObjStr('Rate of Defrost Time Fraction Increase','0.024') + CALL AddToObjStr('Economizer Lockout','') + CALL AddSenEffectCurve(base + ussAirHandlerNameOff, htRecSens75, htRecSens100) END IF IF (isHeatRecEnthalpy) THEN htRecSens75 = StringToReal(FldVal(base + ussHeatRecSenEffOff)) + 0.05 + htRecSens100 = StringToReal(FldVal(base + ussHeatRecSenEffOff)) IF (htRecSens75 .GT. 1.) htRecSens75 = 1. + IF (htRecSens100 .GT. 1.) htRecSens100 = 1. htRecLat75 = StringToReal(FldVal(base + ussHeatRecLatEffOff)) + 0.05 + htRecLat100 = StringToReal(FldVal(base + ussHeatRecLatEffOff)) IF (htRecLat75 .GT. 1.) htRecLat75 = 1. + IF (htRecLat100 .GT. 1.) htRecLat100 = 1. !Object ==> HeatExchanger:AirToAir:SensibleAndLatent CALL CreateNewObj('HeatExchanger:AirToAir:SensibleAndLatent') CALL AddToObjFld('Heat exchanger name', base + ussAirHandlerNameOff,' Heat Recovery') @@ -18003,12 +18219,8 @@ SUBROUTINE CreateNewUnitary CALL AddToObjFld('Nominal supply air flow rate {m3/s}', base + ussMinOutsideFlowOff,'') CALL AddToObjFld('Sensible Effectiveness at 100% Heating Air Flow', base + ussHeatRecSenEffOff,'') CALL AddToObjFld('Latent Effectiveness at 100% Heating Air Flow', base + ussHeatRecLatEffOff,'') - CALL AddToObjNum('Sensible Effectiveness at 75% Heating Air Flow',htRecSens75) - CALL AddToObjNum('Latent Effectiveness at 75% Heating Air Flow', htRecLat75) CALL AddToObjFld('Sensible Effectiveness at 100% Cooling Air Flow', base + ussHeatRecSenEffOff,'') CALL AddToObjFld('Latent Effectiveness at 100% Cooling Air Flow', base + ussHeatRecLatEffOff,'') - CALL AddToObjNum('Sensible Effectiveness at 75% Cooling Air Flow',htRecSens75) - CALL AddToObjNum('Latent Effectiveness at 75% Cooling Air Flow', htRecLat75) CALL AddToObjFld('Supply Air Inlet Node Name', base + ussAirHandlerNameOff,' Outdoor Air Inlet') CALL AddToObjFld('Supply Air Outlet Node Name', base + ussAirHandlerNameOff,' Heat Recovery Supply Outlet') CALL AddToObjFld('Exhaust Air Inlet Node Name', base + ussAirHandlerNameOff,' Relief Air Outlet') @@ -18019,7 +18231,9 @@ SUBROUTINE CreateNewUnitary CALL AddToObjStr('Frost Control Type','MinimumExhaustTemperature') CALL AddToObjStr('Threshold Temperature','1.7') CALL AddToObjStr('Initial Defrost Time Fraction','') - CALL AddToObjStr('Rate of Defrost Time Fraction Increase','',.TRUE.) + CALL AddToObjStr('Rate of Defrost Time Fraction Increase','') + CALL AddToObjStr('Economizer Lockout','') + CALL AddSenLatEffectCurve(base + ussAirHandlerNameOff, htRecSens75, htRecSens100, htRecLat75, htRecLat100) END IF IF (.NOT. isHeatRecNone) THEN IF (isEconoLowLimitBlank) THEN @@ -18506,7 +18720,9 @@ SUBROUTINE CreateNewConstVol INTEGER :: iInt INTEGER :: supFanPlacement=0 REAL :: htRecSens75 +REAL :: htRecSens100 REAL :: htRecLat75 +REAL :: htRecLat100 LOGICAL :: isDehumidifyNone INTEGER :: dehumidCtrlKind = 0 LOGICAL :: isHumidifierNone @@ -19675,12 +19891,8 @@ SUBROUTINE CreateNewConstVol CALL AddToObjStr('Nominal Supply Air Flow Rate {m3/s}','autosize') CALL AddToObjStr('Sensible Effectiveness at 100% Heating Air Flow {dimensionless}','0.7') CALL AddToObjStr('Latent Effectiveness at 100% Heating Air Flow {dimensionless}','0.0') - CALL AddToObjStr('Sensible Effectiveness at 75% Heating Air Flow {dimensionless}','0.75') - CALL AddToObjStr('Latent Effectiveness at 75% Heating Air Flow {dimensionless}','0.0') CALL AddToObjStr('Sensible Effectiveness at 100% Cooling Air Flow {dimensionless}','0.7') CALL AddToObjStr('Latent Effectiveness at 100% Cooling Air Flow {dimensionless}','0.0') - CALL AddToObjStr('Sensible Effectiveness at 75% Cooling Air Flow {dimensionless}','0.75') - CALL AddToObjStr('Latent Effectiveness at 75% Cooling Air Flow {dimensionless}','0.0') CALL AddToObjStr('Supply Air Inlet Node Name', TRIM(coolCoilUnitInlet)) CALL AddToObjFld('Supply Air Outlet Node Name', base + cvsAirHandlerNameOff,' HX Supply Outlet Node') CALL AddToObjFld('Exhaust Air Inlet Node Name', base + cvsAirHandlerNameOff,' Cooling Coil Outlet Node') @@ -19693,7 +19905,8 @@ SUBROUTINE CreateNewConstVol CALL AddToObjStr('Initial Defrost Time Fraction {dimensionless}','') CALL AddToObjStr('Rate of Defrost Time Fraction Increase {1/K}','') ! MJW ???? - Not sure - CALL AddToObjStr('Economizer Lockout','No',.TRUE.) + CALL AddToObjStr('Economizer Lockout','No') + CALL AddSenEffectCurve(base + cvsAirHandlerNameOff, 0.75, 0.7) !***Coil:Cooling:Water CALL CreateNewObj('Coil:Cooling:Water') CALL AddToObjFld('Name', base + cvsAirHandlerNameOff,' Cooling Coil') @@ -20234,7 +20447,9 @@ SUBROUTINE CreateNewConstVol END IF IF (heatRecovery .EQ. htrecSens) THEN htRecSens75 = StringToReal(FldVal(base + cvsHeatRecSenEffOff)) + 0.05 + htRecSens100 = StringToReal(FldVal(base + cvsHeatRecSenEffOff)) IF (htRecSens75 .GT. 1.) htRecSens75 = 1. + IF (htRecSens100 .GT. 1.) htRecSens100 = 1. !***HeatExchanger:AirToAir:SensibleAndLatent CALL CreateNewObj('HeatExchanger:AirToAir:SensibleAndLatent') CALL AddToObjFld('Heat exchanger name', base + cvsAirHandlerNameOff,' Heat Recovery') @@ -20242,12 +20457,8 @@ SUBROUTINE CreateNewConstVol CALL AddToObjStr('Nominal supply air flow rate {m3/s}', 'autosize') CALL AddToObjFld('Sensible Effectiveness at 100% Heating Air Flow', base + cvsHeatRecSenEffOff,'') CALL AddToObjStr('Latent Effectiveness at 100% Heating Air Flow','0') - CALL AddToObjNum('Sensible Effectiveness at 75% Heating Air Flow', htRecSens75) - CALL AddToObjStr('Latent Effectiveness at 75% Heating Air Flow','0') CALL AddToObjFld('Sensible Effectiveness at 100% Cooling Air Flow', base + cvsHeatRecSenEffOff,'') CALL AddToObjStr('Latent Effectiveness at 100% Cooling Air Flow','0') - CALL AddToObjNum('Sensible Effectiveness at 75% Cooling Air Flow', htRecSens75) - CALL AddToObjStr('Latent Effectiveness at 75% Cooling Air Flow','0') CALL AddToObjFld('Supply Air Inlet Node Name', base + cvsAirHandlerNameOff,' Outdoor Air Inlet') CALL AddToObjFld('Supply Air Outlet Node Name', base + cvsAirHandlerNameOff,' Heat Recovery Supply Outlet') CALL AddToObjFld('Exhaust Air Inlet Node Name', base + cvsAirHandlerNameOff,' Relief Air Outlet') @@ -20259,12 +20470,17 @@ SUBROUTINE CreateNewConstVol CALL AddToObjStr('Threshold Temperature','1.7') CALL AddToObjStr('Initial Defrost Time Fraction','0.083') CALL AddToObjStr('Rate of Defrost Time Fraction Increase','0.012') - CALL AddToObjStr('Economizer Lockout','Yes',.TRUE.) + CALL AddToObjStr('Economizer Lockout','Yes') + CALL AddSenEffectCurve(base + cvsAirHandlerNameOff, htRecSens75, htRecSens100) ELSEIF (heatRecovery .EQ. htrecEnth) THEN htRecSens75 = StringToReal(FldVal(base + cvsHeatRecSenEffOff)) + 0.05 + htRecSens100 = StringToReal(FldVal(base + cvsHeatRecSenEffOff)) IF (htRecSens75 .GT. 1.) htRecSens75 = 1. + IF (htRecSens100 .GT. 1.) htRecSens100 = 1. htRecLat75 = StringToReal(FldVal(base + cvsHeatRecLatEffOff)) + 0.05 + htRecLat100 = StringToReal(FldVal(base + cvsHeatRecLatEffOff)) IF (htRecLat75 .GT. 1.) htRecLat75 = 1. + IF (htRecLat100 .GT. 1.) htRecLat100 = 1. !***HeatExchanger:AirToAir:SensibleAndLatent CALL CreateNewObj('HeatExchanger:AirToAir:SensibleAndLatent') CALL AddToObjFld('Heat exchanger name', base + cvsAirHandlerNameOff,' Heat Recovery') @@ -20272,12 +20488,8 @@ SUBROUTINE CreateNewConstVol CALL AddToObjFld('Nominal supply air flow rate {m3/s}', base + cvsMinOutsideFlowOff,'') CALL AddToObjFld('Sensible Effectiveness at 100% Heating Air Flow', base + cvsHeatRecSenEffOff,'') CALL AddToObjFld('Latent Effectiveness at 100% Heating Air Flow', base + cvsHeatRecLatEffOff,'') - CALL AddToObjNum('Sensible Effectiveness at 75% Heating Air Flow', htRecSens75) - CALL AddToObjNum('Latent Effectiveness at 75% Heating Air Flow', htRecLat75) CALL AddToObjFld('Sensible Effectiveness at 100% Cooling Air Flow', base + cvsHeatRecSenEffOff,'') CALL AddToObjFld('Latent Effectiveness at 100% Cooling Air Flow', base + cvsHeatRecLatEffOff,'') - CALL AddToObjNum('Sensible Effectiveness at 75% Cooling Air Flow', htRecSens75) - CALL AddToObjNum('Latent Effectiveness at 75% Cooling Air Flow', htRecLat75) CALL AddToObjFld('Supply Air Inlet Node Name', base + cvsAirHandlerNameOff,' Outdoor Air Inlet') CALL AddToObjFld('Supply Air Outlet Node Name', base + cvsAirHandlerNameOff,' Heat Recovery Supply Outlet') CALL AddToObjFld('Exhaust Air Inlet Node Name', base + cvsAirHandlerNameOff,' Relief Air Outlet') @@ -20289,7 +20501,8 @@ SUBROUTINE CreateNewConstVol CALL AddToObjStr('Threshold Temperature','1.7') CALL AddToObjStr('Initial Defrost Time Fraction','0.083') CALL AddToObjStr('Rate of Defrost Time Fraction Increase','0.012') - CALL AddToObjStr('Economizer Lockout','Yes',.TRUE.) + CALL AddToObjStr('Economizer Lockout','Yes') + CALL AddSenLatEffectCurve(base + cvsAirHandlerNameOff, htRecSens75, htRecSens100, htRecLat75, htRecLat100) END IF IF (heatRecovery .NE. htrecNone) THEN IF (isEconoLowLimitBlank) THEN @@ -20449,7 +20662,9 @@ SUBROUTINE CreateNewDualDuct INTEGER :: hotFanKind=0 LOGICAL :: isMinOARateAutosize REAL :: htRecSens75 +REAL :: htRecSens100 REAL :: htRecLat75 +REAL :: htRecLat100 LOGICAL :: isDehumidifyNone INTEGER :: dehumidCtrlKind = 0 LOGICAL :: isHumidifierNone @@ -22439,19 +22654,17 @@ SUBROUTINE CreateNewDualDuct IF (heatRecovery .EQ. htrecSens) THEN !HEAT EXCHANGER:AIR TO AIR:GENERIC ~ line 685 htRecSens75 = StringToReal(FldVal(base + ddsHeatRecSenEffOff)) + 0.05 + htRecSens100 = StringToReal(FldVal(base + ddsHeatRecSenEffOff)) IF (htRecSens75 .GT. 1.) htRecSens75 = 1. + IF (htRecSens100 .GT. 1.) htRecSens100 = 1. CALL CreateNewObj('HeatExchanger:AirToAir:SensibleAndLatent') CALL AddToObjFld('Heat exchanger name', base + ddsAirHandlerNameOff,' Heat Recovery') CALL AddToObjStr('Availability Schedule Name',' ') CALL AddToObjFld('Nominal supply air flow rate {m3/s}', base + ddsMinOutsideFlowOff,'') CALL AddToObjFld('Sensible Effectiveness at 100% Heating Air Flow', base + ddsHeatRecSenEffOff,'') CALL AddToObjStr('Latent Effectiveness at 100% Heating Air Flow','0') - CALL AddToObjNum('Sensible Effectiveness at 75% Heating Air Flow', htRecSens75) - CALL AddToObjStr('Latent Effectiveness at 75% Heating Air Flow','0') CALL AddToObjFld('Sensible Effectiveness at 100% Cooling Air Flow', base + ddsHeatRecSenEffOff,'') CALL AddToObjStr('Latent Effectiveness at 100% Cooling Air Flow','0') - CALL AddToObjNum('Sensible Effectiveness at 75% Cooling Air Flow', htRecSens75) - CALL AddToObjStr('Latent Effectiveness at 75% Cooling Air Flow','0') CALL AddToObjFld('Supply Air Inlet Node Name', base + ddsAirHandlerNameOff,' Outside Air Inlet') CALL AddToObjFld('Supply Air Outlet Node Name', base + ddsAirHandlerNameOff,' Heat Recovery Supply Outlet') CALL AddToObjFld('Exhaust Air Inlet Node Name', base + ddsAirHandlerNameOff,' Relief Air Outlet') @@ -22462,25 +22675,27 @@ SUBROUTINE CreateNewDualDuct CALL AddToObjStr('Frost Control Type','ExhaustOnly') CALL AddToObjStr('Threshold Temperature','-1.1') CALL AddToObjStr('Initial Defrost Time Fraction','0.167') - CALL AddToObjStr('Rate of Defrost Time Fraction Increase','0.024',.TRUE.) + CALL AddToObjStr('Rate of Defrost Time Fraction Increase','0.024') + CALL AddToObjStr('Economizer Lockout','') + CALL AddSenEffectCurve(base + ddsAirHandlerNameOff, htRecSens75, htRecSens100) ELSEIF (heatRecovery .EQ. htrecEnth) THEN !HEAT EXCHANGER:AIR TO AIR:GENERIC ~ line 708 htRecSens75 = StringToReal(FldVal(base + ddsHeatRecSenEffOff)) + 0.05 + htRecSens100 = StringToReal(FldVal(base + ddsHeatRecSenEffOff)) IF (htRecSens75 .GT. 1.) htRecSens75 = 1. + IF (htRecSens100 .GT. 1.) htRecSens100 = 1. htRecLat75 = StringToReal(FldVal(base + ddsHeatRecLatEffOff)) + 0.05 + htRecLat100 = StringToReal(FldVal(base + ddsHeatRecLatEffOff)) IF (htRecLat75 .GT. 1.) htRecLat75 = 1. + IF (htRecLat100 .GT. 1.) htRecLat100 = 1. CALL CreateNewObj('HeatExchanger:AirToAir:SensibleAndLatent') CALL AddToObjFld('Heat exchanger name', base + ddsAirHandlerNameOff,' Heat Recovery') CALL AddToObjStr('Availability Schedule Name',' ') CALL AddToObjFld('Nominal supply air flow rate {m3/s}', base + ddsMinOutsideFlowOff,'') CALL AddToObjFld('Sensible Effectiveness at 100% Heating Air Flow', base + ddsHeatRecSenEffOff,'') CALL AddToObjFld('Latent Effectiveness at 100% Heating Air Flow', base + ddsHeatRecLatEffOff,'') - CALL AddToObjNum('Sensible Effectiveness at 75% Heating Air Flow', htRecSens75) - CALL AddToObjNum('Latent Effectiveness at 75% Heating Air Flow', htRecLat75) CALL AddToObjFld('Sensible Effectiveness at 100% Cooling Air Flow', base + ddsHeatRecSenEffOff,'') CALL AddToObjFld('Latent Effectiveness at 100% Cooling Air Flow', base + ddsHeatRecLatEffOff,'') - CALL AddToObjNum('Sensible Effectiveness at 75% Cooling Air Flow', htRecSens75) - CALL AddToObjNum('Latent Effectiveness at 75% Cooling Air Flow', htRecLat75) CALL AddToObjFld('Supply Air Inlet Node Name', base + ddsAirHandlerNameOff,' Outside Air Inlet') CALL AddToObjFld('Supply Air Outlet Node Name', base + ddsAirHandlerNameOff,' Heat Recovery Supply Outlet') CALL AddToObjFld('Exhaust Air Inlet Node Name', base + ddsAirHandlerNameOff,' Relief Air Outlet') @@ -22491,7 +22706,9 @@ SUBROUTINE CreateNewDualDuct CALL AddToObjStr('Frost Control Type','MinimumExhaustTemperature') CALL AddToObjStr('Threshold Temperature','1.7') CALL AddToObjStr('Initial Defrost Time Fraction','') - CALL AddToObjStr('Rate of Defrost Time Fraction Increase','',.TRUE.) + CALL AddToObjStr('Rate of Defrost Time Fraction Increase','') + CALL AddToObjStr('Economizer Lockout','') + CALL AddSenLatEffectCurve(base + ddsAirHandlerNameOff, htRecSens75, htRecSens100, htRecLat75, htRecLat100) END IF !SET POINT MANAGER:SCHEDULED ~ line 734 IF (heatRecovery .NE. htrecNone) THEN @@ -24022,12 +24239,8 @@ SUBROUTINE CreateFanCoil CALL AddToObjStr('Nominal Supply Air Flow Rate {m3/s}','autosize') CALL AddToObjStr('Sensible Effectiveness at 100% Heating Air Flow {dimensionless}','0.7') CALL AddToObjStr('Latent Effectiveness at 100% Heating Air Flow {dimensionless}','0.0') - CALL AddToObjStr('Sensible Effectiveness at 75% Heating Air Flow {dimensionless}','0.75') - CALL AddToObjStr('Latent Effectiveness at 75% Heating Air Flow {dimensionless}','0.0') CALL AddToObjStr('Sensible Effectiveness at 100% Cooling Air Flow {dimensionless}','0.7') CALL AddToObjStr('Latent Effectiveness at 100% Cooling Air Flow {dimensionless}','0.0') - CALL AddToObjStr('Sensible Effectiveness at 75% Cooling Air Flow {dimensionless}','0.75') - CALL AddToObjStr('Latent Effectiveness at 75% Cooling Air Flow {dimensionless}','0.0') CALL AddToObjFld('Supply Air Inlet Node Name', base + fczNameOff,' Supply Fan Outlet') CALL AddToObjFld('Supply Air Outlet Node Name', base + fczNameOff,' HX Supply Outlet') CALL AddToObjFld('Exhaust Air Inlet Node Name', base + fczNameOff,' HX Exhaust Inlet') @@ -24040,7 +24253,8 @@ SUBROUTINE CreateFanCoil CALL AddToObjStr('Initial Defrost Time Fraction {dimensionless}','') CALL AddToObjStr('Rate of Defrost Time Fraction Increase {1/K}','') ! MJW ???? - Not sure - CALL AddToObjStr('Economizer Lockout','No',.TRUE.) + CALL AddToObjStr('Economizer Lockout','No') + CALL AddSenEffectCurve(base + fczNameOff, 0.75, 0.7) CALL CreateNewObj('Coil:Cooling:Water') CALL AddToObjFld('Name', base + fczNameOff,' Cooling Coil') CALL AddToObjFld('Availability Schedule Name', base + fczCoolAvailSchedNameOff,'') @@ -25050,6 +25264,7 @@ SUBROUTINE CreatePTAC CALL AddToObjFld('No Load Supply Air Flow Rate {m3/s}', & base + ptaczSupplyNoLoadFlowRateOff,'') END IF + CALL AddToObjStr('No Load Supply Air Flow Rate Control Set To Low Speed','') IF (isDedOutAirNameBlank) THEN CALL AddToObjStr('Cooling Outdoor Air Flow Rate {m3/s}','autosize') CALL AddToObjStr('Heating Outdoor Air Flow Rate {m3/s}','autosize') @@ -25657,6 +25872,7 @@ SUBROUTINE CreatePTHP CALL AddToObjFld('No Load Supply Air Flow Rate {m3/s}', & base + pthpzSupplyNoLoadFlowRateOff,'') END IF + CALL AddToObjStr('No Load Supply Air Flow Rate Control Set To Low Speed','') IF (isDedOutAirNameBlank) THEN CALL AddToObjStr('Cooling Outdoor Air Flow Rate {m3/s}','autosize') CALL AddToObjStr('Heating Outdoor Air Flow Rate {m3/s}','autosize') @@ -30025,6 +30241,7 @@ SUBROUTINE CreateWaterAirHP CALL AddToObjStr('Heating Supply Air Flow Rate {m3/s}','autosize') CALL AddToObjFld('No Load Supply Air Flow Rate {m3/s}', & base + wahpSupplyNoLoadFlowRateOff,'') + CALL AddToObjStr('No Load Supply Air Flow Rate Control Set To Low Speed','') IF (isDedOutAirNameBlank) THEN CALL AddToObjStr('Cooling Outdoor Air Flow Rate {m3/s}','autosize') CALL AddToObjStr('Heating Outdoor Air Flow Rate {m3/s}','autosize') @@ -31210,7 +31427,9 @@ SUBROUTINE CreateDOAS INTEGER :: iInt INTEGER :: supFanPlacement=0 REAL :: htRecSens75 +REAL :: htRecSens100 REAL :: htRecLat75 +REAL :: htRecLat100 LOGICAL :: isDehumidifyNone INTEGER :: dehumidCtrlKind = 0 LOGICAL :: isHumidifierNone @@ -32214,12 +32433,8 @@ SUBROUTINE CreateDOAS CALL AddToObjStr('Nominal Supply Air Flow Rate {m3/s}','autosize') CALL AddToObjStr('Sensible Effectiveness at 100% Heating Air Flow {dimensionless}','0.7') CALL AddToObjStr('Latent Effectiveness at 100% Heating Air Flow {dimensionless}','0.0') - CALL AddToObjStr('Sensible Effectiveness at 75% Heating Air Flow {dimensionless}','0.75') - CALL AddToObjStr('Latent Effectiveness at 75% Heating Air Flow {dimensionless}','0.0') CALL AddToObjStr('Sensible Effectiveness at 100% Cooling Air Flow {dimensionless}','0.7') CALL AddToObjStr('Latent Effectiveness at 100% Cooling Air Flow {dimensionless}','0.0') - CALL AddToObjStr('Sensible Effectiveness at 75% Cooling Air Flow {dimensionless}','0.75') - CALL AddToObjStr('Latent Effectiveness at 75% Cooling Air Flow {dimensionless}','0.0') CALL AddToObjStr('Supply Air Inlet Node Name', TRIM(coolCoilUnitInlet)) CALL AddToObjFld('Supply Air Outlet Node Name', base + doasNameOff,' HX Supply Outlet Node') CALL AddToObjFld('Exhaust Air Inlet Node Name', base + doasNameOff,' Cooling Coil Outlet Node') @@ -32232,7 +32447,8 @@ SUBROUTINE CreateDOAS CALL AddToObjStr('Initial Defrost Time Fraction {dimensionless}','') CALL AddToObjStr('Rate of Defrost Time Fraction Increase {1/K}','') ! MJW ???? - Not sure - CALL AddToObjStr('Economizer Lockout','No',.TRUE.) + CALL AddToObjStr('Economizer Lockout','No') + CALL AddSenEffectCurve(base + doasNameOff, 0.75, 0.7) !***Coil:Cooling:Water CALL CreateNewObj('Coil:Cooling:Water') CALL AddToObjFld('Name', base + doasNameOff,' Cooling Coil') @@ -32304,12 +32520,8 @@ SUBROUTINE CreateDOAS CALL AddToObjStr('Nominal Supply Air Flow Rate {m3/s}','autosize') CALL AddToObjStr('Sensible Effectiveness at 100% Heating Air Flow {dimensionless}','0.7') CALL AddToObjStr('Latent Effectiveness at 100% Heating Air Flow {dimensionless}','0.0') - CALL AddToObjStr('Sensible Effectiveness at 75% Heating Air Flow {dimensionless}','0.75') - CALL AddToObjStr('Latent Effectiveness at 75% Heating Air Flow {dimensionless}','0.0') CALL AddToObjStr('Sensible Effectiveness at 100% Cooling Air Flow {dimensionless}','0.7') CALL AddToObjStr('Latent Effectiveness at 100% Cooling Air Flow {dimensionless}','0.0') - CALL AddToObjStr('Sensible Effectiveness at 75% Cooling Air Flow {dimensionless}','0.75') - CALL AddToObjStr('Latent Effectiveness at 75% Cooling Air Flow {dimensionless}','0.0') CALL AddToObjStr('Supply Air Inlet Node Name', TRIM(coolCoilUnitInlet)) CALL AddToObjFld('Supply Air Outlet Node Name', base + doasNameOff,' HX Supply Outlet Node') CALL AddToObjFld('Exhaust Air Inlet Node Name', base + doasNameOff,' Cooling Coil Outlet Node') @@ -32322,7 +32534,8 @@ SUBROUTINE CreateDOAS CALL AddToObjStr('Initial Defrost Time Fraction {dimensionless}','') CALL AddToObjStr('Rate of Defrost Time Fraction Increase {1/K}','') ! MJW ???? - Not sure - CALL AddToObjStr('Economizer Lockout','No',.TRUE.) + CALL AddToObjStr('Economizer Lockout','No') + CALL AddSenEffectCurve(base + doasNameOff, 0.75, 0.7) !***Coil:Cooling:DX:SingleSpeed CALL CreateNewObj('Coil:Cooling:DX:SingleSpeed') CALL AddToObjFld('Name', base + doasNameOff,' Cooling Coil') @@ -32732,7 +32945,9 @@ SUBROUTINE CreateDOAS CALL AddToObjStr('Mechanical Ventilation Controller Name','',.TRUE.) IF (heatRecovery .EQ. htrecSens) THEN htRecSens75 = StringToReal(FldVal(base + doasHeatRecSenEffOff)) + 0.05 + htRecSens100 = StringToReal(FldVal(base + doasHeatRecSenEffOff)) IF (htRecSens75 .GT. 1.) htRecSens75 = 1. + IF (htRecSens100 .GT. 1.) htRecSens100 = 1. !***HeatExchanger:AirToAir:SensibleAndLatent CALL CreateNewObj('HeatExchanger:AirToAir:SensibleAndLatent') CALL AddToObjFld('Heat exchanger name', base + doasNameOff,' Heat Recovery') @@ -32740,12 +32955,8 @@ SUBROUTINE CreateDOAS CALL AddToObjFld('Nominal supply air flow rate {m3/s}', base + doasSupplyRateOff,'') CALL AddToObjFld('Sensible Effectiveness at 100% Heating Air Flow', base + doasHeatRecSenEffOff,'') CALL AddToObjStr('Latent Effectiveness at 100% Heating Air Flow','0') - CALL AddToObjNum('Sensible Effectiveness at 75% Heating Air Flow', htRecSens75) - CALL AddToObjStr('Latent Effectiveness at 75% Heating Air Flow','0') CALL AddToObjFld('Sensible Effectiveness at 100% Cooling Air Flow', base + doasHeatRecSenEffOff,'') CALL AddToObjStr('Latent Effectiveness at 100% Cooling Air Flow','0') - CALL AddToObjNum('Sensible Effectiveness at 75% Cooling Air Flow', htRecSens75) - CALL AddToObjStr('Latent Effectiveness at 75% Cooling Air Flow','0') CALL AddToObjFld('Supply Air Inlet Node Name', base + doasNameOff,' Outdoor Air Inlet') CALL AddToObjFld('Supply Air Outlet Node Name', base + doasNameOff,' Heat Recovery Supply Outlet') CALL AddToObjFld('Exhaust Air Inlet Node Name', base + doasNameOff,' Relief Air Outlet') @@ -32757,12 +32968,17 @@ SUBROUTINE CreateDOAS CALL AddToObjStr('Threshold Temperature','1.7') CALL AddToObjStr('Initial Defrost Time Fraction','0.083') CALL AddToObjStr('Rate of Defrost Time Fraction Increase','0.012') - CALL AddToObjStr('Economizer Lockout','Yes',.TRUE.) + CALL AddToObjStr('Economizer Lockout','Yes') + CALL AddSenEffectCurve(base + doasNameOff, htRecSens75, htRecSens100) ELSEIF (heatRecovery .EQ. htrecEnth) THEN htRecSens75 = StringToReal(FldVal(base + doasHeatRecSenEffOff)) + 0.05 + htRecSens100 = StringToReal(FldVal(base + doasHeatRecSenEffOff)) IF (htRecSens75 .GT. 1.) htRecSens75 = 1. + IF (htRecSens100 .GT. 1.) htRecSens100 = 1. htRecLat75 = StringToReal(FldVal(base + doasHeatRecLatEffOff)) + 0.05 + htRecLat100 = StringToReal(FldVal(base + doasHeatRecLatEffOff)) IF (htRecLat75 .GT. 1.) htRecLat75 = 1. + IF (htRecLat100 .GT. 1.) htRecLat100 = 1. !***HeatExchanger:AirToAir:SensibleAndLatent CALL CreateNewObj('HeatExchanger:AirToAir:SensibleAndLatent') CALL AddToObjFld('Heat exchanger name', base + doasNameOff,' Heat Recovery') @@ -32770,12 +32986,8 @@ SUBROUTINE CreateDOAS CALL AddToObjFld('Nominal supply air flow rate {m3/s}', base + doasSupplyRateOff,'') CALL AddToObjFld('Sensible Effectiveness at 100% Heating Air Flow', base + doasHeatRecSenEffOff,'') CALL AddToObjFld('Latent Effectiveness at 100% Heating Air Flow', base + doasHeatRecLatEffOff,'') - CALL AddToObjNum('Sensible Effectiveness at 75% Heating Air Flow', htRecSens75) - CALL AddToObjNum('Latent Effectiveness at 75% Heating Air Flow', htRecLat75) CALL AddToObjFld('Sensible Effectiveness at 100% Cooling Air Flow', base + doasHeatRecSenEffOff,'') CALL AddToObjFld('Latent Effectiveness at 100% Cooling Air Flow', base + doasHeatRecLatEffOff,'') - CALL AddToObjNum('Sensible Effectiveness at 75% Cooling Air Flow', htRecSens75) - CALL AddToObjNum('Latent Effectiveness at 75% Cooling Air Flow', htRecLat75) CALL AddToObjFld('Supply Air Inlet Node Name', base + doasNameOff,' Outdoor Air Inlet') CALL AddToObjFld('Supply Air Outlet Node Name', base + doasNameOff,' Heat Recovery Supply Outlet') CALL AddToObjFld('Exhaust Air Inlet Node Name', base + doasNameOff,' Relief Air Outlet') @@ -32787,7 +32999,8 @@ SUBROUTINE CreateDOAS CALL AddToObjStr('Threshold Temperature','1.7') CALL AddToObjStr('Initial Defrost Time Fraction','0.083') CALL AddToObjStr('Rate of Defrost Time Fraction Increase','0.012') - CALL AddToObjStr('Economizer Lockout','Yes',.TRUE.) + CALL AddToObjStr('Economizer Lockout','Yes') + CALL AddSenLatEffectCurve(base + doasNameOff, htRecSens75, htRecSens100, htRecLat75, htRecLat100) END IF IF (heatRecovery .NE. htrecNone) THEN !***SetpointManager:MixedAir for Heat Recovery Outlet - Reference heating coil setpoint diff --git a/src/Transition/CreateNewIDFUsingRulesV24_1_0.f90 b/src/Transition/CreateNewIDFUsingRulesV24_1_0.f90 index 464743fb491..f03ce7b8555 100644 --- a/src/Transition/CreateNewIDFUsingRulesV24_1_0.f90 +++ b/src/Transition/CreateNewIDFUsingRulesV24_1_0.f90 @@ -134,6 +134,15 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile CHARACTER(len=20) :: PotentialRunPeriodName ! END OF TODO + ! used in transition code for HeatExchanger:AirToAir:SensibleAndLatent + CHARACTER(20), DIMENSION(4) :: HxEffectAt75Airflow + CHARACTER(20), DIMENSION(4) :: HxEffectAt100Airflow + CHARACTER(MaxNameLength + 2), DIMENSION(4) :: HxTableName + LOGICAL :: tableAdded + LOGICAL :: tableIndependentVarAdded = .false. + CHARACTER(10) :: tableID + REAL :: effect75 + REAL :: effect100 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! E N D O F I N S E R T L O C A L V A R I A B L E S H E R E ! @@ -382,7 +391,20 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile ! CurArgs = CurArgs + 1 ! If your original object starts with A, insert the rules here - + CASE('AIRLOOPHVAC:UNITARYSYSTEM') ! add new input field No Load Supply Air Flow Rate Control Set To Low Speed + CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits) + nodiff=.false. + OutArgs(1:CurArgs)=InArgs(1:CurArgs) + ! OutArgs(39) is added. If existing coil is VS DX cooling or heating coil then set YES, otherwise set NO + IF (CurArgs .gt. 38) THEN + IF (SameString(InArgs(12),'Coil:Heating:DX:VariableSpeed') .or. SameString(InArgs(15),'Coil:Cooling:DX:VariableSpeed')) THEN + OutArgs(39)='Yes' + ELSE + OutArgs(39)='No' + ENDIF + OutArgs(40:CurArgs+1)=InArgs(39:CurArgs) + CurArgs = CurArgs + 1 + END IF ! If your original object starts with C, insert the rules here CASE('COMFORTVIEWFACTORANGLES') CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits) @@ -402,6 +424,96 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile ! If your original object starts with H, insert the rules here + CASE('HEATEXCHANGER:AIRTOAIR:SENSIBLEANDLATENT') + CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits) + nodiff=.false. + + ! read in 8 reference value for the effectiveness at 75% and 100% + HxEffectAt75Airflow(1) = TRIM(InArgs(6)) ! Sensible Effectiveness at 75% Heating Air Flow + HxEffectAt75Airflow(2) = TRIM(InArgs(7)) ! Latent Effectiveness at 75% Heating Air Flow + HxEffectAt75Airflow(3) = TRIM(InArgs(10)) ! Sensible Effectiveness at 75% Cooling Air Flow + HxEffectAt75Airflow(4) = TRIM(InArgs(11)) ! Latent Effectiveness at 75% Cooling Air Flow + HxEffectAt100Airflow(1) = TRIM(InArgs(4)) ! Sensible Effectiveness at 100% Heating Air Flow + HxEffectAt100Airflow(2) = TRIM(InArgs(5)) ! Latent Effectiveness at 100% Heating Air Flow + HxEffectAt100Airflow(3) = TRIM(InArgs(8)) ! Sensible Effectiveness at 100% Cooling Air Flow + HxEffectAt100Airflow(4) = TRIM(InArgs(9)) ! Latent Effectiveness at 100% Cooling Air Flow + + ! Remove the 4 fields for 75% airflow and adjust the index of the fields + OutArgs(1:5) = InArgs(1:5) + OutArgs(6) = InArgs(8) + OutArgs(7) = InArgs(9) + OutArgs(8:19) = InArgs(12:23) + + ! Fill in table names + DO i = 1, 4 + READ(HxEffectAt75Airflow(i), *) effect75 + READ(HxEffectAt100Airflow(i), *) effect100 + IF (effect75 /= effect100) THEN + WRITE(tableID, '(I0)') i + HxTableName(i) = TRIM(InArgs(1)) // '_' // tableID + OutArgs(19 + i) = HxTableName(i) ! table name + ELSE + OutArgs(19 + i) = '' ! empty table name + ENDIF + END DO + ! removed 4 fields and added 4 fields, no change to CurArgs + CALL WriteOutIDFLines(DifLfn,'HeatExchanger:AirToAir:SensibleAndLatent',CurArgs,OutArgs,NwFldNames,NwFldUnits) + + ! create table object + DO i = 1, 4 + READ(HxEffectAt75Airflow(i), *) effect75 + READ(HxEffectAt100Airflow(i), *) effect100 + IF (effect75 /= effect100) THEN + ! create new object Table:Lookup, + ObjectName='Table:Lookup' + CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits) + OutArgs(1) = HxTableName(i) + OutArgs(2) = 'effectiveness_IndependentVariableList' + OutArgs(3) = 'DivisorOnly' !- Normalization Method + OutArgs(4) = HxEffectAt100Airflow(i) !- Normalization Divisor + OutArgs(5) = '0.0' !- Minimum Output + OutArgs(6) = '10.0' !- Maximum Output + OutArgs(7) = 'Dimensionless' !- Output Unit Type + OutArgs(8) = '' !- External File Name + OutArgs(9) = '' !- External File Column Number + OutArgs(10) = '' !- External File Starting Row Number + OutArgs(11) = HxEffectAt75Airflow(i) !- Output Value 1 + OutArgs(12) = HxEffectAt100Airflow(i) !- Output Value 2 + CurArgs = 12 + tableAdded = .true. + CALL WriteOutIDFLines(DifLfn,ObjectName,CurArgs,OutArgs,NwFldNames,NwFldUnits) + ENDIF + END DO + + ! add independent variables used in the tables + IF (tableAdded .AND. .NOT. tableIndependentVarAdded) THEN + tableIndependentVarAdded = .true. + ObjectName='Table:IndependentVariableList' + CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits) + OutArgs(1) = 'effectiveness_IndependentVariableList' + OutArgs(2) = 'HxAirFlowRatio' + CurArgs = 2 + CALL WriteOutIDFLines(DifLfn,ObjectName,CurArgs,OutArgs,NwFldNames,NwFldUnits) + + ObjectName='Table:IndependentVariable' + CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits) + OutArgs(1) = 'HxAirFlowRatio' ! Name + OutArgs(2) = 'Linear' ! Interpolation Method + OutArgs(3) = 'Linear' ! Extrapolation Method + OutArgs(4) = '0.0' ! Minimum Value + OutArgs(5) = '10.0' ! Maximum Value + OutArgs(6) = '' ! Normalization Reference Value + OutArgs(7) = 'Dimensionless' ! Unit Type + OutArgs(8) = '' ! External File Name + OutArgs(9) = '' ! External File Column Number + OutArgs(10) = '' ! External File Starting Row Number + OutArgs(11) = '0.75' ! Value 1 + OutArgs(12) = '1.0' ! Value 2 + CurArgs = 12 + CALL WriteOutIDFLines(DifLfn,ObjectName,CurArgs,OutArgs,NwFldNames,NwFldUnits) + ENDIF + Written=.true. + ! If your original object starts with I, insert the rules here ! If your original object starts with L, insert the rules here @@ -434,6 +546,38 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile ! If your original object starts with W, insert the rules here ! If your original object starts with Z, insert the rules here + CASE('ZONEHVAC:PACKAGEDTERMINALAIRCONDITIONER') ! add new input field No Load Supply Air Flow Rate Control Set To Low Speed + CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits) + nodiff=.false. + OutArgs(1:9)=InArgs(1:9) + ! OutArgs(10) is added. If existing coil is VS DX cooling or heating coil then set Yes, otherwise set No + IF (SameString(InArgs(17),'Coil:Cooling:DX:VariableSpeed')) THEN + OutArgs(10)='Yes' + ELSE + OutArgs(10)='No' + ENDIF + OutArgs(11:CurArgs+1)=InArgs(10:CurArgs) + CurArgs = CurArgs + 1 + CASE('ZONEHVAC:PACKAGEDTERMINALHEATPUMP') ! add new input field No Load Supply Air Flow Rate Control Set To Low Speed + CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits) + nodiff=.false. + OutArgs(1:9)=InArgs(1:9) + ! OutArgs(10) is added. If existing coil is VS DX cooling or heating coil then set Yes, otherwise set No + IF (SameString(InArgs(15),'Coil:Heating:DX:VariableSpeed') .or. SameString(InArgs(18),'Coil:Cooling:DX:VariableSpeed')) THEN + OutArgs(10)='Yes' + ELSE + OutArgs(10)='No' + ENDIF + OutArgs(11:CurArgs+1)=InArgs(10:CurArgs) + CurArgs = CurArgs + 1 + CASE('ZONEHVAC:WATERTOAIRHEATPUMP') ! add new input field No Load Supply Air Flow Rate Control Set To Low Speed + CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits) + nodiff=.false. + OutArgs(1:9)=InArgs(1:9) + ! Coil:*:WaterToAirHeatPump:VariableSpeedEquationFit was not previously used to set no load air flow rate + OutArgs(10)='No' + OutArgs(11:CurArgs+1)=InArgs(10:CurArgs) + CurArgs = CurArgs + 1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! Changes for report variables, meters, tables -- update names ! diff --git a/src/Transition/InputRulesFiles/Rules23-2-0-to-24-1-0.md b/src/Transition/InputRulesFiles/Rules23-2-0-to-24-1-0.md index dd11d9a8737..d8d317f5cc5 100644 --- a/src/Transition/InputRulesFiles/Rules23-2-0-to-24-1-0.md +++ b/src/Transition/InputRulesFiles/Rules23-2-0-to-24-1-0.md @@ -12,6 +12,9 @@ The alpha/numeric A/N numbers are not as important here. # Object Change: ObjectStartsWithA +# Object Change: AirloopHVAC:UnitarySystem +Field 39 (A23) No Load Supply Air Flow Rate Control Set To Low Speed is inserted. The remaining fields are shifted down. If the cooling or heating coil is Coil:*:DX:VariableSpeed the field is Yes, otherwise No. + # Object Change: ObjectStartsWithB # Object Change: ComfortViewFactorAngles @@ -41,6 +44,91 @@ Field 6 (N2) field name changed from "Power per Zone Floor Area" (power_per_zone # Object Change: ObjectStartsWithH +## Object Changes: HeatExchanger:AirToAir:SensibleAndLatent + +[PR#10277](https://github.com/NREL/EnergyPlus/pull/10277/) + +remove the following four fields +N4: Sensible Effectiveness at 75% Heating Air Flow +N5: Latent Effectiveness at 75% Heating Air Flow +N8: Sensible Effectiveness at 75% Cooling Air Flow +N9: Latent Effectiveness at 75% Cooling Air Flow + +add four curve fields at the end occupying A11 to A14 +A11: Sensible Effectiveness of Heating Air Flow Curve Name +A12: Latent Effectiveness of Heating Air Flow Curve Name +A13: Sensible Effectiveness of Cooling Air Flow Curve Name +A14: Latent Effectiveness of Cooling Air Flow Curve Name + +when N4, N5, N8, N9 has value non-equal to the 100% value, curve objects will be created. + +sudo code is as follows + + tableAdded = FALSE + + for each HeatExchanger:AirToAir:SensibleAndLatent object { + + Read in 8 reference effectiveness value + e100_1: sensible heating 100% + e100_2: latent heating 100% + e75_1 : sensible heating 75% + e75_2 : latent heating 75% + e100_3: sensible cooling 100% + e100_4: latent cooling 100% + e75_3 : sensible cooling 75% + e75_4 : latent cooling 75% + + Remove the 4 fields for 75% airflow and adjust the index of the fields + + For each pair (e75_i, e100_i) { + + If e75_i != e100_i {// needs a table/curve for the effectiveness + + tableAdded = TRUE + + Add the following chunk + + Table:Lookup, + _, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + e100_i, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + e75_i, !- Output Value 1 + e100_i; !- Output Value 2 + } + } + } + + if tableAdded { + + add the following chunk for the independent variable + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + } + + + # Object Change: ObjectStartsWithI # Object Change: ObjectStartsWithJ @@ -83,3 +171,12 @@ Field 13 (A7) Mean Radiant Temperature Calculation Type (mean_radiant_temperatur # Object Change: ObjectStartsWithY # Object Change: ObjectStartsWithZ + +# Object Change: ZoneHVAC:PackagedTerminalAirConditioner +Field 10 (A7) No Load Supply Air Flow Rate Control Set To Low Speed is inserted. The remaining fields are shifted down. If the cooling is Coil:Cooling:DX:VariableSpeed the field is Yes, otherwise No. + +# Object Change: ZoneHVAC:PackagedTerminalHeatPump +Field 10 (A7) No Load Supply Air Flow Rate Control Set To Low Speed is inserted. The remaining fields are shifted down. If the cooling or heating coil is Coil:*:DX:VariableSpeed the field is Yes, otherwise No. + +# Object Change: ZoneHVAC:WaterToAirHeatPump +Field 10 (A7) No Load Supply Air Flow Rate Control Set To Low Speed is inserted. The remaining fields are shifted down. The value can be set to No. diff --git a/src/Transition/table_convert.py b/src/Transition/table_convert.py index 705b929eb6f..a6ce6993384 100644 --- a/src/Transition/table_convert.py +++ b/src/Transition/table_convert.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/src/Transition/transition_coil_heating_gas.py b/src/Transition/transition_coil_heating_gas.py index cc9b8c3f344..f90113eb72a 100644 --- a/src/Transition/transition_coil_heating_gas.py +++ b/src/Transition/transition_coil_heating_gas.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/testfiles/5ZoneFanCoilDOASCool.idf b/testfiles/5ZoneFanCoilDOASCool.idf index 2f854bd5f6d..b54eb43b774 100644 --- a/testfiles/5ZoneFanCoilDOASCool.idf +++ b/testfiles/5ZoneFanCoilDOASCool.idf @@ -2796,12 +2796,8 @@ autosize, !- Nominal Supply Air Flow Rate {m3/s} 0.7, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.7, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} DOAS Outdoor Air Inlet, !- Supply Air Inlet Node Name DOAS Heat Recovery Supply Outlet, !- Supply Air Outlet Node Name DOAS Relief Air Outlet, !- Exhaust Air Inlet Node Name @@ -2813,7 +2809,57 @@ 1.7, !- Threshold Temperature {C} 0.083, !- Initial Defrost Time Fraction {dimensionless} 0.012, !- Rate of Defrost Time Fraction Increase {1/K} - Yes; !- Economizer Lockout + Yes, !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name + + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + + Table:Lookup, + SenEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.7, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Output Value 1 + 0.70; !- Output Value 2 + + Table:Lookup, + LatEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.65, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.70, !- Output Value 1 + 0.65; !- Output Value 2 !- =========== ALL OBJECTS IN CLASS: CONTROLLER:WATERCOIL =========== diff --git a/testfiles/5ZoneFanCoilDOAS_ERVOnAirLoopMainBranch.idf b/testfiles/5ZoneFanCoilDOAS_ERVOnAirLoopMainBranch.idf index c21a1e80c01..3b228876a60 100644 --- a/testfiles/5ZoneFanCoilDOAS_ERVOnAirLoopMainBranch.idf +++ b/testfiles/5ZoneFanCoilDOAS_ERVOnAirLoopMainBranch.idf @@ -2784,12 +2784,8 @@ autosize, !- Nominal Supply Air Flow Rate {m3/s} 0.7, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.7, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} DOAS Mixed Air Outlet, !- Supply Air Inlet Node Name DOAS Heat Recovery Supply Outlet, !- Supply Air Outlet Node Name DOAS Relief Air Outlet, !- Exhaust Air Inlet Node Name @@ -2801,7 +2797,57 @@ 1.7, !- Threshold Temperature {C} 0.083, !- Initial Defrost Time Fraction {dimensionless} 0.012, !- Rate of Defrost Time Fraction Increase {1/K} - Yes; !- Economizer Lockout + Yes, !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name + + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + + Table:Lookup, + SenEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.7, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Output Value 1 + 0.70; !- Output Value 2 + + Table:Lookup, + LatEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.65, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.70, !- Output Value 1 + 0.65; !- Output Value 2 !- =========== ALL OBJECTS IN CLASS: CONTROLLER:WATERCOIL =========== diff --git a/testfiles/5ZoneFanCoilDOAS_HumidifierOnOASystem.idf b/testfiles/5ZoneFanCoilDOAS_HumidifierOnOASystem.idf index 7268d5f422c..29463a059e0 100644 --- a/testfiles/5ZoneFanCoilDOAS_HumidifierOnOASystem.idf +++ b/testfiles/5ZoneFanCoilDOAS_HumidifierOnOASystem.idf @@ -2883,12 +2883,8 @@ autosize, !- Nominal Supply Air Flow Rate {m3/s} 0.7, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.7, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} DOAS Outdoor Air Inlet, !- Supply Air Inlet Node Name DOAS Heat Recovery Outlet, !- Supply Air Outlet Node Name DOAS Relief Air Outlet, !- Exhaust Air Inlet Node Name @@ -2900,7 +2896,57 @@ 1.7, !- Threshold Temperature {C} 0.083, !- Initial Defrost Time Fraction {dimensionless} 0.012, !- Rate of Defrost Time Fraction Increase {1/K} - Yes; !- Economizer Lockout + Yes, !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name + + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + + Table:Lookup, + SenEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.7, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Output Value 1 + 0.70; !- Output Value 2 + + Table:Lookup, + LatEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.65, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.70, !- Output Value 1 + 0.65; !- Output Value 2 Humidifier:Steam:Electric, DOAS OA Humidifier, !- Name diff --git a/testfiles/5Zone_Unitary_HXAssistedCoil.idf b/testfiles/5Zone_Unitary_HXAssistedCoil.idf index d6e3486fb91..4433214591d 100644 --- a/testfiles/5Zone_Unitary_HXAssistedCoil.idf +++ b/testfiles/5Zone_Unitary_HXAssistedCoil.idf @@ -2674,6 +2674,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 80; !- Maximum Supply Air Temperature {C} Coil:Heating:Fuel, @@ -2736,12 +2737,8 @@ autosize, !- Nominal Supply Air Flow Rate {m3/s} 0.7, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.70000, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.650000, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.7, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.70000, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.650000, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} Main Cooling Coil 1 Inlet Node, !- Supply Air Inlet Node Name Heat Recovery Supply Outlet, !- Supply Air Outlet Node Name Heat Recovery Exhuast Inlet Node, !- Exhaust Air Inlet Node Name @@ -2753,7 +2750,11 @@ 1.7, !- Threshold Temperature {C} 0.083, !- Initial Defrost Time Fraction {dimensionless} 0.012, !- Rate of Defrost Time Fraction Increase {1/K} - Yes; !- Economizer Lockout + Yes, !- Economizer Lockout + , !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + , !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name Coil:Cooling:DX:VariableSpeed, Main Cooling Coil 1, !- Name diff --git a/testfiles/5Zone_Unitary_VSDesuperheatWaterHeater.idf b/testfiles/5Zone_Unitary_VSDesuperheatWaterHeater.idf index 7bec5b2a51d..08ad1938c45 100644 --- a/testfiles/5Zone_Unitary_VSDesuperheatWaterHeater.idf +++ b/testfiles/5Zone_Unitary_VSDesuperheatWaterHeater.idf @@ -2688,6 +2688,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 80; !- Maximum Supply Air Temperature {C} Coil:Heating:Fuel, diff --git a/testfiles/5Zone_Unitary_VSDesuperheater.idf b/testfiles/5Zone_Unitary_VSDesuperheater.idf index 0b13b5a4744..9412e9292be 100644 --- a/testfiles/5Zone_Unitary_VSDesuperheater.idf +++ b/testfiles/5Zone_Unitary_VSDesuperheater.idf @@ -2688,6 +2688,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 80; !- Maximum Supply Air Temperature {C} Coil:Heating:Desuperheater, diff --git a/testfiles/API/tk_gui_demonstration.py b/testfiles/API/tk_gui_demonstration.py new file mode 100644 index 00000000000..29d9c31138d --- /dev/null +++ b/testfiles/API/tk_gui_demonstration.py @@ -0,0 +1,123 @@ +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University +# of Illinois, The Regents of the University of California, through Lawrence +# Berkeley National Laboratory (subject to receipt of any required approvals +# from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- +# Battelle, Alliance for Sustainable Energy, LLC, and other contributors. All +# rights reserved. +# +# NOTICE: This Software was developed under funding from the U.S. Department of +# Energy and the U.S. Government consequently retains certain rights. As such, +# the U.S. Government has been granted for itself and others acting on its +# behalf a paid-up, nonexclusive, irrevocable, worldwide license in the +# Software to reproduce, distribute copies to the public, prepare derivative +# works, and perform publicly and display publicly, and to permit others to do +# so. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# (1) Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# (2) Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# (3) Neither the name of the University of California, Lawrence Berkeley +# National Laboratory, the University of Illinois, U.S. Dept. of Energy nor +# the names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# (4) Use of EnergyPlus(TM) Name. If Licensee (i) distributes the software in +# stand-alone form without changes from the version obtained under this +# License, or (ii) Licensee makes a reference solely to the software +# portion of its product, Licensee must refer to the software as +# "EnergyPlus version X" software, where "X" is the version number Licensee +# obtained under this License and may not use a different name for the +# software. Except as specifically required in this Section (4), Licensee +# shall not use in a company name, a product name, in advertising, +# publicity, or other promotional activities any name, trade name, +# trademark, logo, or other designation of "EnergyPlus", "E+", "e+" or +# confusingly similar designation, without the U.S. Department of Energy's +# prior written consent. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +from pathlib import Path +from queue import Queue +from sys import argv, path +from tempfile import mkdtemp +from threading import Thread +from time import sleep +from tkinter import Tk, Button, StringVar, Label, BOTH, ttk, HORIZONTAL + + +class EPGui(Tk): + def __init__(self): + super().__init__() + if len(argv) == 3: + # if running in a build tree, pass in the path to the /Products directory that contains pyenergyplus + # and the full path to the IDF to run + self.install_or_build_dir: Path = Path(argv[1]) + self.example_file_to_run: str = argv[2] + else: + # if running in an installation, it will live at the /ExampleFiles/API, and you don't need any args + self.install_or_build_dir: Path = Path(__file__).resolve().parent.parent.parent + self.example_file_to_run: str = str(self.install_or_build_dir / 'ExampleFiles' / '5ZoneAirCooled.idf') + try: # This is the new way, if the user's Python environment includes the pip installed energyplus-api-helpers + # noinspection PyUnresolvedReferences + from energyplus_api_helpers.import_helper import EPlusAPIHelper + e = EPlusAPIHelper(self.install_or_build_dir) + self.api = e.get_api_instance() + except ImportError: # This is the previous way, directly adding the E+ dir to the path before importing the API + path.insert(0, str(self.install_or_build_dir)) + # noinspection PyUnresolvedReferences + from pyenergyplus.api import EnergyPlusAPI + self.api = EnergyPlusAPI() + self.title("API/GUI Demonstration") + Button(self, text='Run EnergyPlus', command=self._start_thread).pack(expand=True) + ttk.Separator(self, orient=HORIZONTAL).pack(fill=BOTH, expand=False) + self._tk_var_message = StringVar(value="") + Label(self, textvariable=self._tk_var_message).pack(fill=BOTH, expand=True) + self.geometry('600x100') + self._gui_queue = Queue() + self._check_queue() + self.mainloop() + + def _check_queue(self) -> None: + while True: + # noinspection PyBroadException + try: + task = self._gui_queue.get(block=False) + self.after_idle(task) + except Exception: + break + self.after(60, self._check_queue) + + def _callback(self, message: str) -> None: + self._gui_queue.put(lambda: self._tk_var_message.set(message)) + sleep(0.03) # this is purely so that the GUI messages are readable while E+ runs + + def _start_thread(self) -> None: + Thread(target=self._run_ep, daemon=True).start() + + def _run_ep(self) -> None: + run_directory = mkdtemp() + state = self.api.state_manager.new_state() + self.api.runtime.callback_message(state, self._callback) + self.api.runtime.run_energyplus(state, ['-d', run_directory, '-D', self.example_file_to_run]) + print(f"Finished running EnergyPlus, results available in {run_directory}") + + +if __name__ == "__main__": + EPGui() diff --git a/testfiles/API/user_defined_equipment.idf b/testfiles/API/user_defined_equipment.idf new file mode 100644 index 00000000000..64531b9615e --- /dev/null +++ b/testfiles/API/user_defined_equipment.idf @@ -0,0 +1,2481 @@ +! PythonPluginUserDefinedWindACAuto.idf +! Basic file description: 1 story building divided into 3 conditioned zones. Roof with no plenum. +! No ground contact with floor. Window air conditioners serve each zone. +! +! Highlights: illustrates use of Python Plugin system and user defined components to model a window air conditioners +! +! Simulation Location/Run: CHICAGO_IL_USA TMY2-94846, 2 design days, 2 run periods, +! Run Control executes the run periods using the weather file +! +! Location: Chicago, IL +! +! Design Days: CHICAGO_IL_USA Annual Heating 99% Design Conditions DB, MaxDB= -17.3°C +! CHICAGO_IL_USA Annual Cooling 1% Design Conditions, MaxDB= 31.5°C MCWB= 23.0°C +! +! Run Period (Weather File): Winter 1/14, Summer 7/7, CHICAGO_IL_USA TMY2-94846 +! +! Run Control: Zone and System sizing with weather file run control (no design days run) +! +! Building: Single floor rectangular L-shaped building 40 ft south wall, 40 ft west wall, zone height 10 feet. +! There is a single window in West Zone's south wall. The walls are 1 in stucco over 4 in common brick +! and gypboard. The roof is a built up roof with 1/2 in stone over 3/8 in felt over 1 in dense insulation +! supported by 2 in heavy weight concrete. The window is single pane 3mm clear. +! The window to wall ratio is approximately 0.07. +! +! The building is oriented due north. +! +! Floor Area: 130.1 m2 (1403 ft2) +! Number of Stories: 1 +! +! Zone Description Details: +! +! (0,12.192,0) (9.144,12.192,0) +! ________________________________ +! | | +! | | +! | | +! | | +! | North | +! | | +! | | +! | (6.096,6.096,0) | +! |________________________________|____________ (12.192,6.069,0) +! | (0,6.096,0) | (9.144,6.096,0) | +! | | | +! | | | +! | | | +! | West | East | window = * +! | | | +! | | | +! | | | +! |___**************___|________________________| +! +! (0,0,0) (6.069,0,0) (12.192,0,0) +! +! Internal gains description: ZONE West - lighting is 0 watts, equip is 2928.751 watts, 3 occupants +! Internal gains description: ZONE North - lighting is 878.6252 watts, equip is 2928.751 watts, 4 occupants +! Internal gains description: ZONE East - lighting is 1464.375 watts, equip is 1464.375 watts, 3 occupants +! +! Interzone Surfaces: 3 interzone surfaces (see diagram) +! Internal Mass: None +! People: 10 +! Lights: 2343 W +! Equipment: 7323 W +! Windows: 1 +! Detached Shading: None +! Daylight: None +! Natural Ventilation: None +! Compact Schedules: Yes +! Solar Distribution: FullInteriorAndExterior +! +! HVAC: Window ACs and hot-water baseboards serving each zone. NO AIR SYSTEM! Purchased hot water. +! Each air condition uses a constant fan cycling compressor in a blow-through configuration. +! +! Zonal Equipment: ZoneHVAC:ForcedAir:UserDefined, ZoneHVAC:Baseboard:Convective:Water +! Central Air Handling Equipment: No +! System Equipment Autosize: Yes +! Purchased Cooling: No +! Purchased Heating: No +! Purchased Chilled Water: No +! Purchased Hot Water: Yes +! Coils: custom model +! Pumps: Pump:VariableSpeed +! Boilers: None +! Chillers: None +! Towers: None +! +! Results: +! Standard Reports: All Summary Predefined Reports +! Timestep or Hourly Variables: Hourly +! Time bins Report: None +! HTML Report: Predefined All Summary +! Environmental Emissions: None +! Utility Tariffs: None + + Version,24.1; + + Timestep,6; + + Building, + NONE, !- Name + 0, !- North Axis {deg} + Suburbs, !- Terrain + 3.9999999E-02, !- Loads Convergence Tolerance Value {W} + 0.4000000, !- Temperature Convergence Tolerance Value {deltaC} + FullInteriorAndExterior, !- Solar Distribution + 25, !- Maximum Number of Warmup Days + 6; !- Minimum Number of Warmup Days + + HeatBalanceAlgorithm,ConductionTransferFunction; + + SurfaceConvectionAlgorithm:Inside,TARP; + + SurfaceConvectionAlgorithm:Outside,DOE-2; + + RunPeriod, + Jan14, !- Name + 1, !- Begin Month + 14, !- Begin Day of Month + , !- Begin Year + 1, !- End Month + 14, !- End Day of Month + , !- End Year + Tuesday, !- Day of Week for Start Day + Yes, !- Use Weather File Holidays and Special Days + Yes, !- Use Weather File Daylight Saving Period + No, !- Apply Weekend Holiday Rule + Yes, !- Use Weather File Rain Indicators + Yes; !- Use Weather File Snow Indicators + + RunPeriod, + Jul7, !- Name + 7, !- Begin Month + 7, !- Begin Day of Month + , !- Begin Year + 7, !- End Month + 7, !- End Day of Month + , !- End Year + Tuesday, !- Day of Week for Start Day + Yes, !- Use Weather File Holidays and Special Days + Yes, !- Use Weather File Daylight Saving Period + No, !- Apply Weekend Holiday Rule + Yes, !- Use Weather File Rain Indicators + Yes; !- Use Weather File Snow Indicators + + Site:Location, + CHICAGO_IL_USA TMY2-94846, !- Name + 41.78, !- Latitude {deg} + -87.75, !- Longitude {deg} + -6.00, !- Time Zone {hr} + 190.00; !- Elevation {m} + + SimulationControl, + Yes, !- Do Zone Sizing Calculation + No, !- Do System Sizing Calculation + No, !- Do Plant Sizing Calculation + No, !- Run Simulation for Sizing Periods + Yes, !- Run Simulation for Weather File Run Periods + No, !- Do HVAC Sizing Simulation for Sizing Periods + 1; !- Maximum Number of HVAC Sizing Simulation Passes + +! CHICAGO_IL_USA Annual Heating 99% Design Conditions DB, MaxDB= -17.3°C + + SizingPeriod:DesignDay, + CHICAGO_IL_USA Annual Heating 99% Design Conditions DB, !- Name + 1, !- Month + 21, !- Day of Month + WinterDesignDay, !- Day Type + -17.3, !- Maximum Dry-Bulb Temperature {C} + 0.0, !- Daily Dry-Bulb Temperature Range {deltaC} + , !- Dry-Bulb Temperature Range Modifier Type + , !- Dry-Bulb Temperature Range Modifier Day Schedule Name + Wetbulb, !- Humidity Condition Type + -17.3, !- Wetbulb or DewPoint at Maximum Dry-Bulb {C} + , !- Humidity Condition Day Schedule Name + , !- Humidity Ratio at Maximum Dry-Bulb {kgWater/kgDryAir} + , !- Enthalpy at Maximum Dry-Bulb {J/kg} + , !- Daily Wet-Bulb Temperature Range {deltaC} + 99063., !- Barometric Pressure {Pa} + 4.9, !- Wind Speed {m/s} + 270, !- Wind Direction {deg} + No, !- Rain Indicator + No, !- Snow Indicator + No, !- Daylight Saving Time Indicator + ASHRAEClearSky, !- Solar Model Indicator + , !- Beam Solar Day Schedule Name + , !- Diffuse Solar Day Schedule Name + , !- ASHRAE Clear Sky Optical Depth for Beam Irradiance (taub) {dimensionless} + , !- ASHRAE Clear Sky Optical Depth for Diffuse Irradiance (taud) {dimensionless} + 1.0; !- Sky Clearness + +! CHICAGO_IL_USA Annual Cooling 1% Design Conditions, MaxDB= 31.5°C MCWB= 23.0°C + + SizingPeriod:DesignDay, + CHICAGO_IL_USA Annual Cooling 1% Design Conditions DB/MCWB, !- Name + 7, !- Month + 21, !- Day of Month + SummerDesignDay, !- Day Type + 31.5, !- Maximum Dry-Bulb Temperature {C} + 10.7, !- Daily Dry-Bulb Temperature Range {deltaC} + , !- Dry-Bulb Temperature Range Modifier Type + , !- Dry-Bulb Temperature Range Modifier Day Schedule Name + Wetbulb, !- Humidity Condition Type + 23.0, !- Wetbulb or DewPoint at Maximum Dry-Bulb {C} + , !- Humidity Condition Day Schedule Name + , !- Humidity Ratio at Maximum Dry-Bulb {kgWater/kgDryAir} + , !- Enthalpy at Maximum Dry-Bulb {J/kg} + , !- Daily Wet-Bulb Temperature Range {deltaC} + 99063., !- Barometric Pressure {Pa} + 5.3, !- Wind Speed {m/s} + 230, !- Wind Direction {deg} + No, !- Rain Indicator + No, !- Snow Indicator + No, !- Daylight Saving Time Indicator + ASHRAEClearSky, !- Solar Model Indicator + , !- Beam Solar Day Schedule Name + , !- Diffuse Solar Day Schedule Name + , !- ASHRAE Clear Sky Optical Depth for Beam Irradiance (taub) {dimensionless} + , !- ASHRAE Clear Sky Optical Depth for Diffuse Irradiance (taud) {dimensionless} + 1.0; !- Sky Clearness + + Material, + A1 - 1 IN STUCCO, !- Name + Smooth, !- Roughness + 2.5389841E-02, !- Thickness {m} + 0.6918309, !- Conductivity {W/m-K} + 1858.142, !- Density {kg/m3} + 836.8000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.9200000, !- Solar Absorptance + 0.9200000; !- Visible Absorptance + + Material, + C4 - 4 IN COMMON BRICK, !- Name + Rough, !- Roughness + 0.1014984, !- Thickness {m} + 0.7264224, !- Conductivity {W/m-K} + 1922.216, !- Density {kg/m3} + 836.8000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.7600000, !- Solar Absorptance + 0.7600000; !- Visible Absorptance + + Material, + E1 - 3 / 4 IN PLASTER OR GYP BOARD, !- Name + Smooth, !- Roughness + 1.9050000E-02, !- Thickness {m} + 0.7264224, !- Conductivity {W/m-K} + 1601.846, !- Density {kg/m3} + 836.8000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.9200000, !- Solar Absorptance + 0.9200000; !- Visible Absorptance + + Material, + C6 - 8 IN CLAY TILE, !- Name + Smooth, !- Roughness + 0.2033016, !- Thickness {m} + 0.5707605, !- Conductivity {W/m-K} + 1121.292, !- Density {kg/m3} + 836.8000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.8200000, !- Solar Absorptance + 0.8200000; !- Visible Absorptance + + Material, + C10 - 8 IN HW CONCRETE, !- Name + MediumRough, !- Roughness + 0.2033016, !- Thickness {m} + 1.729577, !- Conductivity {W/m-K} + 2242.585, !- Density {kg/m3} + 836.8000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.6500000, !- Solar Absorptance + 0.6500000; !- Visible Absorptance + + Material, + E2 - 1 / 2 IN SLAG OR STONE, !- Name + Rough, !- Roughness + 1.2710161E-02, !- Thickness {m} + 1.435549, !- Conductivity {W/m-K} + 881.0155, !- Density {kg/m3} + 1673.600, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.5500000, !- Solar Absorptance + 0.5500000; !- Visible Absorptance + + Material, + E3 - 3 / 8 IN FELT AND MEMBRANE, !- Name + Rough, !- Roughness + 9.5402403E-03, !- Thickness {m} + 0.1902535, !- Conductivity {W/m-K} + 1121.292, !- Density {kg/m3} + 1673.600, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.7500000, !- Solar Absorptance + 0.7500000; !- Visible Absorptance + + Material, + B5 - 1 IN DENSE INSULATION, !- Name + VeryRough, !- Roughness + 2.5389841E-02, !- Thickness {m} + 4.3239430E-02, !- Conductivity {W/m-K} + 91.30524, !- Density {kg/m3} + 836.8000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.5000000, !- Solar Absorptance + 0.5000000; !- Visible Absorptance + + Material, + C12 - 2 IN HW CONCRETE, !- Name + MediumRough, !- Roughness + 5.0901599E-02, !- Thickness {m} + 1.729577, !- Conductivity {W/m-K} + 2242.585, !- Density {kg/m3} + 836.8000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.6500000, !- Solar Absorptance + 0.6500000; !- Visible Absorptance + + WindowMaterial:Glazing, + WIN-LAY-GLASS-LIGHT, !- Name + SpectralAverage, !- Optical Data Type + , !- Window Glass Spectral Data Set Name + 0.003, !- Thickness {m} + 0.90, !- Solar Transmittance at Normal Incidence + 0.031, !- Front Side Solar Reflectance at Normal Incidence + 0.031, !- Back Side Solar Reflectance at Normal Incidence + 0.90, !- Visible Transmittance at Normal Incidence + 0.05, !- Front Side Visible Reflectance at Normal Incidence + 0.05, !- Back Side Visible Reflectance at Normal Incidence + 0.0, !- Infrared Transmittance at Normal Incidence + 0.84, !- Front Side Infrared Hemispherical Emissivity + 0.84, !- Back Side Infrared Hemispherical Emissivity + 0.9; !- Conductivity {W/m-K} + + Construction, + EXTWALL80, !- Name + A1 - 1 IN STUCCO, !- Outside Layer + C4 - 4 IN COMMON BRICK, !- Layer 2 + E1 - 3 / 4 IN PLASTER OR GYP BOARD; !- Layer 3 + + Construction, + PARTITION06, !- Name + E1 - 3 / 4 IN PLASTER OR GYP BOARD, !- Outside Layer + C6 - 8 IN CLAY TILE, !- Layer 2 + E1 - 3 / 4 IN PLASTER OR GYP BOARD; !- Layer 3 + + Construction, + FLOOR SLAB 8 IN, !- Name + C10 - 8 IN HW CONCRETE; !- Outside Layer + + Construction, + ROOF34, !- Name + E2 - 1 / 2 IN SLAG OR STONE, !- Outside Layer + E3 - 3 / 8 IN FELT AND MEMBRANE, !- Layer 2 + B5 - 1 IN DENSE INSULATION, !- Layer 3 + C12 - 2 IN HW CONCRETE; !- Layer 4 + + Construction, + WIN-CON-LIGHT, !- Name + WIN-LAY-GLASS-LIGHT; !- Outside Layer + + ScheduleTypeLimits, + Any Number; !- Name + + ScheduleTypeLimits, + Fraction, !- Name + 0.0, !- Lower Limit Value + 1.0, !- Upper Limit Value + CONTINUOUS; !- Numeric Type + + ScheduleTypeLimits, + Temperature, !- Name + -60, !- Lower Limit Value + 200, !- Upper Limit Value + CONTINUOUS, !- Numeric Type + Temperature; !- Unit Type + + ScheduleTypeLimits, + Control Type, !- Name + 0, !- Lower Limit Value + 4, !- Upper Limit Value + DISCRETE; !- Numeric Type + + ScheduleTypeLimits, + On/Off, !- Name + 0, !- Lower Limit Value + 1, !- Upper Limit Value + DISCRETE; !- Numeric Type + + Schedule:Compact, + Activity Sch, !- Name + Any Number, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: Alldays, !- Field 2 + Until: 24:00,131.80; !- Field 3 + + Schedule:Compact, + Work Eff Sch, !- Name + Any Number, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: Alldays, !- Field 2 + Until: 24:00,0.00; !- Field 3 + + Schedule:Compact, + Clothing Sch, !- Name + Any Number, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: Alldays, !- Field 2 + Until: 24:00,1.00; !- Field 3 + + Schedule:Compact, + Air Velo Sch, !- Name + Any Number, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: Alldays, !- Field 2 + Until: 24:00,0.137; !- Field 3 + + Schedule:Compact, + Office Occupancy, !- Name + ANY NUMBER, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: Weekdays, !- Field 2 + Until: 6:00,0.00, !- Field 3 + Until: 7:00,0.10, !- Field 5 + Until: 8:00,0.50, !- Field 7 + Until: 12:00,1.00, !- Field 9 + Until: 13:00,0.50, !- Field 11 + Until: 16:00,1.00, !- Field 13 + Until: 17:00,0.50, !- Field 15 + Until: 18:00,0.10, !- Field 17 + Until: 24:00,0.00, !- Field 19 + For: Weekends Holidays CustomDay1 CustomDay2, !- Field 21 + Until: 24:00,0.00, !- Field 22 + For: SummerDesignDay, !- Field 24 + Until: 24:00,1.00, !- Field 25 + For: WinterDesignDay, !- Field 27 + Until: 24:00,5.00E-002; !- Field 28 + + Schedule:Compact, + Intermittent, !- Name + ANY NUMBER, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: Weekdays, !- Field 2 + Until: 8:00,0.00, !- Field 3 + Until: 18:00,1.00, !- Field 5 + Until: 24:00,0.00, !- Field 7 + For: Weekends Holidays CustomDay1 CustomDay2, !- Field 9 + Until: 24:00,0.00, !- Field 10 + For: SummerDesignDay, !- Field 12 + Until: 24:00,1.00, !- Field 13 + For: WinterDesignDay, !- Field 15 + Until: 24:00,0.15; !- Field 16 + + Schedule:Compact, + Office Lighting, !- Name + ANY NUMBER, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: Weekdays, !- Field 2 + Until: 6:00,5.00E-002, !- Field 3 + Until: 7:00,0.20, !- Field 5 + Until: 17:00,1.00, !- Field 7 + Until: 18:00,0.50, !- Field 9 + Until: 24:00,5.00E-002, !- Field 11 + For: Weekends Holidays CustomDay1 CustomDay2, !- Field 13 + Until: 24:00,5.00E-002, !- Field 14 + For: SummerDesignDay, !- Field 16 + Until: 24:00,1.00, !- Field 17 + For: WinterDesignDay, !- Field 19 + Until: 24:00,0.15; !- Field 20 + + Schedule:Compact, + ON, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: Alldays, !- Field 2 + Until: 24:00,1.00; !- Field 3 + + Schedule:Compact, + HW LOOP TEMP SCHEDULE, !- Name + TEMPERATURE, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: Alldays, !- Field 2 + Until: 24:00,82.00; !- Field 3 + + Schedule:Compact, + FANANDCOILAVAILSCHED, !- Name + FRACTION, !- Schedule Type Limits Name + Through: 3/31, !- Field 1 + For: Alldays, !- Field 2 + Until: 24:00,1.00, !- Field 3 + Through: 9/30, !- Field 5 + For: Weekdays, !- Field 6 + Until: 7:00,0.00, !- Field 7 + Until: 17:00,1.00, !- Field 9 + Until: 24:00,0.00, !- Field 11 + For: Weekends Holidays CustomDay1 CustomDay2, !- Field 13 + Until: 24:00,0.00, !- Field 14 + For: SummerDesignDay WinterDesignDay, !- Field 16 + Until: 24:00,1.00, !- Field 17 + Through: 12/31, !- Field 19 + For: Alldays, !- Field 20 + Until: 24:00,1.00; !- Field 21 + + Schedule:Compact, + COOLINGCOILAVAILSCHED, !- Name + FRACTION, !- Schedule Type Limits Name + Through: 3/31, !- Field 1 + For: Alldays, !- Field 2 + Until: 24:00,0.00, !- Field 3 + Through: 9/30, !- Field 5 + For: Weekdays, !- Field 6 + Until: 7:00,0.00, !- Field 7 + Until: 17:00,1.00, !- Field 9 + Until: 24:00,0.00, !- Field 11 + For: Weekends Holidays CustomDay1 CustomDay2, !- Field 13 + Until: 24:00,0.00, !- Field 14 + For: SummerDesignDay WinterDesignDay, !- Field 16 + Until: 24:00,1.00, !- Field 17 + Through: 12/31, !- Field 19 + For: Alldays, !- Field 20 + Until: 24:00,0.00; !- Field 21 + + Schedule:Compact, + HEATING SETPOINTS, !- Name + TEMPERATURE, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: Weekdays Weekends Holidays CustomDay1 CustomDay2, !- Field 2 + Until: 7:00,15.00, !- Field 3 + Until: 17:00,20.00, !- Field 5 + Until: 24:00,15.00, !- Field 7 + For: SummerDesignDay, !- Field 9 + Until: 24:00,15.00, !- Field 10 + For: WinterDesignDay, !- Field 12 + Until: 24:00,20.00; !- Field 13 + + Schedule:Compact, + COOLING SETPOINTS, !- Name + TEMPERATURE, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: Weekdays Weekends Holidays CustomDay1 CustomDay2, !- Field 2 + Until: 7:00,30.00, !- Field 3 + Until: 17:00,24.00, !- Field 5 + Until: 24:00,30.00, !- Field 7 + For: SummerDesignDay, !- Field 9 + Until: 24:00,24.00, !- Field 10 + For: WinterDesignDay, !- Field 12 + Until: 24:00,50.00; !- Field 13 + + Schedule:Compact, + ZONE CONTROL TYPE SCHED, !- Name + CONTROL TYPE, !- Schedule Type Limits Name + Through: 3/31, !- Field 1 + For: Alldays, !- Field 2 + Until: 24:00,1, !- Field 3 + Through: 9/30, !- Field 5 + For: Alldays, !- Field 6 + Until: 24:00,2, !- Field 7 + Through: 12/31, !- Field 9 + For: Alldays, !- Field 10 + Until: 24:00,1; !- Field 11 + + Schedule:Compact, + CYCLINGFANSCH, !- Name + FRACTION, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: Alldays, !- Field 2 + Until: 24:00,0.00; !- Field 3 + + Schedule:Compact, + CONSTANTFANSCH, !- Name + FRACTION, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: Alldays, !- Field 2 + Until: 24:00,1.00; !- Field 3 + + Site:GroundTemperature:BuildingSurface,20.03,20.03,20.13,20.30,20.43,20.52,20.62,20.77,20.78,20.55,20.44,20.20; + +! original zone origin (0,0,0) + + Zone, + West Zone, !- Name + 0, !- Direction of Relative North {deg} + 0, !- X Origin {m} + 0, !- Y Origin {m} + 0, !- Z Origin {m} + 1, !- Type + 1, !- Multiplier + autocalculate, !- Ceiling Height {m} + autocalculate; !- Volume {m3} + +! original zone origin (6.096,0,0) + + Zone, + EAST ZONE, !- Name + 0, !- Direction of Relative North {deg} + 0, !- X Origin {m} + 0, !- Y Origin {m} + 0, !- Z Origin {m} + 1, !- Type + 1, !- Multiplier + autocalculate, !- Ceiling Height {m} + autocalculate; !- Volume {m3} + +! original zone origin (0,6.096,0) + + Zone, + NORTH ZONE, !- Name + 0, !- Direction of Relative North {deg} + 0, !- X Origin {m} + 0, !- Y Origin {m} + 0, !- Z Origin {m} + 1, !- Type + 1, !- Multiplier + autocalculate, !- Ceiling Height {m} + autocalculate; !- Volume {m3} + + People, + West Zone, !- Name + West Zone, !- Zone or ZoneList or Space or SpaceList Name + Office Occupancy, !- Number of People Schedule Name + people, !- Number of People Calculation Method + 3.000000, !- Number of People + , !- People per Floor Area {person/m2} + , !- Floor Area per Person {m2/person} + 0.3000000, !- Fraction Radiant + , !- Sensible Heat Fraction + Activity Sch, !- Activity Level Schedule Name + 3.82E-8, !- Carbon Dioxide Generation Rate {m3/s-W} + , !- Enable ASHRAE 55 Comfort Warnings + EnclosureAveraged, !- Mean Radiant Temperature Calculation Type + , !- Surface Name/Angle Factor List Name + Work Eff Sch, !- Work Efficiency Schedule Name + ClothingInsulationSchedule, !- Clothing Insulation Calculation Method + , !- Clothing Insulation Calculation Method Schedule Name + Clothing Sch, !- Clothing Insulation Schedule Name + Air Velo Sch, !- Air Velocity Schedule Name + FANGER; !- Thermal Comfort Model 1 Type + + ElectricEquipment, + West Zone ElecEq 1, !- Name + West Zone, !- Zone or ZoneList or Space or SpaceList Name + Intermittent, !- Schedule Name + EquipmentLevel, !- Design Level Calculation Method + 2928.751, !- Design Level {W} + , !- Watts per Zone Floor Area {W/m2} + , !- Watts per Person {W/person} + 0, !- Fraction Latent + 0.3000000, !- Fraction Radiant + 0; !- Fraction Lost + + People, + EAST ZONE, !- Name + EAST ZONE, !- Zone or ZoneList or Space or SpaceList Name + Office Occupancy, !- Number of People Schedule Name + people, !- Number of People Calculation Method + 3.000000, !- Number of People + , !- People per Floor Area {person/m2} + , !- Floor Area per Person {m2/person} + 0.3000000, !- Fraction Radiant + , !- Sensible Heat Fraction + Activity Sch, !- Activity Level Schedule Name + 3.82E-8, !- Carbon Dioxide Generation Rate {m3/s-W} + , !- Enable ASHRAE 55 Comfort Warnings + EnclosureAveraged, !- Mean Radiant Temperature Calculation Type + , !- Surface Name/Angle Factor List Name + Work Eff Sch, !- Work Efficiency Schedule Name + ClothingInsulationSchedule, !- Clothing Insulation Calculation Method + , !- Clothing Insulation Calculation Method Schedule Name + Clothing Sch, !- Clothing Insulation Schedule Name + Air Velo Sch, !- Air Velocity Schedule Name + FANGER; !- Thermal Comfort Model 1 Type + + Lights, + EAST ZONE Lights 1, !- Name + EAST ZONE, !- Zone or ZoneList or Space or SpaceList Name + Office Lighting, !- Schedule Name + LightingLevel, !- Design Level Calculation Method + 1464.375, !- Lighting Level {W} + , !- Watts per Zone Floor Area {W/m2} + , !- Watts per Person {W/person} + 0, !- Return Air Fraction + 0.2000000, !- Fraction Radiant + 0.2000000, !- Fraction Visible + 0, !- Fraction Replaceable + GeneralLights; !- End-Use Subcategory + + ElectricEquipment, + EAST ZONE ElecEq 1, !- Name + EAST ZONE, !- Zone or ZoneList or Space or SpaceList Name + Intermittent, !- Schedule Name + EquipmentLevel, !- Design Level Calculation Method + 1464.375, !- Design Level {W} + , !- Watts per Zone Floor Area {W/m2} + , !- Watts per Person {W/person} + 0, !- Fraction Latent + 0.3000000, !- Fraction Radiant + 0; !- Fraction Lost + + People, + NORTH ZONE, !- Name + NORTH ZONE, !- Zone or ZoneList or Space or SpaceList Name + Office Occupancy, !- Number of People Schedule Name + people, !- Number of People Calculation Method + 4.000000, !- Number of People + , !- People per Floor Area {person/m2} + , !- Floor Area per Person {m2/person} + 0.3000000, !- Fraction Radiant + , !- Sensible Heat Fraction + Activity Sch, !- Activity Level Schedule Name + 3.82E-8, !- Carbon Dioxide Generation Rate {m3/s-W} + , !- Enable ASHRAE 55 Comfort Warnings + EnclosureAveraged, !- Mean Radiant Temperature Calculation Type + , !- Surface Name/Angle Factor List Name + Work Eff Sch, !- Work Efficiency Schedule Name + ClothingInsulationSchedule, !- Clothing Insulation Calculation Method + , !- Clothing Insulation Calculation Method Schedule Name + Clothing Sch, !- Clothing Insulation Schedule Name + Air Velo Sch, !- Air Velocity Schedule Name + FANGER; !- Thermal Comfort Model 1 Type + + Lights, + NORTH ZONE Lights 1, !- Name + NORTH ZONE, !- Zone or ZoneList or Space or SpaceList Name + Office Lighting, !- Schedule Name + LightingLevel, !- Design Level Calculation Method + 878.6252, !- Lighting Level {W} + , !- Watts per Zone Floor Area {W/m2} + , !- Watts per Person {W/person} + 0, !- Return Air Fraction + 0.2000000, !- Fraction Radiant + 0.2000000, !- Fraction Visible + 0, !- Fraction Replaceable + GeneralLights; !- End-Use Subcategory + + ElectricEquipment, + NORTH ZONE ElecEq 1, !- Name + NORTH ZONE, !- Zone or ZoneList or Space or SpaceList Name + Intermittent, !- Schedule Name + EquipmentLevel, !- Design Level Calculation Method + 2928.751, !- Design Level {W} + , !- Watts per Zone Floor Area {W/m2} + , !- Watts per Person {W/person} + 0, !- Fraction Latent + 0.3000000, !- Fraction Radiant + 0; !- Fraction Lost + + GlobalGeometryRules, + UpperLeftCorner, !- Starting Vertex Position + CounterClockWise, !- Vertex Entry Direction + World; !- Coordinate System + + BuildingSurface:Detailed, + Zn001:Wall001, !- Name + Wall, !- Surface Type + EXTWALL80, !- Construction Name + West Zone, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.5000000, !- View Factor to Ground + 4, !- Number of Vertices + 0,0,3.048000, !- X,Y,Z ==> Vertex 1 {m} + 0,0,0, !- X,Y,Z ==> Vertex 2 {m} + 6.096000,0,0, !- X,Y,Z ==> Vertex 3 {m} + 6.096000,0,3.048000; !- X,Y,Z ==> Vertex 4 {m} + + FenestrationSurface:Detailed, + Zn001:Wall001:Win001, !- Name + Window, !- Surface Type + WIN-CON-LIGHT, !- Construction Name + Zn001:Wall001, !- Building Surface Name + , !- Outside Boundary Condition Object + 0.5000000, !- View Factor to Ground + , !- Frame and Divider Name + 1.0, !- Multiplier + 4, !- Number of Vertices + 0.548000,0,2.5000, !- X,Y,Z ==> Vertex 1 {m} + 0.548000,0,0.5000, !- X,Y,Z ==> Vertex 2 {m} + 5.548000,0,0.5000, !- X,Y,Z ==> Vertex 3 {m} + 5.548000,0,2.5000; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn001:Wall002, !- Name + Wall, !- Surface Type + EXTWALL80, !- Construction Name + West Zone, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.5000000, !- View Factor to Ground + 4, !- Number of Vertices + 0,6.096000,3.048000, !- X,Y,Z ==> Vertex 1 {m} + 0,6.096000,0, !- X,Y,Z ==> Vertex 2 {m} + 0,0,0, !- X,Y,Z ==> Vertex 3 {m} + 0,0,3.048000; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn001:Wall003, !- Name + Wall, !- Surface Type + PARTITION06, !- Construction Name + West Zone, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + Zn003:Wall004, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.5000000, !- View Factor to Ground + 4, !- Number of Vertices + 6.096000,6.096000,3.048000, !- X,Y,Z ==> Vertex 1 {m} + 6.096000,6.096000,0, !- X,Y,Z ==> Vertex 2 {m} + 0,6.096000,0, !- X,Y,Z ==> Vertex 3 {m} + 0,6.096000,3.048000; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn001:Wall004, !- Name + Wall, !- Surface Type + PARTITION06, !- Construction Name + West Zone, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + Zn002:Wall004, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.5000000, !- View Factor to Ground + 4, !- Number of Vertices + 6.096000,0,3.048000, !- X,Y,Z ==> Vertex 1 {m} + 6.096000,0,0, !- X,Y,Z ==> Vertex 2 {m} + 6.096000,6.096000,0, !- X,Y,Z ==> Vertex 3 {m} + 6.096000,6.096000,3.048000; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn001:Flr001, !- Name + Floor, !- Surface Type + FLOOR SLAB 8 IN, !- Construction Name + West Zone, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + Zn001:Flr001, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 1.000000, !- View Factor to Ground + 4, !- Number of Vertices + 0,0,0, !- X,Y,Z ==> Vertex 1 {m} + 0,6.096000,0, !- X,Y,Z ==> Vertex 2 {m} + 6.096000,6.096000,0, !- X,Y,Z ==> Vertex 3 {m} + 6.096000,0,0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn001:Roof001, !- Name + Roof, !- Surface Type + ROOF34, !- Construction Name + West Zone, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0, !- View Factor to Ground + 4, !- Number of Vertices + 0,6.096000,3.048000, !- X,Y,Z ==> Vertex 1 {m} + 0,0,3.048000, !- X,Y,Z ==> Vertex 2 {m} + 6.096000,0,3.048000, !- X,Y,Z ==> Vertex 3 {m} + 6.096000,6.096000,3.048000; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn002:Wall001, !- Name + Wall, !- Surface Type + EXTWALL80, !- Construction Name + EAST ZONE, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.5000000, !- View Factor to Ground + 4, !- Number of Vertices + 12.19200,6.096000,3.048000, !- X,Y,Z ==> Vertex 1 {m} + 12.19200,6.096000,0, !- X,Y,Z ==> Vertex 2 {m} + 9.144000,6.096000,0, !- X,Y,Z ==> Vertex 3 {m} + 9.144000,6.096000,3.048000; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn002:Wall002, !- Name + Wall, !- Surface Type + EXTWALL80, !- Construction Name + EAST ZONE, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.5000000, !- View Factor to Ground + 4, !- Number of Vertices + 6.096000,0,3.048000, !- X,Y,Z ==> Vertex 1 {m} + 6.096000,0,0, !- X,Y,Z ==> Vertex 2 {m} + 12.19200,0,0, !- X,Y,Z ==> Vertex 3 {m} + 12.19200,0,3.048000; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn002:Wall003, !- Name + Wall, !- Surface Type + EXTWALL80, !- Construction Name + EAST ZONE, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.5000000, !- View Factor to Ground + 4, !- Number of Vertices + 12.19200,0,3.048000, !- X,Y,Z ==> Vertex 1 {m} + 12.19200,0,0, !- X,Y,Z ==> Vertex 2 {m} + 12.19200,6.096000,0, !- X,Y,Z ==> Vertex 3 {m} + 12.19200,6.096000,3.048000; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn002:Wall004, !- Name + Wall, !- Surface Type + PARTITION06, !- Construction Name + EAST ZONE, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + Zn001:Wall004, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.5000000, !- View Factor to Ground + 4, !- Number of Vertices + 6.096000,6.096000,3.048000, !- X,Y,Z ==> Vertex 1 {m} + 6.096000,6.096000,0, !- X,Y,Z ==> Vertex 2 {m} + 6.096000,0,0, !- X,Y,Z ==> Vertex 3 {m} + 6.096000,0,3.048000; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn002:Wall005, !- Name + Wall, !- Surface Type + PARTITION06, !- Construction Name + EAST ZONE, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + Zn003:Wall005, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.5000000, !- View Factor to Ground + 4, !- Number of Vertices + 9.144000,6.096000,3.048000, !- X,Y,Z ==> Vertex 1 {m} + 9.144000,6.096000,0, !- X,Y,Z ==> Vertex 2 {m} + 6.096000,6.096000,0, !- X,Y,Z ==> Vertex 3 {m} + 6.096000,6.096000,3.048000; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn002:Flr001, !- Name + Floor, !- Surface Type + FLOOR SLAB 8 IN, !- Construction Name + EAST ZONE, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + Zn002:Flr001, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 1.000000, !- View Factor to Ground + 4, !- Number of Vertices + 6.096000,0,0, !- X,Y,Z ==> Vertex 1 {m} + 6.096000,6.096000,0, !- X,Y,Z ==> Vertex 2 {m} + 12.19200,6.096000,0, !- X,Y,Z ==> Vertex 3 {m} + 12.19200,0,0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn002:Roof001, !- Name + Roof, !- Surface Type + ROOF34, !- Construction Name + EAST ZONE, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0, !- View Factor to Ground + 4, !- Number of Vertices + 6.096000,6.096000,3.048000, !- X,Y,Z ==> Vertex 1 {m} + 6.096000,0,3.048000, !- X,Y,Z ==> Vertex 2 {m} + 12.19200,0,3.048000, !- X,Y,Z ==> Vertex 3 {m} + 12.19200,6.096000,3.048000; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn003:Wall001, !- Name + Wall, !- Surface Type + EXTWALL80, !- Construction Name + NORTH ZONE, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.5000000, !- View Factor to Ground + 4, !- Number of Vertices + 0,12.19200,3.048000, !- X,Y,Z ==> Vertex 1 {m} + 0,12.19200,0, !- X,Y,Z ==> Vertex 2 {m} + 0,6.096000,0, !- X,Y,Z ==> Vertex 3 {m} + 0,6.096000,3.048000; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn003:Wall002, !- Name + Wall, !- Surface Type + EXTWALL80, !- Construction Name + NORTH ZONE, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.5000000, !- View Factor to Ground + 4, !- Number of Vertices + 9.144000,12.19200,3.048000, !- X,Y,Z ==> Vertex 1 {m} + 9.144000,12.19200,0, !- X,Y,Z ==> Vertex 2 {m} + 0,12.19200,0, !- X,Y,Z ==> Vertex 3 {m} + 0,12.19200,3.048000; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn003:Wall003, !- Name + Wall, !- Surface Type + EXTWALL80, !- Construction Name + NORTH ZONE, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.5000000, !- View Factor to Ground + 4, !- Number of Vertices + 9.144000,6.096000,3.048000, !- X,Y,Z ==> Vertex 1 {m} + 9.144000,6.096000,0, !- X,Y,Z ==> Vertex 2 {m} + 9.144000,12.19200,0, !- X,Y,Z ==> Vertex 3 {m} + 9.144000,12.19200,3.048000; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn003:Wall004, !- Name + Wall, !- Surface Type + PARTITION06, !- Construction Name + NORTH ZONE, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + Zn001:Wall003, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.5000000, !- View Factor to Ground + 4, !- Number of Vertices + 0,6.096000,3.048000, !- X,Y,Z ==> Vertex 1 {m} + 0,6.096000,0, !- X,Y,Z ==> Vertex 2 {m} + 6.096000,6.096000,0, !- X,Y,Z ==> Vertex 3 {m} + 6.096000,6.096000,3.048000; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn003:Wall005, !- Name + Wall, !- Surface Type + PARTITION06, !- Construction Name + NORTH ZONE, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + Zn002:Wall005, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.5000000, !- View Factor to Ground + 4, !- Number of Vertices + 6.096000,6.096000,3.048000, !- X,Y,Z ==> Vertex 1 {m} + 6.096000,6.096000,0, !- X,Y,Z ==> Vertex 2 {m} + 9.144000,6.096000,0, !- X,Y,Z ==> Vertex 3 {m} + 9.144000,6.096000,3.048000; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn003:Flr001, !- Name + Floor, !- Surface Type + FLOOR SLAB 8 IN, !- Construction Name + NORTH ZONE, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + Zn003:Flr001, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 1.000000, !- View Factor to Ground + 4, !- Number of Vertices + 0,6.096000,0, !- X,Y,Z ==> Vertex 1 {m} + 0,12.19200,0, !- X,Y,Z ==> Vertex 2 {m} + 9.144000,12.19200,0, !- X,Y,Z ==> Vertex 3 {m} + 9.144000,6.096000,0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn003:Roof001, !- Name + Roof, !- Surface Type + ROOF34, !- Construction Name + NORTH ZONE, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0, !- View Factor to Ground + 4, !- Number of Vertices + 0,12.19200,3.048000, !- X,Y,Z ==> Vertex 1 {m} + 0,6.096000,3.048000, !- X,Y,Z ==> Vertex 2 {m} + 9.144000,6.096000,3.048000, !- X,Y,Z ==> Vertex 3 {m} + 9.144000,12.19200,3.048000; !- X,Y,Z ==> Vertex 4 {m} + + Sizing:Parameters, + 1.5, !- Heating Sizing Factor + 1.5, !- Cooling Sizing Factor + ; !- Timesteps in Averaging Window + + Sizing:Zone, + West Zone, !- Zone or ZoneList Name + SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method + 12., !- Zone Cooling Design Supply Air Temperature {C} + , !- Zone Cooling Design Supply Air Temperature Difference {deltaC} + SupplyAirTemperature, !- Zone Heating Design Supply Air Temperature Input Method + 50., !- Zone Heating Design Supply Air Temperature {C} + , !- Zone Heating Design Supply Air Temperature Difference {deltaC} + 0.008, !- Zone Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir} + 0.008, !- Zone Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir} + SZ DSOA West Zone, !- Design Specification Outdoor Air Object Name + 0.0, !- Zone Heating Sizing Factor + 0.0, !- Zone Cooling Sizing Factor + DesignDay, !- Cooling Design Air Flow Method + 0, !- Cooling Design Air Flow Rate {m3/s} + , !- Cooling Minimum Air Flow per Zone Floor Area {m3/s-m2} + , !- Cooling Minimum Air Flow {m3/s} + , !- Cooling Minimum Air Flow Fraction + DesignDay, !- Heating Design Air Flow Method + 0, !- Heating Design Air Flow Rate {m3/s} + , !- Heating Maximum Air Flow per Zone Floor Area {m3/s-m2} + , !- Heating Maximum Air Flow {m3/s} + , !- Heating Maximum Air Flow Fraction + , !- Design Specification Zone Air Distribution Object Name + No, !- Account for Dedicated Outdoor Air System + NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy + autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C} + autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + + DesignSpecification:OutdoorAir, + SZ DSOA West Zone, !- Name + flow/person, !- Outdoor Air Method + 0.00944, !- Outdoor Air Flow per Person {m3/s-person} + 0.0, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2} + 0.0; !- Outdoor Air Flow per Zone {m3/s} + + Sizing:Zone, + EAST ZONE, !- Zone or ZoneList Name + SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method + 12., !- Zone Cooling Design Supply Air Temperature {C} + , !- Zone Cooling Design Supply Air Temperature Difference {deltaC} + SupplyAirTemperature, !- Zone Heating Design Supply Air Temperature Input Method + 50., !- Zone Heating Design Supply Air Temperature {C} + , !- Zone Heating Design Supply Air Temperature Difference {deltaC} + 0.008, !- Zone Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir} + 0.008, !- Zone Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir} + SZ DSOA EAST ZONE, !- Design Specification Outdoor Air Object Name + 0.0, !- Zone Heating Sizing Factor + 0.0, !- Zone Cooling Sizing Factor + DesignDay, !- Cooling Design Air Flow Method + 0, !- Cooling Design Air Flow Rate {m3/s} + , !- Cooling Minimum Air Flow per Zone Floor Area {m3/s-m2} + , !- Cooling Minimum Air Flow {m3/s} + , !- Cooling Minimum Air Flow Fraction + DesignDay, !- Heating Design Air Flow Method + 0, !- Heating Design Air Flow Rate {m3/s} + , !- Heating Maximum Air Flow per Zone Floor Area {m3/s-m2} + , !- Heating Maximum Air Flow {m3/s} + , !- Heating Maximum Air Flow Fraction + , !- Design Specification Zone Air Distribution Object Name + No, !- Account for Dedicated Outdoor Air System + NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy + autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C} + autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + + DesignSpecification:OutdoorAir, + SZ DSOA EAST ZONE, !- Name + flow/person, !- Outdoor Air Method + 0.00944, !- Outdoor Air Flow per Person {m3/s-person} + 0.0, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2} + 0.0; !- Outdoor Air Flow per Zone {m3/s} + + Sizing:Zone, + NORTH ZONE, !- Zone or ZoneList Name + SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method + 12., !- Zone Cooling Design Supply Air Temperature {C} + , !- Zone Cooling Design Supply Air Temperature Difference {deltaC} + SupplyAirTemperature, !- Zone Heating Design Supply Air Temperature Input Method + 50., !- Zone Heating Design Supply Air Temperature {C} + , !- Zone Heating Design Supply Air Temperature Difference {deltaC} + 0.008, !- Zone Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir} + 0.008, !- Zone Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir} + SZ DSOA NORTH ZONE, !- Design Specification Outdoor Air Object Name + 0.0, !- Zone Heating Sizing Factor + 0.0, !- Zone Cooling Sizing Factor + DesignDay, !- Cooling Design Air Flow Method + 0, !- Cooling Design Air Flow Rate {m3/s} + , !- Cooling Minimum Air Flow per Zone Floor Area {m3/s-m2} + , !- Cooling Minimum Air Flow {m3/s} + , !- Cooling Minimum Air Flow Fraction + DesignDay, !- Heating Design Air Flow Method + 0, !- Heating Design Air Flow Rate {m3/s} + , !- Heating Maximum Air Flow per Zone Floor Area {m3/s-m2} + , !- Heating Maximum Air Flow {m3/s} + , !- Heating Maximum Air Flow Fraction + , !- Design Specification Zone Air Distribution Object Name + No, !- Account for Dedicated Outdoor Air System + NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy + autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C} + autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + + DesignSpecification:OutdoorAir, + SZ DSOA NORTH ZONE, !- Name + flow/person, !- Outdoor Air Method + 0.00944, !- Outdoor Air Flow per Person {m3/s-person} + 0.0, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2} + 0.0; !- Outdoor Air Flow per Zone {m3/s} + + Sizing:Plant, + Hot Water Loop, !- Plant or Condenser Loop Name + heating, !- Loop Type + 82., !- Design Loop Exit Temperature {C} + 11; !- Loop Design Temperature Difference {deltaC} + + PlantLoop, + Hot Water Loop, !- Name + Water, !- Fluid Type + , !- User Defined Fluid Type + Hot Loop Operation, !- Plant Equipment Operation Scheme Name + HW Supply Outlet Node, !- Loop Temperature Setpoint Node Name + 100, !- Maximum Loop Temperature {C} + 10, !- Minimum Loop Temperature {C} + autosize, !- Maximum Loop Flow Rate {m3/s} + 0.0, !- Minimum Loop Flow Rate {m3/s} + autocalculate, !- Plant Loop Volume {m3} + HW Supply Inlet Node, !- Plant Side Inlet Node Name + HW Supply Outlet Node, !- Plant Side Outlet Node Name + Heating Supply Side Branches, !- Plant Side Branch List Name + Heating Supply Side Connectors, !- Plant Side Connector List Name + HW Demand Inlet Node, !- Demand Side Inlet Node Name + HW Demand Outlet Node, !- Demand Side Outlet Node Name + Heating Demand Side Branches, !- Demand Side Branch List Name + Heating Demand Side Connectors, !- Demand Side Connector List Name + Optimal; !- Load Distribution Scheme + + SetpointManager:Scheduled, + Hot Water Loop Setpoint Manager, !- Name + Temperature, !- Control Variable + HW Loop Temp Schedule, !- Schedule Name + Hot Water Loop Setpoint Node List; !- Setpoint Node or NodeList Name + + NodeList, + Hot Water Loop Setpoint Node List, !- Name + HW Supply Outlet Node; !- Node 1 Name + + BranchList, + Heating Supply Side Branches, !- Name + Heating Supply Inlet Branch, !- Branch 1 Name + Heating Purchased Hot Water Branch, !- Branch 2 Name + Heating Supply Bypass Branch, !- Branch 3 Name + Heating Supply Outlet Branch; !- Branch 4 Name + + ConnectorList, + Heating Supply Side Connectors, !- Name + Connector:Splitter, !- Connector 1 Object Type + Heating Supply Splitter, !- Connector 1 Name + Connector:Mixer, !- Connector 2 Object Type + Heating Supply Mixer; !- Connector 2 Name + + Connector:Splitter, + Heating Supply Splitter, !- Name + Heating Supply Inlet Branch, !- Inlet Branch Name + Heating Purchased Hot Water Branch, !- Outlet Branch 1 Name + Heating Supply Bypass Branch; !- Outlet Branch 2 Name + + Connector:Mixer, + Heating Supply Mixer, !- Name + Heating Supply Outlet Branch, !- Outlet Branch Name + Heating Purchased Hot Water Branch, !- Inlet Branch 1 Name + Heating Supply Bypass Branch; !- Inlet Branch 2 Name + + Branch, + Heating Supply Inlet Branch, !- Name + , !- Pressure Drop Curve Name + Pump:VariableSpeed, !- Component 1 Object Type + HW Circ Pump, !- Component 1 Name + HW Supply Inlet Node, !- Component 1 Inlet Node Name + HW Pump Outlet Node; !- Component 1 Outlet Node Name + + Branch, + Heating Purchased Hot Water Branch, !- Name + , !- Pressure Drop Curve Name + DistrictHeating:Water, !- Component 1 Object Type + Purchased Heating, !- Component 1 Name + Purchased Heat Inlet Node, !- Component 1 Inlet Node Name + Purchased Heat Outlet Node; !- Component 1 Outlet Node Name + + Branch, + Heating Supply Bypass Branch, !- Name + , !- Pressure Drop Curve Name + Pipe:Adiabatic, !- Component 1 Object Type + Heating Supply Side Bypass, !- Component 1 Name + Heating Supply Bypass Inlet Node, !- Component 1 Inlet Node Name + Heating Supply Bypass Outlet Node; !- Component 1 Outlet Node Name + + Pipe:Adiabatic, + Heating Supply Side Bypass, !- Name + Heating Supply Bypass Inlet Node, !- Inlet Node Name + Heating Supply Bypass Outlet Node; !- Outlet Node Name + + Branch, + Heating Supply Outlet Branch, !- Name + , !- Pressure Drop Curve Name + Pipe:Adiabatic, !- Component 1 Object Type + Heating Supply Outlet, !- Component 1 Name + Heating Supply Exit Pipe Inlet Node, !- Component 1 Inlet Node Name + HW Supply Outlet Node; !- Component 1 Outlet Node Name + + Pipe:Adiabatic, + Heating Supply Outlet, !- Name + Heating Supply Exit Pipe Inlet Node, !- Inlet Node Name + HW Supply Outlet Node; !- Outlet Node Name + + Pump:VariableSpeed, + HW Circ Pump, !- Name + HW Supply Inlet Node, !- Inlet Node Name + HW Pump Outlet Node, !- Outlet Node Name + autosize, !- Design Maximum Flow Rate {m3/s} + 179352, !- Design Pump Head {Pa} + autosize, !- Design Power Consumption {W} + 0.9, !- Motor Efficiency + 0.0, !- Fraction of Motor Inefficiencies to Fluid Stream + 0, !- Coefficient 1 of the Part Load Performance Curve + 1, !- Coefficient 2 of the Part Load Performance Curve + 0, !- Coefficient 3 of the Part Load Performance Curve + 0, !- Coefficient 4 of the Part Load Performance Curve + 0, !- Design Minimum Flow Rate {m3/s} + INTERMITTENT; !- Pump Control Type + + BranchList, + Heating Demand Side Branches, !- Name + ZonesHWInletBranch, !- Branch 1 Name + Zone1HWBranch, !- Branch 2 Name + Zone2HWBranch, !- Branch 3 Name + Zone3HWBranch, !- Branch 4 Name + ZonesHWBypassBranch, !- Branch 5 Name + ZonesHWOutletBranch; !- Branch 6 Name + + ConnectorList, + Heating Demand Side Connectors, !- Name + Connector:Splitter, !- Connector 1 Object Type + Zones HW Splitter, !- Connector 1 Name + Connector:Mixer, !- Connector 2 Object Type + Zones HW Mixer; !- Connector 2 Name + + Connector:Splitter, + Zones HW Splitter, !- Name + ZonesHWInletBranch, !- Inlet Branch Name + Zone1HWBranch, !- Outlet Branch 1 Name + Zone2HWBranch, !- Outlet Branch 2 Name + Zone3HWBranch, !- Outlet Branch 3 Name + ZonesHWBypassBranch; !- Outlet Branch 4 Name + + Connector:Mixer, + Zones HW Mixer, !- Name + ZonesHWOutletBranch, !- Outlet Branch Name + Zone1HWBranch, !- Inlet Branch 1 Name + Zone2HWBranch, !- Inlet Branch 2 Name + Zone3HWBranch, !- Inlet Branch 3 Name + ZonesHWBypassBranch; !- Inlet Branch 4 Name + + Branch, + ZonesHWInletBranch, !- Name + , !- Pressure Drop Curve Name + Pipe:Adiabatic, !- Component 1 Object Type + ZonesHWInletPipe, !- Component 1 Name + HW Demand Inlet Node, !- Component 1 Inlet Node Name + HW Demand Entrance Pipe Outlet Node; !- Component 1 Outlet Node Name + + Pipe:Adiabatic, + ZonesHWInletPipe, !- Name + HW Demand Inlet Node, !- Inlet Node Name + HW Demand Entrance Pipe Outlet Node; !- Outlet Node Name + + Branch, + ZonesHWOutletBranch, !- Name + , !- Pressure Drop Curve Name + Pipe:Adiabatic, !- Component 1 Object Type + ZonesHWOutletPipe, !- Component 1 Name + HW Demand Exit Pipe Inlet Node, !- Component 1 Inlet Node Name + HW Demand Outlet Node; !- Component 1 Outlet Node Name + + Pipe:Adiabatic, + ZonesHWOutletPipe, !- Name + HW Demand Exit Pipe Inlet Node, !- Inlet Node Name + HW Demand Outlet Node; !- Outlet Node Name + + Branch, + Zone1HWBranch, !- Name + , !- Pressure Drop Curve Name + ZoneHVAC:Baseboard:Convective:Water, !- Component 1 Object Type + Zone1Baseboard, !- Component 1 Name + Zone1BBHWInletNode, !- Component 1 Inlet Node Name + Zone1BBHWOutletNode; !- Component 1 Outlet Node Name + + Branch, + Zone2HWBranch, !- Name + , !- Pressure Drop Curve Name + ZoneHVAC:Baseboard:Convective:Water, !- Component 1 Object Type + Zone2Baseboard, !- Component 1 Name + Zone2BBHWInletNode, !- Component 1 Inlet Node Name + Zone2BBHWOutletNode; !- Component 1 Outlet Node Name + + Branch, + Zone3HWBranch, !- Name + , !- Pressure Drop Curve Name + ZoneHVAC:Baseboard:Convective:Water, !- Component 1 Object Type + Zone3Baseboard, !- Component 1 Name + Zone3BBHWInletNode, !- Component 1 Inlet Node Name + Zone3BBHWOutletNode; !- Component 1 Outlet Node Name + + Branch, + ZonesHWBypassBranch, !- Name + , !- Pressure Drop Curve Name + Pipe:Adiabatic, !- Component 1 Object Type + ZonesHWBypassPipe, !- Component 1 Name + ZonesHWBypassInletNode, !- Component 1 Inlet Node Name + ZonesHWBypassOutletNode; !- Component 1 Outlet Node Name + + Pipe:Adiabatic, + ZonesHWBypassPipe, !- Name + ZonesHWBypassInletNode, !- Inlet Node Name + ZonesHWBypassOutletNode; !- Outlet Node Name + + PlantEquipmentOperationSchemes, + Hot Loop Operation, !- Name + PlantEquipmentOperation:HeatingLoad, !- Control Scheme 1 Object Type + Purchased Heating Only, !- Control Scheme 1 Name + ON; !- Control Scheme 1 Schedule Name + + PlantEquipmentOperation:HeatingLoad, + Purchased Heating Only, !- Name + 0, !- Load Range 1 Lower Limit {W} + 1000000, !- Load Range 1 Upper Limit {W} + heating plant; !- Range 1 Equipment List Name + + PlantEquipmentList, + heating plant, !- Name + DistrictHeating:Water, !- Equipment 1 Object Type + Purchased Heating; !- Equipment 1 Name + + DistrictHeating:Water, + Purchased Heating, !- Name + Purchased Heat Inlet Node, !- Hot Water Inlet Node Name + Purchased Heat Outlet Node, !- Hot Water Outlet Node Name + 1000000; !- Nominal Capacity {W} + + EnergyManagementSystem:CurveOrTableIndexVariable, + WindACCoolCapFT, !- Name + WindACCoolCapFT; !- Curve or Table Object Name + + Curve:Biquadratic, + WindACCoolCapFT, !- Name + 0.942587793, !- Coefficient1 Constant + 0.009543347, !- Coefficient2 x + 0.000683770, !- Coefficient3 x**2 + -0.011042676, !- Coefficient4 y + 0.000005249, !- Coefficient5 y**2 + -0.000009720, !- Coefficient6 x*y + 12.77778, !- Minimum Value of x + 23.88889, !- Maximum Value of x + 18.0, !- Minimum Value of y + 46.11111, !- Maximum Value of y + , !- Minimum Curve Output + , !- Maximum Curve Output + Temperature, !- Input Unit Type for X + Temperature, !- Input Unit Type for Y + Dimensionless; !- Output Unit Type + + EnergyManagementSystem:CurveOrTableIndexVariable, + WindACEIRFT, !- Name + WindACEIRFT; !- Curve or Table Object Name + + Curve:Biquadratic, + WindACEIRFT, !- Name + 0.342414409, !- Coefficient1 Constant + 0.034885008, !- Coefficient2 x + -0.000623700, !- Coefficient3 x**2 + 0.004977216, !- Coefficient4 y + 0.000437951, !- Coefficient5 y**2 + -0.000728028, !- Coefficient6 x*y + 12.77778, !- Minimum Value of x + 23.88889, !- Maximum Value of x + 18.0, !- Minimum Value of y + 46.11111, !- Maximum Value of y + , !- Minimum Curve Output + , !- Maximum Curve Output + Temperature, !- Input Unit Type for X + Temperature, !- Input Unit Type for Y + Dimensionless; !- Output Unit Type + + EnergyManagementSystem:CurveOrTableIndexVariable, + WindACCoolCapFFF, !- Name + WindACCoolCapFFF; !- Curve or Table Object Name + + Curve:Quadratic, + WindACCoolCapFFF, !- Name + 0.8, !- Coefficient1 Constant + 0.2, !- Coefficient2 x + 0.0, !- Coefficient3 x**2 + 0.5, !- Minimum Value of x + 1.5; !- Maximum Value of x + + EnergyManagementSystem:CurveOrTableIndexVariable, + WindACEIRFFF, !- Name + WindACEIRFFF; !- Curve or Table Object Name + + Curve:Quadratic, + WindACEIRFFF, !- Name + 1.1552, !- Coefficient1 Constant + -0.1808, !- Coefficient2 x + 0.0256, !- Coefficient3 x**2 + 0.5, !- Minimum Value of x + 1.5; !- Maximum Value of x + + EnergyManagementSystem:CurveOrTableIndexVariable, + WindACPLFFPLR, !- Name + WindACPLFFPLR; !- Curve or Table Object Name + + Curve:Quadratic, + WindACPLFFPLR, !- Name + 0.85, !- Coefficient1 Constant + 0.15, !- Coefficient2 x + 0.0, !- Coefficient3 x**2 + 0.0, !- Minimum Value of x + 1.0; !- Maximum Value of x + + OutdoorAir:NodeList, + OutsideAirInletNodes; !- Node or NodeList Name 1 + + NodeList, + OutsideAirInletNodes, !- Name + Zone1WindACOAInNode, !- Node 1 Name + Zone2WindACOAInNode, !- Node 2 Name + Zone3WindACOAInNode; !- Node 3 Name + + ZoneControl:Thermostat, + Zone 1 Thermostat, !- Name + West Zone, !- Zone or ZoneList Name + Zone Control Type Sched, !- Control Type Schedule Name + ThermostatSetpoint:SingleHeating, !- Control 1 Object Type + Heating Setpoint with SB,!- Control 1 Name + ThermostatSetpoint:SingleCooling, !- Control 2 Object Type + Cooling Setpoint with SB;!- Control 2 Name + + ZoneControl:Thermostat, + Zone 2 Thermostat, !- Name + EAST ZONE, !- Zone or ZoneList Name + Zone Control Type Sched, !- Control Type Schedule Name + ThermostatSetpoint:SingleHeating, !- Control 1 Object Type + Heating Setpoint with SB,!- Control 1 Name + ThermostatSetpoint:SingleCooling, !- Control 2 Object Type + Cooling Setpoint with SB;!- Control 2 Name + + ZoneControl:Thermostat, + Zone 3 Thermostat, !- Name + NORTH ZONE, !- Zone or ZoneList Name + Zone Control Type Sched, !- Control Type Schedule Name + ThermostatSetpoint:SingleHeating, !- Control 1 Object Type + Heating Setpoint with SB,!- Control 1 Name + ThermostatSetpoint:SingleCooling, !- Control 2 Object Type + Cooling Setpoint with SB;!- Control 2 Name + + ThermostatSetpoint:SingleHeating, + Heating Setpoint with SB,!- Name + Heating Setpoints; !- Setpoint Temperature Schedule Name + + ThermostatSetpoint:SingleCooling, + Cooling Setpoint with SB,!- Name + Cooling Setpoints; !- Setpoint Temperature Schedule Name + + ZoneHVAC:EquipmentConnections, + West Zone, !- Zone Name + Zone1Equipment, !- Zone Conditioning Equipment List Name + Zone1Inlets, !- Zone Air Inlet Node or NodeList Name + Zone1Exhausts, !- Zone Air Exhaust Node or NodeList Name + Zone 1 Node, !- Zone Air Node Name + Zone 1 Outlet Node; !- Zone Return Air Node or NodeList Name + + ZoneHVAC:EquipmentList, + Zone1Equipment, !- Name + SequentialLoad, !- Load Distribution Scheme + ZoneHVAC:ForcedAir:UserDefined, !- Zone Equipment 1 Object Type + Zone1WindAC, !- Zone Equipment 1 Name + 1, !- Zone Equipment 1 Cooling Sequence + 2, !- Zone Equipment 1 Heating or No-Load Sequence + , !- Zone Equipment 1 Sequential Cooling Fraction Schedule Name + , !- Zone Equipment 1 Sequential Heating Fraction Schedule Name + ZoneHVAC:Baseboard:Convective:Water, !- Zone Equipment 2 Object Type + Zone1Baseboard, !- Zone Equipment 2 Name + 2, !- Zone Equipment 2 Cooling Sequence + 1, !- Zone Equipment 2 Heating or No-Load Sequence + , !- Zone Equipment 2 Sequential Cooling Fraction Schedule Name + ; !- Zone Equipment 2 Sequential Heating Fraction Schedule Name + + NodeList, + Zone1Inlets, !- Name + Zone1WindACAirOutletNode;!- Node 1 Name + + NodeList, + Zone1Exhausts, !- Name + Zone1WindACAirInletNode; !- Node 1 Name + + ZoneHVAC:Baseboard:Convective:Water, + Zone1Baseboard, !- Name + FanAndCoilAvailSched, !- Availability Schedule Name + Zone1BBHWInletNode, !- Inlet Node Name + Zone1BBHWOutletNode, !- Outlet Node Name + HeatingDesignCapacity, !- Heating Design Capacity Method + Autosize, !- Heating Design Capacity {W} + , !- Heating Design Capacity Per Floor Area {W/m2} + , !- Fraction of Autosized Heating Design Capacity + autosize, !- U-Factor Times Area Value {W/K} + autosize, !- Maximum Water Flow Rate {m3/s} + 0.001; !- Convergence Tolerance + + ZoneHVAC:EquipmentConnections, + EAST ZONE, !- Zone Name + Zone2Equipment, !- Zone Conditioning Equipment List Name + Zone2Inlets, !- Zone Air Inlet Node or NodeList Name + Zone2Exhausts, !- Zone Air Exhaust Node or NodeList Name + Zone 2 Node, !- Zone Air Node Name + Zone 2 Outlet Node; !- Zone Return Air Node or NodeList Name + + ZoneHVAC:EquipmentList, + Zone2Equipment, !- Name + SequentialLoad, !- Load Distribution Scheme + ZoneHVAC:ForcedAir:UserDefined, !- Zone Equipment 1 Object Type + Zone2WindAC, !- Zone Equipment 1 Name + 1, !- Zone Equipment 1 Cooling Sequence + 2, !- Zone Equipment 1 Heating or No-Load Sequence + , !- Zone Equipment 1 Sequential Cooling Fraction Schedule Name + , !- Zone Equipment 1 Sequential Heating Fraction Schedule Name + ZoneHVAC:Baseboard:Convective:Water, !- Zone Equipment 2 Object Type + Zone2Baseboard, !- Zone Equipment 2 Name + 2, !- Zone Equipment 2 Cooling Sequence + 1, !- Zone Equipment 2 Heating or No-Load Sequence + , !- Zone Equipment 2 Sequential Cooling Fraction Schedule Name + ; !- Zone Equipment 2 Sequential Heating Fraction Schedule Name + + NodeList, + Zone2Inlets, !- Name + Zone2WindACAirOutletNode;!- Node 1 Name + + NodeList, + Zone2Exhausts, !- Name + Zone2WindACAirInletNode; !- Node 1 Name + + ZoneHVAC:Baseboard:Convective:Water, + Zone2Baseboard, !- Name + FanAndCoilAvailSched, !- Availability Schedule Name + Zone2BBHWInletNode, !- Inlet Node Name + Zone2BBHWOutletNode, !- Outlet Node Name + HeatingDesignCapacity, !- Heating Design Capacity Method + Autosize, !- Heating Design Capacity {W} + , !- Heating Design Capacity Per Floor Area {W/m2} + , !- Fraction of Autosized Heating Design Capacity + autosize, !- U-Factor Times Area Value {W/K} + autosize, !- Maximum Water Flow Rate {m3/s} + 0.001; !- Convergence Tolerance + + ZoneHVAC:EquipmentConnections, + NORTH ZONE, !- Zone Name + Zone3Equipment, !- Zone Conditioning Equipment List Name + Zone3Inlets, !- Zone Air Inlet Node or NodeList Name + Zone3Exhausts, !- Zone Air Exhaust Node or NodeList Name + Zone 3 Node, !- Zone Air Node Name + Zone 3 Outlet Node; !- Zone Return Air Node or NodeList Name + + ZoneHVAC:EquipmentList, + Zone3Equipment, !- Name + SequentialLoad, !- Load Distribution Scheme + ZoneHVAC:ForcedAir:UserDefined, !- Zone Equipment 1 Object Type + Zone3WindAC, !- Zone Equipment 1 Name + 1, !- Zone Equipment 1 Cooling Sequence + 2, !- Zone Equipment 1 Heating or No-Load Sequence + , !- Zone Equipment 1 Sequential Cooling Fraction Schedule Name + , !- Zone Equipment 1 Sequential Heating Fraction Schedule Name + ZoneHVAC:Baseboard:Convective:Water, !- Zone Equipment 2 Object Type + Zone3Baseboard, !- Zone Equipment 2 Name + 2, !- Zone Equipment 2 Cooling Sequence + 1, !- Zone Equipment 2 Heating or No-Load Sequence + , !- Zone Equipment 2 Sequential Cooling Fraction Schedule Name + ; !- Zone Equipment 2 Sequential Heating Fraction Schedule Name + + NodeList, + Zone3Inlets, !- Name + Zone3WindACAirOutletNode;!- Node 1 Name + + NodeList, + Zone3Exhausts, !- Name + Zone3WindACAirInletNode; !- Node 1 Name + + ZoneHVAC:Baseboard:Convective:Water, + Zone3Baseboard, !- Name + FanAndCoilAvailSched, !- Availability Schedule Name + Zone3BBHWInletNode, !- Inlet Node Name + Zone3BBHWOutletNode, !- Outlet Node Name + HeatingDesignCapacity, !- Heating Design Capacity Method + Autosize, !- Heating Design Capacity {W} + , !- Heating Design Capacity Per Floor Area {W/m2} + , !- Fraction of Autosized Heating Design Capacity + autosize, !- U-Factor Times Area Value {W/K} + autosize, !- Maximum Water Flow Rate {m3/s} + 0.001; !- Convergence Tolerance + + Output:Variable,*,Site Outdoor Air Drybulb Temperature,hourly; + + Output:Variable,*,Site Outdoor Air Barometric Pressure,hourly; + + Output:Variable,*,Zone Air System Sensible Cooling Rate,hourly; + + Output:Variable,*,Zone Air System Sensible Heating Rate,hourly; + + Output:Variable,*,Zone Air Temperature,hourly; + + Output:Variable,*,Zone Air Humidity Ratio,hourly; + + Output:Variable,*,Zone 3 WinAC Total Cooling Rate,hourly; + + Output:Variable,*,Zone 3 WinAC Electricity Power,hourly; + + Output:Variable,*,Zone 2 WinAC Total Cooling Rate,hourly; + + Output:Variable,*,Zone 2 WinAC Electricity Power,hourly; + + ! Output:Variable,*,Zone 1 WinAC Total Cooling Rate,hourly; + + ! Output:Variable,Zone 1 WinAC Total Cooling Rate,PythonPlugin:OutputVariable,hourly; + + ! Output:Variable,*,Zone 1 WinAC Electricity Power,hourly; + + ! Output:Variable,Zone 1 WinAC Electricity Power,PythonPlugin:OutputVariable,hourly; + + ! Output:Variable,Zone 1 WinAC Electricity Consumption,PythonPlugin:OutputVariable,hourly; + + Output:Variable,Zone1WindACAirOutletNode,System Node Mass Flow Rate,hourly; + + Output:Variable,Zone2WindACAirOutletNode,System Node Mass Flow Rate,hourly; + + Output:Variable,Zone3WindACAirOutletNode,System Node Mass Flow Rate,hourly; + + Output:Variable,Zone1WindACAirOutletNode,System Node Temperature,hourly; + + Output:Variable,Zone2WindACAirOutletNode,System Node Temperature,hourly; + + Output:Variable,Zone3WindACAirOutletNode,System Node Temperature,hourly; + + Output:Variable,Zone1WindACAirOutletNode,System Node Humidity Ratio,hourly; + + Output:Variable,Zone2WindACAirOutletNode,System Node Humidity Ratio,hourly; + + Output:Variable,Zone3WindACAirOutletNode,System Node Humidity Ratio,hourly; + + Output:Variable,Zone1WindACAirInletNode,System Node Mass Flow Rate,hourly; + + Output:Variable,Zone2WindACAirInletNode,System Node Mass Flow Rate,hourly; + + Output:Variable,Zone3WindACAirInletNode,System Node Mass Flow Rate,hourly; + + Output:Variable,Zone1WindACAirInletNode,System Node Temperature,hourly; + + Output:Variable,Zone2WindACAirInletNode,System Node Temperature,hourly; + + Output:Variable,Zone3WindACAirInletNode,System Node Temperature,hourly; + + Output:Variable,Zone1WindACAirInletNode,System Node Humidity Ratio,hourly; + + Output:Variable,Zone2WindACAirInletNode,System Node Humidity Ratio,hourly; + + Output:Variable,Zone3WindACAirInletNode,System Node Humidity Ratio,hourly; + + Output:Variable,West Zone,Zone Thermostat Cooling Setpoint Temperature,hourly; + + Output:Variable,COOLINGCOILAVAILSCHED,Schedule Value,hourly; + + Output:VariableDictionary,IDF; + + Output:Meter:MeterFileOnly,Electricity:Facility,monthly; + + Output:Meter:MeterFileOnly,Electricity:Building,monthly; + + Output:Meter:MeterFileOnly,InteriorLights:Electricity,monthly; + + Output:Meter:MeterFileOnly,Electricity:HVAC,monthly; + + Output:Meter:MeterFileOnly,Electricity:Plant,monthly; + + Output:Meter:MeterFileOnly,Electricity:Facility,runperiod; + + Output:Meter:MeterFileOnly,Electricity:Building,runperiod; + + Output:Meter:MeterFileOnly,InteriorLights:Electricity,runperiod; + + Output:Meter:MeterFileOnly,Electricity:HVAC,runperiod; + + Output:Meter:MeterFileOnly,Electricity:Plant,runperiod; + + Output:SQLite, + simple; !- Option Type + + OutputControl:Table:Style, + HTML; !- Column Separator + + Output:Table:SummaryReports, + AllSummary; !- Report 1 Name + + ZoneHVAC:ForcedAir:UserDefined, + Zone1WindAC, !- Name + Zone 1 Window AC Model Program Manager, !- Overall Model Simulation Program Calling Manager Name + , !- Model Setup and Sizing Program Calling Manager Name + Zone1WindACAirInletNode, !- Primary Air Inlet Node Name + Zone1WindACAirOutletNode,!- Primary Air Outlet Node Name + Zone1WindACOAInNode, !- Secondary Air Inlet Node Name + Zone1WindACExhNode, !- Secondary Air Outlet Node Name + 0; !- Number of Plant Loop Connections + +! EnergyManagementSystem:ProgramCallingManager, +! Zone 1 Window AC Init Program Manager, !- Name +! UserDefinedComponentModel, !- EnergyPlus Model Calling Point +! InitZone1WinACModel; !- Program Name 1 +! EnergyManagementSystem:Program, +! InitZone1WinACModel, !- Name +! Set dummy = 1; !- Program Line 1 +! EnergyManagementSystem:ProgramCallingManager, +! Zone 1 Window AC Model Program Manager, !- Name +! UserDefinedComponentModel, !- EnergyPlus Model Calling Point +! Zone1_WinAC_ModelInput, !- Program Name 1 +! WinAC_OnFanCycCoil_Sim_Model, !- Program Name 2 +! Zone1_WinAC_ModelOuput; !- Program Name 3 + +! PythonPlugin:Instance, +! Zone 1 Window AC Model Program Manager, !- Name +! Yes, !- Run During Warmup Days +! PythonPluginUserDefinedWindACAuto, !- Python Module Name +! Zone1WinACModel; !- Plugin Class Name + +! EnergyManagementSystem:Program, +! Zone1_WinAC_ModelInput, !- Name +! Set PrimAir_Tinlet = Zone1WinAC_PrimAir_Tinlet, !- Program Line 1 +! Set PrimAir_Winlet = Zone1WinAC_PrimAir_Winlet, !- Program Line 2 +! Set OA_Tdb = Zone1WinAC_OA_Tdb, !- +! Set OA_W = Zone1WinAC_OA_W, !- +! Set Qdot_Request = Zone1WinAC_Qdot_Request, !- +! Set AirOAMdotDesign = Zone1_OADesign_Vdot * Zone1WinAC_OA_rho, !- +! Set AirSupMdotDesign = Zone1_CoolDesign_Mdot, !- +! Set FanEff = 0.5, !- +! Set FanDeltaP = 75.0, !- +! Set RatedCap = Zone1_CoolDesign_Cap / 0.75, !- +! Set RatedEIR = 1 / 3.0, !- +! Set ZoneCoolTstat = Zone1Cooling_Tstat; !- + + EnergyManagementSystem:Program, + Zone1_WinAC_ModelOuput, !- Name + Set Zone1WinAC_PrimAir_MdotOut = PrimAir_MdotOut, !- Program Line 1 + Set Zone1WinAC_PrimAir_MdotIn = PrimAir_MdotIn, !- Program Line 2 + Set Zone1WinAC_PrimAir_Tout = PrimAir_Tout, !- + Set Zone1WinAC_PrimAir_Wout = PrimAir_Wout, !- + Set Zone1WinAC_ElectPower = ElectPower, !- + Set Zone1WinAC_tot_cool_Power = tot_cool_Power, !- + Set Zone1WinAC_ElectEnergy = ElectEnergy, !- + Set Zone1WinAC_OA_MdotIn = OA_MdotIn; !- + + EnergyManagementSystem:Sensor, + COOLINGCOILAVAILSCHED, !- Name + COOLINGCOILAVAILSCHED, !- Output:Variable or Output:Meter Index Key Name + Schedule Value; !- Output:Variable or Output:Meter Name + + EnergyManagementSystem:Sensor, + Zone1Cooling_Tstat, !- Name + West Zone, !- Output:Variable or Output:Meter Index Key Name + Zone Thermostat Cooling Setpoint Temperature; !- Output:Variable or Output:Meter Name + + EnergyManagementSystem:InternalVariable, + Zone1WinAC_PrimAir_Tinlet, !- Name + Zone1WindAC, !- Internal Data Index Key Name + Inlet Temperature for Primary Air Connection; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone1WinAC_PrimAir_Winlet, !- Name + Zone1WindAC, !- Internal Data Index Key Name + Inlet Humidity Ratio for Primary Air Connection; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone1WinAC_PrimAir_Cp, !- Name + Zone1WindAC, !- Internal Data Index Key Name + Inlet Specific Heat for Primary Air Connection; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone1WinAC_Qdot_Request, !- Name + Zone1WindAC, !- Internal Data Index Key Name + Remaining Sensible Load to Cooling Setpoint; !- Internal Data Type + +!EnergyManagementSystem:InternalVariable , Zone1WinAC_PrimAir_rho, Zone1WindAC,Inlet Density for Primary Air Connection; +!EnergyManagementSystem:InternalVariable , Zone1WinAC_PrimAir_cp, Zone1WindAC,Inlet Specific Heat for Primary Air Connection; + + EnergyManagementSystem:InternalVariable, + Zone1WinAC_OA_Tdb, !- Name + Zone1WindAC, !- Internal Data Index Key Name + Inlet Temperature for Secondary Air Connection; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone1WinAC_OA_W, !- Name + Zone1WindAC, !- Internal Data Index Key Name + Inlet Humidity Ratio for Secondary Air Connection; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone1WinAC_OA_rho, !- Name + Zone1WindAC, !- Internal Data Index Key Name + Inlet Density for Secondary Air Connection; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone1_CoolDesign_Cap, !- Name + West Zone, !- Internal Data Index Key Name + Final Zone Design Cooling Load; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone1_CoolDesign_Mdot, !- Name + West Zone, !- Internal Data Index Key Name + Final Zone Design Cooling Air Mass Flow Rate; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone1_OADesign_Vdot, !- Name + West Zone, !- Internal Data Index Key Name + Zone Outdoor Air Design Volume Flow Rate; !- Internal Data Type + + EnergyManagementSystem:Sensor, + OA_Press, !- Name + Environment, !- Output:Variable or Output:Meter Index Key Name + Site Outdoor Air Barometric Pressure; !- Output:Variable or Output:Meter Name + + EnergyManagementSystem:OutputVariable, + Zone 1 WinAC Total Cooling Rate, !- Name + Zone1WinAC_tot_cool_Power, !- EMS Variable Name + Averaged, !- Type of Data in Variable + SystemTimestep, !- Update Frequency + Zone1_WinAC_ModelOuput, !- EMS Program or Subroutine Name + W; !- Units + +! PythonPlugin:Variables, +! MyGlobalVariables, !- Name +! Zone1WinAC_ElectPower, !- Variable Name 1 +! Zone1WinAC_tot_cool_Power, !- Variable Name 2 +! Zone1WinAC_ElectEnergy; !- Variable Name 3 + +! PythonPlugin:OutputVariable, +! Zone 1 WinAC Electricity Power, !- Name +! Zone1WinAC_ElectPower, !- Python Plugin Variable Name +! Averaged, !- Type of Data in Variable +! SystemTimestep, !- Update Frequency +! W; !- Units + +! PythonPlugin:OutputVariable, +! Zone 1 WinAC Total Cooling Rate, !- Name +! Zone1WinAC_tot_cool_Power, !- Python Plugin Variable Name +! Averaged, !- Type of Data in Variable +! SystemTimestep, !- Update Frequency +! W; !- Units + +! EnergyManagementSystem:OutputVariable, +! Zone 1 WinAC Electricity Power, !- Name +! Zone1WinAC_ElectPower, !- EMS Variable Name +! Averaged, !- Type of Data in Variable +! SystemTimestep, !- Update Frequency +! Zone1_WinAC_ModelOuput, !- EMS Program or Subroutine Name +! W; !- Units +! EnergyManagementSystem:MeteredOutputVariable, +! Zone 1 WinAC Electricity Consumption, !- Name +! Zone1WinAC_ElectEnergy, !- EMS Variable Name +! SystemTimestep, !- Update Frequency +! Zone1_WinAC_ModelOuput, !- EMS Program or Subroutine Name +! Electricity, !- Resource Type +! HVAC, !- Group Type +! Cooling, !- End-Use Category +! Window Air Conditioners, !- End-Use Subcategory +! J; !- Units + +! PythonPlugin:OutputVariable, +! Zone 1 WinAC Electricity Consumption, !- Name +! Zone1WinAC_ElectEnergy, !- Python Plugin Variable Name +! Metered, !- Type of Data in Variable +! SystemTimestep, !- Update Frequency +! J, !- Units +! Electricity, !- Resource Type +! HVAC, !- Group Type +! Cooling, !- End-Use Category +! Window Air Conditioners; !- End-Use Subcategory + + ZoneHVAC:ForcedAir:UserDefined, + Zone2WindAC, !- Name + Zone 2 Window AC Model Program Manager, !- Overall Model Simulation Program Calling Manager Name + Zone 2 Window AC Init Program Manager, !- Model Setup and Sizing Program Calling Manager Name + Zone2WindACAirInletNode, !- Primary Air Inlet Node Name + Zone2WindACAirOutletNode,!- Primary Air Outlet Node Name + Zone2WindACOAInNode, !- Secondary Air Inlet Node Name + Zone2WindACExhNode, !- Secondary Air Outlet Node Name + 0; !- Number of Plant Loop Connections + + EnergyManagementSystem:ProgramCallingManager, + Zone 2 Window AC Init Program Manager, !- Name + UserDefinedComponentModel, !- EnergyPlus Model Calling Point + InitZone2WinACModel; !- Program Name 1 + + EnergyManagementSystem:Program, + InitZone2WinACModel, !- Name + Set dummy = 1; !- Program Line 1 + + EnergyManagementSystem:ProgramCallingManager, + Zone 2 Window AC Model Program Manager, !- Name + UserDefinedComponentModel, !- EnergyPlus Model Calling Point + Zone2_WinAC_ModelInput, !- Program Name 1 + WinAC_OnFanCycCoil_Sim_Model, !- Program Name 2 + Zone2_WinAC_ModelOuput; !- Program Name 3 + + EnergyManagementSystem:Program, + Zone2_WinAC_ModelInput, !- Name + Set PrimAir_Tinlet = Zone2WinAC_PrimAir_Tinlet, !- Program Line 1 + Set PrimAir_Winlet = Zone2WinAC_PrimAir_Winlet, !- Program Line 2 + Set OA_Tdb = Zone2WinAC_OA_Tdb, !- + Set OA_W = Zone2WinAC_OA_W, !- + Set Qdot_Request = Zone2WinAC_Qdot_Request, !- + Set AirOAMdotDesign = Zone2_OADesign_Vdot * Zone2WinAC_OA_rho, !- + Set AirSupMdotDesign = Zone2_CoolDesign_Mdot, !- + Set FanEff = 0.5, !- + Set FanDeltaP = 75.0, !- + Set RatedCap = Zone2_CoolDesign_Cap / 0.75, !- + Set RatedEIR = 1 / 3.0, !- + Set ZoneCoolTstat = Zone2Cooling_Tstat; !- + + EnergyManagementSystem:Program, + Zone2_WinAC_ModelOuput, !- Name + Set Zone2WinAC_PrimAir_MdotOut = PrimAir_MdotOut, !- Program Line 1 + Set Zone2WinAC_PrimAir_MdotIn = PrimAir_MdotIn, !- Program Line 2 + Set Zone2WinAC_PrimAir_Tout = PrimAir_Tout, !- + Set Zone2WinAC_PrimAir_Wout = PrimAir_Wout, !- + Set Zone2WinAC_ElectPower = ElectPower, !- + Set Zone2WinAC_tot_cool_Power = tot_cool_Power, !- + Set Zone2WinAC_ElectEnergy = ElectEnergy, !- + Set Zone2WinAC_OA_MdotIn = OA_MdotIn; !- + + EnergyManagementSystem:Sensor, + Zone2Cooling_Tstat, !- Name + East Zone, !- Output:Variable or Output:Meter Index Key Name + Zone Thermostat Cooling Setpoint Temperature; !- Output:Variable or Output:Meter Name + + EnergyManagementSystem:Actuator, + Zone2WinAC_PrimAir_Tout, !- Name + Zone2WindAC, !- Actuated Component Unique Name + Primary Air Connection, !- Actuated Component Type + Outlet Temperature; !- Actuated Component Control Type + + EnergyManagementSystem:Actuator, + Zone2WinAC_PrimAir_Wout, !- Name + Zone2WindAC, !- Actuated Component Unique Name + Primary Air Connection, !- Actuated Component Type + Outlet Humidity Ratio; !- Actuated Component Control Type + + EnergyManagementSystem:Actuator, + Zone2WinAC_PrimAir_MdotOut, !- Name + Zone2WindAC, !- Actuated Component Unique Name + Primary Air Connection, !- Actuated Component Type + Outlet Mass Flow Rate; !- Actuated Component Control Type + + EnergyManagementSystem:Actuator, + Zone2WinAC_PrimAir_MdotIn, !- Name + Zone2WindAC, !- Actuated Component Unique Name + Primary Air Connection, !- Actuated Component Type + Inlet Mass Flow Rate; !- Actuated Component Control Type + + EnergyManagementSystem:Actuator, + Zone2WinAC_OA_MdotIn, !- Name + Zone2WindAC, !- Actuated Component Unique Name + Secondary Air Connection,!- Actuated Component Type + Inlet Mass Flow Rate; !- Actuated Component Control Type + + EnergyManagementSystem:InternalVariable, + Zone2WinAC_PrimAir_Tinlet, !- Name + Zone2WindAC, !- Internal Data Index Key Name + Inlet Temperature for Primary Air Connection; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone2WinAC_PrimAir_Winlet, !- Name + Zone2WindAC, !- Internal Data Index Key Name + Inlet Humidity Ratio for Primary Air Connection; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone2WinAC_PrimAir_Cp, !- Name + Zone2WindAC, !- Internal Data Index Key Name + Inlet Specific Heat for Primary Air Connection; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone2WinAC_Qdot_Request, !- Name + Zone2WindAC, !- Internal Data Index Key Name + Remaining Sensible Load to Cooling Setpoint; !- Internal Data Type + +!EnergyManagementSystem:InternalVariable , Zone2WinAC_PrimAir_rho, Zone2WindAC,Inlet Density for Primary Air Connection; +!EnergyManagementSystem:InternalVariable , Zone2WinAC_PrimAir_cp, Zone2WindAC,Inlet Specific Heat for Primary Air Connection; + + EnergyManagementSystem:InternalVariable, + Zone2WinAC_OA_Tdb, !- Name + Zone2WindAC, !- Internal Data Index Key Name + Inlet Temperature for Secondary Air Connection; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone2WinAC_OA_W, !- Name + Zone2WindAC, !- Internal Data Index Key Name + Inlet Humidity Ratio for Secondary Air Connection; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone2WinAC_OA_rho, !- Name + Zone2WindAC, !- Internal Data Index Key Name + Inlet Density for Secondary Air Connection; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone2_CoolDesign_Cap, !- Name + East Zone, !- Internal Data Index Key Name + Final Zone Design Cooling Load; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone2_CoolDesign_Mdot, !- Name + East Zone, !- Internal Data Index Key Name + Final Zone Design Cooling Air Mass Flow Rate; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone2_OADesign_Vdot, !- Name + East Zone, !- Internal Data Index Key Name + Zone Outdoor Air Design Volume Flow Rate; !- Internal Data Type + + EnergyManagementSystem:OutputVariable, + Zone 2 WinAC Total Cooling Rate, !- Name + Zone2WinAC_tot_cool_Power, !- EMS Variable Name + Averaged, !- Type of Data in Variable + SystemTimestep, !- Update Frequency + Zone2_WinAC_ModelOuput, !- EMS Program or Subroutine Name + W; !- Units + + EnergyManagementSystem:OutputVariable, + Zone 2 WinAC Electricity Power, !- Name + Zone2WinAC_ElectPower, !- EMS Variable Name + Averaged, !- Type of Data in Variable + SystemTimestep, !- Update Frequency + Zone2_WinAC_ModelOuput, !- EMS Program or Subroutine Name + W; !- Units + + EnergyManagementSystem:MeteredOutputVariable, + Zone 2 WinAC Electricity Consumption, !- Name + Zone2WinAC_ElectEnergy, !- EMS Variable Name + SystemTimestep, !- Update Frequency + Zone2_WinAC_ModelOuput, !- EMS Program or Subroutine Name + Electricity, !- Resource Type + HVAC, !- Group Type + Cooling, !- End-Use Category + Window Air Conditioners, !- End-Use Subcategory + J; !- Units + + ZoneHVAC:ForcedAir:UserDefined, + Zone3WindAC, !- Name + Zone 3 Window AC Model Program Manager, !- Overall Model Simulation Program Calling Manager Name + Zone 3 Window AC Init Program Manager, !- Model Setup and Sizing Program Calling Manager Name + Zone3WindACAirInletNode, !- Primary Air Inlet Node Name + Zone3WindACAirOutletNode,!- Primary Air Outlet Node Name + Zone3WindACOAInNode, !- Secondary Air Inlet Node Name + Zone3WindACExhNode, !- Secondary Air Outlet Node Name + 0; !- Number of Plant Loop Connections + + EnergyManagementSystem:ProgramCallingManager, + Zone 3 Window AC Init Program Manager, !- Name + UserDefinedComponentModel, !- EnergyPlus Model Calling Point + InitZone3WinACModel; !- Program Name 1 + + EnergyManagementSystem:Program, + InitZone3WinACModel, !- Name + Set dummy = 1; !- Program Line 1 + + EnergyManagementSystem:ProgramCallingManager, + Zone 3 Window AC Model Program Manager, !- Name + UserDefinedComponentModel, !- EnergyPlus Model Calling Point + Zone3_WinAC_ModelInput, !- Program Name 1 + WinAC_OnFanCycCoil_Sim_Model, !- Program Name 2 + Zone3_WinAC_ModelOuput; !- Program Name 3 + + EnergyManagementSystem:Program, + Zone3_WinAC_ModelInput, !- Name + Set PrimAir_Tinlet = Zone3WinAC_PrimAir_Tinlet, !- Program Line 1 + Set PrimAir_Winlet = Zone3WinAC_PrimAir_Winlet, !- Program Line 2 + Set OA_Tdb = Zone3WinAC_OA_Tdb, !- + Set OA_W = Zone3WinAC_OA_W, !- + Set Qdot_Request = Zone3WinAC_Qdot_Request, !- + Set AirOAMdotDesign = Zone3_OADesign_Vdot * Zone3WinAC_OA_rho, !- + Set AirSupMdotDesign = Zone3_CoolDesign_Mdot, !- + Set FanEff = 0.5, !- + Set FanDeltaP = 75.0, !- + Set RatedCap = Zone3_CoolDesign_Cap / 0.75, !- + Set RatedEIR = 1 / 3.0, !- + Set ZoneCoolTstat = Zone3_Cooling_Tstat; !- + + EnergyManagementSystem:Program, + Zone3_WinAC_ModelOuput, !- Name + Set Zone3WinAC_PrimAir_MdotOut = PrimAir_MdotOut, !- Program Line 1 + Set Zone3WinAC_PrimAir_MdotIn = PrimAir_MdotIn, !- Program Line 2 + Set Zone3WinAC_PrimAir_Tout = PrimAir_Tout, !- + Set Zone3WinAC_PrimAir_Wout = PrimAir_Wout, !- + Set Zone3WinAC_ElectPower = ElectPower, !- + Set Zone3WinAC_tot_cool_Power = tot_cool_Power, !- + Set Zone3WinAC_ElectEnergy = ElectEnergy, !- + Set Zone3WinAC_OA_MdotIn = OA_MdotIn; !- + + EnergyManagementSystem:Sensor, + Zone3_Cooling_Tstat, !- Name + North Zone, !- Output:Variable or Output:Meter Index Key Name + Zone Thermostat Cooling Setpoint Temperature; !- Output:Variable or Output:Meter Name + + EnergyManagementSystem:Actuator, + Zone3WinAC_PrimAir_Tout, !- Name + Zone3WindAC, !- Actuated Component Unique Name + Primary Air Connection, !- Actuated Component Type + Outlet Temperature; !- Actuated Component Control Type + + EnergyManagementSystem:Actuator, + Zone3WinAC_PrimAir_Wout, !- Name + Zone3WindAC, !- Actuated Component Unique Name + Primary Air Connection, !- Actuated Component Type + Outlet Humidity Ratio; !- Actuated Component Control Type + + EnergyManagementSystem:Actuator, + Zone3WinAC_PrimAir_MdotOut, !- Name + Zone3WindAC, !- Actuated Component Unique Name + Primary Air Connection, !- Actuated Component Type + Outlet Mass Flow Rate; !- Actuated Component Control Type + + EnergyManagementSystem:Actuator, + Zone3WinAC_PrimAir_MdotIn, !- Name + Zone3WindAC, !- Actuated Component Unique Name + Primary Air Connection, !- Actuated Component Type + Inlet Mass Flow Rate; !- Actuated Component Control Type + + EnergyManagementSystem:Actuator, + Zone3WinAC_OA_MdotIn, !- Name + Zone3WindAC, !- Actuated Component Unique Name + Secondary Air Connection,!- Actuated Component Type + Inlet Mass Flow Rate; !- Actuated Component Control Type + + EnergyManagementSystem:InternalVariable, + Zone3WinAC_PrimAir_Tinlet, !- Name + Zone3WindAC, !- Internal Data Index Key Name + Inlet Temperature for Primary Air Connection; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone3WinAC_PrimAir_Winlet, !- Name + Zone3WindAC, !- Internal Data Index Key Name + Inlet Humidity Ratio for Primary Air Connection; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone3WinAC_PrimAir_Cp, !- Name + Zone3WindAC, !- Internal Data Index Key Name + Inlet Specific Heat for Primary Air Connection; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone3WinAC_Qdot_Request, !- Name + Zone3WindAC, !- Internal Data Index Key Name + Remaining Sensible Load to Cooling Setpoint; !- Internal Data Type + +!EnergyManagementSystem:InternalVariable , Zone3WinAC_PrimAir_rho, Zone3WindAC,Inlet Density for Primary Air Connection; +!EnergyManagementSystem:InternalVariable , Zone3WinAC_PrimAir_cp, Zone3WindAC,Inlet Specific Heat for Primary Air Connection; + + EnergyManagementSystem:InternalVariable, + Zone3WinAC_OA_Tdb, !- Name + Zone3WindAC, !- Internal Data Index Key Name + Inlet Temperature for Secondary Air Connection; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone3WinAC_OA_W, !- Name + Zone3WindAC, !- Internal Data Index Key Name + Inlet Humidity Ratio for Secondary Air Connection; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone3WinAC_OA_rho, !- Name + Zone3WindAC, !- Internal Data Index Key Name + Inlet Density for Secondary Air Connection; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone3_CoolDesign_Cap, !- Name + North Zone, !- Internal Data Index Key Name + Final Zone Design Cooling Load; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone3_CoolDesign_Mdot, !- Name + North Zone, !- Internal Data Index Key Name + Final Zone Design Cooling Air Mass Flow Rate; !- Internal Data Type + + EnergyManagementSystem:InternalVariable, + Zone3_OADesign_Vdot, !- Name + North Zone, !- Internal Data Index Key Name + Zone Outdoor Air Design Volume Flow Rate; !- Internal Data Type + + EnergyManagementSystem:OutputVariable, + Zone 3 WinAC Total Cooling Rate, !- Name + Zone3WinAC_tot_cool_Power, !- EMS Variable Name + Averaged, !- Type of Data in Variable + SystemTimestep, !- Update Frequency + Zone3_WinAC_ModelOuput, !- EMS Program or Subroutine Name + W; !- Units + + EnergyManagementSystem:OutputVariable, + Zone 3 WinAC Electricity Power, !- Name + Zone3WinAC_ElectPower, !- EMS Variable Name + Averaged, !- Type of Data in Variable + SystemTimestep, !- Update Frequency + Zone3_WinAC_ModelOuput, !- EMS Program or Subroutine Name + W; !- Units + + EnergyManagementSystem:MeteredOutputVariable, + Zone 3 WinAC Electricity Consumption, !- Name + Zone3WinAC_ElectEnergy, !- EMS Variable Name + SystemTimestep, !- Update Frequency + Zone3_WinAC_ModelOuput, !- EMS Program or Subroutine Name + Electricity, !- Resource Type + HVAC, !- Group Type + Cooling, !- End-Use Category + Window Air Conditioners; !- End-Use Subcategory + + ! turn it off and leave + ! unit is on and doing some cooling + ! determine mixed air conditions + ! blow thru fan, simulate fan first + ! DX coil at PLR = 1, full output + ! need to find PLR that satisifies load + + EnergyManagementSystem:Program, + WinAC_OnFanCycCoil_Sim_Model, !- Name + IF Qdot_Request < 0.0, !- Program Line 1 + Set QdotReq = Qdot_Request, !- Program Line 2 + ELSE, !- + Set QdotReq = 0.0, !- + ENDIF, !- + IF COOLINGCOILAVAILSCHED == 0.0, !- + Set QdotReq = 0.0, !- + ENDIF, !- + IF QdotReq == 0.0, !- + Set PrimAir_MdotIn = 0.0,!- + Set PrimAir_MdotOut = 0.0, !- + Set PrimAir_Tout = PrimAir_Tinlet, !- + Set PrimAir_Wout = PrimAir_Winlet, !- + Set tot_cool_Power = 0.0,!- + Set ElectPower = 0.0, !- + Set ElectEnergy = 0.0, !- + Set OA_MdotIn = 0.0, !- + RETURN, !- + ENDIF, !- + Set Recirc_Mdot = AirSupMdotDesign - AirOAMdotDesign, !- + Set Recirc_H = @HFnTdbW PrimAir_Tinlet PrimAir_Winlet, !- + Set OA_H = @HFnTdbW OA_Tdb OA_W, !- + Set Mix_H = ((Recirc_Mdot * Recirc_H) + (AirOAMdotDesign * OA_H)) / AirSupMdotDesign, !- + Set Mix_W = ((Recirc_Mdot * PrimAir_Winlet) + (AirOAMdotDesign * OA_W)) / AirSupMdotDesign, !- + Set Mix_Tdb = @TdbFnHW Mix_H Mix_W, !- + Set Mix_rho = @RhoAirFnPbTdbW OA_Press Mix_Tdb Mix_W, !- + Set FanPower = (AirSupMdotDesign * FanDeltaP) / (FanEff * Mix_rho), !- + Set FanPowerToAir = FanPower, !- + Set FanDeltaH = FanPowerToAir/AirSupMdotDesign, !- + Set FanOut_H = Mix_H + FanDeltaH, !- + Set FanOut_W = Mix_W, !- + Set FanOut_Tdb = @TdbFnHW FanOut_H FanOut_W, !- + Set FanOut_Twb = @TwbFnTdbWPb FanOut_Tdb FanOut_W OA_Press, !- + Set RatedCBF = 0.12666, !- + Set LogRatedCBF = @Ln RatedCBF, !- + Set A0 = (0.0 -1.0) * LogRatedCBF * AirSupMdotDesign, !- + Set ADiff = (0.0 - 1.0) * (A0 / AirSupMdotDesign), !- + Set CBF = @Exp ADiff, !- + Set dummy = 0.0, !- + Set TotCapTempModFac = @CurveValue WindACCoolCapFT FanOut_Twb OA_Tdb dummy dummy dummy, !- + Set TotCapFlowModFac = @CurveValue WindACCoolCapFFF 1.0 dummy dummy dummy dummy, !- + Set TotCap = RatedCap * TotCapTempModFac * TotCapFlowModFac, !- + Set HDelta = TotCap / AirSupMdotDesign, !- + Set H_ADP = FanOut_H - (HDelta / ( 1.0 - CBF)), !- + Set T_ADP = @TsatFnHPb H_ADP OA_Press, !- + Set W_ADP = @WfnTdbH T_ADP H_ADP, !- + Set H_Tin_W_ADP = @HFnTdbW FanOut_Tdb W_ADP, !- + IF ((FanOut_H - H_ADP) <> 0.0), !- + Set SHR = (H_Tin_W_ADP - H_ADP)/(FanOut_H - H_ADP ), !- + Set SHR = @Min SHR 1.0, !- + ELSE, !- + Set SHR = 1.0, !- + ENDIF, !- + Set PLR = 1.0, !- + Set FullLoadOutAirEnth = FanOut_H - (TotCap/AirSupMdotDesign), !- + Set hTinwout = FanOut_H - ((1.0 - SHR) * HDelta), !- + IF (SHR < 1.0), !- + Set FullLoadOutAirHumRat = @WFnTdbH FanOut_Tdb hTinwout, !- + ELSE, !- + Set FullLoadOutAirHumRat = FanOut_W, !- + ENDIF, !- + Set FullLoadOutAirTemp = @TdbFnHW FullLoadOutAirEnth FullLoadOutAirHumRat, !- + Set DesiredZone_H = @HFnTdbW ZoneCoolTstat PrimAir_Winlet, !- + Set FullTotCapSens = AirSupMdotDesign * (DesiredZone_H - FullLoadOutAirEnth), !- + Set ABS_FullTotCapSens = @ABS FullTotCapSens, !- + Set ABS_QdotReq = @ABS QdotReq, !- + IF ABS_QdotReq < ABS_FullTotCapSens, !- + Set PLR = (ABS_QdotReq - FanPowerToAir)/ (ABS_FullTotCapSens - FanPowerToAir), !- + Set ErrorTol = 0.0005, !- + Set Iter = 0, !- + Set MaxIter = 30, !- + Set Relax = 0.8, !- + Set ABS_Error = 0.002, !- + WHILE (ABS_Error > ErrorTol) && (Iter < MaxIter), !- + Set OutAir_H = (PLR*FullLoadOutAirEnth) + ((1.0-PLR)* FanOut_H), !- + Set OutAir_W = (PLR*FullLoadOutAirHumRat) + ((1.0-PLR)*FanOut_W), !- + Set OutletAirTemp = @TdbFnHW OutAir_H OutAir_W, !- + Set TotCapTest = AirSupMdotDesign * (DesiredZone_H - OutAir_H), !- + Set Error = (ABS_QdotReq - TotCapTest)/ABS_QdotReq, !- + Set ABS_Error = @ABS Error, !- + IF (ABS_Error > ErrorTol), !- + Set DelPLR = (ABS_QdotReq - TotCapTest) / ABS_FullTotCapSens, !- + Set PLR = PLR + Relax * DelPLR, !- + Set PLR = @min PLR 1.0, !- + ENDIF, !- + Set Iter = Iter + 1, !- + If (Iter == 16), !- + Set Relax = 0.5, !- + ENDIF, !- + ENDWHILE, !- + ELSE, !- + Set PLR = 1.0, !- + Set OutAir_H = FullLoadOutAirEnth, !- + Set OutAir_W = FullLoadOutAirHumRat, !- + Set OutletAirTemp = FullLoadOutAirTemp, !- + ENDIF, !- + Set PLF = @CurveValue WindACPLFFPLR PLR dummy dummy dummy dummy, !- + Set CoilRTF = PLR / PLF, !- + Set CoilRTF = @Min CoilRTF 1.0, !- + Set EIRTempModFac = @CurveValue WindACEIRFT FanOut_Twb OA_Tdb dummy dummy dummy, !- + Set EIRFlowModFac = @CurveValue WindACEIRFFF 1.0 dummy dummy dummy dummy, !- + Set EIR = RatedEIR * EIRTempModFac * EIRFlowModFac, !- + Set DXElecPower = TotCap * CoilRTF * EIR, !- + Set ElectPower = DXElecPower + FanPower, !- + Set ElectEnergy = ElectPower * SystemTimeStep * 3600, !- + Set tot_cool_Power = ABS_FullTotCapSens * PLR, !- + Set PrimAir_MdotOut = AirSupMdotDesign, !- + Set PrimAir_MdotIn = AirSupMdotDesign, !- + Set PrimAir_Tout = OutletAirTemp, !- + SEt PrimAir_Wout = OutAir_W, !- + Set OA_MdotIn = AirOAMdotDesign; !- + + EnergyManagementSystem:GlobalVariable, + PrimAir_Tinlet, !- Erl Variable 1 Name + PrimAir_Winlet, !- Erl Variable 2 Name + PrimAir_MdotOut, !- Erl Variable 3 Name + PrimAir_MdotIn, !- + PrimAir_Tout, !- + PrimAir_Wout, !- + tot_cool_Power, !- + ElectPower, !- + ElectEnergy, !- + OA_Tdb, !- + OA_W, !- + Qdot_Request, !- + AirSupMdotDesign, !- + AirOAMdotDesign, !- + FanEff, !- + FanDeltaP, !- + RatedCap, !- + RatedEIR, !- + OA_MdotIn, !- + ZoneCoolTstat; !- + + Output:EnergyManagementSystem, + Verbose, !- Actuator Availability Dictionary Reporting + verbose, !- Internal Variable Availability Dictionary Reporting + ErrorsOnly; !- EMS Runtime Language Debug Output Level + diff --git a/testfiles/API/user_defined_equipment.py b/testfiles/API/user_defined_equipment.py new file mode 100644 index 00000000000..7236a31b37b --- /dev/null +++ b/testfiles/API/user_defined_equipment.py @@ -0,0 +1,480 @@ +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University +# of Illinois, The Regents of the University of California, through Lawrence +# Berkeley National Laboratory (subject to receipt of any required approvals +# from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- +# Battelle, Alliance for Sustainable Energy, LLC, and other contributors. All +# rights reserved. +# +# NOTICE: This Software was developed under funding from the U.S. Department of +# Energy and the U.S. Government consequently retains certain rights. As such, +# the U.S. Government has been granted for itself and others acting on its +# behalf a paid-up, nonexclusive, irrevocable, worldwide license in the +# Software to reproduce, distribute copies to the public, prepare derivative +# works, and perform publicly and display publicly, and to permit others to do +# so. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# (1) Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# (2) Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# (3) Neither the name of the University of California, Lawrence Berkeley +# National Laboratory, the University of Illinois, U.S. Dept. of Energy nor +# the names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# (4) Use of EnergyPlus(TM) Name. If Licensee (i) distributes the software in +# stand-alone form without changes from the version obtained under this +# License, or (ii) Licensee makes a reference solely to the software +# portion of its product, Licensee must refer to the software as +# "EnergyPlus version X" software, where "X" is the version number Licensee +# obtained under this License and may not use a different name for the +# software. Except as specifically required in this Section (4), Licensee +# shall not use in a company name, a product name, in advertising, +# publicity, or other promotional activities any name, trade name, +# trademark, logo, or other designation of "EnergyPlus", "E+", "e+" or +# confusingly similar designation, without the U.S. Department of Energy's +# prior written consent. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +from pathlib import Path +from sys import argv, float_info, path +from tempfile import mkdtemp +import math + +# convenience +big = float_info.max + +# if running in an installation, it will live at the /ExampleFiles/API, and you don't need any args +install_or_build_dir: Path = Path(__file__).resolve().parent.parent.parent +if len(argv) == 2: + # if running in a build tree, pass in the path to the /Products directory that contains pyenergyplus + install_or_build_dir: Path = Path(argv[1]) +example_file_to_run: str = str(Path(__file__).resolve().parent / 'user_defined_equipment.idf') +try: # This is the new way, if the user's Python environment includes the pip installed energyplus-api-helpers + # noinspection PyUnresolvedReferences + from energyplus_api_helpers.import_helper import EPlusAPIHelper + + e = EPlusAPIHelper(install_or_build_dir) + api_ = e.get_api_instance() +except (ImportError, ModuleNotFoundError): # This is the older way, directly adding E+ dir to path before importing API + path.insert(0, str(install_or_build_dir)) + # noinspection PyUnresolvedReferences + from pyenergyplus.api import EnergyPlusAPI + + api_ = EnergyPlusAPI() +run_directory = mkdtemp() +state_ = api_.state_manager.new_state() + + +class QuadraticCurve: + def __init__(self, c1: float, c2: float, c3: float, min_x: float = -big, max_x: float = big): + self.c = [c1, c2, c3] + self.max_x = max_x + self.min_x = min_x + + def curve_value(self, x: float) -> float: + x = max(min(x, self.max_x), self.min_x) + return self.c[0] + (self.c[1] * x) + (self.c[2] * pow(x, 2)) + + +class BiQuadraticCurve: + def __init__(self, c1: float, c2: float, c3: float, c4: float, c5: float, c6: float, + min_x: float = -big, max_x: float = big, min_y: float = -big, max_y: float = big): + self.c = [c1, c2, c3, c4, c5, c6] + self.max_x = max_x + self.min_x = min_x + self.max_y = max_y + self.min_y = min_y + + def curve_value(self, x: float, y: float) -> float: + x = max(min(x, self.max_x), self.min_x) + y = max(min(y, self.max_y), self.min_y) + return self.c[0] + (self.c[1] * x) + (self.c[2] * pow(x, 2)) + (self.c[3] * y) + (self.c[4] * pow(y, 2)) + ( + self.c[5] * x * y) + + +class Zone1WinACModel: + + def __init__(self): + self.q_dot_request = 0.0 + self.primary_air_mass_flow_in = 0.0 + self.primary_air_mass_flow_out = 0.0 + self.primary_air_inlet_temp = 0.0 + self.primary_air_hum_rat_inlet = 0.0 + self.primary_air_outlet_temp = 0.0 + self.primary_air_hum_rat_outlet = 0.0 + self.tot_cool_Power = 0.0 + self.electricity_power = 0.0 + self.electricity_energy = 0.0 + self.outdoor_air_mass_flow_inlet = 0.0 + self.outdoor_air_mass_flow_design = 0.0 + self.supply_air_mass_flow_design = 0.0 + self.outdoor_air_dry_bulb = 0.0 + self.outdoor_air_hum_rat = 0.0 + self.fan_efficiency = 0.0 + self.fan_delta_pressure = 0.0 + self.rated_capacity = 0.0 + self.zone_cool_thermostat = 0.0 + self.rated_eir = 0.0 + + # handles + self.need_to_get_handles = True + self.handles = {} + + # psych api instance + self.psych = None + + # curves + d_cap_f_t = {"c1": 0.942587793, # Constant + "c2": 0.00954334, # x + "c3": 0.000683770, # x**2 + "c4": -0.011042676, # y + "c5": 0.000005249, # y**2 + "c6": -0.000009720, # x*y + "min_x": 12.77778, + "max_x": 23.88889, + "min_y": 18.0, + "max_y": 46.11111} + + self.window_ac_cool_cap_f_t = BiQuadraticCurve(*d_cap_f_t.values()) + + d_cap_f_ff = {"c1": 0.8, + "c2": 0.2, + "c3": 0.0, + "min_x": 0.5, + "max_x": 1.5} + + self.window_ac_cool_cap_f_ff = QuadraticCurve(*d_cap_f_ff.values()) + + d_plf_f_plr = {"c1": 0.85, + "c2": 0.15, + "c3": 0.0, + "min_x": 0.0, + "max_x": 1.0} + + self.window_ac_plf_f_plr = QuadraticCurve(*d_plf_f_plr.values()) + + d_eir_f_t = {"c1": 0.342414409, # Constant + "c2": 0.034885008, # x + "c3": -0.000623700, # x**2 + "c4": 0.004977216, # y + "c5": 0.000437951, # y**2 + "c6": -0.000728028, # x*y + "min_x": 12.77778, + "max_x": 23.88889, + "min_y": 18.0, + "max_y": 46.11111} + + self.window_ac_eir_f_t = BiQuadraticCurve(*d_eir_f_t.values()) + + d_eir_f_ff = {"c1": 1.1552, + "c2": -0.1808, + "c3": 0.0256, + "min_x": 0.5, + "max_x": 1.0} + + self.window_ac_eir_f_ff = QuadraticCurve(*d_eir_f_ff.values()) + + def get_handles(self, state): + self.handles["Zone1WinAC_PrimAir_Tinlet"] = api_.exchange.get_internal_variable_handle( + state, + "Inlet Temperature for Primary Air Connection", + "Zone1WindAC" + ) + + self.handles["Zone1WinAC_PrimAir_Winlet"] = api_.exchange.get_internal_variable_handle( + state, + "Inlet Humidity Ratio for Primary Air Connection", + "Zone1WindAC" + ) + self.handles["Zone1WinAC_OA_Tdb"] = api_.exchange.get_internal_variable_handle( + state, + "Inlet Temperature for Secondary Air Connection", + "Zone1WindAC" + ) + self.handles["Zone1WinAC_OA_W"] = api_.exchange.get_internal_variable_handle( + state, + "Inlet Humidity Ratio for Secondary Air Connection", + "Zone1WindAC" + ) + self.handles["Zone1WinAC_Qdot_Request"] = api_.exchange.get_internal_variable_handle( + state, + "Remaining Sensible Load to Cooling Setpoint", + "Zone1WindAC" + ) + self.handles["Zone1_OADesign_Vdot"] = api_.exchange.get_internal_variable_handle( + state, + "Zone Outdoor Air Design Volume Flow Rate", + "West Zone" + ) + self.handles["Zone1WinAC_OA_rho"] = api_.exchange.get_internal_variable_handle( + state, + "Inlet Density for Secondary Air Connection", + "Zone1WindAC" + ) + self.handles["Zone1_CoolDesign_Mdot"] = api_.exchange.get_internal_variable_handle( + state, + "Final Zone Design Cooling Air Mass Flow Rate", + "West Zone" + ) + self.handles["Zone1_CoolDesign_Cap"] = api_.exchange.get_internal_variable_handle( + state, + "Final Zone Design Cooling Load", + "West Zone" + ) + self.handles["Zone1Cooling_Tstat"] = api_.exchange.get_variable_handle( + state, + "Zone Thermostat Cooling Setpoint Temperature", + "West Zone" + ) + self.handles["COOLINGCOILAVAILSCHED"] = api_.exchange.get_variable_handle( + state, + "Schedule Value", + "COOLINGCOILAVAILSCHED" + ) + self.handles["OA_Press"] = api_.exchange.get_variable_handle( + state, + "Site Outdoor Air Barometric Pressure", + "Environment" + ) + self.handles["Zone1WinAC_PrimAir_MdotOut"] = api_.exchange.get_actuator_handle( + state, + "Primary Air Connection", + "Outlet Mass Flow Rate", + "Zone1WindAC" + ) + self.handles["Zone1WinAC_PrimAir_MdotIn"] = api_.exchange.get_actuator_handle( + state, + "Primary Air Connection", + "Inlet Mass Flow Rate", + "Zone1WindAC" + ) + self.handles["Zone1WinAC_PrimAir_Tout"] = api_.exchange.get_actuator_handle( + state, + "Primary Air Connection", + "Outlet Temperature", + "Zone1WindAC" + ) + self.handles["Zone1WinAC_PrimAir_Wout"] = api_.exchange.get_actuator_handle( + state, + "Primary Air Connection", + "Outlet Humidity Ratio", + "Zone1WindAC" + ) + # self.handles["Zone1WinAC_ElectPower"] = api_.exchange.get_global_handle( + # state, + # "Zone1WinAC_ElectPower" + # ) + # self.handles["Zone1WinAC_tot_cool_Power"] = api_.exchange.get_global_handle( + # state, + # "Zone1WinAC_tot_cool_Power" + # ) + # self.handles["Zone1WinAC_ElectEnergy"] = api_.exchange.get_global_handle( + # state, + # "Zone1WinAC_ElectEnergy" + # ) + self.handles["Zone1WinAC_OA_MdotIn"] = api_.exchange.get_actuator_handle( + state, + "Secondary Air Connection", + "Inlet Mass Flow Rate", + "Zone1WindAC" + ) + self.need_to_get_handles = False + + def handles_gotten_properly(self, state): + handles_ok = True + + for (k, v) in self.handles.items(): + if v == -1: + handles_ok = False + api_.runtime.issue_severe(state, f"Handle not found for '{k}'") + + return handles_ok + + def initialize(self, s): + self.primary_air_inlet_temp = api_.exchange.get_internal_variable_value(s, self.handles[ + "Zone1WinAC_PrimAir_Tinlet"]) + self.primary_air_hum_rat_inlet = api_.exchange.get_internal_variable_value(s, self.handles[ + "Zone1WinAC_PrimAir_Winlet"]) + self.outdoor_air_dry_bulb = api_.exchange.get_internal_variable_value(s, self.handles["Zone1WinAC_OA_Tdb"]) + self.outdoor_air_hum_rat = api_.exchange.get_internal_variable_value(s, self.handles["Zone1WinAC_OA_W"]) + self.q_dot_request = api_.exchange.get_internal_variable_value(s, self.handles["Zone1WinAC_Qdot_Request"]) + zone_1_outside_air_design_vol_flow = api_.exchange.get_internal_variable_value(s, self.handles[ + "Zone1_OADesign_Vdot"]) + zone1_win_ac_oa_rho = api_.exchange.get_internal_variable_value(s, self.handles["Zone1WinAC_OA_rho"]) + self.outdoor_air_mass_flow_design = zone_1_outside_air_design_vol_flow * zone1_win_ac_oa_rho + self.supply_air_mass_flow_design = api_.exchange.get_internal_variable_value(s, self.handles[ + "Zone1_CoolDesign_Mdot"]) + self.fan_efficiency = 0.5 + self.fan_delta_pressure = 75.0 + self.rated_capacity = api_.exchange.get_internal_variable_value(s, + self.handles["Zone1_CoolDesign_Cap"]) / 0.75 + self.rated_eir = 1.0 / 3.0 + self.zone_cool_thermostat = api_.exchange.get_variable_value(s, self.handles["Zone1Cooling_Tstat"]) + + def simulate(self, state): + # sim block + if self.q_dot_request < 0.0: + q_dot_request = self.q_dot_request + else: + q_dot_request = 0.0 + + if api_.exchange.get_variable_value(state, self.handles["COOLINGCOILAVAILSCHED"]) == 0.0: + q_dot_request = 0.0 + + if q_dot_request == 0.0: + self.primary_air_mass_flow_in = 0.0 + self.primary_air_mass_flow_out = 0.0 + self.primary_air_outlet_temp = self.primary_air_inlet_temp + self.primary_air_hum_rat_outlet = self.primary_air_hum_rat_inlet + self.tot_cool_Power = 0.0 + self.electricity_power = 0.0 + self.electricity_energy = 0.0 + self.outdoor_air_mass_flow_inlet = 0.0 + return + + recirculation_mass_flow = self.supply_air_mass_flow_design - self.outdoor_air_mass_flow_design + recirculation_enthalpy = self.psych.enthalpy(state, self.primary_air_inlet_temp, self.primary_air_hum_rat_inlet) + outdoor_air_enthalpy = self.psych.enthalpy(state, self.outdoor_air_dry_bulb, self.outdoor_air_hum_rat) + mixed_enthalpy = ((recirculation_mass_flow * recirculation_enthalpy) + ( + self.outdoor_air_mass_flow_design * outdoor_air_enthalpy)) / self.supply_air_mass_flow_design + mixed_hum_rat = ((recirculation_mass_flow * self.primary_air_hum_rat_inlet) + ( + self.outdoor_air_mass_flow_design * self.outdoor_air_hum_rat)) / self.supply_air_mass_flow_design + mixed_dry_bulb = self.psych.dry_bulb(state, mixed_enthalpy, mixed_hum_rat) + outdoor_air_pressure = api_.exchange.get_variable_value(state, self.handles["OA_Press"]) + mixed_density = self.psych.density(state, outdoor_air_pressure, mixed_dry_bulb, mixed_hum_rat) + fan_power = (self.supply_air_mass_flow_design * self.fan_delta_pressure) / (self.fan_efficiency * mixed_density) + fan_power_to_air = fan_power + fan_delta_h = fan_power_to_air / self.supply_air_mass_flow_design + fan_outlet_enthalpy = mixed_enthalpy + fan_delta_h + fan_outlet_hum_rat = mixed_hum_rat + fan_outlet_dry_bulb = self.psych.dry_bulb(state, fan_outlet_enthalpy, fan_outlet_hum_rat) + fan_outlet_wet_bulb = self.psych.wet_bulb(state, fan_outlet_dry_bulb, fan_outlet_hum_rat, outdoor_air_pressure) + rated_cbf = 0.12666 + log_rated_cbf = math.log(rated_cbf) + a0 = (0.0 - 1.0) * log_rated_cbf * self.supply_air_mass_flow_design + a_diff = (0.0 - 1.0) * (a0 / self.supply_air_mass_flow_design) + cbf = math.exp(a_diff) + tot_cap_temp_mod_fac = self.window_ac_cool_cap_f_t.curve_value(fan_outlet_wet_bulb, self.outdoor_air_dry_bulb) + tot_cap_flow_mod_fac = self.window_ac_cool_cap_f_ff.curve_value(1.0) + tot_cap = self.rated_capacity * tot_cap_temp_mod_fac * tot_cap_flow_mod_fac + enthalpy_difference = tot_cap / self.supply_air_mass_flow_design + enthalpy_adp = fan_outlet_enthalpy - (enthalpy_difference / (1.0 - cbf)) + temperature_adp = self.psych.saturation_temperature(state, enthalpy_adp, outdoor_air_pressure) + hum_rat_adp = self.psych.humidity_ratio(state, temperature_adp, enthalpy_adp) + enthalpy_tin_w_adp = self.psych.enthalpy(state, fan_outlet_dry_bulb, hum_rat_adp) + if (fan_outlet_enthalpy - enthalpy_adp) != 0.0: + shr = (enthalpy_tin_w_adp - enthalpy_adp) / (fan_outlet_enthalpy - enthalpy_adp) + shr = min(shr, 1.0) + else: + shr = 1.0 + full_load_out_air_enth = fan_outlet_enthalpy - (tot_cap / self.supply_air_mass_flow_design) + h_tin_w_out = fan_outlet_enthalpy - ((1.0 - shr) * enthalpy_difference) + if shr != 1.0: + full_load_out_air_hum_rat = self.psych.humidity_ratio(state, fan_outlet_dry_bulb, h_tin_w_out) + else: + full_load_out_air_hum_rat = fan_outlet_hum_rat + full_load_out_air_temp = self.psych.dry_bulb(state, full_load_out_air_enth, full_load_out_air_hum_rat) + desired_zone_enthalpy = self.psych.enthalpy(state, self.zone_cool_thermostat, self.primary_air_hum_rat_inlet) + full_tot_cap_sens = self.supply_air_mass_flow_design * (desired_zone_enthalpy - full_load_out_air_enth) + abs_full_tot_cap_sens = abs(full_tot_cap_sens) + abs_q_dot_req = abs(q_dot_request) + outlet_air_temp = 0.0 + out_air_hum_rat = 0.0 + if abs_q_dot_req < abs_full_tot_cap_sens: + plr = (abs_q_dot_req - fan_power_to_air) / (abs_full_tot_cap_sens - fan_power_to_air) + error_tolerance = 0.0005 + iteration_num = 0 + max_iter = 30 + relax = 0.8 + abs_error = 0.002 + while (abs_error > error_tolerance) and (iteration_num < max_iter): + out_air_enthalpy = (plr * full_load_out_air_enth) + ((1.0 - plr) * fan_outlet_enthalpy) + out_air_hum_rat = (plr * full_load_out_air_hum_rat) + ((1.0 - plr) * fan_outlet_hum_rat) + outlet_air_temp = self.psych.dry_bulb(state, out_air_enthalpy, out_air_hum_rat) + tot_cap_test = self.supply_air_mass_flow_design * (desired_zone_enthalpy - out_air_enthalpy) + error = (abs_q_dot_req - tot_cap_test) / abs_q_dot_req + abs_error = abs(error) + if abs_error > error_tolerance: + delta_plr = (abs_q_dot_req - tot_cap_test) / abs_full_tot_cap_sens + plr = plr + relax * delta_plr + plr = min(plr, 1.0) + iteration_num = iteration_num + 1 + if iteration_num == 16: + relax = 0.5 + else: + plr = 1.0 + out_air_hum_rat = full_load_out_air_hum_rat + outlet_air_temp = full_load_out_air_temp + + plf = self.window_ac_plf_f_plr.curve_value(plr) + coil_rtf = plr / plf + coil_rtf = min(coil_rtf, 1.0) + eir_temp_mod_fac = self.window_ac_eir_f_t.curve_value(fan_outlet_wet_bulb, self.outdoor_air_dry_bulb) + eir_flow_mod_fac = self.window_ac_eir_f_ff.curve_value(1.0) + eir = self.rated_eir * eir_temp_mod_fac * eir_flow_mod_fac + dx_electricity_power = tot_cap * coil_rtf * eir + self.electricity_power = dx_electricity_power + fan_power + self.electricity_energy = self.electricity_power * api_.exchange.system_time_step(state) * 3600 + self.tot_cool_Power = abs_full_tot_cap_sens * plr + self.primary_air_mass_flow_out = self.supply_air_mass_flow_design + self.primary_air_mass_flow_in = self.supply_air_mass_flow_design + self.primary_air_outlet_temp = outlet_air_temp + self.primary_air_hum_rat_outlet = out_air_hum_rat + self.outdoor_air_mass_flow_inlet = self.outdoor_air_mass_flow_design + + def report(self, state): + api_.exchange.set_actuator_value(state, self.handles["Zone1WinAC_PrimAir_MdotOut"], + self.primary_air_mass_flow_out) + api_.exchange.set_actuator_value(state, self.handles["Zone1WinAC_PrimAir_MdotIn"], + self.primary_air_mass_flow_in) + api_.exchange.set_actuator_value(state, self.handles["Zone1WinAC_PrimAir_Tout"], + self.primary_air_outlet_temp) + api_.exchange.set_actuator_value(state, self.handles["Zone1WinAC_PrimAir_Wout"], + self.primary_air_hum_rat_outlet) + # api_.exchange.set_global_value(state, self.handles["Zone1WinAC_ElectPower"], self.ElectPower) + # api_.exchange.set_global_value(state, self.handles["Zone1WinAC_tot_cool_Power"], self.tot_cool_Power) + # api_.exchange.set_global_value(state, self.handles["Zone1WinAC_ElectEnergy"], self.ElectEnergy) + api_.exchange.set_actuator_value(state, self.handles["Zone1WinAC_OA_MdotIn"], + self.outdoor_air_mass_flow_inlet) + + def operate(self, state): + if not self.psych: + self.psych = api_.functional.psychrometrics(state) + if self.need_to_get_handles: + self.get_handles(state) + if not self.handles_gotten_properly(state): + return 1 + self.initialize(state) + self.simulate(state) + self.report(state) + return 0 + + +def on_user_defined_component_model(s) -> int: + return instance.operate(s) + + +instance = Zone1WinACModel() +api_.runtime.callback_user_defined_component_model( + state_, on_user_defined_component_model, "ZONE 1 WINDOW AC MODEL PROGRAM MANAGER" +) +api_.runtime.run_energyplus(state_, ['-d', run_directory, '-D', example_file_to_run]) +print(f"Finished running EnergyPlus, results available in {run_directory}") diff --git a/testfiles/ASHRAE901_ApartmentHighRise_STD2019_Denver.idf b/testfiles/ASHRAE901_ApartmentHighRise_STD2019_Denver.idf index 3f4d343f9ef..1bcd7d783b2 100644 --- a/testfiles/ASHRAE901_ApartmentHighRise_STD2019_Denver.idf +++ b/testfiles/ASHRAE901_ApartmentHighRise_STD2019_Denver.idf @@ -39630,12 +39630,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} G SW Apartment Outside Air Node, !- Supply Air Inlet Node Name G SW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name G SW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -39646,7 +39642,58 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + + Table:Lookup, + SenEffectHeatingTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.6, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.623, !- Output Value 1 + 0.60; !- Output Value 2 + + Table:Lookup, + SenEffectCoolingTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.596, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.618, !- Output Value 1 + 0.596; !- Output Value 2 HeatExchanger:AirToAir:SensibleAndLatent, G NW Apartment OA Heat Exchanger, !- Name @@ -39654,12 +39701,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} G NW Apartment Outside Air Node, !- Supply Air Inlet Node Name G NW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name G NW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -39670,7 +39713,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, G NE Apartment OA Heat Exchanger, !- Name @@ -39678,12 +39726,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} G NE Apartment Outside Air Node, !- Supply Air Inlet Node Name G NE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name G NE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -39694,7 +39738,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, G N1 Apartment OA Heat Exchanger, !- Name @@ -39702,12 +39751,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} G N1 Apartment Outside Air Node, !- Supply Air Inlet Node Name G N1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name G N1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -39718,7 +39763,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, G N2 Apartment OA Heat Exchanger, !- Name @@ -39726,12 +39776,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} G N2 Apartment Outside Air Node, !- Supply Air Inlet Node Name G N2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name G N2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -39742,7 +39788,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, G S1 Apartment OA Heat Exchanger, !- Name @@ -39750,12 +39801,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} G S1 Apartment Outside Air Node, !- Supply Air Inlet Node Name G S1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name G S1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -39766,7 +39813,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, G S2 Apartment OA Heat Exchanger, !- Name @@ -39774,12 +39826,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} G S2 Apartment Outside Air Node, !- Supply Air Inlet Node Name G S2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name G S2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -39790,7 +39838,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F2 SW Apartment OA Heat Exchanger, !- Name @@ -39798,12 +39851,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F2 SW Apartment Outside Air Node, !- Supply Air Inlet Node Name F2 SW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F2 SW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -39814,7 +39863,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F2 NW Apartment OA Heat Exchanger, !- Name @@ -39822,12 +39877,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F2 NW Apartment Outside Air Node, !- Supply Air Inlet Node Name F2 NW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F2 NW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -39838,7 +39889,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F2 SE Apartment OA Heat Exchanger, !- Name @@ -39846,12 +39903,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F2 SE Apartment Outside Air Node, !- Supply Air Inlet Node Name F2 SE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F2 SE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -39862,7 +39915,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F2 NE Apartment OA Heat Exchanger, !- Name @@ -39870,12 +39928,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F2 NE Apartment Outside Air Node, !- Supply Air Inlet Node Name F2 NE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F2 NE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -39886,7 +39940,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F2 N1 Apartment OA Heat Exchanger, !- Name @@ -39894,12 +39953,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F2 N1 Apartment Outside Air Node, !- Supply Air Inlet Node Name F2 N1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F2 N1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -39910,7 +39965,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F2 N2 Apartment OA Heat Exchanger, !- Name @@ -39918,12 +39978,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F2 N2 Apartment Outside Air Node, !- Supply Air Inlet Node Name F2 N2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F2 N2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -39934,7 +39990,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F2 S1 Apartment OA Heat Exchanger, !- Name @@ -39942,12 +40003,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F2 S1 Apartment Outside Air Node, !- Supply Air Inlet Node Name F2 S1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F2 S1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -39958,7 +40015,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F2 S2 Apartment OA Heat Exchanger, !- Name @@ -39966,12 +40028,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F2 S2 Apartment Outside Air Node, !- Supply Air Inlet Node Name F2 S2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F2 S2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -39982,7 +40040,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F3 SW Apartment OA Heat Exchanger, !- Name @@ -39990,12 +40053,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F3 SW Apartment Outside Air Node, !- Supply Air Inlet Node Name F3 SW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F3 SW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40006,7 +40065,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F3 NW Apartment OA Heat Exchanger, !- Name @@ -40014,12 +40079,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F3 NW Apartment Outside Air Node, !- Supply Air Inlet Node Name F3 NW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F3 NW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40030,7 +40091,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F3 SE Apartment OA Heat Exchanger, !- Name @@ -40038,12 +40105,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F3 SE Apartment Outside Air Node, !- Supply Air Inlet Node Name F3 SE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F3 SE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40054,7 +40117,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F3 NE Apartment OA Heat Exchanger, !- Name @@ -40062,12 +40130,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F3 NE Apartment Outside Air Node, !- Supply Air Inlet Node Name F3 NE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F3 NE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40078,7 +40142,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F3 N1 Apartment OA Heat Exchanger, !- Name @@ -40086,12 +40155,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F3 N1 Apartment Outside Air Node, !- Supply Air Inlet Node Name F3 N1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F3 N1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40102,7 +40167,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F3 N2 Apartment OA Heat Exchanger, !- Name @@ -40110,12 +40180,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F3 N2 Apartment Outside Air Node, !- Supply Air Inlet Node Name F3 N2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F3 N2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40126,7 +40192,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F3 S1 Apartment OA Heat Exchanger, !- Name @@ -40134,12 +40205,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F3 S1 Apartment Outside Air Node, !- Supply Air Inlet Node Name F3 S1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F3 S1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40150,7 +40217,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F3 S2 Apartment OA Heat Exchanger, !- Name @@ -40158,12 +40230,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F3 S2 Apartment Outside Air Node, !- Supply Air Inlet Node Name F3 S2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F3 S2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40174,7 +40242,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F4 SW Apartment OA Heat Exchanger, !- Name @@ -40182,12 +40255,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F4 SW Apartment Outside Air Node, !- Supply Air Inlet Node Name F4 SW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F4 SW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40198,7 +40267,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F4 NW Apartment OA Heat Exchanger, !- Name @@ -40206,12 +40281,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F4 NW Apartment Outside Air Node, !- Supply Air Inlet Node Name F4 NW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F4 NW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40222,7 +40293,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F4 SE Apartment OA Heat Exchanger, !- Name @@ -40230,12 +40307,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F4 SE Apartment Outside Air Node, !- Supply Air Inlet Node Name F4 SE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F4 SE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40246,7 +40319,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F4 NE Apartment OA Heat Exchanger, !- Name @@ -40254,12 +40332,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F4 NE Apartment Outside Air Node, !- Supply Air Inlet Node Name F4 NE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F4 NE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40270,7 +40344,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F4 N1 Apartment OA Heat Exchanger, !- Name @@ -40278,12 +40357,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F4 N1 Apartment Outside Air Node, !- Supply Air Inlet Node Name F4 N1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F4 N1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40294,7 +40369,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F4 N2 Apartment OA Heat Exchanger, !- Name @@ -40302,12 +40382,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F4 N2 Apartment Outside Air Node, !- Supply Air Inlet Node Name F4 N2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F4 N2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40318,7 +40394,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F4 S1 Apartment OA Heat Exchanger, !- Name @@ -40326,12 +40407,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F4 S1 Apartment Outside Air Node, !- Supply Air Inlet Node Name F4 S1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F4 S1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40342,7 +40419,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F4 S2 Apartment OA Heat Exchanger, !- Name @@ -40350,12 +40432,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F4 S2 Apartment Outside Air Node, !- Supply Air Inlet Node Name F4 S2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F4 S2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40366,7 +40444,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, M SW Apartment OA Heat Exchanger, !- Name @@ -40374,12 +40457,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} M SW Apartment Outside Air Node, !- Supply Air Inlet Node Name M SW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name M SW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40390,7 +40469,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, M NW Apartment OA Heat Exchanger, !- Name @@ -40398,12 +40483,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} M NW Apartment Outside Air Node, !- Supply Air Inlet Node Name M NW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name M NW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40414,7 +40495,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, M SE Apartment OA Heat Exchanger, !- Name @@ -40422,12 +40509,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} M SE Apartment Outside Air Node, !- Supply Air Inlet Node Name M SE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name M SE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40438,7 +40521,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, M NE Apartment OA Heat Exchanger, !- Name @@ -40446,12 +40534,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} M NE Apartment Outside Air Node, !- Supply Air Inlet Node Name M NE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name M NE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40462,7 +40546,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, M N1 Apartment OA Heat Exchanger, !- Name @@ -40470,12 +40559,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} M N1 Apartment Outside Air Node, !- Supply Air Inlet Node Name M N1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name M N1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40486,7 +40571,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, M N2 Apartment OA Heat Exchanger, !- Name @@ -40494,12 +40584,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} M N2 Apartment Outside Air Node, !- Supply Air Inlet Node Name M N2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name M N2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40510,7 +40596,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, M S1 Apartment OA Heat Exchanger, !- Name @@ -40518,12 +40609,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} M S1 Apartment Outside Air Node, !- Supply Air Inlet Node Name M S1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name M S1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40534,7 +40621,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, M S2 Apartment OA Heat Exchanger, !- Name @@ -40542,12 +40634,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} M S2 Apartment Outside Air Node, !- Supply Air Inlet Node Name M S2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name M S2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40558,7 +40646,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F6 SW Apartment OA Heat Exchanger, !- Name @@ -40566,12 +40659,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F6 SW Apartment Outside Air Node, !- Supply Air Inlet Node Name F6 SW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F6 SW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40582,7 +40671,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F6 NW Apartment OA Heat Exchanger, !- Name @@ -40590,12 +40685,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F6 NW Apartment Outside Air Node, !- Supply Air Inlet Node Name F6 NW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F6 NW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40606,7 +40697,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F6 SE Apartment OA Heat Exchanger, !- Name @@ -40614,12 +40711,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F6 SE Apartment Outside Air Node, !- Supply Air Inlet Node Name F6 SE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F6 SE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40630,7 +40723,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F6 NE Apartment OA Heat Exchanger, !- Name @@ -40638,12 +40736,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F6 NE Apartment Outside Air Node, !- Supply Air Inlet Node Name F6 NE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F6 NE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40654,7 +40748,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F6 N1 Apartment OA Heat Exchanger, !- Name @@ -40662,12 +40761,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F6 N1 Apartment Outside Air Node, !- Supply Air Inlet Node Name F6 N1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F6 N1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40678,7 +40773,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F6 N2 Apartment OA Heat Exchanger, !- Name @@ -40686,12 +40786,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F6 N2 Apartment Outside Air Node, !- Supply Air Inlet Node Name F6 N2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F6 N2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40702,7 +40798,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F6 S1 Apartment OA Heat Exchanger, !- Name @@ -40710,12 +40811,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F6 S1 Apartment Outside Air Node, !- Supply Air Inlet Node Name F6 S1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F6 S1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40726,7 +40823,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F6 S2 Apartment OA Heat Exchanger, !- Name @@ -40734,12 +40836,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F6 S2 Apartment Outside Air Node, !- Supply Air Inlet Node Name F6 S2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F6 S2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40750,7 +40848,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F7 SW Apartment OA Heat Exchanger, !- Name @@ -40758,12 +40861,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F7 SW Apartment Outside Air Node, !- Supply Air Inlet Node Name F7 SW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F7 SW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40774,7 +40873,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F7 NW Apartment OA Heat Exchanger, !- Name @@ -40782,12 +40887,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F7 NW Apartment Outside Air Node, !- Supply Air Inlet Node Name F7 NW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F7 NW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40798,7 +40899,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F7 SE Apartment OA Heat Exchanger, !- Name @@ -40806,12 +40912,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F7 SE Apartment Outside Air Node, !- Supply Air Inlet Node Name F7 SE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F7 SE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40822,7 +40924,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F7 NE Apartment OA Heat Exchanger, !- Name @@ -40830,12 +40937,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F7 NE Apartment Outside Air Node, !- Supply Air Inlet Node Name F7 NE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F7 NE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40846,7 +40949,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F7 N1 Apartment OA Heat Exchanger, !- Name @@ -40854,12 +40962,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F7 N1 Apartment Outside Air Node, !- Supply Air Inlet Node Name F7 N1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F7 N1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40870,7 +40974,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F7 N2 Apartment OA Heat Exchanger, !- Name @@ -40878,12 +40987,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F7 N2 Apartment Outside Air Node, !- Supply Air Inlet Node Name F7 N2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F7 N2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40894,7 +40999,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, F7 S1 Apartment OA Heat Exchanger, !- Name @@ -40902,12 +41012,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F7 S1 Apartment Outside Air Node, !- Supply Air Inlet Node Name F7 S1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F7 S1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40918,7 +41024,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F7 S2 Apartment OA Heat Exchanger, !- Name @@ -40926,12 +41038,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F7 S2 Apartment Outside Air Node, !- Supply Air Inlet Node Name F7 S2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F7 S2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40942,7 +41050,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F8 SW Apartment OA Heat Exchanger, !- Name @@ -40950,12 +41064,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F8 SW Apartment Outside Air Node, !- Supply Air Inlet Node Name F8 SW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F8 SW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40966,7 +41076,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F8 NW Apartment OA Heat Exchanger, !- Name @@ -40974,12 +41090,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F8 NW Apartment Outside Air Node, !- Supply Air Inlet Node Name F8 NW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F8 NW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -40990,7 +41102,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F8 SE Apartment OA Heat Exchanger, !- Name @@ -40998,12 +41116,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F8 SE Apartment Outside Air Node, !- Supply Air Inlet Node Name F8 SE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F8 SE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -41014,7 +41128,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F8 NE Apartment OA Heat Exchanger, !- Name @@ -41022,12 +41142,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F8 NE Apartment Outside Air Node, !- Supply Air Inlet Node Name F8 NE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F8 NE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -41038,7 +41154,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F8 N1 Apartment OA Heat Exchanger, !- Name @@ -41046,12 +41168,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F8 N1 Apartment Outside Air Node, !- Supply Air Inlet Node Name F8 N1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F8 N1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -41062,7 +41180,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F8 N2 Apartment OA Heat Exchanger, !- Name @@ -41070,12 +41194,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F8 N2 Apartment Outside Air Node, !- Supply Air Inlet Node Name F8 N2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F8 N2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -41086,7 +41206,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F8 S1 Apartment OA Heat Exchanger, !- Name @@ -41094,12 +41220,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F8 S1 Apartment Outside Air Node, !- Supply Air Inlet Node Name F8 S1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F8 S1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -41110,7 +41232,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F8 S2 Apartment OA Heat Exchanger, !- Name @@ -41118,12 +41246,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F8 S2 Apartment Outside Air Node, !- Supply Air Inlet Node Name F8 S2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F8 S2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -41134,7 +41258,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F9 SW Apartment OA Heat Exchanger, !- Name @@ -41142,12 +41272,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F9 SW Apartment Outside Air Node, !- Supply Air Inlet Node Name F9 SW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F9 SW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -41158,7 +41284,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F9 NW Apartment OA Heat Exchanger, !- Name @@ -41166,12 +41298,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F9 NW Apartment Outside Air Node, !- Supply Air Inlet Node Name F9 NW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F9 NW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -41182,7 +41310,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F9 SE Apartment OA Heat Exchanger, !- Name @@ -41190,12 +41324,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F9 SE Apartment Outside Air Node, !- Supply Air Inlet Node Name F9 SE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F9 SE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -41206,7 +41336,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F9 NE Apartment OA Heat Exchanger, !- Name @@ -41214,12 +41350,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F9 NE Apartment Outside Air Node, !- Supply Air Inlet Node Name F9 NE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F9 NE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -41230,7 +41362,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F9 N1 Apartment OA Heat Exchanger, !- Name @@ -41238,12 +41376,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F9 N1 Apartment Outside Air Node, !- Supply Air Inlet Node Name F9 N1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F9 N1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -41254,7 +41388,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F9 N2 Apartment OA Heat Exchanger, !- Name @@ -41262,12 +41402,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F9 N2 Apartment Outside Air Node, !- Supply Air Inlet Node Name F9 N2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F9 N2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -41278,7 +41414,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F9 S1 Apartment OA Heat Exchanger, !- Name @@ -41286,12 +41428,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F9 S1 Apartment Outside Air Node, !- Supply Air Inlet Node Name F9 S1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F9 S1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -41302,7 +41440,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, F9 S2 Apartment OA Heat Exchanger, !- Name @@ -41310,12 +41454,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} F9 S2 Apartment Outside Air Node, !- Supply Air Inlet Node Name F9 S2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name F9 S2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -41326,7 +41466,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, T SW Apartment OA Heat Exchanger, !- Name @@ -41334,12 +41480,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} T SW Apartment Outside Air Node, !- Supply Air Inlet Node Name T SW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name T SW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -41350,7 +41492,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, T NW Apartment OA Heat Exchanger, !- Name @@ -41358,12 +41506,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} T NW Apartment Outside Air Node, !- Supply Air Inlet Node Name T NW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name T NW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -41374,7 +41518,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, T SE Apartment OA Heat Exchanger, !- Name @@ -41382,12 +41532,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} T SE Apartment Outside Air Node, !- Supply Air Inlet Node Name T SE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name T SE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -41398,7 +41544,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, T NE Apartment OA Heat Exchanger, !- Name @@ -41406,12 +41558,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} T NE Apartment Outside Air Node, !- Supply Air Inlet Node Name T NE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name T NE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -41422,7 +41570,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, T N1 Apartment OA Heat Exchanger, !- Name @@ -41430,12 +41584,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} T N1 Apartment Outside Air Node, !- Supply Air Inlet Node Name T N1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name T N1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -41446,7 +41596,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, T N2 Apartment OA Heat Exchanger, !- Name @@ -41454,12 +41610,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} T N2 Apartment Outside Air Node, !- Supply Air Inlet Node Name T N2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name T N2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -41470,7 +41622,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, T S1 Apartment OA Heat Exchanger, !- Name @@ -41478,12 +41636,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} T S1 Apartment Outside Air Node, !- Supply Air Inlet Node Name T S1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name T S1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -41494,7 +41648,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + HeatExchanger:AirToAir:SensibleAndLatent, T S2 Apartment OA Heat Exchanger, !- Name @@ -41502,12 +41662,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} T S2 Apartment Outside Air Node, !- Supply Air Inlet Node Name T S2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name T S2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -41518,7 +41674,13 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + !- =========== ALL OBJECTS IN CLASS: AIRLOOPHVAC:UNITARYHEATPUMP:WATERTOAIR =========== diff --git a/testfiles/ASHRAE901_ApartmentMidRise_STD2019_Denver.idf b/testfiles/ASHRAE901_ApartmentMidRise_STD2019_Denver.idf index fce31acd405..673f3f94063 100644 --- a/testfiles/ASHRAE901_ApartmentMidRise_STD2019_Denver.idf +++ b/testfiles/ASHRAE901_ApartmentMidRise_STD2019_Denver.idf @@ -12372,12 +12372,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} G SW Apartment Outside Air Node, !- Supply Air Inlet Node Name G SW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name G SW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -12388,7 +12384,58 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name + + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + + Table:Lookup, + SenEffectHeatingTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.6, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.623, !- Output Value 1 + 0.60; !- Output Value 2 + + Table:Lookup, + SenEffectCoolingTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.596, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.618, !- Output Value 1 + 0.596; !- Output Value 2 HeatExchanger:AirToAir:SensibleAndLatent, G NW Apartment OA Heat Exchanger, !- Name @@ -12396,12 +12443,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} G NW Apartment Outside Air Node, !- Supply Air Inlet Node Name G NW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name G NW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -12412,7 +12455,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, G NE Apartment OA Heat Exchanger, !- Name @@ -12420,12 +12468,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} G NE Apartment Outside Air Node, !- Supply Air Inlet Node Name G NE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name G NE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -12436,7 +12480,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, G N1 Apartment OA Heat Exchanger, !- Name @@ -12444,12 +12493,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} G N1 Apartment Outside Air Node, !- Supply Air Inlet Node Name G N1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name G N1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -12460,7 +12505,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, G N2 Apartment OA Heat Exchanger, !- Name @@ -12468,12 +12518,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} G N2 Apartment Outside Air Node, !- Supply Air Inlet Node Name G N2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name G N2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -12484,7 +12530,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, G S1 Apartment OA Heat Exchanger, !- Name @@ -12492,12 +12543,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} G S1 Apartment Outside Air Node, !- Supply Air Inlet Node Name G S1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name G S1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -12508,7 +12555,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, G S2 Apartment OA Heat Exchanger, !- Name @@ -12516,12 +12568,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} G S2 Apartment Outside Air Node, !- Supply Air Inlet Node Name G S2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name G S2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -12532,7 +12580,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, M SW Apartment OA Heat Exchanger, !- Name @@ -12540,12 +12593,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} M SW Apartment Outside Air Node, !- Supply Air Inlet Node Name M SW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name M SW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -12556,7 +12605,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, M NW Apartment OA Heat Exchanger, !- Name @@ -12564,12 +12618,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} M NW Apartment Outside Air Node, !- Supply Air Inlet Node Name M NW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name M NW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -12580,7 +12630,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, M SE Apartment OA Heat Exchanger, !- Name @@ -12588,12 +12643,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} M SE Apartment Outside Air Node, !- Supply Air Inlet Node Name M SE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name M SE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -12604,7 +12655,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, M NE Apartment OA Heat Exchanger, !- Name @@ -12612,12 +12668,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} M NE Apartment Outside Air Node, !- Supply Air Inlet Node Name M NE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name M NE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -12628,7 +12680,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, M N1 Apartment OA Heat Exchanger, !- Name @@ -12636,12 +12693,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} M N1 Apartment Outside Air Node, !- Supply Air Inlet Node Name M N1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name M N1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -12652,7 +12705,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, M N2 Apartment OA Heat Exchanger, !- Name @@ -12660,12 +12718,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} M N2 Apartment Outside Air Node, !- Supply Air Inlet Node Name M N2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name M N2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -12676,7 +12730,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, M S1 Apartment OA Heat Exchanger, !- Name @@ -12684,12 +12743,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} M S1 Apartment Outside Air Node, !- Supply Air Inlet Node Name M S1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name M S1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -12700,7 +12755,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, M S2 Apartment OA Heat Exchanger, !- Name @@ -12708,12 +12768,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} M S2 Apartment Outside Air Node, !- Supply Air Inlet Node Name M S2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name M S2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -12724,7 +12780,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, T SW Apartment OA Heat Exchanger, !- Name @@ -12732,12 +12793,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} T SW Apartment Outside Air Node, !- Supply Air Inlet Node Name T SW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name T SW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -12756,12 +12813,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} T NW Apartment Outside Air Node, !- Supply Air Inlet Node Name T NW Apartment ERV Outlet Node, !- Supply Air Outlet Node Name T NW Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -12780,12 +12833,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} T SE Apartment Outside Air Node, !- Supply Air Inlet Node Name T SE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name T SE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -12796,7 +12845,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, T NE Apartment OA Heat Exchanger, !- Name @@ -12804,12 +12858,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} T NE Apartment Outside Air Node, !- Supply Air Inlet Node Name T NE Apartment ERV Outlet Node, !- Supply Air Outlet Node Name T NE Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -12820,7 +12870,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, T N1 Apartment OA Heat Exchanger, !- Name @@ -12828,12 +12883,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} T N1 Apartment Outside Air Node, !- Supply Air Inlet Node Name T N1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name T N1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -12844,7 +12895,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, T N2 Apartment OA Heat Exchanger, !- Name @@ -12852,12 +12908,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} T N2 Apartment Outside Air Node, !- Supply Air Inlet Node Name T N2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name T N2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -12868,7 +12920,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, T S1 Apartment OA Heat Exchanger, !- Name @@ -12876,12 +12933,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} T S1 Apartment Outside Air Node, !- Supply Air Inlet Node Name T S1 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name T S1 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -12892,7 +12945,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, T S2 Apartment OA Heat Exchanger, !- Name @@ -12900,12 +12958,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.6, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.623, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.596, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.618, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} T S2 Apartment Outside Air Node, !- Supply Air Inlet Node Name T S2 Apartment ERV Outlet Node, !- Supply Air Outlet Node Name T S2 Apartment Zone Exhaust Node, !- Exhaust Air Inlet Node Name @@ -12916,7 +12970,12 @@ ExhaustOnly, !- Frost Control Type -23.3, !- Threshold Temperature {C} 0.167, !- Initial Defrost Time Fraction {dimensionless} - 1.44; !- Rate of Defrost Time Fraction Increase {1/K} + 1.44, !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectHeatingTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + , !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectCoolingTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + ; !- Latent Effectiveness of Cooling Air Flow Curve Name AirLoopHVAC:Unitary:Furnace:HeatCool, Split GSW Furnace with DX Cooling, !- Name diff --git a/testfiles/ASHRAE901_Hospital_STD2019_Denver.idf b/testfiles/ASHRAE901_Hospital_STD2019_Denver.idf index b62efcf157f..a95ec2c4c35 100644 --- a/testfiles/ASHRAE901_Hospital_STD2019_Denver.idf +++ b/testfiles/ASHRAE901_Hospital_STD2019_Denver.idf @@ -22733,12 +22733,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.70, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.60, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.70, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.60, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.75, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.60, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.75, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.60, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} VAV_ICU_OAInlet Node, !- Supply Air Inlet Node Name ICU Heat Recovery Outlet Node, !- Supply Air Outlet Node Name VAV_ICU_OARelief Node, !- Exhaust Air Inlet Node Name @@ -22757,12 +22753,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.70, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.60, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.70, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.60, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.75, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.60, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.75, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.60, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} VAV_PATRMS_OAInlet Node, !- Supply Air Inlet Node Name PATRMS Heat Recovery Outlet Node, !- Supply Air Outlet Node Name VAV_PATRMS_OARelief Node,!- Exhaust Air Inlet Node Name @@ -22781,12 +22773,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.70, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.60, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.70, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.60, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.75, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.60, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.75, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.60, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} VAV_1_OAInlet Node, !- Supply Air Inlet Node Name VAV_1 Heat Recovery Outlet Node, !- Supply Air Outlet Node Name VAV_1_OARelief Node, !- Exhaust Air Inlet Node Name diff --git a/testfiles/ASHRAE901_HotelLarge_STD2019_Denver.idf b/testfiles/ASHRAE901_HotelLarge_STD2019_Denver.idf index 9858cb7ef59..c32d77ef021 100644 --- a/testfiles/ASHRAE901_HotelLarge_STD2019_Denver.idf +++ b/testfiles/ASHRAE901_HotelLarge_STD2019_Denver.idf @@ -11810,12 +11810,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.70, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.60, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.70, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.60, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.75, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.60, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.75, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.60, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} VAV WITH REHEAT_OAInlet Node, !- Supply Air Inlet Node Name VAV WITH REHEAT Heat Recovery Outlet Node, !- Supply Air Outlet Node Name VAV WITH REHEAT_OARelief Node, !- Exhaust Air Inlet Node Name @@ -11834,12 +11830,8 @@ AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s} 0.70, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.60, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.70, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.60, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.75, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.60, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.75, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.60, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} FLR_3_DOAS_OAInlet Node, !- Supply Air Inlet Node Name FLR_3_DOAS Heat Recovery Outlet Node, !- Supply Air Outlet Node Name FLR_3_DOAS_OARelief Node,!- Exhaust Air Inlet Node Name diff --git a/testfiles/ASHRAE901_HotelSmall_STD2019_Denver.idf b/testfiles/ASHRAE901_HotelSmall_STD2019_Denver.idf index b8d14b243cb..a9aeb141fb5 100644 --- a/testfiles/ASHRAE901_HotelSmall_STD2019_Denver.idf +++ b/testfiles/ASHRAE901_HotelSmall_STD2019_Denver.idf @@ -20745,6 +20745,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.01347770326, !- Cooling Outdoor Air Flow Rate {m3/s} 0.01347770326, !- Heating Outdoor Air Flow Rate {m3/s} 0.01347770326, !- No Load Outdoor Air Flow Rate {m3/s} @@ -20767,6 +20768,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.01347770326, !- Cooling Outdoor Air Flow Rate {m3/s} 0.01347770326, !- Heating Outdoor Air Flow Rate {m3/s} 0.01347770326, !- No Load Outdoor Air Flow Rate {m3/s} @@ -20789,6 +20791,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.01347770326, !- Cooling Outdoor Air Flow Rate {m3/s} 0.01347770326, !- Heating Outdoor Air Flow Rate {m3/s} 0.01347770326, !- No Load Outdoor Air Flow Rate {m3/s} @@ -20811,6 +20814,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.01347770326, !- Cooling Outdoor Air Flow Rate {m3/s} 0.01347770326, !- Heating Outdoor Air Flow Rate {m3/s} 0.01347770326, !- No Load Outdoor Air Flow Rate {m3/s} @@ -20833,6 +20837,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.01347770326, !- Cooling Outdoor Air Flow Rate {m3/s} 0.01347770326, !- Heating Outdoor Air Flow Rate {m3/s} 0.01347770326, !- No Load Outdoor Air Flow Rate {m3/s} @@ -20855,6 +20860,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.01347770326, !- Cooling Outdoor Air Flow Rate {m3/s} 0.01347770326, !- Heating Outdoor Air Flow Rate {m3/s} 0.01347770326, !- No Load Outdoor Air Flow Rate {m3/s} @@ -20877,6 +20883,7 @@ 0.519200065914071, !- Cooling Supply Air Flow Rate {m3/s} 0.519200065914071, !- Heating Supply Air Flow Rate {m3/s} 0.519200065914071, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.05391081304, !- Cooling Outdoor Air Flow Rate {m3/s} 0.05391081304, !- Heating Outdoor Air Flow Rate {m3/s} 0.05391081304, !- No Load Outdoor Air Flow Rate {m3/s} @@ -20899,6 +20906,7 @@ 0.389400049435553, !- Cooling Supply Air Flow Rate {m3/s} 0.389400049435553, !- Heating Supply Air Flow Rate {m3/s} 0.389400049435553, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0427311626, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0427311626, !- Heating Outdoor Air Flow Rate {m3/s} 0.0427311626, !- No Load Outdoor Air Flow Rate {m3/s} @@ -20921,6 +20929,7 @@ 0.519200065914071, !- Cooling Supply Air Flow Rate {m3/s} 0.519200065914071, !- Heating Supply Air Flow Rate {m3/s} 0.519200065914071, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.05391081304, !- Cooling Outdoor Air Flow Rate {m3/s} 0.05391081304, !- Heating Outdoor Air Flow Rate {m3/s} 0.05391081304, !- No Load Outdoor Air Flow Rate {m3/s} @@ -20943,6 +20952,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.01347770326, !- Cooling Outdoor Air Flow Rate {m3/s} 0.01347770326, !- Heating Outdoor Air Flow Rate {m3/s} 0.01347770326, !- No Load Outdoor Air Flow Rate {m3/s} @@ -20965,6 +20975,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.01347770326, !- Cooling Outdoor Air Flow Rate {m3/s} 0.01347770326, !- Heating Outdoor Air Flow Rate {m3/s} 0.01347770326, !- No Load Outdoor Air Flow Rate {m3/s} @@ -20987,6 +20998,7 @@ 0.519200065914071, !- Cooling Supply Air Flow Rate {m3/s} 0.519200065914071, !- Heating Supply Air Flow Rate {m3/s} 0.519200065914071, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.05391081304, !- Cooling Outdoor Air Flow Rate {m3/s} 0.05391081304, !- Heating Outdoor Air Flow Rate {m3/s} 0.05391081304, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21009,6 +21021,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.01347770326, !- Cooling Outdoor Air Flow Rate {m3/s} 0.01347770326, !- Heating Outdoor Air Flow Rate {m3/s} 0.01347770326, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21031,6 +21044,7 @@ 0.519200065914071, !- Cooling Supply Air Flow Rate {m3/s} 0.519200065914071, !- Heating Supply Air Flow Rate {m3/s} 0.519200065914071, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.05391081304, !- Cooling Outdoor Air Flow Rate {m3/s} 0.05391081304, !- Heating Outdoor Air Flow Rate {m3/s} 0.05391081304, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21053,6 +21067,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.01347770326, !- Cooling Outdoor Air Flow Rate {m3/s} 0.01347770326, !- Heating Outdoor Air Flow Rate {m3/s} 0.01347770326, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21075,6 +21090,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.01347770326, !- Cooling Outdoor Air Flow Rate {m3/s} 0.01347770326, !- Heating Outdoor Air Flow Rate {m3/s} 0.01347770326, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21097,6 +21113,7 @@ 0.519200065914071, !- Cooling Supply Air Flow Rate {m3/s} 0.519200065914071, !- Heating Supply Air Flow Rate {m3/s} 0.519200065914071, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.05391081304, !- Cooling Outdoor Air Flow Rate {m3/s} 0.05391081304, !- Heating Outdoor Air Flow Rate {m3/s} 0.05391081304, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21119,6 +21136,7 @@ 0.389400049435553, !- Cooling Supply Air Flow Rate {m3/s} 0.389400049435553, !- Heating Supply Air Flow Rate {m3/s} 0.389400049435553, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0427311626, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0427311626, !- Heating Outdoor Air Flow Rate {m3/s} 0.0427311626, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21141,6 +21159,7 @@ 0.519200065914071, !- Cooling Supply Air Flow Rate {m3/s} 0.519200065914071, !- Heating Supply Air Flow Rate {m3/s} 0.519200065914071, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.05391081304, !- Cooling Outdoor Air Flow Rate {m3/s} 0.05391081304, !- Heating Outdoor Air Flow Rate {m3/s} 0.05391081304, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21163,6 +21182,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.01347770326, !- Cooling Outdoor Air Flow Rate {m3/s} 0.01347770326, !- Heating Outdoor Air Flow Rate {m3/s} 0.01347770326, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21185,6 +21205,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.01347770326, !- Cooling Outdoor Air Flow Rate {m3/s} 0.01347770326, !- Heating Outdoor Air Flow Rate {m3/s} 0.01347770326, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21207,6 +21228,7 @@ 0.519200065914071, !- Cooling Supply Air Flow Rate {m3/s} 0.519200065914071, !- Heating Supply Air Flow Rate {m3/s} 0.519200065914071, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.05391081304, !- Cooling Outdoor Air Flow Rate {m3/s} 0.05391081304, !- Heating Outdoor Air Flow Rate {m3/s} 0.05391081304, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21229,6 +21251,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.01347770326, !- Cooling Outdoor Air Flow Rate {m3/s} 0.01347770326, !- Heating Outdoor Air Flow Rate {m3/s} 0.01347770326, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21251,6 +21274,7 @@ 0.519200065914071, !- Cooling Supply Air Flow Rate {m3/s} 0.519200065914071, !- Heating Supply Air Flow Rate {m3/s} 0.519200065914071, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.05391081304, !- Cooling Outdoor Air Flow Rate {m3/s} 0.05391081304, !- Heating Outdoor Air Flow Rate {m3/s} 0.05391081304, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21273,6 +21297,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.01347770326, !- Cooling Outdoor Air Flow Rate {m3/s} 0.01347770326, !- Heating Outdoor Air Flow Rate {m3/s} 0.01347770326, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21295,6 +21320,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.01347770326, !- Cooling Outdoor Air Flow Rate {m3/s} 0.01347770326, !- Heating Outdoor Air Flow Rate {m3/s} 0.01347770326, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21317,6 +21343,7 @@ 0.519200065914071, !- Cooling Supply Air Flow Rate {m3/s} 0.519200065914071, !- Heating Supply Air Flow Rate {m3/s} 0.519200065914071, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.05391081304, !- Cooling Outdoor Air Flow Rate {m3/s} 0.05391081304, !- Heating Outdoor Air Flow Rate {m3/s} 0.05391081304, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21339,6 +21366,7 @@ 0.389400049435553, !- Cooling Supply Air Flow Rate {m3/s} 0.389400049435553, !- Heating Supply Air Flow Rate {m3/s} 0.389400049435553, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0427311626, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0427311626, !- Heating Outdoor Air Flow Rate {m3/s} 0.0427311626, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21361,6 +21389,7 @@ 0.519200065914071, !- Cooling Supply Air Flow Rate {m3/s} 0.519200065914071, !- Heating Supply Air Flow Rate {m3/s} 0.519200065914071, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.05391081304, !- Cooling Outdoor Air Flow Rate {m3/s} 0.05391081304, !- Heating Outdoor Air Flow Rate {m3/s} 0.05391081304, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21383,6 +21412,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.01347770326, !- Cooling Outdoor Air Flow Rate {m3/s} 0.01347770326, !- Heating Outdoor Air Flow Rate {m3/s} 0.01347770326, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21405,6 +21435,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.01347770326, !- Cooling Outdoor Air Flow Rate {m3/s} 0.01347770326, !- Heating Outdoor Air Flow Rate {m3/s} 0.01347770326, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21427,6 +21458,7 @@ 0.519200065914071, !- Cooling Supply Air Flow Rate {m3/s} 0.519200065914071, !- Heating Supply Air Flow Rate {m3/s} 0.519200065914071, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.05391081304, !- Cooling Outdoor Air Flow Rate {m3/s} 0.05391081304, !- Heating Outdoor Air Flow Rate {m3/s} 0.05391081304, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21449,6 +21481,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.01347770326, !- Cooling Outdoor Air Flow Rate {m3/s} 0.01347770326, !- Heating Outdoor Air Flow Rate {m3/s} 0.01347770326, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21471,6 +21504,7 @@ 0.519200065914071, !- Cooling Supply Air Flow Rate {m3/s} 0.519200065914071, !- Heating Supply Air Flow Rate {m3/s} 0.519200065914071, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.05391081304, !- Cooling Outdoor Air Flow Rate {m3/s} 0.05391081304, !- Heating Outdoor Air Flow Rate {m3/s} 0.05391081304, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21493,6 +21527,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.01347770326, !- Cooling Outdoor Air Flow Rate {m3/s} 0.01347770326, !- Heating Outdoor Air Flow Rate {m3/s} 0.01347770326, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21515,6 +21550,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0458698751, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0458698751, !- Heating Outdoor Air Flow Rate {m3/s} 0.0458698751, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21537,6 +21573,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.03822540372, !- Cooling Outdoor Air Flow Rate {m3/s} 0.03822540372, !- Heating Outdoor Air Flow Rate {m3/s} 0.03822540372, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21559,6 +21596,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.03822540372, !- Cooling Outdoor Air Flow Rate {m3/s} 0.03822540372, !- Heating Outdoor Air Flow Rate {m3/s} 0.03822540372, !- No Load Outdoor Air Flow Rate {m3/s} @@ -21581,6 +21619,7 @@ 0.129800016478518, !- Cooling Supply Air Flow Rate {m3/s} 0.129800016478518, !- Heating Supply Air Flow Rate {m3/s} 0.129800016478518, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.03822540372, !- Cooling Outdoor Air Flow Rate {m3/s} 0.03822540372, !- Heating Outdoor Air Flow Rate {m3/s} 0.03822540372, !- No Load Outdoor Air Flow Rate {m3/s} @@ -25336,6 +25375,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -25387,6 +25427,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -25438,6 +25479,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -25489,6 +25531,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/ASHRAE901_RestaurantFastFood_STD2019_Denver.idf b/testfiles/ASHRAE901_RestaurantFastFood_STD2019_Denver.idf index d8b7fa31ad4..1227e87cbbd 100644 --- a/testfiles/ASHRAE901_RestaurantFastFood_STD2019_Denver.idf +++ b/testfiles/ASHRAE901_RestaurantFastFood_STD2019_Denver.idf @@ -3265,6 +3265,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -3316,6 +3317,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/ASHRAE901_RestaurantSitDown_STD2019_Denver.idf b/testfiles/ASHRAE901_RestaurantSitDown_STD2019_Denver.idf index e0eea54c3e7..c19a90ef680 100644 --- a/testfiles/ASHRAE901_RestaurantSitDown_STD2019_Denver.idf +++ b/testfiles/ASHRAE901_RestaurantSitDown_STD2019_Denver.idf @@ -3313,6 +3313,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -3364,6 +3365,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/ASHRAE901_RetailStandalone_STD2019_Denver.idf b/testfiles/ASHRAE901_RetailStandalone_STD2019_Denver.idf index f219cf53a7b..c84949b9c71 100644 --- a/testfiles/ASHRAE901_RetailStandalone_STD2019_Denver.idf +++ b/testfiles/ASHRAE901_RetailStandalone_STD2019_Denver.idf @@ -4593,6 +4593,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -4644,6 +4645,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -4695,6 +4697,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -4746,6 +4749,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/ASHRAE901_RetailStripmall_STD2019_Denver.idf b/testfiles/ASHRAE901_RetailStripmall_STD2019_Denver.idf index 56b917200ad..f76ee226742 100644 --- a/testfiles/ASHRAE901_RetailStripmall_STD2019_Denver.idf +++ b/testfiles/ASHRAE901_RetailStripmall_STD2019_Denver.idf @@ -7138,6 +7138,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -7189,6 +7190,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -7240,6 +7242,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -7291,6 +7294,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -7342,6 +7346,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -7393,6 +7398,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -7444,6 +7450,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -7495,6 +7502,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -7546,6 +7554,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -7597,6 +7606,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/ASHRAE901_SchoolPrimary_STD2019_Denver.idf b/testfiles/ASHRAE901_SchoolPrimary_STD2019_Denver.idf index 0facb0d7b95..2088567fd4d 100644 --- a/testfiles/ASHRAE901_SchoolPrimary_STD2019_Denver.idf +++ b/testfiles/ASHRAE901_SchoolPrimary_STD2019_Denver.idf @@ -14340,6 +14340,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -14391,6 +14392,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -14442,6 +14444,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/ASHRAE901_SchoolSecondary_STD2019_Denver.idf b/testfiles/ASHRAE901_SchoolSecondary_STD2019_Denver.idf index 56c3252ea8a..45ecccdeeeb 100644 --- a/testfiles/ASHRAE901_SchoolSecondary_STD2019_Denver.idf +++ b/testfiles/ASHRAE901_SchoolSecondary_STD2019_Denver.idf @@ -23675,6 +23675,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -23726,6 +23727,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -23777,6 +23779,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -23828,6 +23831,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -23879,6 +23883,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/ASHRAE901_Warehouse_STD2019_Denver.idf b/testfiles/ASHRAE901_Warehouse_STD2019_Denver.idf index 56d327cb1ee..cd29897aa3f 100644 --- a/testfiles/ASHRAE901_Warehouse_STD2019_Denver.idf +++ b/testfiles/ASHRAE901_Warehouse_STD2019_Denver.idf @@ -5336,6 +5336,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -5387,6 +5388,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/AirflowNetwork_MultiZone_SmallOffice_HeatRecoveryHXSL.idf b/testfiles/AirflowNetwork_MultiZone_SmallOffice_HeatRecoveryHXSL.idf index bab34fb300a..72360714f2b 100644 --- a/testfiles/AirflowNetwork_MultiZone_SmallOffice_HeatRecoveryHXSL.idf +++ b/testfiles/AirflowNetwork_MultiZone_SmallOffice_HeatRecoveryHXSL.idf @@ -1833,12 +1833,8 @@ 0.4333, !- Nominal Supply Air Flow Rate {m3/s} 0.76, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.76, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} Outside Air Inlet Node, !- Supply Air Inlet Node Name Heat Recovery Outlet Node, !- Supply Air Outlet Node Name Relief Air Outlet Node, !- Exhaust Air Inlet Node Name @@ -1847,7 +1843,60 @@ Yes, !- Supply Air Outlet Temperature Control Plate, !- Heat Exchanger Type MinimumExhaustTemperature, !- Frost Control Type - 1.7; !- Threshold Temperature {C} + 1.7, !- Threshold Temperature {C} + , !- Initial Defrost Time Fraction {dimensionless} + , !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name + + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + + Table:Lookup, + SenEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.76, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.81, !- Output Value 1 + 0.76; !- Output Value 2 + + Table:Lookup, + LatEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.68, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.73, !- Output Value 1 + 0.68; !- Output Value 2 SetpointManager:Scheduled, Heat Exhchanger Supply Air Temp Manager, !- Name diff --git a/testfiles/AtticRoof_RadiantBarriers.idf b/testfiles/AtticRoof_RadiantBarriers.idf index ae1e1919cbc..4cce1982f78 100644 --- a/testfiles/AtticRoof_RadiantBarriers.idf +++ b/testfiles/AtticRoof_RadiantBarriers.idf @@ -10756,6 +10756,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 48.8888888888889, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/CMakeLists.txt b/testfiles/CMakeLists.txt index 3acb3c1f2f5..68a4f9d3fb4 100644 --- a/testfiles/CMakeLists.txt +++ b/testfiles/CMakeLists.txt @@ -391,6 +391,7 @@ add_simulation_test(IDF_FILE IceStorage-Series-ChillerDownstream.idf EPW_FILE US add_simulation_test(IDF_FILE IceStorage-Series-ChillerUpstream.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw) add_simulation_test(IDF_FILE IndEvapCoolerRTUoffice.idf EPW_FILE USA_AZ_Phoenix-Sky.Harbor.Intl.AP.722780_TMY3.epw) add_simulation_test(IDF_FILE IndirectAbsorptionChiller.idf EPW_FILE USA_FL_Miami.Intl.AP.722020_TMY3.epw) +add_simulation_test(IDF_FILE IndoorLivingWall.idf EPW_FILE USA_AZ_Phoenix-Sky.Harbor.Intl.AP.722780_TMY3.epw) add_simulation_test(IDF_FILE InternalMass_wZoneList.idf EPW_FILE USA_FL_Miami.Intl.AP.722020_TMY3.epw) add_simulation_test(IDF_FILE Fenestration_RefBldgSmallHotelNew2004_Chicago.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw) add_simulation_test(IDF_FILE LgOffVAV.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw) @@ -787,6 +788,8 @@ add_simulation_test(IDF_FILE BasicsFiles/Exercise2.idf EPW_FILE USA_IL_Chicago-O # Macro files add_simulation_test(IDF_FILE AbsorptionChiller_Macro.imf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw ENERGYPLUS_FLAGS -m) +add_api_simulation_test(PYTHON_FILE user_defined_equipment.py) + # External interface files -- note they don't work on Mac if (NOT APPLE) add_simulation_test(IDF_FILE _ExternalInterface-functionalmockupunit-to-actuator.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw) diff --git a/testfiles/CoilWaterDesuperheatingUnitary.idf b/testfiles/CoilWaterDesuperheatingUnitary.idf index d5899c63e2d..9b63bf7690f 100644 --- a/testfiles/CoilWaterDesuperheatingUnitary.idf +++ b/testfiles/CoilWaterDesuperheatingUnitary.idf @@ -1320,6 +1320,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Cooling Capacity , !- No Load Supply Air Flow Rate Per Unit of Heating Capacity + , !- No Load Supply Air Flow Rate Control Set To Low Speed 80; !- Maximum Supply Air Temperature {C} AirTerminal:SingleDuct:ConstantVolume:NoReheat, diff --git a/testfiles/CoilWaterDesuperheatingUnitaryCoilDX.idf b/testfiles/CoilWaterDesuperheatingUnitaryCoilDX.idf index fbb40253c37..df06f409e93 100644 --- a/testfiles/CoilWaterDesuperheatingUnitaryCoilDX.idf +++ b/testfiles/CoilWaterDesuperheatingUnitaryCoilDX.idf @@ -1320,6 +1320,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Cooling Capacity , !- No Load Supply Air Flow Rate Per Unit of Heating Capacity + , !- No Load Supply Air Flow Rate Control Set To Low Speed 80; !- Maximum Supply Air Temperature {C} AirTerminal:SingleDuct:ConstantVolume:NoReheat, diff --git a/testfiles/CoolingCoilFreezingPrevention.idf b/testfiles/CoolingCoilFreezingPrevention.idf index 46c2a209b9b..57ecefedb39 100644 --- a/testfiles/CoolingCoilFreezingPrevention.idf +++ b/testfiles/CoolingCoilFreezingPrevention.idf @@ -1548,6 +1548,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize, !- Maximum Supply Air Temperature {C} 21; !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} diff --git a/testfiles/DOAS_wNeutralSupplyAir_wFanCoilUnits.idf b/testfiles/DOAS_wNeutralSupplyAir_wFanCoilUnits.idf index 9a9ee3f4033..36d0020febc 100644 --- a/testfiles/DOAS_wNeutralSupplyAir_wFanCoilUnits.idf +++ b/testfiles/DOAS_wNeutralSupplyAir_wFanCoilUnits.idf @@ -3024,12 +3024,8 @@ Autosize, !- Nominal Supply Air Flow Rate {m3/s} 0.76, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.76, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} Node 6, !- Supply Air Inlet Node Name Node 9, !- Supply Air Outlet Node Name Node 10, !- Exhaust Air Inlet Node Name @@ -3041,7 +3037,58 @@ 1.7, !- Threshold Temperature {C} , !- Initial Defrost Time Fraction {dimensionless} , !- Rate of Defrost Time Fraction Increase {1/K} - Yes; !- Economizer Lockout + Yes, !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name + + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + + Table:Lookup, + SenEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.76, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.81, !- Output Value 1 + 0.76; !- Output Value 2 + + Table:Lookup, + LatEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.68, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.73, !- Output Value 1 + 0.68; !- Output Value 2 + !- =========== ALL OBJECTS IN CLASS: CONTROLLER:WATERCOIL =========== diff --git a/testfiles/DOAToFanCoilInlet.idf b/testfiles/DOAToFanCoilInlet.idf index e7e2471333e..e8e1d00195e 100644 --- a/testfiles/DOAToFanCoilInlet.idf +++ b/testfiles/DOAToFanCoilInlet.idf @@ -2808,12 +2808,8 @@ autosize, !- Nominal Supply Air Flow Rate {m3/s} 0.7, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.7, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} DOAS Outdoor Air Inlet, !- Supply Air Inlet Node Name DOAS Heat Recovery Supply Outlet, !- Supply Air Outlet Node Name DOAS Relief Air Outlet, !- Exhaust Air Inlet Node Name @@ -2825,8 +2821,57 @@ 1.7, !- Threshold Temperature {C} 0.083, !- Initial Defrost Time Fraction {dimensionless} 0.012, !- Rate of Defrost Time Fraction Increase {1/K} - Yes; !- Economizer Lockout - + Yes, !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name + + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + + Table:Lookup, + SenEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.7, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Output Value 1 + 0.70; !- Output Value 2 + + Table:Lookup, + LatEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.65, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.70, !- Output Value 1 + 0.65; !- Output Value 2 !- =========== ALL OBJECTS IN CLASS: CONTROLLER:WATERCOIL =========== Controller:WaterCoil, diff --git a/testfiles/DOAToFanCoilSupply.idf b/testfiles/DOAToFanCoilSupply.idf index f9d5ea5ff34..e9c779ca04a 100644 --- a/testfiles/DOAToFanCoilSupply.idf +++ b/testfiles/DOAToFanCoilSupply.idf @@ -2807,12 +2807,8 @@ autosize, !- Nominal Supply Air Flow Rate {m3/s} 0.7, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.7, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} DOAS Outdoor Air Inlet, !- Supply Air Inlet Node Name DOAS Heat Recovery Supply Outlet, !- Supply Air Outlet Node Name DOAS Relief Air Outlet, !- Exhaust Air Inlet Node Name @@ -2824,7 +2820,57 @@ 1.7, !- Threshold Temperature {C} 0.083, !- Initial Defrost Time Fraction {dimensionless} 0.012, !- Rate of Defrost Time Fraction Increase {1/K} - Yes; !- Economizer Lockout + Yes, !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name + + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + + Table:Lookup, + SenEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.7, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Output Value 1 + 0.70; !- Output Value 2 + + Table:Lookup, + LatEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.65, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.70, !- Output Value 1 + 0.65; !- Output Value 2 !- =========== ALL OBJECTS IN CLASS: CONTROLLER:WATERCOIL =========== diff --git a/testfiles/DOAToPTAC.idf b/testfiles/DOAToPTAC.idf index cb1e3ae4d00..75ca753ae0c 100644 --- a/testfiles/DOAToPTAC.idf +++ b/testfiles/DOAToPTAC.idf @@ -2189,6 +2189,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2307,6 +2308,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2348,6 +2350,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2389,6 +2392,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2430,6 +2434,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2809,12 +2814,8 @@ autosize, !- Nominal Supply Air Flow Rate {m3/s} 0.7, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.7, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} DOAS Outdoor Air Inlet, !- Supply Air Inlet Node Name DOAS Heat Recovery Supply Outlet, !- Supply Air Outlet Node Name DOAS Relief Air Outlet, !- Exhaust Air Inlet Node Name @@ -2826,7 +2827,57 @@ 1.7, !- Threshold Temperature {C} 0.083, !- Initial Defrost Time Fraction {dimensionless} 0.012, !- Rate of Defrost Time Fraction Increase {1/K} - Yes; !- Economizer Lockout + Yes, !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name + + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + + Table:Lookup, + SenEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.7, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Output Value 1 + 0.70; !- Output Value 2 + + Table:Lookup, + LatEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.65, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.70, !- Output Value 1 + 0.65; !- Output Value 2 !- =========== ALL OBJECTS IN CLASS: CONTROLLER:OUTDOORAIR =========== diff --git a/testfiles/DOAToPTAC_DrawReturnAir.idf b/testfiles/DOAToPTAC_DrawReturnAir.idf index 3e9883868bc..97547052840 100644 --- a/testfiles/DOAToPTAC_DrawReturnAir.idf +++ b/testfiles/DOAToPTAC_DrawReturnAir.idf @@ -2137,6 +2137,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2255,6 +2256,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2296,6 +2298,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2337,6 +2340,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2378,6 +2382,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/testfiles/DOAToPTHP.idf b/testfiles/DOAToPTHP.idf index 0a838b60d3b..4c5f276eb2d 100644 --- a/testfiles/DOAToPTHP.idf +++ b/testfiles/DOAToPTHP.idf @@ -2236,6 +2236,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2453,6 +2454,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2527,6 +2529,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2601,6 +2604,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2675,6 +2679,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -3082,12 +3087,8 @@ autosize, !- Nominal Supply Air Flow Rate {m3/s} 0.7, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.7, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} DOAS Outdoor Air Inlet, !- Supply Air Inlet Node Name DOAS Heat Recovery Supply Outlet, !- Supply Air Outlet Node Name DOAS Relief Air Outlet, !- Exhaust Air Inlet Node Name @@ -3099,8 +3100,57 @@ 1.7, !- Threshold Temperature {C} 0.083, !- Initial Defrost Time Fraction {dimensionless} 0.012, !- Rate of Defrost Time Fraction Increase {1/K} - Yes; !- Economizer Lockout - + Yes, !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name + + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + + Table:Lookup, + SenEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.7, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Output Value 1 + 0.70; !- Output Value 2 + + Table:Lookup, + LatEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.65, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.70, !- Output Value 1 + 0.65; !- Output Value 2 !- =========== ALL OBJECTS IN CLASS: CONTROLLER:OUTDOORAIR =========== Controller:OutdoorAir, diff --git a/testfiles/DOAToUnitVentilator.idf b/testfiles/DOAToUnitVentilator.idf index 71e99fee5b7..b875ef1720f 100644 --- a/testfiles/DOAToUnitVentilator.idf +++ b/testfiles/DOAToUnitVentilator.idf @@ -3015,12 +3015,8 @@ autosize, !- Nominal Supply Air Flow Rate {m3/s} 0.7, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.7, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} DOAS Outdoor Air Inlet, !- Supply Air Inlet Node Name DOAS Heat Recovery Supply Outlet, !- Supply Air Outlet Node Name DOAS Relief Air Outlet, !- Exhaust Air Inlet Node Name @@ -3032,7 +3028,57 @@ 1.7, !- Threshold Temperature {C} 0.083, !- Initial Defrost Time Fraction {dimensionless} 0.012, !- Rate of Defrost Time Fraction Increase {1/K} - Yes; !- Economizer Lockout + Yes, !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name + + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + + Table:Lookup, + SenEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.7, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Output Value 1 + 0.70; !- Output Value 2 + + Table:Lookup, + LatEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.65, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.70, !- Output Value 1 + 0.65; !- Output Value 2 !- =========== ALL OBJECTS IN CLASS: CONTROLLER:OUTDOORAIR =========== diff --git a/testfiles/DOAToUnitarySystem.idf b/testfiles/DOAToUnitarySystem.idf index 010a2e3e442..c4a3dc1e37c 100644 --- a/testfiles/DOAToUnitarySystem.idf +++ b/testfiles/DOAToUnitarySystem.idf @@ -2336,6 +2336,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize; !- Maximum Supply Air Temperature {C} !- =========== ALL OBJECTS IN CLASS: COIL:COOLING:DX:SINGLESPEED =========== @@ -2473,6 +2474,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize; !- Maximum Supply Air Temperature {C} !- =========== ALL OBJECTS IN CLASS: COIL:COOLING:DX:SINGLESPEED =========== @@ -2533,6 +2535,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize; !- Maximum Supply Air Temperature {C} !- =========== ALL OBJECTS IN CLASS: COIL:COOLING:DX:SINGLESPEED =========== @@ -2593,6 +2596,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize; !- Maximum Supply Air Temperature {C} !- =========== ALL OBJECTS IN CLASS: COIL:COOLING:DX:SINGLESPEED =========== @@ -2653,6 +2657,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize; !- Maximum Supply Air Temperature {C} !- =========== ALL OBJECTS IN CLASS: COIL:COOLING:DX:SINGLESPEED =========== @@ -3017,12 +3022,8 @@ autosize, !- Nominal Supply Air Flow Rate {m3/s} 0.7, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.7, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} DOAS Outdoor Air Inlet, !- Supply Air Inlet Node Name DOAS Heat Recovery Supply Outlet, !- Supply Air Outlet Node Name DOAS Relief Air Outlet, !- Exhaust Air Inlet Node Name @@ -3034,7 +3035,57 @@ 1.7, !- Threshold Temperature {C} 0.083, !- Initial Defrost Time Fraction {dimensionless} 0.012, !- Rate of Defrost Time Fraction Increase {1/K} - Yes; !- Economizer Lockout + Yes, !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name + + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + + Table:Lookup, + SenEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.7, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Output Value 1 + 0.70; !- Output Value 2 + + Table:Lookup, + LatEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.65, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.70, !- Output Value 1 + 0.65; !- Output Value 2 !- =========== ALL OBJECTS IN CLASS: CONTROLLER:OUTDOORAIR =========== diff --git a/testfiles/DOAToVRF.idf b/testfiles/DOAToVRF.idf index e0aae9011a2..bda10b0e078 100644 --- a/testfiles/DOAToVRF.idf +++ b/testfiles/DOAToVRF.idf @@ -3281,12 +3281,8 @@ autosize, !- Nominal Supply Air Flow Rate {m3/s} 0.7, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.7, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} DOAS Outdoor Air Inlet, !- Supply Air Inlet Node Name DOAS Heat Recovery Supply Outlet, !- Supply Air Outlet Node Name DOAS Relief Air Outlet, !- Exhaust Air Inlet Node Name @@ -3298,7 +3294,58 @@ 1.7, !- Threshold Temperature {C} 0.083, !- Initial Defrost Time Fraction {dimensionless} 0.012, !- Rate of Defrost Time Fraction Increase {1/K} - Yes; !- Economizer Lockout + Yes, !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name + + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + + Table:Lookup, + SenEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.7, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Output Value 1 + 0.70; !- Output Value 2 + + Table:Lookup, + LatEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.65, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.70, !- Output Value 1 + 0.65; !- Output Value 2 + !- =========== ALL OBJECTS IN CLASS: CONTROLLER:OUTDOORAIR =========== diff --git a/testfiles/DOAToWaterToAirHPInlet.idf b/testfiles/DOAToWaterToAirHPInlet.idf index 915e43eb5d1..6f71b1db3bf 100644 --- a/testfiles/DOAToWaterToAirHPInlet.idf +++ b/testfiles/DOAToWaterToAirHPInlet.idf @@ -2177,6 +2177,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2204,6 +2205,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2231,6 +2233,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2258,6 +2261,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2285,6 +2289,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2960,12 +2965,8 @@ autosize, !- Nominal Supply Air Flow Rate {m3/s} 0.7, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.7, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} DOAS Outdoor Air Inlet, !- Supply Air Inlet Node Name DOAS Heat Recovery Supply Outlet, !- Supply Air Outlet Node Name DOAS Relief Air Outlet, !- Exhaust Air Inlet Node Name @@ -2977,7 +2978,57 @@ 1.7, !- Threshold Temperature {C} 0.083, !- Initial Defrost Time Fraction {dimensionless} 0.012, !- Rate of Defrost Time Fraction Increase {1/K} - Yes; !- Economizer Lockout + Yes, !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name + + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + + Table:Lookup, + SenEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.7, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Output Value 1 + 0.70; !- Output Value 2 + + Table:Lookup, + LatEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.65, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.70, !- Output Value 1 + 0.65; !- Output Value 2 !- =========== ALL OBJECTS IN CLASS: CONTROLLER:OUTDOORAIR =========== diff --git a/testfiles/DOAToWaterToAirHPInlet_MultispeedFan.idf b/testfiles/DOAToWaterToAirHPInlet_MultispeedFan.idf index 1ba3f671b85..83f2e0c5a5d 100644 --- a/testfiles/DOAToWaterToAirHPInlet_MultispeedFan.idf +++ b/testfiles/DOAToWaterToAirHPInlet_MultispeedFan.idf @@ -2179,6 +2179,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2238,6 +2239,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2729,6 +2731,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2756,6 +2759,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2783,6 +2787,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -3434,12 +3439,8 @@ autosize, !- Nominal Supply Air Flow Rate {m3/s} 0.7, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.7, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} DOAS Outdoor Air Inlet, !- Supply Air Inlet Node Name DOAS Heat Recovery Supply Outlet, !- Supply Air Outlet Node Name DOAS Relief Air Outlet, !- Exhaust Air Inlet Node Name @@ -3451,7 +3452,57 @@ 1.7, !- Threshold Temperature {C} 0.083, !- Initial Defrost Time Fraction {dimensionless} 0.012, !- Rate of Defrost Time Fraction Increase {1/K} - Yes; !- Economizer Lockout + Yes, !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name + + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + + Table:Lookup, + SenEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.7, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Output Value 1 + 0.70; !- Output Value 2 + + Table:Lookup, + LatEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.65, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.70, !- Output Value 1 + 0.65; !- Output Value 2 !- =========== ALL OBJECTS IN CLASS: CONTROLLER:OUTDOORAIR =========== diff --git a/testfiles/DOAToWaterToAirHPSupply.idf b/testfiles/DOAToWaterToAirHPSupply.idf index 34f54940dea..b8e17530923 100644 --- a/testfiles/DOAToWaterToAirHPSupply.idf +++ b/testfiles/DOAToWaterToAirHPSupply.idf @@ -2177,6 +2177,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2204,6 +2205,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2231,6 +2233,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2258,6 +2261,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2285,6 +2289,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0, !- Cooling Outdoor Air Flow Rate {m3/s} 0, !- Heating Outdoor Air Flow Rate {m3/s} 0, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2960,12 +2965,8 @@ autosize, !- Nominal Supply Air Flow Rate {m3/s} 0.7, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.7, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} DOAS Outdoor Air Inlet, !- Supply Air Inlet Node Name DOAS Heat Recovery Supply Outlet, !- Supply Air Outlet Node Name DOAS Relief Air Outlet, !- Exhaust Air Inlet Node Name @@ -2977,7 +2978,58 @@ 1.7, !- Threshold Temperature {C} 0.083, !- Initial Defrost Time Fraction {dimensionless} 0.012, !- Rate of Defrost Time Fraction Increase {1/K} - Yes; !- Economizer Lockout + Yes, !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name + + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + + Table:Lookup, + SenEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.7, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Output Value 1 + 0.70; !- Output Value 2 + + Table:Lookup, + LatEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.65, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.70, !- Output Value 1 + 0.65; !- Output Value 2 + !- =========== ALL OBJECTS IN CLASS: CONTROLLER:OUTDOORAIR =========== diff --git a/testfiles/EMSCurveOverride_PackagedTerminalHeatPump.idf b/testfiles/EMSCurveOverride_PackagedTerminalHeatPump.idf index 87fcf959e2d..dfc96a441fa 100644 --- a/testfiles/EMSCurveOverride_PackagedTerminalHeatPump.idf +++ b/testfiles/EMSCurveOverride_PackagedTerminalHeatPump.idf @@ -1593,6 +1593,7 @@ 0.32, !- Cooling Supply Air Flow Rate {m3/s} 0.32, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.028, !- Cooling Outdoor Air Flow Rate {m3/s} 0.028, !- Heating Outdoor Air Flow Rate {m3/s} 0.0186, !- No Load Outdoor Air Flow Rate {m3/s} @@ -1621,6 +1622,7 @@ autosize, !- Cooling Supply Air Flow Rate {m3/s} autosize, !- Heating Supply Air Flow Rate {m3/s} autosize, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize, !- Cooling Outdoor Air Flow Rate {m3/s} autosize, !- Heating Outdoor Air Flow Rate {m3/s} autosize, !- No Load Outdoor Air Flow Rate {m3/s} @@ -1649,6 +1651,7 @@ autosize, !- Cooling Supply Air Flow Rate {m3/s} autosize, !- Heating Supply Air Flow Rate {m3/s} autosize, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize, !- Cooling Outdoor Air Flow Rate {m3/s} autosize, !- Heating Outdoor Air Flow Rate {m3/s} autosize, !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/testfiles/EMSLoadBasedMultiSpeedDXCoilOverrideControl.idf b/testfiles/EMSLoadBasedMultiSpeedDXCoilOverrideControl.idf index e5303788866..b290cfbfeab 100644 --- a/testfiles/EMSLoadBasedMultiSpeedDXCoilOverrideControl.idf +++ b/testfiles/EMSLoadBasedMultiSpeedDXCoilOverrideControl.idf @@ -2422,6 +2422,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -2880,6 +2881,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -3348,6 +3350,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -4003,6 +4006,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -4658,6 +4662,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/EMSSetpointBasedMultiSpeedDXCoilOverrideControl.idf b/testfiles/EMSSetpointBasedMultiSpeedDXCoilOverrideControl.idf index 4e43a0f1111..aa4c8992850 100644 --- a/testfiles/EMSSetpointBasedMultiSpeedDXCoilOverrideControl.idf +++ b/testfiles/EMSSetpointBasedMultiSpeedDXCoilOverrideControl.idf @@ -2741,6 +2741,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 80, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/Fenestration_RefBldgSmallHotelNew2004_Chicago.idf b/testfiles/Fenestration_RefBldgSmallHotelNew2004_Chicago.idf index 646abb7dbe2..92004f6d269 100644 --- a/testfiles/Fenestration_RefBldgSmallHotelNew2004_Chicago.idf +++ b/testfiles/Fenestration_RefBldgSmallHotelNew2004_Chicago.idf @@ -19182,6 +19182,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19204,6 +19205,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19226,6 +19228,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19248,6 +19251,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19270,6 +19274,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19292,6 +19297,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19314,6 +19320,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19336,6 +19343,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19358,6 +19366,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19380,6 +19389,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19402,6 +19412,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19424,6 +19435,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19446,6 +19458,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19468,6 +19481,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19490,6 +19504,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19512,6 +19527,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19534,6 +19550,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19556,6 +19573,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19578,6 +19596,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19600,6 +19619,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19622,6 +19642,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19644,6 +19665,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19666,6 +19688,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19688,6 +19711,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19710,6 +19734,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19732,6 +19757,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19754,6 +19780,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19776,6 +19803,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19798,6 +19826,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19820,6 +19849,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19842,6 +19872,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19864,6 +19895,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19886,6 +19918,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19908,6 +19941,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19930,6 +19964,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/testfiles/GSHP-GLHE-CalcGFunctions-cpg.idf b/testfiles/GSHP-GLHE-CalcGFunctions-cpg.idf index 8a9b791a772..dc6d38feb9c 100644 --- a/testfiles/GSHP-GLHE-CalcGFunctions-cpg.idf +++ b/testfiles/GSHP-GLHE-CalcGFunctions-cpg.idf @@ -588,6 +588,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Cooling Outdoor Air Flow Rate {m3/s} Autosize, !- Heating Outdoor Air Flow Rate {m3/s} Autosize, !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/testfiles/GSHP-GLHE-CalcGFunctions.idf b/testfiles/GSHP-GLHE-CalcGFunctions.idf index d8c64f70378..8937836359b 100644 --- a/testfiles/GSHP-GLHE-CalcGFunctions.idf +++ b/testfiles/GSHP-GLHE-CalcGFunctions.idf @@ -588,6 +588,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Cooling Outdoor Air Flow Rate {m3/s} Autosize, !- Heating Outdoor Air Flow Rate {m3/s} Autosize, !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/testfiles/HVACStandAloneERV_Economizer.idf b/testfiles/HVACStandAloneERV_Economizer.idf index 1157364291c..5e38400f6b5 100644 --- a/testfiles/HVACStandAloneERV_Economizer.idf +++ b/testfiles/HVACStandAloneERV_Economizer.idf @@ -1677,12 +1677,8 @@ 0.05, !- Nominal Supply Air Flow Rate {m3/s} 0.76, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.76, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} ERV Outside Air Inlet Node, !- Supply Air Inlet Node Name Heat Recovery Outlet Node, !- Supply Air Outlet Node Name Zone 1 Exhaust Node, !- Exhaust Air Inlet Node Name @@ -1691,7 +1687,60 @@ Yes, !- Supply Air Outlet Temperature Control Rotary, !- Heat Exchanger Type MinimumExhaustTemperature, !- Frost Control Type - 1.7; !- Threshold Temperature {C} + 1.7, !- Threshold Temperature {C} + , !- Initial Defrost Time Fraction {dimensionless} + , !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name + + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + + Table:Lookup, + SenEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.76, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.81, !- Output Value 1 + 0.76; !- Output Value 2 + + Table:Lookup, + LatEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.68, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.73, !- Output Value 1 + 0.68; !- Output Value 2 HeatExchanger:AirToAir:SensibleAndLatent, OA Heat Recovery 2, !- Name @@ -1699,12 +1748,8 @@ 0.05, !- Nominal Supply Air Flow Rate {m3/s} 0.76, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.76, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} ERV Outside Air Inlet Node 2, !- Supply Air Inlet Node Name Heat Recovery Outlet Node 2, !- Supply Air Outlet Node Name Zone 2 Exhaust Node, !- Exhaust Air Inlet Node Name @@ -1713,7 +1758,14 @@ Yes, !- Supply Air Outlet Temperature Control Rotary, !- Heat Exchanger Type MinimumExhaustTemperature, !- Frost Control Type - 1.7; !- Threshold Temperature {C} + 1.7, !- Threshold Temperature {C} + , !- Initial Defrost Time Fraction {dimensionless} + , !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name HeatExchanger:AirToAir:SensibleAndLatent, OA Heat Recovery 3, !- Name @@ -1721,12 +1773,8 @@ 0.015, !- Nominal Supply Air Flow Rate {m3/s} 0.76, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.76, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} ERV Outside Air Inlet Node 3, !- Supply Air Inlet Node Name Heat Recovery Outlet Node 3, !- Supply Air Outlet Node Name Zone 3 Exhaust Node, !- Exhaust Air Inlet Node Name @@ -1735,7 +1783,14 @@ Yes, !- Supply Air Outlet Temperature Control Rotary, !- Heat Exchanger Type MinimumExhaustTemperature, !- Frost Control Type - 1.7; !- Threshold Temperature {C} + 1.7, !- Threshold Temperature {C} + , !- Initial Defrost Time Fraction {dimensionless} + , !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name !- =========== ALL OBJECTS IN CLASS: OUTDOORAIR:MIXER =========== diff --git a/testfiles/HospitalLowEnergy.idf b/testfiles/HospitalLowEnergy.idf index 935181b88c9..79dff177d0b 100644 --- a/testfiles/HospitalLowEnergy.idf +++ b/testfiles/HospitalLowEnergy.idf @@ -2009,6 +2009,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -2947,6 +2948,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -3558,6 +3560,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -4127,6 +4130,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -4721,6 +4725,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -5250,6 +5255,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -5792,6 +5798,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -6496,6 +6503,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -6992,6 +7000,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -7555,6 +7564,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -8098,6 +8108,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -8655,6 +8666,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -9287,6 +9299,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -9873,6 +9886,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -10358,6 +10372,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -10865,6 +10880,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -11421,6 +11437,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -11990,6 +12007,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -12559,6 +12577,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -13145,6 +13164,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -13714,6 +13734,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -14283,6 +14304,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -14892,6 +14914,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -15448,6 +15471,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -15906,6 +15930,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -16391,6 +16416,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -16898,6 +16924,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -17467,6 +17494,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -17958,6 +17986,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -18389,6 +18418,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -18874,6 +18904,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -19443,6 +19474,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -19928,6 +19960,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -20413,6 +20446,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -20962,6 +20996,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -21556,6 +21591,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -22125,6 +22161,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -22610,6 +22647,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -23095,6 +23133,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -23597,6 +23636,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -24151,6 +24191,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -24664,6 +24705,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -25263,6 +25305,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -25835,6 +25878,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -26354,6 +26398,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -26884,6 +26929,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -27403,6 +27449,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -27871,6 +27918,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -28480,6 +28528,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -28993,6 +29042,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -29607,6 +29657,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -30092,6 +30143,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -30661,6 +30713,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -31146,6 +31199,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -31755,6 +31809,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -32898,6 +32953,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -33427,6 +33483,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -33912,6 +33969,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -34425,6 +34483,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -34938,6 +34997,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -35505,6 +35565,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -36068,6 +36129,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -36639,6 +36701,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -37113,6 +37176,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -37587,6 +37651,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -38109,6 +38174,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -38540,6 +38606,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -38988,6 +39055,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -39528,6 +39596,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -40095,6 +40164,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -40662,6 +40732,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -41147,6 +41218,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -41771,6 +41843,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -42256,6 +42329,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -42861,6 +42935,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -43431,6 +43506,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -44043,6 +44119,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -44599,6 +44676,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -45141,6 +45219,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -46209,6 +46288,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -46753,6 +46833,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -47314,6 +47395,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -47883,6 +47965,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -48403,6 +48486,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -48950,6 +49034,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -49534,6 +49619,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -49998,6 +50084,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -50473,6 +50560,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -51042,6 +51130,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -51594,6 +51683,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -52079,6 +52169,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -52703,6 +52794,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -53300,6 +53392,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -53869,6 +53962,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -54465,6 +54559,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -55009,6 +55104,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -55553,6 +55649,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -56122,6 +56219,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -56642,6 +56740,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -57189,6 +57288,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -57680,6 +57780,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -58155,6 +58256,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -58640,6 +58742,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -59264,6 +59367,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -59861,6 +59965,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -60430,6 +60535,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -61026,6 +61132,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -61570,6 +61677,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -62114,6 +62222,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -62683,6 +62792,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -63203,6 +63313,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -63750,6 +63861,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -64241,6 +64353,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -64716,6 +64829,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -65201,6 +65315,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -65770,6 +65885,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -66364,6 +66480,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -66933,6 +67050,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -67418,6 +67536,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -67987,6 +68106,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -68581,6 +68701,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -69150,6 +69271,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -69719,6 +69841,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -70204,6 +70327,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -70773,6 +70897,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -71367,6 +71492,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -71936,6 +72062,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -72527,6 +72654,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} 0.0, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/testfiles/IndoorLivingWall.idf b/testfiles/IndoorLivingWall.idf new file mode 100644 index 00000000000..bdb12830efa --- /dev/null +++ b/testfiles/IndoorLivingWall.idf @@ -0,0 +1,3343 @@ +!-Generator IDFEditor 1.53 +!-Option SortedOrder + +!-NOTE: All comments with '!-' are ignored by the IDFEditor and are generated automatically. +!- Use '!' comments if they need to be retained when using the IDFEditor. + + +!- =========== ALL OBJECTS IN CLASS: VERSION =========== + +! IndoorLivingWall.idf +! Basic file description: 1 story building divided into 4 exterior and one interior conditioned zones and return plenum. +! An indoor living wall object is added to the south perimeter zone of the building. +! +! Highlights: Example of an indoor living wall object for thermal zones. +! +! Simulation Location/Run: Phoenix Sky Harbor Intl Ap_AZ_USA, 1 run periods, +! Run Control executes the run periods using the weather file +! +! Location: Phoenix, Arizona +! +! Design Days: PHOENIX_AZ_USA Annual Heating 99.6% Design Conditions DB, MaxDB= 3.7°C +! PHOENIX_AZ_USA Annual Cooling 1% Design Conditions, MaxDB= 42.3°C MWB= 21.0°C +! +! Run Period (Weather File): 7/1 through 7/31, USA_AZ_Phoenix-Sky.Harbor.Intl.AP.722780_TMY3 +! +! Run Control: Zone and System sizing with weather file run control (no design days run) +! +! Building: Single floor rectangular building 100 ft x 50 ft. 5 zones - 4 exterior, 1 interior, zone height 8 feet. +! Exterior zone depth is 12 feet. There is a 2 foot high return plenum: the overall building height is +! 10 feet. There are windows on all 4 facades; the south and north facades have glass doors. +! The walls are woodshingle over plywood, R11 insulation, +! and gypboard. The roof is a gravel built up roof with R-3 mineral board insulation and plywood sheathing. +! The windows are of various single and double pane construction with 3mm and 6mm glass and either 6mm or +! 13mm argon or air gap. The window to wall ratio is approximately 0.29. +! The south wall and door have overhangs. +! +! The building is oriented 0 degrees from north. +! +! Floor Area: 463.6 m2 (5000 ft2) +! Number of Stories: 1 +! +! Zone Description Details: +! +! (0,15.2,0) (30.5,15.2,0) +! _____ ________ ____ +! |\ *** **************** /| +! | \ / | +! | \ (26.8,11.6,0) / | +! * \_____________________________/ * +! * |(3.7,11.6,0) | * +! * | | * +! * | | * +! * | (26.8,3.7,0)| * +! * |___________________________| * +! * / (3.7,3.7,0) \ * +! | / \ | +! | / \ | +! |/___******************___***________\| +! | Overhang | | +! |_______________________| | window/door = * +! |___| +! +! (0,0,0) (30.5,0,0) +! +! Internal gains description: lighting is 1.5 watts/ft2, office equip is 1.0 watts/ft2. There is 1 occupant +! per 100 ft2 of floor area. The infiltration is 0.25 air changes per hour. +! +! Interzone Surfaces: 6 interzone surfaces (see diagram) +! Internal Mass: None +! People: 50 +! Lights: 7500 W +! Windows: 4 ea.: 1) Double pane clear, 3mm glass, 13mm air gap +! 2) Double pane clear, 3mm glass, 13mm argon gap +! 3) Double pane clear, 6mm glass, 6mm air gap +! 4) Double pane lowE, 6mm lowE glass outside, 6mm air gap, 6mm clear glass +! +! Doors: 2 ea.: Single pane grey, 3mm glass +! +! Detached Shading: None +! Daylight: None +! Natural Ventilation: None +! Compact Schedules: Yes +! +! HVAC: Standard VAV system with outside air, hot water reheat coils, +! central chilled water cooling coil. Central Plant is single hot water +! boiler, electric compression chiller with air cooled condenser. +! All equipment is autosized. HW and ChW coils are used in the outside air +! stream to precondition the outside air. +! +! Zonal Equipment: AirTerminal:SingleDuct:VAV:Reheat +! Central Air Handling Equipment: Yes +! System Equipment Autosize: Yes +! Purchased Cooling: None +! Purchased Heating: None +! Coils: Coil:Cooling:Water, Coil:Heating:Water +! Pumps: Pump:VariableSpeed +! Boilers: Boiler:HotWater +! Chillers: Chiller:Electric +! +! Results: +! Standard Reports: None +! Timestep or Hourly Variables: Hourly +! Time bins Report: None +! HTML Report: None +! Environmental Emissions: None +! Utility Tariffs: None +Version, + 23.2; !- Version Identifier + + +!- =========== ALL OBJECTS IN CLASS: SIMULATIONCONTROL =========== + +SimulationControl, + Yes, !- Do Zone Sizing Calculation + Yes, !- Do System Sizing Calculation + Yes, !- Do Plant Sizing Calculation + No, !- Run Simulation for Sizing Periods + Yes, !- Run Simulation for Weather File Run Periods + No, !- Do HVAC Sizing Simulation for Sizing Periods + 1; !- Maximum Number of HVAC Sizing Simulation Passes + + +!- =========== ALL OBJECTS IN CLASS: BUILDING =========== + +Building, + Building, !- Name + 0, !- North Axis {deg} + City, !- Terrain + 0.04, !- Loads Convergence Tolerance Value {W} + 0.4, !- Temperature Convergence Tolerance Value {deltaC} + FullExterior, !- Solar Distribution + 25, !- Maximum Number of Warmup Days + 6; !- Minimum Number of Warmup Days + + +!- =========== ALL OBJECTS IN CLASS: SURFACECONVECTIONALGORITHM:INSIDE =========== + +SurfaceConvectionAlgorithm:Inside, + Simple; !- Algorithm + + +!- =========== ALL OBJECTS IN CLASS: SURFACECONVECTIONALGORITHM:OUTSIDE =========== + +SurfaceConvectionAlgorithm:Outside, + SimpleCombined; !- Algorithm + + +!- =========== ALL OBJECTS IN CLASS: HEATBALANCEALGORITHM =========== + +HeatBalanceAlgorithm, + ConductionTransferFunction; !- Algorithm + + +!- =========== ALL OBJECTS IN CLASS: TIMESTEP =========== + +Timestep, + 4; !- Number of Timesteps per Hour + + +!- =========== ALL OBJECTS IN CLASS: SITE:LOCATION =========== + +Site:Location, + Phoenix Sky Harbor Intl Ap_AZ_USA Design_Conditions, !- Name + 33.45, !- Latitude {deg} + -111.98, !- Longitude {deg} + -7.00, !- Time Zone {hr} + 337.00; !- Elevation {m} + + +!- =========== ALL OBJECTS IN CLASS: SIZINGPERIOD:DESIGNDAY =========== + +SizingPeriod:DesignDay, + Phoenix Sky Harbor Intl Ap Ann Htg 99.6% Condns DB, !- Name + 12, !- Month + 21, !- Day of Month + WinterDesignDay, !- Day Type + 3.7, !- Maximum Dry-Bulb Temperature {C} + 0.0, !- Daily Dry-Bulb Temperature Range {deltaC} + DefaultMultipliers, !- Dry-Bulb Temperature Range Modifier Type + , !- Dry-Bulb Temperature Range Modifier Day Schedule Name + Wetbulb, !- Humidity Condition Type + 3.7, !- Wetbulb or DewPoint at Maximum Dry-Bulb {C} + , !- Humidity Condition Day Schedule Name + , !- Humidity Ratio at Maximum Dry-Bulb {kgWater/kgDryAir} + , !- Enthalpy at Maximum Dry-Bulb {J/kg} + , !- Daily Wet-Bulb Temperature Range {deltaC} + 97342., !- Barometric Pressure {Pa} + 1.7, !- Wind Speed {m/s} + 100, !- Wind Direction {deg} + No, !- Rain Indicator + No, !- Snow Indicator + No, !- Daylight Saving Time Indicator + ASHRAEClearSky, !- Solar Model Indicator + , !- Beam Solar Day Schedule Name + , !- Diffuse Solar Day Schedule Name + , !- ASHRAE Clear Sky Optical Depth for Beam Irradiance (taub) {dimensionless} + , !- ASHRAE Clear Sky Optical Depth for Diffuse Irradiance (taud) {dimensionless} + 0.00; !- Sky Clearness + +! Phoenix Sky Harbor Intl Ap_AZ_USA Annual Cooling (DB=>MWB) 1%, MaxDB=42.3°C MWB=21°C +SizingPeriod:DesignDay, + Phoenix Sky Harbor Intl Ap Ann Clg 1% Condns DB=>MWB, !- Name + 7, !- Month + 21, !- Day of Month + SummerDesignDay, !- Day Type + 42.3, !- Maximum Dry-Bulb Temperature {C} + 12, !- Daily Dry-Bulb Temperature Range {deltaC} + DefaultMultipliers, !- Dry-Bulb Temperature Range Modifier Type + , !- Dry-Bulb Temperature Range Modifier Day Schedule Name + Wetbulb, !- Humidity Condition Type + 21, !- Wetbulb or DewPoint at Maximum Dry-Bulb {C} + , !- Humidity Condition Day Schedule Name + , !- Humidity Ratio at Maximum Dry-Bulb {kgWater/kgDryAir} + , !- Enthalpy at Maximum Dry-Bulb {J/kg} + , !- Daily Wet-Bulb Temperature Range {deltaC} + 97342., !- Barometric Pressure {Pa} + 4.1, !- Wind Speed {m/s} + 260, !- Wind Direction {deg} + No, !- Rain Indicator + No, !- Snow Indicator + No, !- Daylight Saving Time Indicator + ASHRAETau, !- Solar Model Indicator + , !- Beam Solar Day Schedule Name + , !- Diffuse Solar Day Schedule Name + 0.588, !- ASHRAE Clear Sky Optical Depth for Beam Irradiance (taub) {dimensionless} + 1.653; !- ASHRAE Clear Sky Optical Depth for Diffuse Irradiance (taud) {dimensionless} + + +!- =========== ALL OBJECTS IN CLASS: RUNPERIOD =========== + +RunPeriod, + Run Period 1, !- Name + 7, !- Begin Month + 1, !- Begin Day of Month + , !- Begin Year + 7, !- End Month + 31, !- End Day of Month + , !- End Year + Tuesday, !- Day of Week for Start Day + Yes, !- Use Weather File Holidays and Special Days + Yes, !- Use Weather File Daylight Saving Period + No, !- Apply Weekend Holiday Rule + Yes, !- Use Weather File Rain Indicators + Yes; !- Use Weather File Snow Indicators + + +!- =========== ALL OBJECTS IN CLASS: SITE:GROUNDTEMPERATURE:BUILDINGSURFACE =========== + +Site:GroundTemperature:BuildingSurface, + 20.03, !- January Ground Temperature {C} + 20.03, !- February Ground Temperature {C} + 20.13, !- March Ground Temperature {C} + 20.30, !- April Ground Temperature {C} + 20.43, !- May Ground Temperature {C} + 20.52, !- June Ground Temperature {C} + 20.62, !- July Ground Temperature {C} + 20.77, !- August Ground Temperature {C} + 20.78, !- September Ground Temperature {C} + 20.55, !- October Ground Temperature {C} + 20.44, !- November Ground Temperature {C} + 20.20; !- December Ground Temperature {C} + + +!- =========== ALL OBJECTS IN CLASS: SCHEDULETYPELIMITS =========== + +ScheduleTypeLimits, + Any Number; !- Name + +ScheduleTypeLimits, + Fraction, !- Name + 0.0, !- Lower Limit Value + 1.0, !- Upper Limit Value + CONTINUOUS; !- Numeric Type + +ScheduleTypeLimits, + Temperature, !- Name + -60, !- Lower Limit Value + 200, !- Upper Limit Value + CONTINUOUS, !- Numeric Type + Temperature; !- Unit Type + +ScheduleTypeLimits, + Control Type, !- Name + 0, !- Lower Limit Value + 4, !- Upper Limit Value + DISCRETE; !- Numeric Type + +ScheduleTypeLimits, + On/Off, !- Name + 0, !- Lower Limit Value + 1, !- Upper Limit Value + DISCRETE; !- Numeric Type + +ScheduleTypeLimits, + FlowRate, !- Name + 0.0, !- Lower Limit Value + 10, !- Upper Limit Value + CONTINUOUS; !- Numeric Type + +! +! ------------------------------------------------------------- +! New objects created from ExpandObjects +! ------------------------------------------------------------- +! +ScheduleTypeLimits, + HVACTemplate Any Number; !- Name + + +!- =========== ALL OBJECTS IN CLASS: SCHEDULE:COMPACT =========== + +Schedule:Compact, + AlwaysOff, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00, !- Field 3 + 0; !- Field 4 + +Schedule:Compact, + AlwaysOn, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00, !- Field 3 + 1; !- Field 4 + +Schedule:Compact, + OCCUPY-1, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: WeekDays SummerDesignDay CustomDay1 CustomDay2, !- Field 2 + Until: 8:00, !- Field 3 + 0.0, !- Field 4 + Until: 11:00, !- Field 5 + 1.00, !- Field 6 + Until: 12:00, !- Field 7 + 0.80, !- Field 8 + Until: 13:00, !- Field 9 + 0.40, !- Field 10 + Until: 14:00, !- Field 11 + 0.80, !- Field 12 + Until: 18:00, !- Field 13 + 1.00, !- Field 14 + Until: 19:00, !- Field 15 + 0.50, !- Field 16 + Until: 24:00, !- Field 17 + 0.0, !- Field 18 + For: Weekends WinterDesignDay Holiday, !- Field 19 + Until: 24:00, !- Field 20 + 0.0; !- Field 21 + +Schedule:Compact, + LIGHTS-1, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: WeekDays SummerDesignDay CustomDay1 CustomDay2, !- Field 2 + Until: 8:00, !- Field 3 + 0.05, !- Field 4 + Until: 9:00, !- Field 5 + 0.9, !- Field 6 + Until: 10:00, !- Field 7 + 0.95, !- Field 8 + Until: 11:00, !- Field 9 + 1.00, !- Field 10 + Until: 12:00, !- Field 11 + 0.95, !- Field 12 + Until: 13:00, !- Field 13 + 0.8, !- Field 14 + Until: 14:00, !- Field 15 + 0.9, !- Field 16 + Until: 18:00, !- Field 17 + 1.00, !- Field 18 + Until: 19:00, !- Field 19 + 0.60, !- Field 20 + Until: 21:00, !- Field 21 + 0.20, !- Field 22 + Until: 24:00, !- Field 23 + 0.05, !- Field 24 + For: Weekends WinterDesignDay Holiday, !- Field 25 + Until: 24:00, !- Field 26 + 0.05; !- Field 27 + +Schedule:Compact, + EQUIP-1, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: WeekDays SummerDesignDay CustomDay1 CustomDay2, !- Field 2 + Until: 8:00, !- Field 3 + 0.02, !- Field 4 + Until: 9:00, !- Field 5 + 0.4, !- Field 6 + Until: 14:00, !- Field 7 + 0.9, !- Field 8 + Until: 15:00, !- Field 9 + 0.8, !- Field 10 + Until: 16:00, !- Field 11 + 0.7, !- Field 12 + Until: 18:00, !- Field 13 + 0.5, !- Field 14 + Until: 20:00, !- Field 15 + 0.3, !- Field 16 + Until: 24:00, !- Field 17 + 0.02, !- Field 18 + For: Weekends WinterDesignDay Holiday, !- Field 19 + Until: 24:00, !- Field 20 + 0.2; !- Field 21 + +Schedule:Compact, + INFIL-SCH, !- Name + Fraction, !- Schedule Type Limits Name + Through: 3/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00, !- Field 3 + 1.0, !- Field 4 + Through: 10/31, !- Field 5 + For: AllDays, !- Field 6 + Until: 24:00, !- Field 7 + 0.0, !- Field 8 + Through: 12/31, !- Field 9 + For: AllDays, !- Field 10 + Until: 24:00, !- Field 11 + 1.0; !- Field 12 + +Schedule:Compact, + ActSchd, !- Name + Any Number, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00, !- Field 3 + 117.239997864; !- Field 4 + +Schedule:Compact, + ShadeTransSch, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00, !- Field 3 + 0.0; !- Field 4 + +Schedule:Compact, + Htg-SetP-Sch, !- Name + Temperature, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: SummerDesignDay, !- Field 2 + Until: 24:00, !- Field 3 + 16.7, !- Field 4 + For: WinterDesignDay, !- Field 5 + Until: 24:00, !- Field 6 + 22.2, !- Field 7 + For: WeekDays, !- Field 8 + Until: 6:00, !- Field 9 + 16.7, !- Field 10 + Until: 20:00, !- Field 11 + 22.2, !- Field 12 + Until: 24:00, !- Field 13 + 16.7, !- Field 14 + For: WeekEnds Holiday, !- Field 15 + Until: 24:00, !- Field 16 + 16.7, !- Field 17 + For: AllOtherDays, !- Field 18 + Until: 24:00, !- Field 19 + 16.7; !- Field 20 + +Schedule:Compact, + PlenumHtg-SetP-Sch, !- Name + Temperature, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00, !- Field 3 + 12.8; !- Field 4 + +Schedule:Compact, + Clg-SetP-Sch, !- Name + Temperature, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: SummerDesignDay, !- Field 2 + Until: 24:00, !- Field 3 + 23.9, !- Field 4 + For: WinterDesignDay, !- Field 5 + Until: 24:00, !- Field 6 + 29.4, !- Field 7 + For: WeekDays, !- Field 8 + Until: 6:00, !- Field 9 + 29.4, !- Field 10 + Until: 20:00, !- Field 11 + 23.9, !- Field 12 + Until: 24:00, !- Field 13 + 29.4, !- Field 14 + For: WeekEnds Holiday, !- Field 15 + Until: 24:00, !- Field 16 + 29.4, !- Field 17 + For: AllOtherDays, !- Field 18 + Until: 24:00, !- Field 19 + 29.4; !- Field 20 + +Schedule:Compact, + PlenumClg-SetP-Sch, !- Name + Temperature, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00, !- Field 3 + 40.0; !- Field 4 + +Schedule:Compact, + Zone Control Type Sched, !- Name + Control Type, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: SummerDesignDay, !- Field 2 + Until: 24:00, !- Field 3 + 2, !- Field 4 + For: WinterDesignDay, !- Field 5 + Until: 24:00, !- Field 6 + 1, !- Field 7 + For: AllOtherDays, !- Field 8 + Until: 24:00, !- Field 9 + 4; !- Field 10 + +Schedule:Compact, + Min OA Sched, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: Weekdays, !- Field 2 + Until: 6:00, !- Field 3 + 0.02, !- Field 4 + Until: 20:00, !- Field 5 + 1.0, !- Field 6 + Until: 24:00, !- Field 7 + 0.02, !- Field 8 + For: AllOtherDays, !- Field 9 + Until: 24:00, !- Field 10 + 0.02; !- Field 11 + +Schedule:Compact, + FanAvailSched, !- Name + Fraction, !- Schedule Type Limits Name + Through: 3/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00, !- Field 3 + 1.0, !- Field 4 + Through: 9/30, !- Field 5 + For: WeekDays, !- Field 6 + Until: 6:00, !- Field 7 + 0.0, !- Field 8 + Until: 20:00, !- Field 9 + 1.0, !- Field 10 + Until: 24:00, !- Field 11 + 0.0, !- Field 12 + For: SummerDesignDay WinterDesignDay, !- Field 13 + Until: 24:00, !- Field 14 + 1.0, !- Field 15 + For: AllOtherDays, !- Field 16 + Until: 24:00, !- Field 17 + 0.0, !- Field 18 + Through: 12/31, !- Field 19 + For: AllDays, !- Field 20 + Until: 24:00, !- Field 21 + 1.0; !- Field 22 + +Schedule:Compact, + CoolingCoilAvailSched, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: WeekDays, !- Field 2 + Until: 6:00, !- Field 3 + 0.0, !- Field 4 + Until: 20:00, !- Field 5 + 1.0, !- Field 6 + Until: 24:00, !- Field 7 + 0.0, !- Field 8 + For: SummerDesignDay WinterDesignDay, !- Field 9 + Until: 24:00, !- Field 10 + 1.0, !- Field 11 + For: AllOtherDays, !- Field 12 + Until: 24:00, !- Field 13 + 0.0; !- Field 14 + +Schedule:Compact, + CoolingPumpAvailSched, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00, !- Field 3 + 1.0; !- Field 4 + +Schedule:Compact, + ReheatCoilAvailSched, !- Name + Fraction, !- Schedule Type Limits Name + Through: 3/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00, !- Field 3 + 1.0, !- Field 4 + Through: 9/30, !- Field 5 + For: WeekDays, !- Field 6 + Until: 6:00, !- Field 7 + 0.0, !- Field 8 + Until: 20:00, !- Field 9 + 1.0, !- Field 10 + Until: 24:00, !- Field 11 + 0.0, !- Field 12 + For: SummerDesignDay WinterDesignDay, !- Field 13 + Until: 24:00, !- Field 14 + 1.0, !- Field 15 + For: AllOtherDays, !- Field 16 + Until: 24:00, !- Field 17 + 0.0, !- Field 18 + Through: 12/31, !- Field 19 + For: AllDays, !- Field 20 + Until: 24:00, !- Field 21 + 1.0; !- Field 22 + +Schedule:Compact, + CW Loop Temp Schedule, !- Name + Temperature, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00, !- Field 3 + 7.22; !- Field 4 + +Schedule:Compact, + HW Loop Temp Schedule, !- Name + Temperature, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00, !- Field 3 + 82; !- Field 4 + +Schedule:Compact, + PlantOnSched, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00, !- Field 3 + 1.0; !- Field 4 + +Schedule:Compact, + Seasonal Reset Supply Air Temp Sch, !- Name + Temperature, !- Schedule Type Limits Name + Through: 3/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00, !- Field 3 + 16.0, !- Field 4 + Through: 9/30, !- Field 5 + For: AllDays, !- Field 6 + Until: 24:00, !- Field 7 + 13.0, !- Field 8 + Through: 12/31, !- Field 9 + For: AllDays, !- Field 10 + Until: 24:00, !- Field 11 + 16.0; !- Field 12 + +Schedule:Compact, + OA Cooling Supply Air Temp Sch, !- Name + Temperature, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00, !- Field 3 + 11.5; !- Field 4 + +Schedule:Compact, + OA Heating Supply Air Temp Sch, !- Name + Temperature, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00, !- Field 3 + 4.5; !- Field 4 + +Schedule:Compact, + LightingTarget, !- Name + Any Number, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 7:00, !- Field 3 + 0, !- Field 4 + Until: 19:00, !- Field 5 + 32.5, !- Field 6 + Until: 24:00, !- Field 7 + 0; !- Field 8 + +Schedule:Compact, + HVACTemplate-Always 24, !- Name + HVACTemplate Any Number, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00, !- Field 3 + 24; !- Field 4 + +Schedule:Compact, + HVACTemplate-Always 4, !- Name + HVACTemplate Any Number, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00, !- Field 3 + 4; !- Field 4 + +Schedule:Compact, + HVACTemplate-Always 1, !- Name + HVACTemplate Any Number, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00, !- Field 3 + 1; !- Field 4 + +Schedule:Compact, + HVACTemplate-Always 70, !- Name + HVACTemplate Any Number, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00, !- Field 3 + 70; !- Field 4 + + +!- =========== ALL OBJECTS IN CLASS: MATERIAL =========== + +! +! Site:GroundTemperature:BuildingSurface,20.03,20.03,20.13,20.30,20.43,20.52,20.62,20.77,20.78,20.55,20.44,20.20; +Material, + WD10, !- Name + MediumSmooth, !- Roughness + 0.667, !- Thickness {m} + 0.115, !- Conductivity {W/m-K} + 513, !- Density {kg/m3} + 1381, !- Specific Heat {J/kg-K} + 0.9, !- Thermal Absorptance + 0.78, !- Solar Absorptance + 0.78; !- Visible Absorptance + +Material, + RG01, !- Name + Rough, !- Roughness + 1.2700000E-02, !- Thickness {m} + 1.442000, !- Conductivity {W/m-K} + 881.0000, !- Density {kg/m3} + 1674.000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.6500000, !- Solar Absorptance + 0.6500000; !- Visible Absorptance + +Material, + BR01, !- Name + VeryRough, !- Roughness + 9.4999997E-03, !- Thickness {m} + 0.1620000, !- Conductivity {W/m-K} + 1121.000, !- Density {kg/m3} + 1464.000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.7000000, !- Solar Absorptance + 0.7000000; !- Visible Absorptance + +Material, + IN46, !- Name + VeryRough, !- Roughness + 7.6200001E-02, !- Thickness {m} + 2.3000000E-02, !- Conductivity {W/m-K} + 24.00000, !- Density {kg/m3} + 1590.000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.5000000, !- Solar Absorptance + 0.5000000; !- Visible Absorptance + +Material, + WD01, !- Name + MediumSmooth, !- Roughness + 1.9099999E-02, !- Thickness {m} + 0.1150000, !- Conductivity {W/m-K} + 513.0000, !- Density {kg/m3} + 1381.000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.7800000, !- Solar Absorptance + 0.7800000; !- Visible Absorptance + +Material, + PW03, !- Name + MediumSmooth, !- Roughness + 1.2700000E-02, !- Thickness {m} + 0.1150000, !- Conductivity {W/m-K} + 545.0000, !- Density {kg/m3} + 1213.000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.7800000, !- Solar Absorptance + 0.7800000; !- Visible Absorptance + +Material, + IN02, !- Name + Rough, !- Roughness + 9.0099998E-02, !- Thickness {m} + 4.3000001E-02, !- Conductivity {W/m-K} + 10.00000, !- Density {kg/m3} + 837.0000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.7500000, !- Solar Absorptance + 0.7500000; !- Visible Absorptance + +Material, + GP01, !- Name + MediumSmooth, !- Roughness + 1.2700000E-02, !- Thickness {m} + 0.1600000, !- Conductivity {W/m-K} + 801.0000, !- Density {kg/m3} + 837.0000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.7500000, !- Solar Absorptance + 0.7500000; !- Visible Absorptance + +Material, + GP02, !- Name + MediumSmooth, !- Roughness + 1.5900001E-02, !- Thickness {m} + 0.1600000, !- Conductivity {W/m-K} + 801.0000, !- Density {kg/m3} + 837.0000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.7500000, !- Solar Absorptance + 0.7500000; !- Visible Absorptance + +Material, + CC03, !- Name + MediumRough, !- Roughness + 0.1016000, !- Thickness {m} + 1.310000, !- Conductivity {W/m-K} + 2243.000, !- Density {kg/m3} + 837.0000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.6500000, !- Solar Absorptance + 0.6500000; !- Visible Absorptance + + +!- =========== ALL OBJECTS IN CLASS: MATERIAL:NOMASS =========== + +Material:NoMass, + CP01, !- Name + Rough, !- Roughness + 0.3670000, !- Thermal Resistance {m2-K/W} + 0.9000000, !- Thermal Absorptance + 0.7500000, !- Solar Absorptance + 0.7500000; !- Visible Absorptance + +Material:NoMass, + MAT-CLNG-1, !- Name + Rough, !- Roughness + 0.652259290, !- Thermal Resistance {m2-K/W} + 0.65, !- Thermal Absorptance + 0.65, !- Solar Absorptance + 0.65; !- Visible Absorptance + + +!- =========== ALL OBJECTS IN CLASS: MATERIAL:AIRGAP =========== + +Material:AirGap, + AL21, !- Name + 0.1570000; !- Thermal Resistance {m2-K/W} + +Material:AirGap, + AL23, !- Name + 0.1530000; !- Thermal Resistance {m2-K/W} + + +!- =========== ALL OBJECTS IN CLASS: WINDOWMATERIAL:GLAZING =========== + +WindowMaterial:Glazing, + CLEAR 3MM, !- Name + SpectralAverage, !- Optical Data Type + , !- Window Glass Spectral Data Set Name + 0.003, !- Thickness {m} + 0.837, !- Solar Transmittance at Normal Incidence + 0.075, !- Front Side Solar Reflectance at Normal Incidence + 0.075, !- Back Side Solar Reflectance at Normal Incidence + 0.898, !- Visible Transmittance at Normal Incidence + 0.081, !- Front Side Visible Reflectance at Normal Incidence + 0.081, !- Back Side Visible Reflectance at Normal Incidence + 0.0, !- Infrared Transmittance at Normal Incidence + 0.84, !- Front Side Infrared Hemispherical Emissivity + 0.84, !- Back Side Infrared Hemispherical Emissivity + 0.9; !- Conductivity {W/m-K} + +WindowMaterial:Glazing, + GREY 3MM, !- Name + SpectralAverage, !- Optical Data Type + , !- Window Glass Spectral Data Set Name + 0.003, !- Thickness {m} + 0.626, !- Solar Transmittance at Normal Incidence + 0.061, !- Front Side Solar Reflectance at Normal Incidence + 0.061, !- Back Side Solar Reflectance at Normal Incidence + 0.611, !- Visible Transmittance at Normal Incidence + 0.061, !- Front Side Visible Reflectance at Normal Incidence + 0.061, !- Back Side Visible Reflectance at Normal Incidence + 0.0, !- Infrared Transmittance at Normal Incidence + 0.84, !- Front Side Infrared Hemispherical Emissivity + 0.84, !- Back Side Infrared Hemispherical Emissivity + 0.9; !- Conductivity {W/m-K} + + +!- =========== ALL OBJECTS IN CLASS: WINDOWMATERIAL:GAS =========== + +WindowMaterial:Gas, + AIR 13MM, !- Name + Air, !- Gas Type + 0.0127; !- Thickness {m} + + +!- =========== ALL OBJECTS IN CLASS: CONSTRUCTION =========== + +Construction, + ROOF-1, !- Name + RG01, !- Outside Layer + BR01, !- Layer 2 + IN46, !- Layer 3 + WD01; !- Layer 4 + +Construction, + WALL-1, !- Name + WD01, !- Outside Layer + PW03, !- Layer 2 + IN02, !- Layer 3 + GP01; !- Layer 4 + +Construction, + CLNG-1, !- Name + MAT-CLNG-1; !- Outside Layer + +Construction, + FLOOR-SLAB-1, !- Name + CC03; !- Outside Layer + +Construction, + INT-WALL-1, !- Name + GP02, !- Outside Layer + AL21, !- Layer 2 + GP02; !- Layer 3 + +Construction, + Dbl Clr 3mm/13mm Air, !- Name + CLEAR 3MM, !- Outside Layer + AIR 13MM, !- Layer 2 + CLEAR 3MM; !- Layer 3 + +Construction, + Sgl Grey 3mm, !- Name + GREY 3MM; !- Outside Layer + + +!- =========== ALL OBJECTS IN CLASS: GLOBALGEOMETRYRULES =========== + +GlobalGeometryRules, + UpperLeftCorner, !- Starting Vertex Position + CounterClockWise, !- Vertex Entry Direction + Relative; !- Coordinate System + + +!- =========== ALL OBJECTS IN CLASS: ZONE =========== + +Zone, + PLENUM-1, !- Name + 0, !- Direction of Relative North {deg} + 0, !- X Origin {m} + 0, !- Y Origin {m} + 0, !- Z Origin {m} + 1, !- Type + 1, !- Multiplier + 0.609600067, !- Ceiling Height {m} + 283.2; !- Volume {m3} + +Zone, + SPACE1-1, !- Name + 0, !- Direction of Relative North {deg} + 0, !- X Origin {m} + 0, !- Y Origin {m} + 0, !- Z Origin {m} + 1, !- Type + 1, !- Multiplier + 2.438400269, !- Ceiling Height {m} + 239.247360229; !- Volume {m3} + +Zone, + SPACE2-1, !- Name + 0, !- Direction of Relative North {deg} + 0, !- X Origin {m} + 0, !- Y Origin {m} + 0, !- Z Origin {m} + 1, !- Type + 1, !- Multiplier + 2.438400269, !- Ceiling Height {m} + 103.311355591; !- Volume {m3} + +Zone, + SPACE3-1, !- Name + 0, !- Direction of Relative North {deg} + 0, !- X Origin {m} + 0, !- Y Origin {m} + 0, !- Z Origin {m} + 1, !- Type + 1, !- Multiplier + 2.438400269, !- Ceiling Height {m} + 239.247360229; !- Volume {m3} + +Zone, + SPACE4-1, !- Name + 0, !- Direction of Relative North {deg} + 0, !- X Origin {m} + 0, !- Y Origin {m} + 0, !- Z Origin {m} + 1, !- Type + 1, !- Multiplier + 2.438400269, !- Ceiling Height {m} + 103.311355591; !- Volume {m3} + +Zone, + SPACE5-1, !- Name + 0, !- Direction of Relative North {deg} + 0, !- X Origin {m} + 0, !- Y Origin {m} + 0, !- Z Origin {m} + 1, !- Type + 1, !- Multiplier + 2.438400269, !- Ceiling Height {m} + 447.682556152; !- Volume {m3} + + +!- =========== ALL OBJECTS IN CLASS: BUILDINGSURFACE:DETAILED =========== + +BuildingSurface:Detailed, + WALL-1PF, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + PLENUM-1, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 0.0, !- Vertex 1 X-coordinate {m} + 0.0, !- Vertex 1 Y-coordinate {m} + 3.0, !- Vertex 1 Z-coordinate {m} + 0.0, !- Vertex 2 X-coordinate {m} + 0.0, !- Vertex 2 Y-coordinate {m} + 2.4, !- Vertex 2 Z-coordinate {m} + 30.5, !- Vertex 3 X-coordinate {m} + 0.0, !- Vertex 3 Y-coordinate {m} + 2.4, !- Vertex 3 Z-coordinate {m} + 30.5, !- Vertex 4 X-coordinate {m} + 0.0, !- Vertex 4 Y-coordinate {m} + 3.0; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + WALL-1PR, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + PLENUM-1, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 30.5, !- Vertex 1 X-coordinate {m} + 0.0, !- Vertex 1 Y-coordinate {m} + 3.0, !- Vertex 1 Z-coordinate {m} + 30.5, !- Vertex 2 X-coordinate {m} + 0.0, !- Vertex 2 Y-coordinate {m} + 2.4, !- Vertex 2 Z-coordinate {m} + 30.5, !- Vertex 3 X-coordinate {m} + 15.2, !- Vertex 3 Y-coordinate {m} + 2.4, !- Vertex 3 Z-coordinate {m} + 30.5, !- Vertex 4 X-coordinate {m} + 15.2, !- Vertex 4 Y-coordinate {m} + 3.0; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + WALL-1PB, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + PLENUM-1, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 30.5, !- Vertex 1 X-coordinate {m} + 15.2, !- Vertex 1 Y-coordinate {m} + 3.0, !- Vertex 1 Z-coordinate {m} + 30.5, !- Vertex 2 X-coordinate {m} + 15.2, !- Vertex 2 Y-coordinate {m} + 2.4, !- Vertex 2 Z-coordinate {m} + 0.0, !- Vertex 3 X-coordinate {m} + 15.2, !- Vertex 3 Y-coordinate {m} + 2.4, !- Vertex 3 Z-coordinate {m} + 0.0, !- Vertex 4 X-coordinate {m} + 15.2, !- Vertex 4 Y-coordinate {m} + 3.0; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + WALL-1PL, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + PLENUM-1, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 0.0, !- Vertex 1 X-coordinate {m} + 15.2, !- Vertex 1 Y-coordinate {m} + 3.0, !- Vertex 1 Z-coordinate {m} + 0.0, !- Vertex 2 X-coordinate {m} + 15.2, !- Vertex 2 Y-coordinate {m} + 2.4, !- Vertex 2 Z-coordinate {m} + 0.0, !- Vertex 3 X-coordinate {m} + 0.0, !- Vertex 3 Y-coordinate {m} + 2.4, !- Vertex 3 Z-coordinate {m} + 0.0, !- Vertex 4 X-coordinate {m} + 0.0, !- Vertex 4 Y-coordinate {m} + 3.0; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + TOP-1, !- Name + ROOF, !- Surface Type + ROOF-1, !- Construction Name + PLENUM-1, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.00000, !- View Factor to Ground + 4, !- Number of Vertices + 0.0, !- Vertex 1 X-coordinate {m} + 15.2, !- Vertex 1 Y-coordinate {m} + 3.0, !- Vertex 1 Z-coordinate {m} + 0.0, !- Vertex 2 X-coordinate {m} + 0.0, !- Vertex 2 Y-coordinate {m} + 3.0, !- Vertex 2 Z-coordinate {m} + 30.5, !- Vertex 3 X-coordinate {m} + 0.0, !- Vertex 3 Y-coordinate {m} + 3.0, !- Vertex 3 Z-coordinate {m} + 30.5, !- Vertex 4 X-coordinate {m} + 15.2, !- Vertex 4 Y-coordinate {m} + 3.0; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + C1-1P, !- Name + FLOOR, !- Surface Type + CLNG-1, !- Construction Name + PLENUM-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + C1-1, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8, !- Vertex 1 X-coordinate {m} + 3.7, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 30.5, !- Vertex 2 X-coordinate {m} + 0.0, !- Vertex 2 Y-coordinate {m} + 2.4, !- Vertex 2 Z-coordinate {m} + 0.0, !- Vertex 3 X-coordinate {m} + 0.0, !- Vertex 3 Y-coordinate {m} + 2.4, !- Vertex 3 Z-coordinate {m} + 3.7, !- Vertex 4 X-coordinate {m} + 3.7, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + C2-1P, !- Name + FLOOR, !- Surface Type + CLNG-1, !- Construction Name + PLENUM-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + C2-1, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8, !- Vertex 1 X-coordinate {m} + 11.6, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 30.5, !- Vertex 2 X-coordinate {m} + 15.2, !- Vertex 2 Y-coordinate {m} + 2.4, !- Vertex 2 Z-coordinate {m} + 30.5, !- Vertex 3 X-coordinate {m} + 0.0, !- Vertex 3 Y-coordinate {m} + 2.4, !- Vertex 3 Z-coordinate {m} + 26.8, !- Vertex 4 X-coordinate {m} + 3.7, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + C3-1P, !- Name + FLOOR, !- Surface Type + CLNG-1, !- Construction Name + PLENUM-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + C3-1, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8, !- Vertex 1 X-coordinate {m} + 11.6, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 3.7, !- Vertex 2 X-coordinate {m} + 11.6, !- Vertex 2 Y-coordinate {m} + 2.4, !- Vertex 2 Z-coordinate {m} + 0.0, !- Vertex 3 X-coordinate {m} + 15.2, !- Vertex 3 Y-coordinate {m} + 2.4, !- Vertex 3 Z-coordinate {m} + 30.5, !- Vertex 4 X-coordinate {m} + 15.2, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + C4-1P, !- Name + FLOOR, !- Surface Type + CLNG-1, !- Construction Name + PLENUM-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + C4-1, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7, !- Vertex 1 X-coordinate {m} + 3.7, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 0.0, !- Vertex 2 X-coordinate {m} + 0.0, !- Vertex 2 Y-coordinate {m} + 2.4, !- Vertex 2 Z-coordinate {m} + 0.0, !- Vertex 3 X-coordinate {m} + 15.2, !- Vertex 3 Y-coordinate {m} + 2.4, !- Vertex 3 Z-coordinate {m} + 3.7, !- Vertex 4 X-coordinate {m} + 11.6, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + C5-1P, !- Name + FLOOR, !- Surface Type + CLNG-1, !- Construction Name + PLENUM-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + C5-1, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8, !- Vertex 1 X-coordinate {m} + 11.6, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 26.8, !- Vertex 2 X-coordinate {m} + 3.7, !- Vertex 2 Y-coordinate {m} + 2.4, !- Vertex 2 Z-coordinate {m} + 3.7, !- Vertex 3 X-coordinate {m} + 3.7, !- Vertex 3 Y-coordinate {m} + 2.4, !- Vertex 3 Z-coordinate {m} + 3.7, !- Vertex 4 X-coordinate {m} + 11.6, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + FRONT-1, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + SPACE1-1, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 0.0, !- Vertex 1 X-coordinate {m} + 0.0, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 0.0, !- Vertex 2 X-coordinate {m} + 0.0, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 30.5, !- Vertex 3 X-coordinate {m} + 0.0, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 30.5, !- Vertex 4 X-coordinate {m} + 0.0, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + C1-1, !- Name + CEILING, !- Surface Type + CLNG-1, !- Construction Name + SPACE1-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + C1-1P, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7, !- Vertex 1 X-coordinate {m} + 3.7, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 0.0, !- Vertex 2 X-coordinate {m} + 0.0, !- Vertex 2 Y-coordinate {m} + 2.4, !- Vertex 2 Z-coordinate {m} + 30.5, !- Vertex 3 X-coordinate {m} + 0.0, !- Vertex 3 Y-coordinate {m} + 2.4, !- Vertex 3 Z-coordinate {m} + 26.8, !- Vertex 4 X-coordinate {m} + 3.7, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + F1-1, !- Name + FLOOR, !- Surface Type + FLOOR-SLAB-1, !- Construction Name + SPACE1-1, !- Zone Name + , !- Space Name + Adiabatic, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8, !- Vertex 1 X-coordinate {m} + 3.7, !- Vertex 1 Y-coordinate {m} + 0.0, !- Vertex 1 Z-coordinate {m} + 30.5, !- Vertex 2 X-coordinate {m} + 0.0, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 0.0, !- Vertex 3 X-coordinate {m} + 0.0, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 3.7, !- Vertex 4 X-coordinate {m} + 3.7, !- Vertex 4 Y-coordinate {m} + 0.0; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + SB12, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE1-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB21, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 30.5, !- Vertex 1 X-coordinate {m} + 0.0, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 30.5, !- Vertex 2 X-coordinate {m} + 0.0, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 26.8, !- Vertex 3 X-coordinate {m} + 3.7, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 26.8, !- Vertex 4 X-coordinate {m} + 3.7, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + SB14, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE1-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB41, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7, !- Vertex 1 X-coordinate {m} + 3.7, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 3.7, !- Vertex 2 X-coordinate {m} + 3.7, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 0.0, !- Vertex 3 X-coordinate {m} + 0.0, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 0.0, !- Vertex 4 X-coordinate {m} + 0.0, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + SB15, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE1-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB51, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8, !- Vertex 1 X-coordinate {m} + 3.7, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 26.8, !- Vertex 2 X-coordinate {m} + 3.7, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 3.7, !- Vertex 3 X-coordinate {m} + 3.7, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 3.7, !- Vertex 4 X-coordinate {m} + 3.7, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + RIGHT-1, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + SPACE2-1, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 30.5, !- Vertex 1 X-coordinate {m} + 0.0, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 30.5, !- Vertex 2 X-coordinate {m} + 0.0, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 30.5, !- Vertex 3 X-coordinate {m} + 15.2, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 30.5, !- Vertex 4 X-coordinate {m} + 15.2, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + C2-1, !- Name + CEILING, !- Surface Type + CLNG-1, !- Construction Name + SPACE2-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + C2-1P, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8, !- Vertex 1 X-coordinate {m} + 3.7, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 30.5, !- Vertex 2 X-coordinate {m} + 0.0, !- Vertex 2 Y-coordinate {m} + 2.4, !- Vertex 2 Z-coordinate {m} + 30.5, !- Vertex 3 X-coordinate {m} + 15.2, !- Vertex 3 Y-coordinate {m} + 2.4, !- Vertex 3 Z-coordinate {m} + 26.8, !- Vertex 4 X-coordinate {m} + 11.6, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + F2-1, !- Name + FLOOR, !- Surface Type + FLOOR-SLAB-1, !- Construction Name + SPACE2-1, !- Zone Name + , !- Space Name + Adiabatic, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8, !- Vertex 1 X-coordinate {m} + 11.6, !- Vertex 1 Y-coordinate {m} + 0.0, !- Vertex 1 Z-coordinate {m} + 30.5, !- Vertex 2 X-coordinate {m} + 15.2, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 30.5, !- Vertex 3 X-coordinate {m} + 0.0, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 26.8, !- Vertex 4 X-coordinate {m} + 3.7, !- Vertex 4 Y-coordinate {m} + 0.0; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + SB21, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE2-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB12, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8, !- Vertex 1 X-coordinate {m} + 3.7, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 26.8, !- Vertex 2 X-coordinate {m} + 3.7, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 30.5, !- Vertex 3 X-coordinate {m} + 0.0, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 30.5, !- Vertex 4 X-coordinate {m} + 0.0, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + SB23, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE2-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB32, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 30.5, !- Vertex 1 X-coordinate {m} + 15.2, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 30.5, !- Vertex 2 X-coordinate {m} + 15.2, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 26.8, !- Vertex 3 X-coordinate {m} + 11.6, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 26.8, !- Vertex 4 X-coordinate {m} + 11.6, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + SB25, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE2-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB52, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8, !- Vertex 1 X-coordinate {m} + 11.6, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 26.8, !- Vertex 2 X-coordinate {m} + 11.6, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 26.8, !- Vertex 3 X-coordinate {m} + 3.7, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 26.8, !- Vertex 4 X-coordinate {m} + 3.7, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + BACK-1, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + SPACE3-1, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 30.5, !- Vertex 1 X-coordinate {m} + 15.2, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 30.5, !- Vertex 2 X-coordinate {m} + 15.2, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 0.0, !- Vertex 3 X-coordinate {m} + 15.2, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 0.0, !- Vertex 4 X-coordinate {m} + 15.2, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + C3-1, !- Name + CEILING, !- Surface Type + CLNG-1, !- Construction Name + SPACE3-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + C3-1P, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 30.5, !- Vertex 1 X-coordinate {m} + 15.2, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 0.0, !- Vertex 2 X-coordinate {m} + 15.2, !- Vertex 2 Y-coordinate {m} + 2.4, !- Vertex 2 Z-coordinate {m} + 3.7, !- Vertex 3 X-coordinate {m} + 11.6, !- Vertex 3 Y-coordinate {m} + 2.4, !- Vertex 3 Z-coordinate {m} + 26.8, !- Vertex 4 X-coordinate {m} + 11.6, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + F3-1, !- Name + FLOOR, !- Surface Type + FLOOR-SLAB-1, !- Construction Name + SPACE3-1, !- Zone Name + , !- Space Name + Adiabatic, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8, !- Vertex 1 X-coordinate {m} + 11.6, !- Vertex 1 Y-coordinate {m} + 0.0, !- Vertex 1 Z-coordinate {m} + 3.7, !- Vertex 2 X-coordinate {m} + 11.6, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 0.0, !- Vertex 3 X-coordinate {m} + 15.2, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 30.5, !- Vertex 4 X-coordinate {m} + 15.2, !- Vertex 4 Y-coordinate {m} + 0.0; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + SB32, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE3-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB23, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8, !- Vertex 1 X-coordinate {m} + 11.6, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 26.8, !- Vertex 2 X-coordinate {m} + 11.6, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 30.5, !- Vertex 3 X-coordinate {m} + 15.2, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 30.5, !- Vertex 4 X-coordinate {m} + 15.2, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + SB34, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE3-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB43, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 0.0, !- Vertex 1 X-coordinate {m} + 15.2, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 0.0, !- Vertex 2 X-coordinate {m} + 15.2, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 3.7, !- Vertex 3 X-coordinate {m} + 11.6, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 3.7, !- Vertex 4 X-coordinate {m} + 11.6, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + SB35, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE3-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB53, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7, !- Vertex 1 X-coordinate {m} + 11.6, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 3.7, !- Vertex 2 X-coordinate {m} + 11.6, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 26.8, !- Vertex 3 X-coordinate {m} + 11.6, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 26.8, !- Vertex 4 X-coordinate {m} + 11.6, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + LEFT-1, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + SPACE4-1, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 0.0, !- Vertex 1 X-coordinate {m} + 15.2, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 0.0, !- Vertex 2 X-coordinate {m} + 15.2, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 0.0, !- Vertex 3 X-coordinate {m} + 0.0, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 0.0, !- Vertex 4 X-coordinate {m} + 0.0, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + C4-1, !- Name + CEILING, !- Surface Type + CLNG-1, !- Construction Name + SPACE4-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + C4-1P, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7, !- Vertex 1 X-coordinate {m} + 11.6, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 0.0, !- Vertex 2 X-coordinate {m} + 15.2, !- Vertex 2 Y-coordinate {m} + 2.4, !- Vertex 2 Z-coordinate {m} + 0.0, !- Vertex 3 X-coordinate {m} + 0.0, !- Vertex 3 Y-coordinate {m} + 2.4, !- Vertex 3 Z-coordinate {m} + 3.7, !- Vertex 4 X-coordinate {m} + 3.7, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + F4-1, !- Name + FLOOR, !- Surface Type + FLOOR-SLAB-1, !- Construction Name + SPACE4-1, !- Zone Name + , !- Space Name + Adiabatic, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7, !- Vertex 1 X-coordinate {m} + 3.7, !- Vertex 1 Y-coordinate {m} + 0.0, !- Vertex 1 Z-coordinate {m} + 0.0, !- Vertex 2 X-coordinate {m} + 0.0, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 0.0, !- Vertex 3 X-coordinate {m} + 15.2, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 3.7, !- Vertex 4 X-coordinate {m} + 11.6, !- Vertex 4 Y-coordinate {m} + 0.0; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + SB41, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE4-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB14, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 0.0, !- Vertex 1 X-coordinate {m} + 0.0, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 0.0, !- Vertex 2 X-coordinate {m} + 0.0, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 3.7, !- Vertex 3 X-coordinate {m} + 3.7, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 3.7, !- Vertex 4 X-coordinate {m} + 3.7, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + SB43, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE4-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB34, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7, !- Vertex 1 X-coordinate {m} + 11.6, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 3.7, !- Vertex 2 X-coordinate {m} + 11.6, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 0.0, !- Vertex 3 X-coordinate {m} + 15.2, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 0.0, !- Vertex 4 X-coordinate {m} + 15.2, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + SB45, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE4-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB54, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7, !- Vertex 1 X-coordinate {m} + 3.7, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 3.7, !- Vertex 2 X-coordinate {m} + 3.7, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 3.7, !- Vertex 3 X-coordinate {m} + 11.6, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 3.7, !- Vertex 4 X-coordinate {m} + 11.6, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + C5-1, !- Name + CEILING, !- Surface Type + CLNG-1, !- Construction Name + SPACE5-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + C5-1P, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7, !- Vertex 1 X-coordinate {m} + 11.6, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 3.7, !- Vertex 2 X-coordinate {m} + 3.7, !- Vertex 2 Y-coordinate {m} + 2.4, !- Vertex 2 Z-coordinate {m} + 26.8, !- Vertex 3 X-coordinate {m} + 3.7, !- Vertex 3 Y-coordinate {m} + 2.4, !- Vertex 3 Z-coordinate {m} + 26.8, !- Vertex 4 X-coordinate {m} + 11.6, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + F5-1, !- Name + FLOOR, !- Surface Type + FLOOR-SLAB-1, !- Construction Name + SPACE5-1, !- Zone Name + , !- Space Name + Adiabatic, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8, !- Vertex 1 X-coordinate {m} + 11.6, !- Vertex 1 Y-coordinate {m} + 0.0, !- Vertex 1 Z-coordinate {m} + 26.8, !- Vertex 2 X-coordinate {m} + 3.7, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 3.7, !- Vertex 3 X-coordinate {m} + 3.7, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 3.7, !- Vertex 4 X-coordinate {m} + 11.6, !- Vertex 4 Y-coordinate {m} + 0.0; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + SB51, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE5-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB15, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7, !- Vertex 1 X-coordinate {m} + 3.7, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 3.7, !- Vertex 2 X-coordinate {m} + 3.7, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 26.8, !- Vertex 3 X-coordinate {m} + 3.7, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 26.8, !- Vertex 4 X-coordinate {m} + 3.7, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + SB52, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE5-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB25, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8, !- Vertex 1 X-coordinate {m} + 3.7, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 26.8, !- Vertex 2 X-coordinate {m} + 3.7, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 26.8, !- Vertex 3 X-coordinate {m} + 11.6, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 26.8, !- Vertex 4 X-coordinate {m} + 11.6, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + SB53, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE5-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB35, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8, !- Vertex 1 X-coordinate {m} + 11.6, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 26.8, !- Vertex 2 X-coordinate {m} + 11.6, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 3.7, !- Vertex 3 X-coordinate {m} + 11.6, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 3.7, !- Vertex 4 X-coordinate {m} + 11.6, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + SB54, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE5-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB45, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7, !- Vertex 1 X-coordinate {m} + 11.6, !- Vertex 1 Y-coordinate {m} + 2.4, !- Vertex 1 Z-coordinate {m} + 3.7, !- Vertex 2 X-coordinate {m} + 11.6, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 3.7, !- Vertex 3 X-coordinate {m} + 3.7, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 3.7, !- Vertex 4 X-coordinate {m} + 3.7, !- Vertex 4 Y-coordinate {m} + 2.4; !- Vertex 4 Z-coordinate {m} + +BuildingSurface:Detailed, + SPACE1-1 South Partition,!- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE1-1, !- Zone Name + , !- Space Name + Adiabatic, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0, !- View Factor to Ground + 4, !- Number of Vertices + 5, !- Vertex 1 X-coordinate {m} + 1.5, !- Vertex 1 Y-coordinate {m} + 2, !- Vertex 1 Z-coordinate {m} + 5, !- Vertex 2 X-coordinate {m} + 1.5, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 20, !- Vertex 3 X-coordinate {m} + 1.5, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 20, !- Vertex 4 X-coordinate {m} + 1.5, !- Vertex 4 Y-coordinate {m} + 2; !- Vertex 4 Z-coordinate {m} + + +!- =========== ALL OBJECTS IN CLASS: FENESTRATIONSURFACE:DETAILED =========== + +FenestrationSurface:Detailed, + WF-1, !- Name + WINDOW, !- Surface Type + Dbl Clr 3mm/13mm Air, !- Construction Name + FRONT-1, !- Building Surface Name + , !- Outside Boundary Condition Object + 0.50000, !- View Factor to Ground + , !- Frame and Divider Name + 1, !- Multiplier + 4, !- Number of Vertices + 3.0, !- Vertex 1 X-coordinate {m} + 0.0, !- Vertex 1 Y-coordinate {m} + 2.1, !- Vertex 1 Z-coordinate {m} + 3.0, !- Vertex 2 X-coordinate {m} + 0.0, !- Vertex 2 Y-coordinate {m} + 0.9, !- Vertex 2 Z-coordinate {m} + 16.8, !- Vertex 3 X-coordinate {m} + 0.0, !- Vertex 3 Y-coordinate {m} + 0.9, !- Vertex 3 Z-coordinate {m} + 16.8, !- Vertex 4 X-coordinate {m} + 0.0, !- Vertex 4 Y-coordinate {m} + 2.1; !- Vertex 4 Z-coordinate {m} + +FenestrationSurface:Detailed, + DF-1, !- Name + GLASSDOOR, !- Surface Type + Sgl Grey 3mm, !- Construction Name + FRONT-1, !- Building Surface Name + , !- Outside Boundary Condition Object + 0.50000, !- View Factor to Ground + , !- Frame and Divider Name + 1, !- Multiplier + 4, !- Number of Vertices + 21.3, !- Vertex 1 X-coordinate {m} + 0.0, !- Vertex 1 Y-coordinate {m} + 2.1, !- Vertex 1 Z-coordinate {m} + 21.3, !- Vertex 2 X-coordinate {m} + 0.0, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 23.8, !- Vertex 3 X-coordinate {m} + 0.0, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 23.8, !- Vertex 4 X-coordinate {m} + 0.0, !- Vertex 4 Y-coordinate {m} + 2.1; !- Vertex 4 Z-coordinate {m} + +FenestrationSurface:Detailed, + WR-1, !- Name + WINDOW, !- Surface Type + Dbl Clr 3mm/13mm Air, !- Construction Name + RIGHT-1, !- Building Surface Name + , !- Outside Boundary Condition Object + 0.50000, !- View Factor to Ground + , !- Frame and Divider Name + 1, !- Multiplier + 4, !- Number of Vertices + 30.5, !- Vertex 1 X-coordinate {m} + 3.8, !- Vertex 1 Y-coordinate {m} + 2.1, !- Vertex 1 Z-coordinate {m} + 30.5, !- Vertex 2 X-coordinate {m} + 3.8, !- Vertex 2 Y-coordinate {m} + 0.9, !- Vertex 2 Z-coordinate {m} + 30.5, !- Vertex 3 X-coordinate {m} + 11.4, !- Vertex 3 Y-coordinate {m} + 0.9, !- Vertex 3 Z-coordinate {m} + 30.5, !- Vertex 4 X-coordinate {m} + 11.4, !- Vertex 4 Y-coordinate {m} + 2.1; !- Vertex 4 Z-coordinate {m} + +FenestrationSurface:Detailed, + WB-1, !- Name + WINDOW, !- Surface Type + Dbl Clr 3mm/13mm Air, !- Construction Name + BACK-1, !- Building Surface Name + , !- Outside Boundary Condition Object + 0.50000, !- View Factor to Ground + , !- Frame and Divider Name + 1, !- Multiplier + 4, !- Number of Vertices + 27.4, !- Vertex 1 X-coordinate {m} + 15.2, !- Vertex 1 Y-coordinate {m} + 2.1, !- Vertex 1 Z-coordinate {m} + 27.4, !- Vertex 2 X-coordinate {m} + 15.2, !- Vertex 2 Y-coordinate {m} + 0.9, !- Vertex 2 Z-coordinate {m} + 13.7, !- Vertex 3 X-coordinate {m} + 15.2, !- Vertex 3 Y-coordinate {m} + 0.9, !- Vertex 3 Z-coordinate {m} + 13.7, !- Vertex 4 X-coordinate {m} + 15.2, !- Vertex 4 Y-coordinate {m} + 2.1; !- Vertex 4 Z-coordinate {m} + +FenestrationSurface:Detailed, + DB-1, !- Name + GLASSDOOR, !- Surface Type + Sgl Grey 3mm, !- Construction Name + BACK-1, !- Building Surface Name + , !- Outside Boundary Condition Object + 0.50000, !- View Factor to Ground + , !- Frame and Divider Name + 1, !- Multiplier + 4, !- Number of Vertices + 9.1, !- Vertex 1 X-coordinate {m} + 15.2, !- Vertex 1 Y-coordinate {m} + 2.1, !- Vertex 1 Z-coordinate {m} + 9.1, !- Vertex 2 X-coordinate {m} + 15.2, !- Vertex 2 Y-coordinate {m} + 0.0, !- Vertex 2 Z-coordinate {m} + 7.0, !- Vertex 3 X-coordinate {m} + 15.2, !- Vertex 3 Y-coordinate {m} + 0.0, !- Vertex 3 Z-coordinate {m} + 7.0, !- Vertex 4 X-coordinate {m} + 15.2, !- Vertex 4 Y-coordinate {m} + 2.1; !- Vertex 4 Z-coordinate {m} + +FenestrationSurface:Detailed, + WL-1, !- Name + WINDOW, !- Surface Type + Dbl Clr 3mm/13mm Air, !- Construction Name + LEFT-1, !- Building Surface Name + , !- Outside Boundary Condition Object + 0.50000, !- View Factor to Ground + , !- Frame and Divider Name + 1, !- Multiplier + 4, !- Number of Vertices + 0.0, !- Vertex 1 X-coordinate {m} + 11.4, !- Vertex 1 Y-coordinate {m} + 2.1, !- Vertex 1 Z-coordinate {m} + 0.0, !- Vertex 2 X-coordinate {m} + 11.4, !- Vertex 2 Y-coordinate {m} + 0.9, !- Vertex 2 Z-coordinate {m} + 0.0, !- Vertex 3 X-coordinate {m} + 3.8, !- Vertex 3 Y-coordinate {m} + 0.9, !- Vertex 3 Z-coordinate {m} + 0.0, !- Vertex 4 X-coordinate {m} + 3.8, !- Vertex 4 Y-coordinate {m} + 2.1; !- Vertex 4 Z-coordinate {m} + + +!- =========== ALL OBJECTS IN CLASS: PEOPLE =========== + +People, + SPACE1-1 People 1, !- Name + SPACE1-1, !- Zone or ZoneList or Space or SpaceList Name + OCCUPY-1, !- Number of People Schedule Name + people, !- Number of People Calculation Method + 11, !- Number of People + , !- People per Floor Area {person/m2} + , !- Floor Area per Person {m2/person} + 0.3, !- Fraction Radiant + , !- Sensible Heat Fraction + ActSchd; !- Activity Level Schedule Name + +People, + SPACE2-1 People 1, !- Name + SPACE2-1, !- Zone or ZoneList or Space or SpaceList Name + OCCUPY-1, !- Number of People Schedule Name + people, !- Number of People Calculation Method + 5, !- Number of People + , !- People per Floor Area {person/m2} + , !- Floor Area per Person {m2/person} + 0.3, !- Fraction Radiant + , !- Sensible Heat Fraction + ActSchd; !- Activity Level Schedule Name + +People, + SPACE3-1 People 1, !- Name + SPACE3-1, !- Zone or ZoneList or Space or SpaceList Name + OCCUPY-1, !- Number of People Schedule Name + people, !- Number of People Calculation Method + 11, !- Number of People + , !- People per Floor Area {person/m2} + , !- Floor Area per Person {m2/person} + 0.3, !- Fraction Radiant + , !- Sensible Heat Fraction + ActSchd; !- Activity Level Schedule Name + +People, + SPACE4-1 People 1, !- Name + SPACE4-1, !- Zone or ZoneList or Space or SpaceList Name + OCCUPY-1, !- Number of People Schedule Name + people, !- Number of People Calculation Method + 5, !- Number of People + , !- People per Floor Area {person/m2} + , !- Floor Area per Person {m2/person} + 0.3, !- Fraction Radiant + , !- Sensible Heat Fraction + ActSchd; !- Activity Level Schedule Name + +People, + SPACE5-1 People 1, !- Name + SPACE5-1, !- Zone or ZoneList or Space or SpaceList Name + OCCUPY-1, !- Number of People Schedule Name + people, !- Number of People Calculation Method + 20, !- Number of People + , !- People per Floor Area {person/m2} + , !- Floor Area per Person {m2/person} + 0.3, !- Fraction Radiant + , !- Sensible Heat Fraction + ActSchd; !- Activity Level Schedule Name + + +!- =========== ALL OBJECTS IN CLASS: LIGHTS =========== + +Lights, + SPACE1-1 Lights 1, !- Name + SPACE1-1, !- Zone or ZoneList or Space or SpaceList Name + LIGHTS-1, !- Schedule Name + LightingLevel, !- Design Level Calculation Method + 1584, !- Lighting Level {W} + , !- Watts per Floor Area {W/m2} + , !- Watts per Person {W/person} + 0.2, !- Return Air Fraction + 0.59, !- Fraction Radiant + 0.2, !- Fraction Visible + 0, !- Fraction Replaceable + GeneralLights; !- End-Use Subcategory + +Lights, + SPACE2-1 Lights 1, !- Name + SPACE2-1, !- Zone or ZoneList or Space or SpaceList Name + LIGHTS-1, !- Schedule Name + LightingLevel, !- Design Level Calculation Method + 684, !- Lighting Level {W} + , !- Watts per Floor Area {W/m2} + , !- Watts per Person {W/person} + 0.2, !- Return Air Fraction + 0.59, !- Fraction Radiant + 0.2, !- Fraction Visible + 0, !- Fraction Replaceable + GeneralLights; !- End-Use Subcategory + +Lights, + SPACE3-1 Lights 1, !- Name + SPACE3-1, !- Zone or ZoneList or Space or SpaceList Name + LIGHTS-1, !- Schedule Name + LightingLevel, !- Design Level Calculation Method + 1584, !- Lighting Level {W} + , !- Watts per Floor Area {W/m2} + , !- Watts per Person {W/person} + 0.2, !- Return Air Fraction + 0.59, !- Fraction Radiant + 0.2, !- Fraction Visible + 0, !- Fraction Replaceable + GeneralLights; !- End-Use Subcategory + +Lights, + SPACE4-1 Lights 1, !- Name + SPACE4-1, !- Zone or ZoneList or Space or SpaceList Name + LIGHTS-1, !- Schedule Name + LightingLevel, !- Design Level Calculation Method + 684, !- Lighting Level {W} + , !- Watts per Floor Area {W/m2} + , !- Watts per Person {W/person} + 0.2, !- Return Air Fraction + 0.59, !- Fraction Radiant + 0.2, !- Fraction Visible + 0, !- Fraction Replaceable + GeneralLights; !- End-Use Subcategory + +Lights, + SPACE5-1 Lights 1, !- Name + SPACE5-1, !- Zone or ZoneList or Space or SpaceList Name + LIGHTS-1, !- Schedule Name + LightingLevel, !- Design Level Calculation Method + 2964, !- Lighting Level {W} + , !- Watts per Floor Area {W/m2} + , !- Watts per Person {W/person} + 0.2, !- Return Air Fraction + 0.59, !- Fraction Radiant + 0.2, !- Fraction Visible + 0, !- Fraction Replaceable + GeneralLights; !- End-Use Subcategory + + +!- =========== ALL OBJECTS IN CLASS: ELECTRICEQUIPMENT =========== + +ElectricEquipment, + SPACE1-1 ElecEq 1, !- Name + SPACE1-1, !- Zone or ZoneList or Space or SpaceList Name + EQUIP-1, !- Schedule Name + EquipmentLevel, !- Design Level Calculation Method + 1056, !- Design Level {W} + , !- Watts per Floor Area {W/m2} + , !- Watts per Person {W/person} + 0, !- Fraction Latent + 0.3, !- Fraction Radiant + 0; !- Fraction Lost + +ElectricEquipment, + SPACE2-1 ElecEq 1, !- Name + SPACE2-1, !- Zone or ZoneList or Space or SpaceList Name + EQUIP-1, !- Schedule Name + EquipmentLevel, !- Design Level Calculation Method + 456, !- Design Level {W} + , !- Watts per Floor Area {W/m2} + , !- Watts per Person {W/person} + 0, !- Fraction Latent + 0.3, !- Fraction Radiant + 0; !- Fraction Lost + +ElectricEquipment, + SPACE3-1 ElecEq 1, !- Name + SPACE3-1, !- Zone or ZoneList or Space or SpaceList Name + EQUIP-1, !- Schedule Name + EquipmentLevel, !- Design Level Calculation Method + 1056, !- Design Level {W} + , !- Watts per Floor Area {W/m2} + , !- Watts per Person {W/person} + 0, !- Fraction Latent + 0.3, !- Fraction Radiant + 0; !- Fraction Lost + +ElectricEquipment, + SPACE4-1 ElecEq 1, !- Name + SPACE4-1, !- Zone or ZoneList or Space or SpaceList Name + EQUIP-1, !- Schedule Name + EquipmentLevel, !- Design Level Calculation Method + 456, !- Design Level {W} + , !- Watts per Floor Area {W/m2} + , !- Watts per Person {W/person} + 0, !- Fraction Latent + 0.3, !- Fraction Radiant + 0; !- Fraction Lost + +ElectricEquipment, + SPACE5-1 ElecEq 1, !- Name + SPACE5-1, !- Zone or ZoneList or Space or SpaceList Name + EQUIP-1, !- Schedule Name + EquipmentLevel, !- Design Level Calculation Method + 1976, !- Design Level {W} + , !- Watts per Floor Area {W/m2} + , !- Watts per Person {W/person} + 0, !- Fraction Latent + 0.3, !- Fraction Radiant + 0; !- Fraction Lost + + +!- =========== ALL OBJECTS IN CLASS: INDOORGREEN =========== + +IndoorLivingWall, + Space1-1IndoorLivingWall,!- Name + SPACE1-1 South Partition,!- Surface Name + AlwaysOn, !- Schedule Name + Penman-Monteith, !- ET Calculation Method + LED-Daylight, !- Lighting Method + AlwaysOn, !- LED Intensity Schedule Name + DaylightControl1-1, !- Daylighting Control Name + LightingTarget, !- LED-Daylight Targeted Lighting Intensity Schedule Name + 30, !- Total Leaf Area {m2} + 32.5, !- LED Nominal Intensity {umol_m2s} + 640, !- LED Nominal Power {W} + 0.6; !- Radiant Fraction of LED Lights + + +!- =========== ALL OBJECTS IN CLASS: DAYLIGHTING:CONTROLS =========== + +Daylighting:Controls, + DaylightControl1-1, !- Name + SPACE1-1, !- Zone or Space Name + SplitFlux, !- Daylighting Method + AlwaysOn, !- Availability Schedule Name + Continuous, !- Lighting Control Type + 0, !- Minimum Input Power Fraction for Continuous or ContinuousOff Dimming Control + 0, !- Minimum Light Output Fraction for Continuous or ContinuousOff Dimming Control + 1, !- Number of Stepped Control Steps + 1, !- Probability Lighting will be Reset When Needed in Manual Stepped Control + , !- Glare Calculation Daylighting Reference Point Name + , !- Glare Calculation Azimuth Angle of View Direction Clockwise from Zone y-Axis {deg} + 22, !- Maximum Allowable Discomfort Glare Index + , !- DElight Gridding Resolution {m2} + ReferenceSouthPartition, !- Daylighting Reference Point 1 Name + 1, !- Fraction of Lights Controlled by Reference Point 1 + 0; !- Illuminance Setpoint at Reference Point 1 {lux} + + +!- =========== ALL OBJECTS IN CLASS: DAYLIGHTING:REFERENCEPOINT =========== + +Daylighting:ReferencePoint, + ReferenceSouthPartition, !- Name + SPACE1-1, !- Zone or Space Name + 12.5, !- X-Coordinate of Reference Point {m} + 1.5, !- Y-Coordinate of Reference Point {m} + 1.2; !- Z-Coordinate of Reference Point {m} + + +!- =========== ALL OBJECTS IN CLASS: ZONEINFILTRATION:DESIGNFLOWRATE =========== + +ZoneInfiltration:DesignFlowRate, + SPACE1-1 Infil 1, !- Name + SPACE1-1, !- Zone or ZoneList or Space or SpaceList Name + INFIL-SCH, !- Schedule Name + flow/zone, !- Design Flow Rate Calculation Method + 0.032, !- Design Flow Rate {m3/s} + , !- Flow Rate per Floor Area {m3/s-m2} + , !- Flow Rate per Exterior Surface Area {m3/s-m2} + , !- Air Changes per Hour {1/hr} + 0, !- Constant Term Coefficient + 0, !- Temperature Term Coefficient + 0.2237, !- Velocity Term Coefficient + 0; !- Velocity Squared Term Coefficient + +ZoneInfiltration:DesignFlowRate, + SPACE2-1 Infil 1, !- Name + SPACE2-1, !- Zone or ZoneList or Space or SpaceList Name + INFIL-SCH, !- Schedule Name + flow/zone, !- Design Flow Rate Calculation Method + 0.014, !- Design Flow Rate {m3/s} + , !- Flow Rate per Floor Area {m3/s-m2} + , !- Flow Rate per Exterior Surface Area {m3/s-m2} + , !- Air Changes per Hour {1/hr} + 0, !- Constant Term Coefficient + 0, !- Temperature Term Coefficient + 0.2237, !- Velocity Term Coefficient + 0; !- Velocity Squared Term Coefficient + +ZoneInfiltration:DesignFlowRate, + SPACE3-1 Infil 1, !- Name + SPACE3-1, !- Zone or ZoneList or Space or SpaceList Name + INFIL-SCH, !- Schedule Name + flow/zone, !- Design Flow Rate Calculation Method + 0.032, !- Design Flow Rate {m3/s} + , !- Flow Rate per Floor Area {m3/s-m2} + , !- Flow Rate per Exterior Surface Area {m3/s-m2} + , !- Air Changes per Hour {1/hr} + 0, !- Constant Term Coefficient + 0, !- Temperature Term Coefficient + 0.2237, !- Velocity Term Coefficient + 0; !- Velocity Squared Term Coefficient + +ZoneInfiltration:DesignFlowRate, + SPACE4-1 Infil 1, !- Name + SPACE4-1, !- Zone or ZoneList or Space or SpaceList Name + INFIL-SCH, !- Schedule Name + flow/zone, !- Design Flow Rate Calculation Method + 0.014, !- Design Flow Rate {m3/s} + , !- Flow Rate per Floor Area {m3/s-m2} + , !- Flow Rate per Exterior Surface Area {m3/s-m2} + , !- Air Changes per Hour {1/hr} + 0, !- Constant Term Coefficient + 0, !- Temperature Term Coefficient + 0.2237, !- Velocity Term Coefficient + 0; !- Velocity Squared Term Coefficient + +ZoneInfiltration:DesignFlowRate, + SPACE5-1 Infil 1, !- Name + SPACE5-1, !- Zone or ZoneList or Space or SpaceList Name + INFIL-SCH, !- Schedule Name + flow/zone, !- Design Flow Rate Calculation Method + 0.062, !- Design Flow Rate {m3/s} + , !- Flow Rate per Floor Area {m3/s-m2} + , !- Flow Rate per Exterior Surface Area {m3/s-m2} + , !- Air Changes per Hour {1/hr} + 0, !- Constant Term Coefficient + 0, !- Temperature Term Coefficient + 0.2237, !- Velocity Term Coefficient + 0; !- Velocity Squared Term Coefficient + + +!- =========== ALL OBJECTS IN CLASS: DESIGNSPECIFICATION:OUTDOORAIR =========== + +DesignSpecification:OutdoorAir, + SZ DSOA SPACE1-1, !- Name + sum, !- Outdoor Air Method + 0.00236, !- Outdoor Air Flow per Person {m3/s-person} + 0.000305, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2} + 0.0; !- Outdoor Air Flow per Zone {m3/s} + +DesignSpecification:OutdoorAir, + SZ DSOA SPACE2-1, !- Name + sum, !- Outdoor Air Method + 0.00236, !- Outdoor Air Flow per Person {m3/s-person} + 0.000305, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2} + 0.0; !- Outdoor Air Flow per Zone {m3/s} + +DesignSpecification:OutdoorAir, + SZ DSOA SPACE3-1, !- Name + sum, !- Outdoor Air Method + 0.00236, !- Outdoor Air Flow per Person {m3/s-person} + 0.000305, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2} + 0.0; !- Outdoor Air Flow per Zone {m3/s} + +DesignSpecification:OutdoorAir, + SZ DSOA SPACE4-1, !- Name + sum, !- Outdoor Air Method + 0.00236, !- Outdoor Air Flow per Person {m3/s-person} + 0.000305, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2} + 0.0; !- Outdoor Air Flow per Zone {m3/s} + +DesignSpecification:OutdoorAir, + SZ DSOA SPACE5-1, !- Name + sum, !- Outdoor Air Method + 0.00236, !- Outdoor Air Flow per Person {m3/s-person} + 0.000305, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2} + 0.0; !- Outdoor Air Flow per Zone {m3/s} + + +!- =========== ALL OBJECTS IN CLASS: ZONECONTROL:HUMIDISTAT =========== + +ZoneControl:Humidistat, + SPACE1-1 Humidistat, !- Name + SPACE1-1, !- Zone Name + HVACTemplate-Always 1, !- Humidifying Relative Humidity Setpoint Schedule Name + HVACTemplate-Always 70; !- Dehumidifying Relative Humidity Setpoint Schedule Name + +ZoneControl:Humidistat, + SPACE2-1 Humidistat, !- Name + SPACE2-1, !- Zone Name + HVACTemplate-Always 1, !- Humidifying Relative Humidity Setpoint Schedule Name + HVACTemplate-Always 70; !- Dehumidifying Relative Humidity Setpoint Schedule Name + +ZoneControl:Humidistat, + SPACE3-1 Humidistat, !- Name + SPACE3-1, !- Zone Name + HVACTemplate-Always 1, !- Humidifying Relative Humidity Setpoint Schedule Name + HVACTemplate-Always 70; !- Dehumidifying Relative Humidity Setpoint Schedule Name + +ZoneControl:Humidistat, + SPACE4-1 Humidistat, !- Name + SPACE4-1, !- Zone Name + HVACTemplate-Always 1, !- Humidifying Relative Humidity Setpoint Schedule Name + HVACTemplate-Always 70; !- Dehumidifying Relative Humidity Setpoint Schedule Name + +ZoneControl:Humidistat, + SPACE5-1 Humidistat, !- Name + SPACE5-1, !- Zone Name + HVACTemplate-Always 1, !- Humidifying Relative Humidity Setpoint Schedule Name + HVACTemplate-Always 70; !- Dehumidifying Relative Humidity Setpoint Schedule Name + + +!- =========== ALL OBJECTS IN CLASS: ZONECONTROL:THERMOSTAT =========== + +ZoneControl:Thermostat, + SPACE1-1 Thermostat, !- Name + SPACE1-1, !- Zone or ZoneList Name + HVACTemplate-Always 4, !- Control Type Schedule Name + ThermostatSetpoint:DualSetpoint, !- Control 1 Object Type + Constant 24 Dual SP Control; !- Control 1 Name + +ZoneControl:Thermostat, + SPACE2-1 Thermostat, !- Name + SPACE2-1, !- Zone or ZoneList Name + HVACTemplate-Always 4, !- Control Type Schedule Name + ThermostatSetpoint:DualSetpoint, !- Control 1 Object Type + Constant 24 Dual SP Control; !- Control 1 Name + +ZoneControl:Thermostat, + SPACE3-1 Thermostat, !- Name + SPACE3-1, !- Zone or ZoneList Name + HVACTemplate-Always 4, !- Control Type Schedule Name + ThermostatSetpoint:DualSetpoint, !- Control 1 Object Type + Constant 24 Dual SP Control; !- Control 1 Name + +ZoneControl:Thermostat, + SPACE4-1 Thermostat, !- Name + SPACE4-1, !- Zone or ZoneList Name + HVACTemplate-Always 4, !- Control Type Schedule Name + ThermostatSetpoint:DualSetpoint, !- Control 1 Object Type + Constant 24 Dual SP Control; !- Control 1 Name + +ZoneControl:Thermostat, + SPACE5-1 Thermostat, !- Name + SPACE5-1, !- Zone or ZoneList Name + HVACTemplate-Always 4, !- Control Type Schedule Name + ThermostatSetpoint:DualSetpoint, !- Control 1 Object Type + Constant 24 Dual SP Control; !- Control 1 Name + + +!- =========== ALL OBJECTS IN CLASS: THERMOSTATSETPOINT:DUALSETPOINT =========== + +ThermostatSetpoint:DualSetpoint, + Constant 24 Dual SP Control, !- Name + HVACTemplate-Always 24, !- Heating Setpoint Temperature Schedule Name + HVACTemplate-Always 24; !- Cooling Setpoint Temperature Schedule Name + + +!- =========== ALL OBJECTS IN CLASS: ZONEHVAC:IDEALLOADSAIRSYSTEM =========== + +ZoneHVAC:IdealLoadsAirSystem, + SPACE1-1 Ideal Loads Air System, !- Name + AlwaysOn, !- Availability Schedule Name + SPACE1-1 Ideal Loads Supply Inlet, !- Zone Supply Air Node Name + , !- Zone Exhaust Air Node Name + , !- System Inlet Air Node Name + 50, !- Maximum Heating Supply Air Temperature {C} + 13, !- Minimum Cooling Supply Air Temperature {C} + 0.0156, !- Maximum Heating Supply Air Humidity Ratio {kgWater/kgDryAir} + 0.0077, !- Minimum Cooling Supply Air Humidity Ratio {kgWater/kgDryAir} + NoLimit, !- Heating Limit + , !- Maximum Heating Air Flow Rate {m3/s} + , !- Maximum Sensible Heating Capacity {W} + NoLimit, !- Cooling Limit + , !- Maximum Cooling Air Flow Rate {m3/s} + , !- Maximum Total Cooling Capacity {W} + , !- Heating Availability Schedule Name + , !- Cooling Availability Schedule Name + Humidistat, !- Dehumidification Control Type + 0.7, !- Cooling Sensible Heat Ratio {dimensionless} + None, !- Humidification Control Type + , !- Design Specification Outdoor Air Object Name + , !- Outdoor Air Inlet Node Name + None, !- Demand Controlled Ventilation Type + NoEconomizer, !- Outdoor Air Economizer Type + None, !- Heat Recovery Type + 0.7, !- Sensible Heat Recovery Effectiveness {dimensionless} + 0.65; !- Latent Heat Recovery Effectiveness {dimensionless} + +ZoneHVAC:IdealLoadsAirSystem, + SPACE2-1 Ideal Loads Air System, !- Name + AlwaysOn, !- Availability Schedule Name + SPACE2-1 Ideal Loads Supply Inlet, !- Zone Supply Air Node Name + , !- Zone Exhaust Air Node Name + , !- System Inlet Air Node Name + 50, !- Maximum Heating Supply Air Temperature {C} + 13, !- Minimum Cooling Supply Air Temperature {C} + 0.0156, !- Maximum Heating Supply Air Humidity Ratio {kgWater/kgDryAir} + 0.0077, !- Minimum Cooling Supply Air Humidity Ratio {kgWater/kgDryAir} + NoLimit, !- Heating Limit + , !- Maximum Heating Air Flow Rate {m3/s} + , !- Maximum Sensible Heating Capacity {W} + NoLimit, !- Cooling Limit + , !- Maximum Cooling Air Flow Rate {m3/s} + , !- Maximum Total Cooling Capacity {W} + , !- Heating Availability Schedule Name + , !- Cooling Availability Schedule Name + Humidistat, !- Dehumidification Control Type + 0.7, !- Cooling Sensible Heat Ratio {dimensionless} + None, !- Humidification Control Type + , !- Design Specification Outdoor Air Object Name + , !- Outdoor Air Inlet Node Name + None, !- Demand Controlled Ventilation Type + NoEconomizer, !- Outdoor Air Economizer Type + None, !- Heat Recovery Type + 0.7, !- Sensible Heat Recovery Effectiveness {dimensionless} + 0.65; !- Latent Heat Recovery Effectiveness {dimensionless} + +ZoneHVAC:IdealLoadsAirSystem, + SPACE3-1 Ideal Loads Air System, !- Name + AlwaysOn, !- Availability Schedule Name + SPACE3-1 Ideal Loads Supply Inlet, !- Zone Supply Air Node Name + , !- Zone Exhaust Air Node Name + , !- System Inlet Air Node Name + 50, !- Maximum Heating Supply Air Temperature {C} + 13, !- Minimum Cooling Supply Air Temperature {C} + 0.0156, !- Maximum Heating Supply Air Humidity Ratio {kgWater/kgDryAir} + 0.0077, !- Minimum Cooling Supply Air Humidity Ratio {kgWater/kgDryAir} + NoLimit, !- Heating Limit + , !- Maximum Heating Air Flow Rate {m3/s} + , !- Maximum Sensible Heating Capacity {W} + NoLimit, !- Cooling Limit + , !- Maximum Cooling Air Flow Rate {m3/s} + , !- Maximum Total Cooling Capacity {W} + , !- Heating Availability Schedule Name + , !- Cooling Availability Schedule Name + Humidistat, !- Dehumidification Control Type + 0.7, !- Cooling Sensible Heat Ratio {dimensionless} + None, !- Humidification Control Type + , !- Design Specification Outdoor Air Object Name + , !- Outdoor Air Inlet Node Name + None, !- Demand Controlled Ventilation Type + NoEconomizer, !- Outdoor Air Economizer Type + None, !- Heat Recovery Type + 0.7, !- Sensible Heat Recovery Effectiveness {dimensionless} + 0.65; !- Latent Heat Recovery Effectiveness {dimensionless} + +ZoneHVAC:IdealLoadsAirSystem, + SPACE4-1 Ideal Loads Air System, !- Name + AlwaysOn, !- Availability Schedule Name + SPACE4-1 Ideal Loads Supply Inlet, !- Zone Supply Air Node Name + , !- Zone Exhaust Air Node Name + , !- System Inlet Air Node Name + 50, !- Maximum Heating Supply Air Temperature {C} + 13, !- Minimum Cooling Supply Air Temperature {C} + 0.0156, !- Maximum Heating Supply Air Humidity Ratio {kgWater/kgDryAir} + 0.0077, !- Minimum Cooling Supply Air Humidity Ratio {kgWater/kgDryAir} + NoLimit, !- Heating Limit + , !- Maximum Heating Air Flow Rate {m3/s} + , !- Maximum Sensible Heating Capacity {W} + NoLimit, !- Cooling Limit + , !- Maximum Cooling Air Flow Rate {m3/s} + , !- Maximum Total Cooling Capacity {W} + , !- Heating Availability Schedule Name + , !- Cooling Availability Schedule Name + Humidistat, !- Dehumidification Control Type + 0.7, !- Cooling Sensible Heat Ratio {dimensionless} + None, !- Humidification Control Type + , !- Design Specification Outdoor Air Object Name + , !- Outdoor Air Inlet Node Name + None, !- Demand Controlled Ventilation Type + NoEconomizer, !- Outdoor Air Economizer Type + None, !- Heat Recovery Type + 0.7, !- Sensible Heat Recovery Effectiveness {dimensionless} + 0.65; !- Latent Heat Recovery Effectiveness {dimensionless} + +ZoneHVAC:IdealLoadsAirSystem, + SPACE5-1 Ideal Loads Air System, !- Name + AlwaysOn, !- Availability Schedule Name + SPACE5-1 Ideal Loads Supply Inlet, !- Zone Supply Air Node Name + , !- Zone Exhaust Air Node Name + , !- System Inlet Air Node Name + 50, !- Maximum Heating Supply Air Temperature {C} + 13, !- Minimum Cooling Supply Air Temperature {C} + 0.0156, !- Maximum Heating Supply Air Humidity Ratio {kgWater/kgDryAir} + 0.0077, !- Minimum Cooling Supply Air Humidity Ratio {kgWater/kgDryAir} + NoLimit, !- Heating Limit + , !- Maximum Heating Air Flow Rate {m3/s} + , !- Maximum Sensible Heating Capacity {W} + NoLimit, !- Cooling Limit + , !- Maximum Cooling Air Flow Rate {m3/s} + , !- Maximum Total Cooling Capacity {W} + , !- Heating Availability Schedule Name + , !- Cooling Availability Schedule Name + Humidistat, !- Dehumidification Control Type + 0.7, !- Cooling Sensible Heat Ratio {dimensionless} + None, !- Humidification Control Type + , !- Design Specification Outdoor Air Object Name + , !- Outdoor Air Inlet Node Name + None, !- Demand Controlled Ventilation Type + NoEconomizer, !- Outdoor Air Economizer Type + None, !- Heat Recovery Type + 0.7, !- Sensible Heat Recovery Effectiveness {dimensionless} + 0.65; !- Latent Heat Recovery Effectiveness {dimensionless} + + +!- =========== ALL OBJECTS IN CLASS: ZONEHVAC:EQUIPMENTLIST =========== + +ZoneHVAC:EquipmentList, + SPACE1-1 Equipment, !- Name + SequentialLoad, !- Load Distribution Scheme + ZoneHVAC:IdealLoadsAirSystem, !- Zone Equipment 1 Object Type + SPACE1-1 Ideal Loads Air System, !- Zone Equipment 1 Name + 1, !- Zone Equipment 1 Cooling Sequence + 1, !- Zone Equipment 1 Heating or No-Load Sequence + , !- Zone Equipment 1 Sequential Cooling Fraction Schedule Name + ; !- Zone Equipment 1 Sequential Heating Fraction Schedule Name + +ZoneHVAC:EquipmentList, + SPACE2-1 Equipment, !- Name + SequentialLoad, !- Load Distribution Scheme + ZoneHVAC:IdealLoadsAirSystem, !- Zone Equipment 1 Object Type + SPACE2-1 Ideal Loads Air System, !- Zone Equipment 1 Name + 1, !- Zone Equipment 1 Cooling Sequence + 1, !- Zone Equipment 1 Heating or No-Load Sequence + , !- Zone Equipment 1 Sequential Cooling Fraction Schedule Name + ; !- Zone Equipment 1 Sequential Heating Fraction Schedule Name + +ZoneHVAC:EquipmentList, + SPACE3-1 Equipment, !- Name + SequentialLoad, !- Load Distribution Scheme + ZoneHVAC:IdealLoadsAirSystem, !- Zone Equipment 1 Object Type + SPACE3-1 Ideal Loads Air System, !- Zone Equipment 1 Name + 1, !- Zone Equipment 1 Cooling Sequence + 1, !- Zone Equipment 1 Heating or No-Load Sequence + , !- Zone Equipment 1 Sequential Cooling Fraction Schedule Name + ; !- Zone Equipment 1 Sequential Heating Fraction Schedule Name + +ZoneHVAC:EquipmentList, + SPACE4-1 Equipment, !- Name + SequentialLoad, !- Load Distribution Scheme + ZoneHVAC:IdealLoadsAirSystem, !- Zone Equipment 1 Object Type + SPACE4-1 Ideal Loads Air System, !- Zone Equipment 1 Name + 1, !- Zone Equipment 1 Cooling Sequence + 1, !- Zone Equipment 1 Heating or No-Load Sequence + , !- Zone Equipment 1 Sequential Cooling Fraction Schedule Name + ; !- Zone Equipment 1 Sequential Heating Fraction Schedule Name + +ZoneHVAC:EquipmentList, + SPACE5-1 Equipment, !- Name + SequentialLoad, !- Load Distribution Scheme + ZoneHVAC:IdealLoadsAirSystem, !- Zone Equipment 1 Object Type + SPACE5-1 Ideal Loads Air System, !- Zone Equipment 1 Name + 1, !- Zone Equipment 1 Cooling Sequence + 1, !- Zone Equipment 1 Heating or No-Load Sequence + , !- Zone Equipment 1 Sequential Cooling Fraction Schedule Name + ; !- Zone Equipment 1 Sequential Heating Fraction Schedule Name + + +!- =========== ALL OBJECTS IN CLASS: ZONEHVAC:EQUIPMENTCONNECTIONS =========== + +ZoneHVAC:EquipmentConnections, + SPACE1-1, !- Zone Name + SPACE1-1 Equipment, !- Zone Conditioning Equipment List Name + SPACE1-1 Ideal Loads Supply Inlet, !- Zone Air Inlet Node or NodeList Name + , !- Zone Air Exhaust Node or NodeList Name + SPACE1-1 Zone Air Node, !- Zone Air Node Name + SPACE1-1 Return Outlet; !- Zone Return Air Node or NodeList Name + +ZoneHVAC:EquipmentConnections, + SPACE2-1, !- Zone Name + SPACE2-1 Equipment, !- Zone Conditioning Equipment List Name + SPACE2-1 Ideal Loads Supply Inlet, !- Zone Air Inlet Node or NodeList Name + , !- Zone Air Exhaust Node or NodeList Name + SPACE2-1 Zone Air Node, !- Zone Air Node Name + SPACE2-1 Return Outlet; !- Zone Return Air Node or NodeList Name + +ZoneHVAC:EquipmentConnections, + SPACE3-1, !- Zone Name + SPACE3-1 Equipment, !- Zone Conditioning Equipment List Name + SPACE3-1 Ideal Loads Supply Inlet, !- Zone Air Inlet Node or NodeList Name + , !- Zone Air Exhaust Node or NodeList Name + SPACE3-1 Zone Air Node, !- Zone Air Node Name + SPACE3-1 Return Outlet; !- Zone Return Air Node or NodeList Name + +ZoneHVAC:EquipmentConnections, + SPACE4-1, !- Zone Name + SPACE4-1 Equipment, !- Zone Conditioning Equipment List Name + SPACE4-1 Ideal Loads Supply Inlet, !- Zone Air Inlet Node or NodeList Name + , !- Zone Air Exhaust Node or NodeList Name + SPACE4-1 Zone Air Node, !- Zone Air Node Name + SPACE4-1 Return Outlet; !- Zone Return Air Node or NodeList Name + +ZoneHVAC:EquipmentConnections, + SPACE5-1, !- Zone Name + SPACE5-1 Equipment, !- Zone Conditioning Equipment List Name + SPACE5-1 Ideal Loads Supply Inlet, !- Zone Air Inlet Node or NodeList Name + , !- Zone Air Exhaust Node or NodeList Name + SPACE5-1 Zone Air Node, !- Zone Air Node Name + SPACE5-1 Return Outlet; !- Zone Return Air Node or NodeList Name + + +!- =========== ALL OBJECTS IN CLASS: CURVE:QUADRATIC =========== + +Curve:Quadratic, + BoilerEfficiency, !- Name + 1.0, !- Coefficient1 Constant + 0.0, !- Coefficient2 x + 0.0, !- Coefficient3 x**2 + 0, !- Minimum Value of x + 1; !- Maximum Value of x + + +!- =========== ALL OBJECTS IN CLASS: OUTPUT:VARIABLEDICTIONARY =========== + +Output:VariableDictionary, + Regular; !- Key Field + + +!- =========== ALL OBJECTS IN CLASS: OUTPUT:SURFACES:LIST =========== + +Output:Surfaces:List, + Details; !- Report Type + +Output:Surfaces:List, + DecayCurvesFromComponentLoadsSummary; !- Report Type + +Output:Surfaces:List, + ViewFactorInfo; !- Report Type + + +!- =========== ALL OBJECTS IN CLASS: OUTPUT:SURFACES:DRAWING =========== + +Output:Surfaces:Drawing, + VRML; !- Report Type + + +!- =========== ALL OBJECTS IN CLASS: OUTPUT:TABLE:SUMMARYREPORTS =========== + +Output:Table:SummaryReports, + AllSummaryAndSizingPeriod; !- Report 1 Name + + +!- =========== ALL OBJECTS IN CLASS: OUTPUTCONTROL:TABLE:STYLE =========== + +OutputControl:Table:Style, + HTML; !- Column Separator + + +!- =========== ALL OBJECTS IN CLASS: OUTPUT:VARIABLE =========== + +Output:Variable, + SPACE1-1, !- Key Value + Zone Air Relative Humidity , !- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + *, !- Key Value + Daylighting Reference Point 1 Illuminance , !- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + SPACE1-1, !- Key Value + Zone Air System Sensible Cooling Rate , !- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + SPACE1-1 Ideal Loads Air System, !- Key Value + Zone Ideal Loads Zone Sensible Cooling Rate, !- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + SPACE1-1 Ideal Loads Air System, !- Key Value + Zone Ideal Loads Zone Latent Cooling Rate, !- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + SPACE1-1 Ideal Loads Air System, !- Key Value + Zone Ideal Loads Zone Total Cooling Rate, !- Variable Name + Timestep; !- Reporting Frequency + +! +! HVACTemplate:Thermostat, +! Constant 24, !- Name +! , !- Heating Setpoint Schedule Name +! 24, !- Constant Heating Setpoint {C} +! , !- Cooling Setpoint Schedule Name +! 24; !- Constant Cooling Setpoint {C} +! +! HVACTemplate:Zone:IdealLoadsAirSystem, +! SPACE1-1, !- Zone Name +! Constant 24, !- Template Thermostat Name +! AlwaysOn, !- System Availability Schedule Name +! 50, !- Maximum Heating Supply Air Temperature {C} +! 13, !- Minimum Cooling Supply Air Temperature {C} +! 0.0156, !- Maximum Heating Supply Air Humidity Ratio {kgWater/kgDryAir} +! 0.0077, !- Minimum Cooling Supply Air Humidity Ratio {kgWater/kgDryAir} +! NoLimit, !- Heating Limit +! , !- Maximum Heating Air Flow Rate {m3/s} +! , !- Maximum Sensible Heating Capacity {W} +! NoLimit, !- Cooling Limit +! , !- Maximum Cooling Air Flow Rate {m3/s} +! , !- Maximum Total Cooling Capacity {W} +! , !- Heating Availability Schedule Name +! , !- Cooling Availability Schedule Name +! Humidistat, !- Dehumidification Control Type +! 0.7, !- Cooling Sensible Heat Ratio {dimensionless} +! 70, !- Dehumidification Setpoint {percent} +! None, !- Humidification Control Type +! 30, !- Humidification Setpoint {percent} +! None, !- Outdoor Air Method +! 0.00944, !- Outdoor Air Flow Rate per Person {m3/s} +! , !- Outdoor Air Flow Rate per Zone Floor Area {m3/s-m2} +! , !- Outdoor Air Flow Rate per Zone {m3/s} +! , !- Design Specification Outdoor Air Object Name +! None, !- Demand Controlled Ventilation Type +! NoEconomizer, !- Outdoor Air Economizer Type +! None, !- Heat Recovery Type +! 0.7, !- Sensible Heat Recovery Effectiveness {dimensionless} +! 0.65; !- Latent Heat Recovery Effectiveness {dimensionless} +! +! HVACTemplate:Zone:IdealLoadsAirSystem, +! SPACE2-1, !- Zone Name +! Constant 24, !- Template Thermostat Name +! AlwaysOn, !- System Availability Schedule Name +! 50, !- Maximum Heating Supply Air Temperature {C} +! 13, !- Minimum Cooling Supply Air Temperature {C} +! 0.0156, !- Maximum Heating Supply Air Humidity Ratio {kgWater/kgDryAir} +! 0.0077, !- Minimum Cooling Supply Air Humidity Ratio {kgWater/kgDryAir} +! NoLimit, !- Heating Limit +! , !- Maximum Heating Air Flow Rate {m3/s} +! , !- Maximum Sensible Heating Capacity {W} +! NoLimit, !- Cooling Limit +! , !- Maximum Cooling Air Flow Rate {m3/s} +! , !- Maximum Total Cooling Capacity {W} +! , !- Heating Availability Schedule Name +! , !- Cooling Availability Schedule Name +! Humidistat, !- Dehumidification Control Type +! 0.7, !- Cooling Sensible Heat Ratio {dimensionless} +! 70, !- Dehumidification Setpoint {percent} +! None, !- Humidification Control Type +! 30, !- Humidification Setpoint {percent} +! None, !- Outdoor Air Method +! 0.00944, !- Outdoor Air Flow Rate per Person {m3/s} +! , !- Outdoor Air Flow Rate per Zone Floor Area {m3/s-m2} +! , !- Outdoor Air Flow Rate per Zone {m3/s} +! , !- Design Specification Outdoor Air Object Name +! None, !- Demand Controlled Ventilation Type +! NoEconomizer, !- Outdoor Air Economizer Type +! None, !- Heat Recovery Type +! 0.7, !- Sensible Heat Recovery Effectiveness {dimensionless} +! 0.65; !- Latent Heat Recovery Effectiveness {dimensionless} +! +! HVACTemplate:Zone:IdealLoadsAirSystem, +! SPACE3-1, !- Zone Name +! Constant 24, !- Template Thermostat Name +! AlwaysOn, !- System Availability Schedule Name +! 50, !- Maximum Heating Supply Air Temperature {C} +! 13, !- Minimum Cooling Supply Air Temperature {C} +! 0.0156, !- Maximum Heating Supply Air Humidity Ratio {kgWater/kgDryAir} +! 0.0077, !- Minimum Cooling Supply Air Humidity Ratio {kgWater/kgDryAir} +! NoLimit, !- Heating Limit +! , !- Maximum Heating Air Flow Rate {m3/s} +! , !- Maximum Sensible Heating Capacity {W} +! NoLimit, !- Cooling Limit +! , !- Maximum Cooling Air Flow Rate {m3/s} +! , !- Maximum Total Cooling Capacity {W} +! , !- Heating Availability Schedule Name +! , !- Cooling Availability Schedule Name +! Humidistat, !- Dehumidification Control Type +! 0.7, !- Cooling Sensible Heat Ratio {dimensionless} +! 70, !- Dehumidification Setpoint {percent} +! None, !- Humidification Control Type +! 30, !- Humidification Setpoint {percent} +! None, !- Outdoor Air Method +! 0.00944, !- Outdoor Air Flow Rate per Person {m3/s} +! , !- Outdoor Air Flow Rate per Zone Floor Area {m3/s-m2} +! , !- Outdoor Air Flow Rate per Zone {m3/s} +! , !- Design Specification Outdoor Air Object Name +! None, !- Demand Controlled Ventilation Type +! NoEconomizer, !- Outdoor Air Economizer Type +! None, !- Heat Recovery Type +! 0.7, !- Sensible Heat Recovery Effectiveness {dimensionless} +! 0.65; !- Latent Heat Recovery Effectiveness {dimensionless} +! +! HVACTemplate:Zone:IdealLoadsAirSystem, +! SPACE4-1, !- Zone Name +! Constant 24, !- Template Thermostat Name +! AlwaysOn, !- System Availability Schedule Name +! 50, !- Maximum Heating Supply Air Temperature {C} +! 13, !- Minimum Cooling Supply Air Temperature {C} +! 0.0156, !- Maximum Heating Supply Air Humidity Ratio {kgWater/kgDryAir} +! 0.0077, !- Minimum Cooling Supply Air Humidity Ratio {kgWater/kgDryAir} +! NoLimit, !- Heating Limit +! , !- Maximum Heating Air Flow Rate {m3/s} +! , !- Maximum Sensible Heating Capacity {W} +! NoLimit, !- Cooling Limit +! , !- Maximum Cooling Air Flow Rate {m3/s} +! , !- Maximum Total Cooling Capacity {W} +! , !- Heating Availability Schedule Name +! , !- Cooling Availability Schedule Name +! Humidistat, !- Dehumidification Control Type +! 0.7, !- Cooling Sensible Heat Ratio {dimensionless} +! 70, !- Dehumidification Setpoint {percent} +! None, !- Humidification Control Type +! 30, !- Humidification Setpoint {percent} +! None, !- Outdoor Air Method +! 0.00944, !- Outdoor Air Flow Rate per Person {m3/s} +! , !- Outdoor Air Flow Rate per Zone Floor Area {m3/s-m2} +! , !- Outdoor Air Flow Rate per Zone {m3/s} +! , !- Design Specification Outdoor Air Object Name +! None, !- Demand Controlled Ventilation Type +! NoEconomizer, !- Outdoor Air Economizer Type +! None, !- Heat Recovery Type +! 0.7, !- Sensible Heat Recovery Effectiveness {dimensionless} +! 0.65; !- Latent Heat Recovery Effectiveness {dimensionless} +! +! HVACTemplate:Zone:IdealLoadsAirSystem, +! SPACE5-1, !- Zone Name +! Constant 24, !- Template Thermostat Name +! AlwaysOn, !- System Availability Schedule Name +! 50, !- Maximum Heating Supply Air Temperature {C} +! 13, !- Minimum Cooling Supply Air Temperature {C} +! 0.0156, !- Maximum Heating Supply Air Humidity Ratio {kgWater/kgDryAir} +! 0.0077, !- Minimum Cooling Supply Air Humidity Ratio {kgWater/kgDryAir} +! NoLimit, !- Heating Limit +! , !- Maximum Heating Air Flow Rate {m3/s} +! , !- Maximum Sensible Heating Capacity {W} +! NoLimit, !- Cooling Limit +! , !- Maximum Cooling Air Flow Rate {m3/s} +! , !- Maximum Total Cooling Capacity {W} +! , !- Heating Availability Schedule Name +! , !- Cooling Availability Schedule Name +! Humidistat, !- Dehumidification Control Type +! 0.7, !- Cooling Sensible Heat Ratio {dimensionless} +! 70, !- Dehumidification Setpoint {percent} +! None, !- Humidification Control Type +! 30, !- Humidification Setpoint {percent} +! None, !- Outdoor Air Method +! 0.00944, !- Outdoor Air Flow Rate per Person {m3/s} +! , !- Outdoor Air Flow Rate per Zone Floor Area {m3/s-m2} +! , !- Outdoor Air Flow Rate per Zone {m3/s} +! , !- Design Specification Outdoor Air Object Name +! None, !- Demand Controlled Ventilation Type +! NoEconomizer, !- Outdoor Air Economizer Type +! None, !- Heat Recovery Type +! 0.7, !- Sensible Heat Recovery Effectiveness {dimensionless} +! 0.65; !- Latent Heat Recovery Effectiveness {dimensionless} +Output:Variable, + *, !- Key Value + Indoor Living Wall Latent Heat Gain Rate, !- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + *, !- Key Value + Indoor Living Wall Energy Required For Evapotranspiration Per Unit Are, !- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + *, !- Key Value + Zone Air Relative Humidity , !- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + , !- Key Value + Zone Air Temperature, !- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + , !- Key Value + Zone Air System Sensible Cooling Rate, !- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + *, !- Key Value + Zone Air System Sensible Heating Rate, !- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + *, !- Key Value + Heating Coil Heating Rate, !- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + *, !- Key Value + Cooling Coil Total Cooling Rate, !- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + *, !- Key Value + Cooling Coil Sensible Cooling Rate, !- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + *, !- Key Value + Indoor Living Wall Plant Surface Temperature , !- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + *, !- Key Value + Indoor Living Wall Sensible Heat Gain Rate , !- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + *, !- Key Value + Indoor Living Wall Latent Heat Gain Rate , !- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + *, !- Key Value + Indoor Living Wall Latent Heat Gain Rate , !- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + *, !- Key Value + Indoor Living Wall Evapotranspiration Rate , !- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + *, !- Key Value + Indoor Living Wall LED Operational PPFD , !- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + *, !- Key Value + Indoor Living Wall PPFD ,!- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + *, !- Key Value + Indoor Living Wall VPD , !- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + *, !- Key Value + Indoor Living Wall LED Sensible Heat Gain Rate , !- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + *, !- Key Value + Indoor Living Wall LED Operational Power , !- Variable Name + Timestep; !- Reporting Frequency + +Output:Variable, + *, !- Key Value + Indoor Living Wall LED Electricity Energy , !- Variable Name + Timestep; !- Reporting Frequency + + +!- =========== ALL OBJECTS IN CLASS: OUTPUT:METER:METERFILEONLY =========== + +Output:Meter:MeterFileOnly, + Electricity:Facility, !- Key Name + monthly; !- Reporting Frequency + +Output:Meter:MeterFileOnly, + Electricity:Building, !- Key Name + monthly; !- Reporting Frequency + +Output:Meter:MeterFileOnly, + InteriorLights:Electricity, !- Key Name + monthly; !- Reporting Frequency + +Output:Meter:MeterFileOnly, + Electricity:HVAC, !- Key Name + monthly; !- Reporting Frequency + +Output:Meter:MeterFileOnly, + Electricity:Plant, !- Key Name + monthly; !- Reporting Frequency + +Output:Meter:MeterFileOnly, + NaturalGas:Facility, !- Key Name + monthly; !- Reporting Frequency + +Output:Meter:MeterFileOnly, + NaturalGas:Plant, !- Key Name + monthly; !- Reporting Frequency + +Output:Meter:MeterFileOnly, + Electricity:Facility, !- Key Name + runperiod; !- Reporting Frequency + +Output:Meter:MeterFileOnly, + Electricity:Building, !- Key Name + runperiod; !- Reporting Frequency + +Output:Meter:MeterFileOnly, + InteriorLights:Electricity, !- Key Name + runperiod; !- Reporting Frequency + +Output:Meter:MeterFileOnly, + Electricity:HVAC, !- Key Name + runperiod; !- Reporting Frequency + +Output:Meter:MeterFileOnly, + Electricity:Plant, !- Key Name + runperiod; !- Reporting Frequency + +Output:Meter:MeterFileOnly, + NaturalGas:Facility, !- Key Name + runperiod; !- Reporting Frequency + +Output:Meter:MeterFileOnly, + NaturalGas:Plant, !- Key Name + runperiod; !- Reporting Frequency + +Output:Meter:MeterFileOnly, + MyGeneralLights, !- Key Name + monthly; !- Reporting Frequency + +Output:Meter:MeterFileOnly, + MyGeneralLights, !- Key Name + runperiod; !- Reporting Frequency + +Output:Meter:MeterFileOnly, + MyBuildingElectric, !- Key Name + monthly; !- Reporting Frequency + +Output:Meter:MeterFileOnly, + MyBuildingElectric, !- Key Name + runperiod; !- Reporting Frequency + +Output:Meter:MeterFileOnly, + MyBuildingOther, !- Key Name + monthly; !- Reporting Frequency + +Output:Meter:MeterFileOnly, + MyBuildingOther, !- Key Name + runperiod; !- Reporting Frequency + + +!- =========== ALL OBJECTS IN CLASS: METER:CUSTOM =========== + +! The following custom meters are set up to illustrate the capabilities +! of custom meters. +! Custom Meter "MyGeneralLights" duplicates the InteriorLights:Electricity meter. +! Custom Meter "MyBuildingElectric" duplicates the Electricity:Building meter (by specifying that meter). +! Custom Meter (Decrement) "MyBuildingOther" uses Electricity:Building as its source meter +! and subtracts out the values for MyGeneralLights (aka InteriorLights:Electricity). The +! resultant value for MyBuildingOther should be equal to the value for the meters +! Electricity:Building - InteriorLights:Electricity (aka MyGeneralLights) +Meter:Custom, + MyGeneralLights, !- Name + Electricity, !- Resource Type + SPACE1-1 Lights 1, !- Key Name 1 + Lights Electricity Energy, !- Output Variable or Meter Name 1 + SPACE2-1 Lights 1, !- Key Name 2 + Lights Electricity Energy, !- Output Variable or Meter Name 2 + SPACE3-1 Lights 1, !- Key Name 3 + Lights Electricity Energy, !- Output Variable or Meter Name 3 + SPACE4-1 Lights 1, !- Key Name 4 + Lights Electricity Energy, !- Output Variable or Meter Name 4 + SPACE5-1 Lights 1, !- Key Name 5 + Lights Electricity Energy; !- Output Variable or Meter Name 5 + +Meter:Custom, + MyBuildingElectric, !- Name + Electricity, !- Resource Type + , !- Key Name 1 + Electricity:Building; !- Output Variable or Meter Name 1 + + +!- =========== ALL OBJECTS IN CLASS: METER:CUSTOMDECREMENT =========== + +Meter:CustomDecrement, + MyBuildingOther, !- Name + Electricity, !- Resource Type + Electricity:Building, !- Source Meter Name + , !- Key Name 1 + MyGeneralLights; !- Output Variable or Meter Name 1 + + +!- =========== ALL OBJECTS IN CLASS: OUTPUTCONTROL:FILES =========== + +OutputControl:Files, + Yes; !- Output CSV + diff --git a/testfiles/LookupTables.idf b/testfiles/LookupTables.idf index a3f04f37eda..3e0fb9603fc 100644 --- a/testfiles/LookupTables.idf +++ b/testfiles/LookupTables.idf @@ -1460,6 +1460,7 @@ 0.5, !- Cooling Supply Air Flow Rate {m3/s} 0.6, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.028, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0233, !- Heating Outdoor Air Flow Rate {m3/s} 0.0186, !- No Load Outdoor Air Flow Rate {m3/s} @@ -1488,6 +1489,7 @@ autosize, !- Cooling Supply Air Flow Rate {m3/s} autosize, !- Heating Supply Air Flow Rate {m3/s} autosize, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize, !- Cooling Outdoor Air Flow Rate {m3/s} autosize, !- Heating Outdoor Air Flow Rate {m3/s} autosize, !- No Load Outdoor Air Flow Rate {m3/s} @@ -1516,6 +1518,7 @@ autosize, !- Cooling Supply Air Flow Rate {m3/s} autosize, !- Heating Supply Air Flow Rate {m3/s} autosize, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize, !- Cooling Outdoor Air Flow Rate {m3/s} autosize, !- Heating Outdoor Air Flow Rate {m3/s} autosize, !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/testfiles/MicroCogeneration.idf b/testfiles/MicroCogeneration.idf index 0fa9e0ce1af..ad46817e13e 100644 --- a/testfiles/MicroCogeneration.idf +++ b/testfiles/MicroCogeneration.idf @@ -1275,6 +1275,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -1832,6 +1833,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2389,6 +2391,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -2946,6 +2949,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -3490,6 +3494,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/testfiles/OutdoorAirUnit.idf b/testfiles/OutdoorAirUnit.idf index 61bf48bb8bc..f5e3421ab78 100644 --- a/testfiles/OutdoorAirUnit.idf +++ b/testfiles/OutdoorAirUnit.idf @@ -1693,12 +1693,8 @@ 0.42, !- Nominal Supply Air Flow Rate {m3/s} 0.76, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.76, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} Zone3OAUOANode, !- Supply Air Inlet Node Name Zone3OAUCCoilIn, !- Supply Air Outlet Node Name Zone3OAUZoneOutletNode, !- Exhaust Air Inlet Node Name @@ -1710,7 +1706,57 @@ 1.7, !- Threshold Temperature {C} 0.083, !- Initial Defrost Time Fraction {dimensionless} 0.012, !- Rate of Defrost Time Fraction Increase {1/K} - No; !- Economizer Lockout + No, !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name + + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + + Table:Lookup, + SenEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.76, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.81, !- Output Value 1 + 0.76; !- Output Value 2 + + Table:Lookup, + LatEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.68, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.73, !- Output Value 1 + 0.68; !- Output Value 2 OutdoorAir:Node, Zone3OAUOANode, !- Name @@ -1962,12 +2008,8 @@ 0.42, !- Nominal Supply Air Flow Rate {m3/s} 0.76, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.76, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} Zone2OAUFanOutletNode, !- Supply Air Inlet Node Name Zone2OAUCCoilIn, !- Supply Air Outlet Node Name Zone2OAUZoneOutletNode, !- Exhaust Air Inlet Node Name @@ -1979,7 +2021,11 @@ 1.7, !- Threshold Temperature {C} 0.083, !- Initial Defrost Time Fraction {dimensionless} 0.012, !- Rate of Defrost Time Fraction Increase {1/K} - No; !- Economizer Lockout + No, !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name NodeList, Zone2Inlets, !- Name @@ -2141,12 +2187,8 @@ 0.42, !- Nominal Supply Air Flow Rate {m3/s} 0.76, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.76, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} Zone1OAUOANode, !- Supply Air Inlet Node Name Zone1OAUCCoilin, !- Supply Air Outlet Node Name Zone1OAUZoneOutletNode, !- Exhaust Air Inlet Node Name @@ -2158,7 +2200,11 @@ 1.7, !- Threshold Temperature {C} 0.083, !- Initial Defrost Time Fraction {dimensionless} 0.012, !- Rate of Defrost Time Fraction Increase {1/K} - No; !- Economizer Lockout + No, !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name ThermostatSetpoint:SingleHeating, Heating Setpoint with SB,!- Name diff --git a/testfiles/OutdoorAirUnitwithAirloopHVAC.idf b/testfiles/OutdoorAirUnitwithAirloopHVAC.idf index 281232e095f..d5f32d1088d 100644 --- a/testfiles/OutdoorAirUnitwithAirloopHVAC.idf +++ b/testfiles/OutdoorAirUnitwithAirloopHVAC.idf @@ -1586,12 +1586,8 @@ 0.42, !- Nominal Supply Air Flow Rate {m3/s} 0.76, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.76, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} Zone3OAUOANode, !- Supply Air Inlet Node Name Zone3OAUCCoilIn, !- Supply Air Outlet Node Name Zone3OAUZoneOutletNode, !- Exhaust Air Inlet Node Name @@ -1603,7 +1599,57 @@ 1.7, !- Threshold Temperature {C} 0.083, !- Initial Defrost Time Fraction {dimensionless} 0.012, !- Rate of Defrost Time Fraction Increase {1/K} - No; !- Economizer Lockout + No, !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name + + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + + Table:Lookup, + SenEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.76, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.81, !- Output Value 1 + 0.76; !- Output Value 2 + + Table:Lookup, + LatEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.68, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.73, !- Output Value 1 + 0.68; !- Output Value 2 OutdoorAir:Node, Zone3OAUOANode, !- Name @@ -1861,12 +1907,8 @@ 0.42, !- Nominal Supply Air Flow Rate {m3/s} 0.76, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.76, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} Zone2OAUFanOutletNode, !- Supply Air Inlet Node Name Zone2OAUCCoilIn, !- Supply Air Outlet Node Name Zone2OAUZoneOutletNode, !- Exhaust Air Inlet Node Name @@ -1878,7 +1920,11 @@ 1.7, !- Threshold Temperature {C} 0.083, !- Initial Defrost Time Fraction {dimensionless} 0.012, !- Rate of Defrost Time Fraction Increase {1/K} - No; !- Economizer Lockout + No, !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name NodeList, Zone2Inlets, !- Name @@ -2028,12 +2074,8 @@ 0.42, !- Nominal Supply Air Flow Rate {m3/s} 0.76, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.76, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} Zone1OAUOANode, !- Supply Air Inlet Node Name Zone1OAUCCoilin, !- Supply Air Outlet Node Name Zone1OAUZoneOutletNode, !- Exhaust Air Inlet Node Name @@ -2045,7 +2087,11 @@ 1.7, !- Threshold Temperature {C} 0.083, !- Initial Defrost Time Fraction {dimensionless} 0.012, !- Rate of Defrost Time Fraction Increase {1/K} - No; !- Economizer Lockout + No, !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name ThermostatSetpoint:SingleHeating, Heating Setpoint with SB,!- Name diff --git a/testfiles/PackagedTerminalAirConditioner.idf b/testfiles/PackagedTerminalAirConditioner.idf index 561bd8b5b87..9f42f73d9dd 100644 --- a/testfiles/PackagedTerminalAirConditioner.idf +++ b/testfiles/PackagedTerminalAirConditioner.idf @@ -1494,6 +1494,7 @@ 0.4, !- Cooling Supply Air Flow Rate {m3/s} 0.4, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.028, !- Cooling Outdoor Air Flow Rate {m3/s} 0.028, !- Heating Outdoor Air Flow Rate {m3/s} 0.0186, !- No Load Outdoor Air Flow Rate {m3/s} @@ -1516,6 +1517,7 @@ autosize, !- Cooling Supply Air Flow Rate {m3/s} autosize, !- Heating Supply Air Flow Rate {m3/s} autosize, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize, !- Cooling Outdoor Air Flow Rate {m3/s} autosize, !- Heating Outdoor Air Flow Rate {m3/s} autosize, !- No Load Outdoor Air Flow Rate {m3/s} @@ -1538,6 +1540,7 @@ autosize, !- Cooling Supply Air Flow Rate {m3/s} autosize, !- Heating Supply Air Flow Rate {m3/s} autosize, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize, !- Cooling Outdoor Air Flow Rate {m3/s} autosize, !- Heating Outdoor Air Flow Rate {m3/s} autosize, !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/testfiles/PackagedTerminalAirConditionerVSAS.idf b/testfiles/PackagedTerminalAirConditionerVSAS.idf index 45c8a367c38..066a06cceec 100644 --- a/testfiles/PackagedTerminalAirConditionerVSAS.idf +++ b/testfiles/PackagedTerminalAirConditionerVSAS.idf @@ -141,6 +141,7 @@ 0.4, !- Cooling Supply Air Flow Rate {m3/s} 0.4, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.028, !- Cooling Outdoor Air Flow Rate {m3/s} 0.028, !- Heating Outdoor Air Flow Rate {m3/s} 0.0186, !- No Load Outdoor Air Flow Rate {m3/s} @@ -163,6 +164,7 @@ autosize, !- Cooling Supply Air Flow Rate {m3/s} autosize, !- Heating Supply Air Flow Rate {m3/s} autosize, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize, !- Cooling Outdoor Air Flow Rate {m3/s} autosize, !- Heating Outdoor Air Flow Rate {m3/s} autosize, !- No Load Outdoor Air Flow Rate {m3/s} @@ -185,6 +187,7 @@ autosize, !- Cooling Supply Air Flow Rate {m3/s} autosize, !- Heating Supply Air Flow Rate {m3/s} autosize, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize, !- Cooling Outdoor Air Flow Rate {m3/s} autosize, !- Heating Outdoor Air Flow Rate {m3/s} autosize, !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/testfiles/PackagedTerminalHeatPump.idf b/testfiles/PackagedTerminalHeatPump.idf index 4508e4d703a..a397e4c540d 100644 --- a/testfiles/PackagedTerminalHeatPump.idf +++ b/testfiles/PackagedTerminalHeatPump.idf @@ -1460,6 +1460,7 @@ 0.4, !- Cooling Supply Air Flow Rate {m3/s} 0.4, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.028, !- Cooling Outdoor Air Flow Rate {m3/s} 0.028, !- Heating Outdoor Air Flow Rate {m3/s} 0.0186, !- No Load Outdoor Air Flow Rate {m3/s} @@ -1488,6 +1489,7 @@ autosize, !- Cooling Supply Air Flow Rate {m3/s} autosize, !- Heating Supply Air Flow Rate {m3/s} autosize, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize, !- Cooling Outdoor Air Flow Rate {m3/s} autosize, !- Heating Outdoor Air Flow Rate {m3/s} autosize, !- No Load Outdoor Air Flow Rate {m3/s} @@ -1516,6 +1518,7 @@ autosize, !- Cooling Supply Air Flow Rate {m3/s} autosize, !- Heating Supply Air Flow Rate {m3/s} autosize, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize, !- Cooling Outdoor Air Flow Rate {m3/s} autosize, !- Heating Outdoor Air Flow Rate {m3/s} autosize, !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/testfiles/PackagedTerminalHeatPumpVSAS.idf b/testfiles/PackagedTerminalHeatPumpVSAS.idf index bc5afa129aa..ac71a356c53 100644 --- a/testfiles/PackagedTerminalHeatPumpVSAS.idf +++ b/testfiles/PackagedTerminalHeatPumpVSAS.idf @@ -136,6 +136,7 @@ 0.4, !- Cooling Supply Air Flow Rate {m3/s} 0.4, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.028, !- Cooling Outdoor Air Flow Rate {m3/s} 0.028, !- Heating Outdoor Air Flow Rate {m3/s} 0.0186, !- No Load Outdoor Air Flow Rate {m3/s} @@ -164,6 +165,7 @@ autosize, !- Cooling Supply Air Flow Rate {m3/s} autosize, !- Heating Supply Air Flow Rate {m3/s} autosize, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize, !- Cooling Outdoor Air Flow Rate {m3/s} autosize, !- Heating Outdoor Air Flow Rate {m3/s} autosize, !- No Load Outdoor Air Flow Rate {m3/s} @@ -192,6 +194,7 @@ autosize, !- Cooling Supply Air Flow Rate {m3/s} autosize, !- Heating Supply Air Flow Rate {m3/s} autosize, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize, !- Cooling Outdoor Air Flow Rate {m3/s} autosize, !- Heating Outdoor Air Flow Rate {m3/s} autosize, !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/testfiles/PackagedTerminalHeatPump_LatentSizing_SensibleAndLatent.idf b/testfiles/PackagedTerminalHeatPump_LatentSizing_SensibleAndLatent.idf index dd95dfaac37..2871dc501ec 100644 --- a/testfiles/PackagedTerminalHeatPump_LatentSizing_SensibleAndLatent.idf +++ b/testfiles/PackagedTerminalHeatPump_LatentSizing_SensibleAndLatent.idf @@ -1470,6 +1470,7 @@ 0.4, !- Cooling Supply Air Flow Rate {m3/s} 0.4, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.028, !- Cooling Outdoor Air Flow Rate {m3/s} 0.028, !- Heating Outdoor Air Flow Rate {m3/s} 0.0186, !- No Load Outdoor Air Flow Rate {m3/s} @@ -1498,6 +1499,7 @@ autosize, !- Cooling Supply Air Flow Rate {m3/s} autosize, !- Heating Supply Air Flow Rate {m3/s} autosize, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize, !- Cooling Outdoor Air Flow Rate {m3/s} autosize, !- Heating Outdoor Air Flow Rate {m3/s} autosize, !- No Load Outdoor Air Flow Rate {m3/s} @@ -1526,6 +1528,7 @@ autosize, !- Cooling Supply Air Flow Rate {m3/s} autosize, !- Heating Supply Air Flow Rate {m3/s} autosize, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize, !- Cooling Outdoor Air Flow Rate {m3/s} autosize, !- Heating Outdoor Air Flow Rate {m3/s} autosize, !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/testfiles/PipingSystem_Underground_FHX.idf b/testfiles/PipingSystem_Underground_FHX.idf index 703ec036691..ac931c4488f 100644 --- a/testfiles/PipingSystem_Underground_FHX.idf +++ b/testfiles/PipingSystem_Underground_FHX.idf @@ -812,6 +812,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} @@ -1034,6 +1035,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/testfiles/PythonPlugin1ZoneUncontrolledCondFD.py b/testfiles/PythonPlugin1ZoneUncontrolledCondFD.py index f348248aca8..e42eb5a2d0f 100644 --- a/testfiles/PythonPlugin1ZoneUncontrolledCondFD.py +++ b/testfiles/PythonPlugin1ZoneUncontrolledCondFD.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/testfiles/PythonPlugin1ZoneUncontrolledTrackHistory.py b/testfiles/PythonPlugin1ZoneUncontrolledTrackHistory.py index c3a9e70f990..d79af97f9b3 100644 --- a/testfiles/PythonPlugin1ZoneUncontrolledTrackHistory.py +++ b/testfiles/PythonPlugin1ZoneUncontrolledTrackHistory.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/testfiles/PythonPluginAirflowNetworkOpeningControlByHumidity.py b/testfiles/PythonPluginAirflowNetworkOpeningControlByHumidity.py index 3a6825db64a..7f192ffb9e3 100644 --- a/testfiles/PythonPluginAirflowNetworkOpeningControlByHumidity.py +++ b/testfiles/PythonPluginAirflowNetworkOpeningControlByHumidity.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/testfiles/PythonPluginConstantVolumePurchasedAir.py b/testfiles/PythonPluginConstantVolumePurchasedAir.py index 704c7270aed..41c14f3f685 100644 --- a/testfiles/PythonPluginConstantVolumePurchasedAir.py +++ b/testfiles/PythonPluginConstantVolumePurchasedAir.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/testfiles/PythonPluginCurveOverride_PackagedTerminalHeatPump.idf b/testfiles/PythonPluginCurveOverride_PackagedTerminalHeatPump.idf index eee58bee820..5099d37dd63 100644 --- a/testfiles/PythonPluginCurveOverride_PackagedTerminalHeatPump.idf +++ b/testfiles/PythonPluginCurveOverride_PackagedTerminalHeatPump.idf @@ -1500,6 +1500,7 @@ 0.32, !- Cooling Supply Air Flow Rate {m3/s} 0.32, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.028, !- Cooling Outdoor Air Flow Rate {m3/s} 0.028, !- Heating Outdoor Air Flow Rate {m3/s} 0.0186, !- No Load Outdoor Air Flow Rate {m3/s} @@ -1528,6 +1529,7 @@ autosize, !- Cooling Supply Air Flow Rate {m3/s} autosize, !- Heating Supply Air Flow Rate {m3/s} autosize, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize, !- Cooling Outdoor Air Flow Rate {m3/s} autosize, !- Heating Outdoor Air Flow Rate {m3/s} autosize, !- No Load Outdoor Air Flow Rate {m3/s} @@ -1556,6 +1558,7 @@ autosize, !- Cooling Supply Air Flow Rate {m3/s} autosize, !- Heating Supply Air Flow Rate {m3/s} autosize, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize, !- Cooling Outdoor Air Flow Rate {m3/s} autosize, !- Heating Outdoor Air Flow Rate {m3/s} autosize, !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/testfiles/PythonPluginCurveOverride_PackagedTerminalHeatPump.py b/testfiles/PythonPluginCurveOverride_PackagedTerminalHeatPump.py index 9998e73c3e3..7e922222856 100644 --- a/testfiles/PythonPluginCurveOverride_PackagedTerminalHeatPump.py +++ b/testfiles/PythonPluginCurveOverride_PackagedTerminalHeatPump.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/testfiles/PythonPluginCustomOutputVariable.py b/testfiles/PythonPluginCustomOutputVariable.py index 4a9a6971549..5aecbae487b 100644 --- a/testfiles/PythonPluginCustomOutputVariable.py +++ b/testfiles/PythonPluginCustomOutputVariable.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/testfiles/PythonPluginCustomSchedule.py b/testfiles/PythonPluginCustomSchedule.py index dbebc7cc6c6..a777c349c85 100644 --- a/testfiles/PythonPluginCustomSchedule.py +++ b/testfiles/PythonPluginCustomSchedule.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/testfiles/PythonPluginCustomTrendVariable.py b/testfiles/PythonPluginCustomTrendVariable.py index 66e9f7f5418..dd193e9fe80 100644 --- a/testfiles/PythonPluginCustomTrendVariable.py +++ b/testfiles/PythonPluginCustomTrendVariable.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/testfiles/PythonPluginDemandManager_LargeOffice.py b/testfiles/PythonPluginDemandManager_LargeOffice.py index fd15624d6b5..de79134302b 100644 --- a/testfiles/PythonPluginDemandManager_LargeOffice.py +++ b/testfiles/PythonPluginDemandManager_LargeOffice.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/testfiles/PythonPluginDiscreteAirSystemSizes.py b/testfiles/PythonPluginDiscreteAirSystemSizes.py index 4627da4c928..8559d91dbf2 100644 --- a/testfiles/PythonPluginDiscreteAirSystemSizes.py +++ b/testfiles/PythonPluginDiscreteAirSystemSizes.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/testfiles/PythonPluginLoadBasedMultiSpeedDXCoilOverrideControl.idf b/testfiles/PythonPluginLoadBasedMultiSpeedDXCoilOverrideControl.idf index 33598ea292d..f88aa549caa 100644 --- a/testfiles/PythonPluginLoadBasedMultiSpeedDXCoilOverrideControl.idf +++ b/testfiles/PythonPluginLoadBasedMultiSpeedDXCoilOverrideControl.idf @@ -2422,6 +2422,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -2880,6 +2881,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -3348,6 +3350,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -4003,6 +4006,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -4658,6 +4662,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/PythonPluginLoadBasedMultiSpeedDXCoilOverrideControl.py b/testfiles/PythonPluginLoadBasedMultiSpeedDXCoilOverrideControl.py index d993b4e0a85..d548b4a22e4 100644 --- a/testfiles/PythonPluginLoadBasedMultiSpeedDXCoilOverrideControl.py +++ b/testfiles/PythonPluginLoadBasedMultiSpeedDXCoilOverrideControl.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/testfiles/PythonPluginLrgOff_GridStorageSmoothing.py b/testfiles/PythonPluginLrgOff_GridStorageSmoothing.py index 61a1a78ba76..0bdc7b6d857 100644 --- a/testfiles/PythonPluginLrgOff_GridStorageSmoothing.py +++ b/testfiles/PythonPluginLrgOff_GridStorageSmoothing.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/testfiles/PythonPluginMultiSpeedHeatPumpOverrideControl.py b/testfiles/PythonPluginMultiSpeedHeatPumpOverrideControl.py index b120fd7a1da..8b88a352043 100644 --- a/testfiles/PythonPluginMultiSpeedHeatPumpOverrideControl.py +++ b/testfiles/PythonPluginMultiSpeedHeatPumpOverrideControl.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/testfiles/PythonPluginPlantLoopOverrideControl.py b/testfiles/PythonPluginPlantLoopOverrideControl.py index 20cf3562217..17920e50dea 100644 --- a/testfiles/PythonPluginPlantLoopOverrideControl.py +++ b/testfiles/PythonPluginPlantLoopOverrideControl.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/testfiles/PythonPluginPlantOperation_largeOff.py b/testfiles/PythonPluginPlantOperation_largeOff.py index c87d027ced3..c99c4fe3a8a 100644 --- a/testfiles/PythonPluginPlantOperation_largeOff.py +++ b/testfiles/PythonPluginPlantOperation_largeOff.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/testfiles/PythonPluginReplaceTraditionalManagers_LargeOffice.py b/testfiles/PythonPluginReplaceTraditionalManagers_LargeOffice.py index 43b6098b0d1..743176b02bc 100644 --- a/testfiles/PythonPluginReplaceTraditionalManagers_LargeOffice.py +++ b/testfiles/PythonPluginReplaceTraditionalManagers_LargeOffice.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/testfiles/PythonPluginTestMathAndKill.py b/testfiles/PythonPluginTestMathAndKill.py index 1565dc8b133..3d2bfd7fec4 100644 --- a/testfiles/PythonPluginTestMathAndKill.py +++ b/testfiles/PythonPluginTestMathAndKill.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/testfiles/PythonPluginThermochromicWindow.py b/testfiles/PythonPluginThermochromicWindow.py index c2a56b5a290..e7227e7da07 100644 --- a/testfiles/PythonPluginThermochromicWindow.py +++ b/testfiles/PythonPluginThermochromicWindow.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/testfiles/PythonPluginUserDefined5ZoneAirCooled.py b/testfiles/PythonPluginUserDefined5ZoneAirCooled.py index c31813545d9..bf2f562d92f 100644 --- a/testfiles/PythonPluginUserDefined5ZoneAirCooled.py +++ b/testfiles/PythonPluginUserDefined5ZoneAirCooled.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/testfiles/PythonPluginUserDefinedWindACAuto.py b/testfiles/PythonPluginUserDefinedWindACAuto.py index e19c8586840..ee973fdd186 100644 --- a/testfiles/PythonPluginUserDefinedWindACAuto.py +++ b/testfiles/PythonPluginUserDefinedWindACAuto.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/testfiles/PythonPluginWindowShadeControl.py b/testfiles/PythonPluginWindowShadeControl.py index 433a2cd1e3d..b477edacb30 100644 --- a/testfiles/PythonPluginWindowShadeControl.py +++ b/testfiles/PythonPluginWindowShadeControl.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/testfiles/PythonPlugin_SingleFamilyHouse_TwoSpeed_MultiStageElectricSuppCoil.idf b/testfiles/PythonPlugin_SingleFamilyHouse_TwoSpeed_MultiStageElectricSuppCoil.idf index 5f6f4f060e3..427ca3994f4 100644 --- a/testfiles/PythonPlugin_SingleFamilyHouse_TwoSpeed_MultiStageElectricSuppCoil.idf +++ b/testfiles/PythonPlugin_SingleFamilyHouse_TwoSpeed_MultiStageElectricSuppCoil.idf @@ -1484,6 +1484,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 45.0, !- Maximum Supply Air Temperature {C} 4.44444444444444, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/PythonPlugin_SingleFamilyHouse_TwoSpeed_MultiStageElectricSuppCoil.py b/testfiles/PythonPlugin_SingleFamilyHouse_TwoSpeed_MultiStageElectricSuppCoil.py index f6cf658f13f..db2c49d6b6d 100644 --- a/testfiles/PythonPlugin_SingleFamilyHouse_TwoSpeed_MultiStageElectricSuppCoil.py +++ b/testfiles/PythonPlugin_SingleFamilyHouse_TwoSpeed_MultiStageElectricSuppCoil.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/testfiles/RefBldgSmallHotelNew2004_Chicago.idf b/testfiles/RefBldgSmallHotelNew2004_Chicago.idf index cdfbeba8f54..cb00371c7c2 100644 --- a/testfiles/RefBldgSmallHotelNew2004_Chicago.idf +++ b/testfiles/RefBldgSmallHotelNew2004_Chicago.idf @@ -18414,6 +18414,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18436,6 +18437,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18458,6 +18460,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18480,6 +18483,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18502,6 +18506,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18524,6 +18529,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18546,6 +18552,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18568,6 +18575,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18590,6 +18598,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18612,6 +18621,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18634,6 +18644,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18656,6 +18667,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18678,6 +18690,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18700,6 +18713,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18722,6 +18736,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18744,6 +18759,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18766,6 +18782,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18788,6 +18805,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18810,6 +18828,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18832,6 +18851,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18854,6 +18874,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18876,6 +18897,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18898,6 +18920,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18920,6 +18943,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18942,6 +18966,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18964,6 +18989,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -18986,6 +19012,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19008,6 +19035,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19030,6 +19058,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19052,6 +19081,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19074,6 +19104,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19096,6 +19127,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19118,6 +19150,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19140,6 +19173,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} @@ -19162,6 +19196,7 @@ AUTOSIZE, !- Cooling Supply Air Flow Rate {m3/s} AUTOSIZE, !- Heating Supply Air Flow Rate {m3/s} AUTOSIZE, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed AUTOSIZE, !- Cooling Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- Heating Outdoor Air Flow Rate {m3/s} AUTOSIZE, !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/testfiles/RoomAirflowNetwork.idf b/testfiles/RoomAirflowNetwork.idf index 3aa8cc9cb0f..ddd2593ff0b 100644 --- a/testfiles/RoomAirflowNetwork.idf +++ b/testfiles/RoomAirflowNetwork.idf @@ -2566,6 +2566,7 @@ autosize, !- Cooling Supply Air Flow Rate {m3/s} autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize, !- Cooling Outdoor Air Flow Rate {m3/s} autosize, !- Heating Outdoor Air Flow Rate {m3/s} autosize, !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/testfiles/SingleFamilyHouse_HP_Slab.idf b/testfiles/SingleFamilyHouse_HP_Slab.idf index 1b95e09b949..e0998aa64c6 100644 --- a/testfiles/SingleFamilyHouse_HP_Slab.idf +++ b/testfiles/SingleFamilyHouse_HP_Slab.idf @@ -3861,12 +3861,8 @@ 0.0283168464628752, !- Nominal Supply Air Flow Rate {m3/s} 0.65, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.65, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.65, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.65, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} outdoor air node_unit1, !- Supply Air Inlet Node Name OA fan inlet node_unit1, !- Supply Air Outlet Node Name Zone Exhaust Node_unit1, !- Exhaust Air Inlet Node Name diff --git a/testfiles/SingleFamilyHouse_HP_Slab_Dehumidification.idf b/testfiles/SingleFamilyHouse_HP_Slab_Dehumidification.idf index 5ce6eabac97..c9c9d1fb6de 100644 --- a/testfiles/SingleFamilyHouse_HP_Slab_Dehumidification.idf +++ b/testfiles/SingleFamilyHouse_HP_Slab_Dehumidification.idf @@ -3884,12 +3884,8 @@ 0.0283168464628752, !- Nominal Supply Air Flow Rate {m3/s} 0.65, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.65, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.65, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.65, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} outdoor air node_unit1, !- Supply Air Inlet Node Name OA fan inlet node_unit1, !- Supply Air Outlet Node Name Zone Exhaust Node_unit1, !- Exhaust Air Inlet Node Name diff --git a/testfiles/SingleFamilyHouse_TwoSpeed_MultiStageElectricSuppCoil.idf b/testfiles/SingleFamilyHouse_TwoSpeed_MultiStageElectricSuppCoil.idf index bcf0261949e..95413d387cd 100644 --- a/testfiles/SingleFamilyHouse_TwoSpeed_MultiStageElectricSuppCoil.idf +++ b/testfiles/SingleFamilyHouse_TwoSpeed_MultiStageElectricSuppCoil.idf @@ -1485,6 +1485,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 45.0, !- Maximum Supply Air Temperature {C} 4.44444444444444, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/SingleFamilyHouse_TwoSpeed_MultiStageElectricSuppCoilEMS.idf b/testfiles/SingleFamilyHouse_TwoSpeed_MultiStageElectricSuppCoilEMS.idf index b3c22d566da..1789003142c 100644 --- a/testfiles/SingleFamilyHouse_TwoSpeed_MultiStageElectricSuppCoilEMS.idf +++ b/testfiles/SingleFamilyHouse_TwoSpeed_MultiStageElectricSuppCoilEMS.idf @@ -1484,6 +1484,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 45.0, !- Maximum Supply Air Temperature {C} 4.44444444444444, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/SingleFamilyHouse_TwoSpeed_MultiStageElectricSuppCoil_SPControl.idf b/testfiles/SingleFamilyHouse_TwoSpeed_MultiStageElectricSuppCoil_SPControl.idf index c59bf6b6049..06c87dd6685 100644 --- a/testfiles/SingleFamilyHouse_TwoSpeed_MultiStageElectricSuppCoil_SPControl.idf +++ b/testfiles/SingleFamilyHouse_TwoSpeed_MultiStageElectricSuppCoil_SPControl.idf @@ -1486,6 +1486,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 45.0, !- Maximum Supply Air Temperature {C} 4.44444444444444, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/TermRhGenericOAHeatRecMinExh.idf b/testfiles/TermRhGenericOAHeatRecMinExh.idf index 3cafa85382f..6fa83827a8a 100644 --- a/testfiles/TermRhGenericOAHeatRecMinExh.idf +++ b/testfiles/TermRhGenericOAHeatRecMinExh.idf @@ -2167,12 +2167,8 @@ 0.4333, !- Nominal Supply Air Flow Rate {m3/s} .76, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} .68, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - .81, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - .73, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} .76, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} .68, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - .81, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - .73, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} Outside Air Inlet Node, !- Supply Air Inlet Node Name Heat Recovery Outlet Node, !- Supply Air Outlet Node Name Relief Air Outlet Node, !- Exhaust Air Inlet Node Name @@ -2181,7 +2177,60 @@ Yes, !- Supply Air Outlet Temperature Control Plate, !- Heat Exchanger Type MinimumExhaustTemperature, !- Frost Control Type - 1.7; !- Threshold Temperature {C} + 1.7, !- Threshold Temperature {C} + , !- Initial Defrost Time Fraction {dimensionless} + , !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name + + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + + Table:Lookup, + SenEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.76, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.81, !- Output Value 1 + 0.76; !- Output Value 2 + + Table:Lookup, + LatEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.68, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.73, !- Output Value 1 + 0.68; !- Output Value 2 Coil:Cooling:Water:DetailedGeometry, Detailed Cooling Coil, !- Name diff --git a/testfiles/TermRhGenericOAHeatRecPreheat.idf b/testfiles/TermRhGenericOAHeatRecPreheat.idf index 406b19e2997..d44b1d55224 100644 --- a/testfiles/TermRhGenericOAHeatRecPreheat.idf +++ b/testfiles/TermRhGenericOAHeatRecPreheat.idf @@ -2162,12 +2162,8 @@ 0.4333, !- Nominal Supply Air Flow Rate {m3/s} .76, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} .68, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - .81, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - .73, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} .76, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} .68, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - .81, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - .73, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} Outside Air Inlet Node Preheated, !- Supply Air Inlet Node Name Heat Recovery Outlet Node, !- Supply Air Outlet Node Name Relief Air Outlet Node, !- Exhaust Air Inlet Node Name @@ -2175,7 +2171,62 @@ 200.0, !- Nominal Electric Power {W} No, !- Supply Air Outlet Temperature Control Plate, !- Heat Exchanger Type - None; !- Frost Control Type + None, !- Frost Control Type + , !- Threshold Temperature {C} + , !- Initial Defrost Time Fraction {dimensionless} + , !- Rate of Defrost Time Fraction Increase {1/K} + , !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name + + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + + Table:Lookup, + SenEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.76, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.81, !- Output Value 1 + 0.76; !- Output Value 2 + + Table:Lookup, + LatEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.68, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.73, !- Output Value 1 + 0.68; !- Output Value 2 + Coil:Cooling:Water:DetailedGeometry, Detailed Cooling Coil, !- Name diff --git a/testfiles/US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf b/testfiles/US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf index 5afef56ea81..4e2673543ad 100644 --- a/testfiles/US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf +++ b/testfiles/US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf @@ -6302,12 +6302,8 @@ 0.0283168464628752, !- Nominal Supply Air Flow Rate {m3/s} 0.65, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.65, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.65, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.65, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} outdoor air node_unit1, !- Supply Air Inlet Node Name OA fan inlet node_unit1, !- Supply Air Outlet Node Name Zone Exhaust Node_unit1, !- Exhaust Air Inlet Node Name diff --git a/testfiles/UnitarySystem_5ZoneWaterLoopHeatPump.idf b/testfiles/UnitarySystem_5ZoneWaterLoopHeatPump.idf index c82f4992142..e738e2880a0 100644 --- a/testfiles/UnitarySystem_5ZoneWaterLoopHeatPump.idf +++ b/testfiles/UnitarySystem_5ZoneWaterLoopHeatPump.idf @@ -2109,6 +2109,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 50, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} Outside Air Inlet Node; !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -2413,6 +2414,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 50, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} Outside Air Inlet Node; !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -2708,6 +2710,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 50, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} Outside Air Inlet Node; !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -3003,6 +3006,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 50, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} Outside Air Inlet Node; !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -3298,6 +3302,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 50, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} Outside Air Inlet Node; !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/UnitarySystem_FurnaceWithDXSystemRHcontrol.idf b/testfiles/UnitarySystem_FurnaceWithDXSystemRHcontrol.idf index 81b905180ef..86f79d1caf1 100644 --- a/testfiles/UnitarySystem_FurnaceWithDXSystemRHcontrol.idf +++ b/testfiles/UnitarySystem_FurnaceWithDXSystemRHcontrol.idf @@ -1469,6 +1469,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 80; !- Maximum Supply Air Temperature {C} ! , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation diff --git a/testfiles/UnitarySystem_HeatPumpAuto.idf b/testfiles/UnitarySystem_HeatPumpAuto.idf index de45f6cc3e6..1debfd5b4aa 100644 --- a/testfiles/UnitarySystem_HeatPumpAuto.idf +++ b/testfiles/UnitarySystem_HeatPumpAuto.idf @@ -1554,6 +1554,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed autosize, !- Maximum Supply Air Temperature {C} 21; !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} diff --git a/testfiles/UnitarySystem_MultiSpeedCoils_SingleMode.idf b/testfiles/UnitarySystem_MultiSpeedCoils_SingleMode.idf index 6991ec64ae0..f4508ccfd57 100644 --- a/testfiles/UnitarySystem_MultiSpeedCoils_SingleMode.idf +++ b/testfiles/UnitarySystem_MultiSpeedCoils_SingleMode.idf @@ -1555,6 +1555,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 50, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/UnitarySystem_MultiSpeedDX.idf b/testfiles/UnitarySystem_MultiSpeedDX.idf index ee9de16cff5..d94ee18b81b 100644 --- a/testfiles/UnitarySystem_MultiSpeedDX.idf +++ b/testfiles/UnitarySystem_MultiSpeedDX.idf @@ -2432,6 +2432,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -2890,6 +2891,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -3358,6 +3360,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -4013,6 +4016,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -4668,6 +4672,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/UnitarySystem_MultiSpeedDX_EconoStaging.idf b/testfiles/UnitarySystem_MultiSpeedDX_EconoStaging.idf index 4ecbd87717c..d95b5fcc4a4 100644 --- a/testfiles/UnitarySystem_MultiSpeedDX_EconoStaging.idf +++ b/testfiles/UnitarySystem_MultiSpeedDX_EconoStaging.idf @@ -2394,6 +2394,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -2853,6 +2854,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -3298,6 +3300,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -3827,6 +3830,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -4356,6 +4360,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/UnitarySystem_SingleSpeedDX.idf b/testfiles/UnitarySystem_SingleSpeedDX.idf index a7acef8fe68..67ed7b0108a 100644 --- a/testfiles/UnitarySystem_SingleSpeedDX.idf +++ b/testfiles/UnitarySystem_SingleSpeedDX.idf @@ -2432,6 +2432,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -2807,6 +2808,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -3169,6 +3171,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -3614,6 +3617,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -4059,6 +4063,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/UnitarySystem_SubcoolReheatDX.idf b/testfiles/UnitarySystem_SubcoolReheatDX.idf index de3d7c939b6..a33db82a764 100644 --- a/testfiles/UnitarySystem_SubcoolReheatDX.idf +++ b/testfiles/UnitarySystem_SubcoolReheatDX.idf @@ -2945,6 +2945,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -3691,6 +3692,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -4052,6 +4054,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -4496,6 +4499,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -4940,6 +4944,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/UnitarySystem_TwoSpeedDX.idf b/testfiles/UnitarySystem_TwoSpeedDX.idf index 43db7395bb4..514df67503a 100644 --- a/testfiles/UnitarySystem_TwoSpeedDX.idf +++ b/testfiles/UnitarySystem_TwoSpeedDX.idf @@ -2432,6 +2432,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -2886,6 +2887,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -3327,6 +3329,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -3851,6 +3854,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -4375,6 +4379,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/UnitarySystem_TwoStageDX.idf b/testfiles/UnitarySystem_TwoStageDX.idf index 404cc78884c..0d656683ac2 100644 --- a/testfiles/UnitarySystem_TwoStageDX.idf +++ b/testfiles/UnitarySystem_TwoStageDX.idf @@ -2445,6 +2445,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -2847,6 +2848,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -3236,6 +3238,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -3708,6 +3711,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -4174,6 +4178,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/UnitarySystem_TwoStageDXWithHumidityControl.idf b/testfiles/UnitarySystem_TwoStageDXWithHumidityControl.idf index cbddb4972f1..fac516382e6 100644 --- a/testfiles/UnitarySystem_TwoStageDXWithHumidityControl.idf +++ b/testfiles/UnitarySystem_TwoStageDXWithHumidityControl.idf @@ -2445,6 +2445,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -2944,6 +2945,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -3430,6 +3432,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -3999,6 +4002,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -4562,6 +4566,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/UnitarySystem_VSCoolingCoil.idf b/testfiles/UnitarySystem_VSCoolingCoil.idf index 0d50206c93b..4a7aa4a00bc 100644 --- a/testfiles/UnitarySystem_VSCoolingCoil.idf +++ b/testfiles/UnitarySystem_VSCoolingCoil.idf @@ -1554,6 +1554,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed autosize, !- Maximum Supply Air Temperature {C} 21; !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} diff --git a/testfiles/UnitarySystem_VSHeatPumpWaterToAirEquationFit.idf b/testfiles/UnitarySystem_VSHeatPumpWaterToAirEquationFit.idf index ea086d0f694..c814240b31a 100644 --- a/testfiles/UnitarySystem_VSHeatPumpWaterToAirEquationFit.idf +++ b/testfiles/UnitarySystem_VSHeatPumpWaterToAirEquationFit.idf @@ -171,6 +171,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed 50; !- Maximum Supply Air Temperature {C} Coil:Cooling:WaterToAirHeatPump:VariableSpeedEquationFit, diff --git a/testfiles/UnitarySystem_WaterCoils_wMultiSpeedFan.idf b/testfiles/UnitarySystem_WaterCoils_wMultiSpeedFan.idf index 88ef2c018bd..6e73a88adb6 100644 --- a/testfiles/UnitarySystem_WaterCoils_wMultiSpeedFan.idf +++ b/testfiles/UnitarySystem_WaterCoils_wMultiSpeedFan.idf @@ -1616,6 +1616,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 80, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/UnitarySystem_ZoneVSWSHP_wDOAS.idf b/testfiles/UnitarySystem_ZoneVSWSHP_wDOAS.idf index e011202a912..f8b30d31f37 100644 --- a/testfiles/UnitarySystem_ZoneVSWSHP_wDOAS.idf +++ b/testfiles/UnitarySystem_ZoneVSWSHP_wDOAS.idf @@ -126,6 +126,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed 60.0, !- Maximum Supply Air Temperature {C} 20.0, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} Sys 1 Outside Air Inlet Node; !- Outdoor Dry-Bulb Temperature Sensor Node Name diff --git a/testfiles/VRFMultispeedFan.idf b/testfiles/VRFMultispeedFan.idf index deda4728b8f..df6e30ac526 100644 --- a/testfiles/VRFMultispeedFan.idf +++ b/testfiles/VRFMultispeedFan.idf @@ -3353,12 +3353,8 @@ autosize, !- Nominal Supply Air Flow Rate {m3/s} 0.7, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.7, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.750000, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.700000, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} DOAS Outdoor Air Inlet, !- Supply Air Inlet Node Name DOAS Heat Recovery Supply Outlet, !- Supply Air Outlet Node Name DOAS Relief Air Outlet, !- Exhaust Air Inlet Node Name @@ -3370,7 +3366,57 @@ 1.7, !- Threshold Temperature {C} 0.083, !- Initial Defrost Time Fraction {dimensionless} 0.012, !- Rate of Defrost Time Fraction Increase {1/K} - Yes; !- Economizer Lockout + Yes, !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name + + Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + + Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + + Table:Lookup, + SenEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.7, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Output Value 1 + 0.70; !- Output Value 2 + + Table:Lookup, + LatEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.65, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.70, !- Output Value 1 + 0.65; !- Output Value 2 !- =========== ALL OBJECTS IN CLASS: CONTROLLER:OUTDOORAIR =========== diff --git a/testfiles/WaterSideEconomizer_PreCoolCoil.idf b/testfiles/WaterSideEconomizer_PreCoolCoil.idf index 22f9a59dad0..28205a1ca09 100644 --- a/testfiles/WaterSideEconomizer_PreCoolCoil.idf +++ b/testfiles/WaterSideEconomizer_PreCoolCoil.idf @@ -2740,6 +2740,7 @@ , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 80; !- Maximum Supply Air Temperature {C} Coil:Heating:Fuel, diff --git a/testfiles/ZoneSysAvailManager.idf b/testfiles/ZoneSysAvailManager.idf index 4f214769560..f00e81a0ccd 100644 --- a/testfiles/ZoneSysAvailManager.idf +++ b/testfiles/ZoneSysAvailManager.idf @@ -698,6 +698,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/testfiles/ZoneVSWSHP_wDOAS.idf b/testfiles/ZoneVSWSHP_wDOAS.idf index 761641860b2..6ed31cccf59 100644 --- a/testfiles/ZoneVSWSHP_wDOAS.idf +++ b/testfiles/ZoneVSWSHP_wDOAS.idf @@ -97,6 +97,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/testfiles/ZoneWSHP_wDOAS.idf b/testfiles/ZoneWSHP_wDOAS.idf index 8ef811776f8..ad166b75a36 100644 --- a/testfiles/ZoneWSHP_wDOAS.idf +++ b/testfiles/ZoneWSHP_wDOAS.idf @@ -693,6 +693,7 @@ Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} , !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 0.0, !- Cooling Outdoor Air Flow Rate {m3/s} 0.0, !- Heating Outdoor Air Flow Rate {m3/s} , !- No Load Outdoor Air Flow Rate {m3/s} diff --git a/testfiles/_CrashLights_9680.idf b/testfiles/_CrashLights_9680.idf index 76ca8d59a25..3f33b31727d 100644 --- a/testfiles/_CrashLights_9680.idf +++ b/testfiles/_CrashLights_9680.idf @@ -230,6 +230,7 @@ ZoneHVAC:PackagedTerminalAirConditioner, Autosize, !- Cooling Supply Air Flow Rate {m3/s} Autosize, !- Heating Supply Air Flow Rate {m3/s} Autosize, !- No Load Supply Air Flow Rate {m3/s} + , !- No Load Supply Air Flow Rate Control Set To Low Speed Autosize, !- Cooling Outdoor Air Flow Rate {m3/s} Autosize, !- Heating Outdoor Air Flow Rate {m3/s} Autosize, !- No Load Outdoor Air Flow Rate {m3/s} @@ -313,12 +314,8 @@ HeatExchanger:AirToAir:SensibleAndLatent, Autosize, !- Nominal Supply Air Flow Rate {m3/s} 0.76, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.76, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.68, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.81, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.73, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} Zone HVAC Packaged Terminal Air Conditioner 1 Mixed Air Node, !- Supply Air Inlet Node Name Coil System Cooling DX Heat Exchanger Assisted 1 HX Supply Air Outlet - Cooling Inlet Node, !- Supply Air Outlet Node Name Coil System Cooling DX Heat Exchanger Assisted 1 HX Exhaust Air Inlet - Cooling Outlet Node, !- Exhaust Air Inlet Node Name @@ -330,7 +327,57 @@ HeatExchanger:AirToAir:SensibleAndLatent, 1.7, !- Threshold Temperature {C} , !- Initial Defrost Time Fraction {dimensionless} , !- Rate of Defrost Time Fraction Increase {1/K} - Yes; !- Economizer Lockout + Yes, !- Economizer Lockout + SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name + LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name + SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name + LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name + +Table:IndependentVariable, + airFlowRatio, !- Name + Linear, !- Interpolation Method + Linear, !- Extrapolation Method + 0.0, !- Minimum Value + 10.0, !- Maximum Value + , !- Normalization Reference Value + Dimensionless, !- Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.75, !- Value 1 + 1.0; !- Value 2 + +Table:IndependentVariableList, + effectiveness_IndependentVariableList, !- Name + airFlowRatio; !- Independent Variable 1 Name + +Table:Lookup, + SenEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.76, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.81, !- Output Value 1 + 0.76; !- Output Value 2 + +Table:Lookup, + LatEffectivenessTable, !- Name + effectiveness_IndependentVariableList, !- Independent Variable List Name + DivisorOnly, !- Normalization Method + 0.68, !- Normalization Divisor + 0.0, !- Minimum Output + 10.0, !- Maximum Output + Dimensionless, !- Output Unit Type + , !- External File Name + , !- External File Column Number + , !- External File Starting Row Number + 0.73, !- Output Value 1 + 0.68; !- Output Value 2 Curve:Biquadratic, Curve Biquadratic 1, !- Name diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index 8467006cdf1..aa4fabb04dc 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -10,9 +10,14 @@ target_compile_definitions( ) target_include_directories( nlohmann_json - INTERFACE + SYSTEM INTERFACE $ ) +set_source_files_properties( + $/json.hpp + TARGET_DIRECTORY nlohmann_json + PROPERTIES COMPILE_FLAGS -Wno-deprecated-declarations +) # To avoid modifying every third_party library # we link the project_options in here for every library in this @@ -67,12 +72,15 @@ elseif(MSVC) # VisualStudio endif() target_compile_features(ssc PRIVATE cxx_std_11) -# C++17 flag is intentionally after ssd +# C++17 flag is intentionally after ssc set(CMAKE_CXX_STANDARD 17) #Note: the Tarcog files are improperly initializing their virtual base classes, and this 4589 warning # on MSVC is legitimate, but silencing the warning because it's a third-party library +# Shush every warning for any lib added after it? +# link_libraries(turn_off_warnings) + if(NOT MSVC) add_compile_options(-Wno-pedantic -Wno-unused-parameter -Wno-unknown-pragmas) else() @@ -93,7 +101,7 @@ set(RE2_BUILD_TESTING # CACHE BOOL "" FORCE) #endif() -# We don't want to enable the global warnings for any of the third party projects +# We don't want to enable the global project_warnings for any of the third party projects link_libraries(project_options) add_subdirectory(SQLite) set_target_properties(sqlite PROPERTIES FOLDER ThirdParty/SQLite) @@ -123,21 +131,33 @@ endif() add_subdirectory(ObjexxFCL) set_target_properties(objexx PROPERTIES FOLDER ThirdParty/ObjexxFCL) + add_subdirectory(BCVTB) set_target_properties(bcvtb PROPERTIES FOLDER ThirdParty/BCVTB) + add_subdirectory(Expat) set_target_properties(epexpat PROPERTIES FOLDER ThirdParty/Expat) + add_subdirectory(FMI) set_target_properties(epfmiimport PROPERTIES FOLDER ThirdParty/FMI) +target_link_libraries(epfmiimport turn_off_warnings) + add_subdirectory(zlib) set_target_properties(miniziplib PROPERTIES FOLDER ThirdParty/zlib) +target_link_libraries(miniziplib PRIVATE turn_off_warnings) + add_subdirectory(DElight) set_target_properties(DElight PROPERTIES FOLDER ThirdParty/DElight) +target_link_libraries(DElight PRIVATE turn_off_warnings) + add_subdirectory(re2) set_target_properties(re2 PROPERTIES FOLDER ThirdParty/re2) + add_subdirectory(fmt-8.0.1) target_compile_definitions(fmt PRIVATE FMT_USE_FULL_CACHE_DRAGONBOX=1) set_target_properties(fmt PROPERTIES FOLDER ThirdParty/fmt) +mark_as_advanced(FORCE FMT_SYSTEM_HEADERS) + add_subdirectory(cpgfunctionEP) set_target_properties(cpgfunctionEP PROPERTIES FOLDER ThirdParty/cpgfunctionEP) @@ -152,7 +172,7 @@ set(KIVA_3D OFF CACHE BOOL "" FORCE) set(KIVA_GROUND_PLOT ${BUILD_GROUND_PLOT} CACHE BOOL "" FORCE) set(KIVA_COVERAGE OFF CACHE BOOL "" FORCE) -add_subdirectory("kiva") +add_subdirectory(kiva) set_target_properties(libkiva PROPERTIES FOLDER ThirdParty/Kiva) if(NOT APPLE) @@ -173,6 +193,9 @@ set(BUILD_BTWXT_TESTING CACHE BOOL "" FORCE) add_subdirectory(btwxt) set_target_properties(btwxt PROPERTIES FOLDER ThirdParty/Btwxt) +mark_as_advanced(FORCE btwxt_STATIC_LIB) +mark_as_advanced(FORCE btwxt_COVERAGE) +mark_as_advanced(FORCE btwxt_BUILD_TESTING) if(OPENGL_FOUND) set(BUILD_PENUMBRA_TESTING @@ -183,6 +206,8 @@ if(OPENGL_FOUND) set_target_properties(glad PROPERTIES FOLDER ThirdParty/Penumbra) set_target_properties(penumbra PROPERTIES FOLDER ThirdParty/Penumbra) set_target_properties(tess2 PROPERTIES FOLDER ThirdParty/Penumbra) + mark_as_advanced(FORCE penumbra_STATIC_LIB) + mark_as_advanced(FORCE penumbra_COVERAGE) endif() # libtk205 @@ -193,3 +218,7 @@ set(libtk205_USE_SUBMODULES OFF CACHE BOOL "" FORCE) add_subdirectory(libtk205) +mark_as_advanced(FORCE libtk205_STATIC_LIB) +mark_as_advanced(FORCE libtk205_COVERAGE) +mark_as_advanced(FORCE libtk205_BUILD_TESTING) + diff --git a/third_party/DElight/CMakeLists.txt b/third_party/DElight/CMakeLists.txt index 97eb3b95959..0ff4b238745 100644 --- a/third_party/DElight/CMakeLists.txt +++ b/third_party/DElight/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED( VERSION 2.8.12 ) +CMAKE_MINIMUM_REQUIRED( VERSION 2.8.12...3.5 ) # bumped max support to 3.5 to hush a cmake deprecation warning PROJECT(DElight) diff --git a/third_party/Windows-CalcEngine/CMakeLists.txt b/third_party/Windows-CalcEngine/CMakeLists.txt index 1e600c72a3a..401d5e1cc2a 100644 --- a/third_party/Windows-CalcEngine/CMakeLists.txt +++ b/third_party/Windows-CalcEngine/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required( VERSION 2.8.12 ) +cmake_minimum_required( VERSION 2.8.12...3.5) # bumped max support to 3.5 to hush a cmake deprecation warning set( target_name Windows-CalcEngine ) diff --git a/third_party/eigen/Eigen/src/SparseCore/TriangularSolver.h b/third_party/eigen/Eigen/src/SparseCore/TriangularSolver.h index f9c56ba7980..baf2671767a 100644 --- a/third_party/eigen/Eigen/src/SparseCore/TriangularSolver.h +++ b/third_party/eigen/Eigen/src/SparseCore/TriangularSolver.h @@ -10,7 +10,7 @@ #ifndef EIGEN_SPARSETRIANGULARSOLVER_H #define EIGEN_SPARSETRIANGULARSOLVER_H -namespace Eigen { +namespace Eigen { namespace internal { @@ -270,7 +270,7 @@ struct sparse_solve_triangular_sparse_selector } - Index count = 0; + [[maybe_unused]] Index count = 0; // FIXME compute a reference value to filter zeros for (typename AmbiVector::Iterator it(tempVector/*,1e-12*/); it; ++it) { diff --git a/third_party/gtest/CMakeLists.txt b/third_party/gtest/CMakeLists.txt index ea81ab1292d..2aed8ea188b 100644 --- a/third_party/gtest/CMakeLists.txt +++ b/third_party/gtest/CMakeLists.txt @@ -1,7 +1,7 @@ # Note: CMake support is community-based. The maintainers do not use CMake # internally. -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 2.8.12...3.5) # bumped max support to 3.5 to hush a cmake deprecation warning if (POLICY CMP0048) cmake_policy(SET CMP0048 NEW) diff --git a/third_party/gtest/googlemock/CMakeLists.txt b/third_party/gtest/googlemock/CMakeLists.txt index e7df8ec53d0..c577b3d78fe 100644 --- a/third_party/gtest/googlemock/CMakeLists.txt +++ b/third_party/gtest/googlemock/CMakeLists.txt @@ -42,7 +42,7 @@ else() cmake_policy(SET CMP0048 NEW) project(gmock VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C) endif() -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 2.8.12...3.5) # bumped max support to 3.5 to hush a cmake deprecation warning if (COMMAND set_up_hermetic_build) set_up_hermetic_build() diff --git a/third_party/gtest/googletest/CMakeLists.txt b/third_party/gtest/googletest/CMakeLists.txt index abdd98b79a4..6d64d8b6c87 100644 --- a/third_party/gtest/googletest/CMakeLists.txt +++ b/third_party/gtest/googletest/CMakeLists.txt @@ -53,7 +53,7 @@ else() cmake_policy(SET CMP0048 NEW) project(gtest VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C) endif() -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 2.8.12...3.5) # bumped max support to 3.5 to hush a cmake deprecation warning if (POLICY CMP0063) # Visibility cmake_policy(SET CMP0063 NEW) diff --git a/third_party/kiva/vendor/boost-1.77.0/boost/geometry/policies/relate/intersection_points.hpp b/third_party/kiva/vendor/boost-1.77.0/boost/geometry/policies/relate/intersection_points.hpp index 1ba08452fdd..4209c44d2bc 100644 --- a/third_party/kiva/vendor/boost-1.77.0/boost/geometry/policies/relate/intersection_points.hpp +++ b/third_party/kiva/vendor/boost-1.77.0/boost/geometry/policies/relate/intersection_points.hpp @@ -68,7 +68,9 @@ struct segments_intersection_points Ratio const& rb_from_wrt_a, Ratio const& rb_to_wrt_a) { return_type result; - unsigned int index = 0, count_a = 0, count_b = 0; + unsigned int index = 0; + [[maybe_unused]] unsigned int count_a = 0; + [[maybe_unused]] unsigned int count_b = 0; Ratio on_a[2]; // The conditions "index < 2" are necessary for non-robust handling, diff --git a/third_party/kiva/vendor/boost-1.77.0/boost/move/detail/type_traits.hpp b/third_party/kiva/vendor/boost-1.77.0/boost/move/detail/type_traits.hpp index e44db125839..03bf59c219d 100644 --- a/third_party/kiva/vendor/boost-1.77.0/boost/move/detail/type_traits.hpp +++ b/third_party/kiva/vendor/boost-1.77.0/boost/move/detail/type_traits.hpp @@ -190,33 +190,37 @@ # endif // BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR -# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && BOOST_MOVE_HAS_TRAIT(is_constructible) && BOOST_MOVE_HAS_TRAIT(is_trivially_constructible) +# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + +# if BOOST_MOVE_HAS_TRAIT(is_constructible) && BOOST_MOVE_HAS_TRAIT(is_trivially_constructible) # define BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) (__is_constructible(T, T&&) && __is_trivially_constructible(T, T&&)) # elif BOOST_MOVE_HAS_TRAIT(has_trivial_move_constructor) # define BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) __has_trivial_move_constructor(T) # endif // BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN -# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && BOOST_MOVE_HAS_TRAIT(is_assignable) && BOOST_MOVE_HAS_TRAIT(is_trivially_assignable) +# if BOOST_MOVE_HAS_TRAIT(is_assignable) && BOOST_MOVE_HAS_TRAIT(is_trivially_assignable) # define BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) (__is_assignable(T, T&&) && __is_trivially_assignable(T, T&&)) # elif BOOST_MOVE_HAS_TRAIT(has_trivial_move_assign) # define BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) __has_trivial_move_assign(T) # endif // BOOST_MOVE_HAS_NOTHROW_MOVE_CONSTRUCTOR -# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && BOOST_MOVE_HAS_TRAIT(is_constructible) && BOOST_MOVE_HAS_TRAIT(is_nothrow_constructible) +# if BOOST_MOVE_HAS_TRAIT(is_constructible) && BOOST_MOVE_HAS_TRAIT(is_nothrow_constructible) # define BOOST_MOVE_HAS_NOTHROW_MOVE_CONSTRUCTOR(T) (__is_constructible(T, T&&) && __is_nothrow_constructible(T, T&&)) # elif BOOST_MOVE_HAS_TRAIT(has_nothrow_move_constructor) # define BOOST_MOVE_HAS_NOTHROW_MOVE_CONSTRUCTOR(T) __has_nothrow_move_constructor(T) # endif // BOOST_MOVE_HAS_NOTHROW_MOVE_ASSIGN -# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && BOOST_MOVE_HAS_TRAIT(is_assignable) && BOOST_MOVE_HAS_TRAIT(is_nothrow_assignable) +# if BOOST_MOVE_HAS_TRAIT(is_assignable) && BOOST_MOVE_HAS_TRAIT(is_nothrow_assignable) # define BOOST_MOVE_HAS_NOTHROW_MOVE_ASSIGN(T) (__is_assignable(T, T&&) && __is_nothrow_assignable(T, T&&)) # elif BOOST_MOVE_HAS_TRAIT(has_nothrow_move_assign) # define BOOST_MOVE_HAS_NOTHROW_MOVE_ASSIGN(T) __has_nothrow_move_assign(T) # endif +# endif //BOOST_NO_CXX11_RVALUE_REFERENCES + // BOOST_MOVE_ALIGNMENT_OF # define BOOST_MOVE_ALIGNMENT_OF(T) __alignof(T) diff --git a/third_party/kiva/vendor/boost-1.77.0/boost/type_traits/intrinsics.hpp b/third_party/kiva/vendor/boost-1.77.0/boost/type_traits/intrinsics.hpp index 02f2a0315b9..4b34ad65583 100644 --- a/third_party/kiva/vendor/boost-1.77.0/boost/type_traits/intrinsics.hpp +++ b/third_party/kiva/vendor/boost-1.77.0/boost/type_traits/intrinsics.hpp @@ -78,7 +78,7 @@ #if defined(__MSL_CPP__) && (__MSL_CPP__ >= 0x8000) // Metrowerks compiler is acquiring intrinsic type traits support // post version 8. We hook into the published interface to pick up - // user defined specializations as well as compiler intrinsics as + // user defined specializations as well as compiler intrinsics as // and when they become available: # include # define BOOST_IS_UNION(T) BOOST_STD_EXTENSION_NAMESPACE::is_union::value @@ -160,11 +160,11 @@ # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif -#if defined(BOOST_CLANG) && defined(__has_feature) && !defined(__CUDACC__) +#if defined(BOOST_CLANG) && defined(__has_feature) && defined(__has_builtin) && (!(defined(__CUDACC__) && (__CUDACC_VER_MAJOR__ < 11)) || defined(__CUDA__)) // // Note that these intrinsics are disabled for the CUDA meta-compiler as it appears // to not support them, even though the underlying clang compiler does so. -// This is a rubbish fix as it basically stops type traits from working correctly, +// This is a rubbish fix as it basically stops type traits from working correctly, // but maybe the best we can do for now. See https://svn.boost.org/trac/boost/ticket/10694 // // @@ -183,25 +183,39 @@ # if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_empty) # define BOOST_IS_EMPTY(T) __is_empty(T) # endif -# if __has_feature(has_trivial_constructor) +# if __has_builtin(__is_trivially_constructible) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __is_trivially_constructible(T) +# elif __has_feature(has_trivial_constructor) # define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) # endif -# if __has_feature(has_trivial_copy) +# if __has_builtin(__is_trivially_copyable) +# define BOOST_HAS_TRIVIAL_COPY(T) (__is_trivially_copyable(T) && !is_reference::value) +# elif __has_feature(has_trivial_copy) # define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference::value) # endif -# if __has_feature(has_trivial_assign) +# if __has_builtin(__is_trivially_assignable) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__is_trivially_assignable(T&, const T&) && !is_volatile::value && is_assignable::value) +# elif __has_feature(has_trivial_assign) # define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile::value && is_assignable::value) # endif -# if __has_feature(has_trivial_destructor) +# if __has_builtin(__is_trivially_destructible) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__is_trivially_destructible(T) && is_destructible::value) +# elif __has_feature(has_trivial_destructor) # define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) && is_destructible::value) # endif -# if __has_feature(has_nothrow_constructor) +# if __has_builtin(__is_nothrow_constructible) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__is_nothrow_constructible(T) && is_default_constructible::value) +# elif __has_feature(has_nothrow_constructor) # define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) && is_default_constructible::value) # endif -# if __has_feature(has_nothrow_copy) +# if __has_builtin(__is_nothrow_constructible) +# define BOOST_HAS_NOTHROW_COPY(T) (__is_nothrow_constructible(T, const T&) && !is_volatile::value && !is_reference::value && is_copy_constructible::value) +# elif __has_feature(has_nothrow_copy) # define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile::value && !is_reference::value && is_copy_constructible::value) # endif -# if __has_feature(has_nothrow_assign) +# if __has_builtin(__is_nothrow_assignable) +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__is_nothrow_assignable(T&, const T&) && !is_volatile::value && is_assignable::value) +# elif __has_feature(has_nothrow_assign) # define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value && is_assignable::value) # endif # if __has_feature(has_virtual_destructor) @@ -388,4 +402,3 @@ #endif // BOOST_TT_DISABLE_INTRINSICS #endif // BOOST_TT_INTRINSICS_HPP_INCLUDED - diff --git a/third_party/ssc/CMakeLists.txt b/third_party/ssc/CMakeLists.txt index f0977159eb1..d00eb0dc943 100644 --- a/third_party/ssc/CMakeLists.txt +++ b/third_party/ssc/CMakeLists.txt @@ -91,7 +91,7 @@ function(set_default_compile_options target) else(MSVC) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") if (APPLE) - set(MAIN_CFLAGS "${MAIN_CFLAGS} -arch x86_64 -fno-common -DWX_PRECOMP -D__MACOSX__") + set(MAIN_CFLAGS "${MAIN_CFLAGS} -fno-common -DWX_PRECOMP -D__MACOSX__") else() set(MAIN_CFLAGS "${MAIN_CFLAGS} -D__UNIX__") endif() diff --git a/third_party/ssc/linux_errors b/third_party/ssc/linux_errors deleted file mode 100644 index 0b9fc8b3ec8..00000000000 --- a/third_party/ssc/linux_errors +++ /dev/null @@ -1,11 +0,0 @@ -g++ -g -o Test ../test/input_cases/tcs_trough_physical_input.o ../test/input_cases/weather_inputs.o ../test/shared_test/lib_battery_test.o ../test/shared_test/lib_battery_powerflow_test.o ../test/shared_test/lib_irradproc_test.o ../test/shared_test/lib_util_test.o ../test/shared_test/lib_weatherfile_test.o ../test/shared_test/lib_windfile_test.o ../test/shared_test/lib_windwakemodel_test.o ../test/shared_test/lib_windwatts_test.o ../test/ssc_test/computeModuleTest.o ../test/ssc_test/cmod_windpower_test.o ../test/ssc_test/cmod_pvsamv1_test.o ../test/ssc_test/cmod_pvwattsv5_test.o ../test/ssc_test/cmod_tcstrough_physical_test.o ../test/tcs_test/csp_solver_core_test.o main.o -std=c++0x `wx-config-3 --libs` `wx-config-3 --libs aui` `wx-config-3 --libs stc` `wx-config-3 --libs` -lm ../../googletest/googletest/make/gtest_main.a ./ssc.so -Wl,--no-as-needed -ldl -../test/ssc_test/computeModuleTest.o: In function `testing::internal::MutexBase::Lock()': -/home/sjanzou/Public/Projects/GitHub/NREL/ssc/build_linux/../../googletest/googletest/include/gtest/internal/gtest-port.h:1860: undefined reference to `testing::internal::g_linked_ptr_mutex' -/home/sjanzou/Public/Projects/GitHub/NREL/ssc/build_linux/../../googletest/googletest/include/gtest/internal/gtest-port.h:1861: undefined reference to `testing::internal::g_linked_ptr_mutex' -/home/sjanzou/Public/Projects/GitHub/NREL/ssc/build_linux/../../googletest/googletest/include/gtest/internal/gtest-port.h:1862: undefined reference to `testing::internal::g_linked_ptr_mutex' -../test/ssc_test/computeModuleTest.o: In function `testing::internal::MutexBase::Unlock()': -/home/sjanzou/Public/Projects/GitHub/NREL/ssc/build_linux/../../googletest/googletest/include/gtest/internal/gtest-port.h:1872: undefined reference to `testing::internal::g_linked_ptr_mutex' -/home/sjanzou/Public/Projects/GitHub/NREL/ssc/build_linux/../../googletest/googletest/include/gtest/internal/gtest-port.h:1871: undefined reference to `testing::internal::g_linked_ptr_mutex' -../test/ssc_test/computeModuleTest.o:/home/sjanzou/Public/Projects/GitHub/NREL/ssc/build_linux/../../googletest/googletest/include/gtest/internal/gtest-port.h:1860: more undefined references to `testing::internal::g_linked_ptr_mutex' follow -collect2: error: ld returned 1 exit status -make: *** [Test] Error 1 diff --git a/third_party/ssc/shared/lib_battery_lifetime.h b/third_party/ssc/shared/lib_battery_lifetime.h index 7c0c5cf1799..fc6298a93e0 100644 --- a/third_party/ssc/shared/lib_battery_lifetime.h +++ b/third_party/ssc/shared/lib_battery_lifetime.h @@ -68,7 +68,7 @@ struct lifetime_state { lifetime_state(const std::shared_ptr& cyc, const std::shared_ptr& cal); - lifetime_state(const std::shared_ptr& nmc); + explicit lifetime_state(const std::shared_ptr& nmc); lifetime_state &operator=(const lifetime_state &rhs); @@ -81,7 +81,7 @@ class lifetime_t { lifetime_t(const lifetime_t &rhs); - virtual lifetime_t &operator=(const lifetime_t &rhs); + lifetime_t &operator=(const lifetime_t &rhs); virtual lifetime_t *clone() = 0; diff --git a/third_party/ssc/ssc/CMakeLists.txt b/third_party/ssc/ssc/CMakeLists.txt index 0b9d5ba1380..7edbfe2b998 100644 --- a/third_party/ssc/ssc/CMakeLists.txt +++ b/third_party/ssc/ssc/CMakeLists.txt @@ -232,7 +232,12 @@ foreach( name ${DEPENDENCIES} ) endforeach() if (UNIX) - target_link_libraries(ssc -lpthread -lm -ldl -lstdc++) + find_package(Threads REQUIRED) + target_link_libraries(ssc Threads::Threads ${CMAKE_DL_LIBS}) + find_library(MATH_LIBRARY m) + if(MATH_LIBRARY) + target_link_libraries(ssc ${MATH_LIBRARY}) + endif() endif() diff --git a/tst/EnergyPlus/api/TestAutosizing.c b/tst/EnergyPlus/api/TestAutosizing.c index 9707b840bba..95394ae476f 100644 --- a/tst/EnergyPlus/api/TestAutosizing.c +++ b/tst/EnergyPlus/api/TestAutosizing.c @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/api/TestAutosizing.py b/tst/EnergyPlus/api/TestAutosizing.py index 19dc47b63a9..6b744af4288 100644 --- a/tst/EnergyPlus/api/TestAutosizing.py +++ b/tst/EnergyPlus/api/TestAutosizing.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/tst/EnergyPlus/api/TestDataTransfer.c b/tst/EnergyPlus/api/TestDataTransfer.c index 674615c1a61..6e6cd9decc5 100644 --- a/tst/EnergyPlus/api/TestDataTransfer.c +++ b/tst/EnergyPlus/api/TestDataTransfer.c @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -70,7 +70,7 @@ void afterZoneTimeStepHandler(EnergyPlusState state) unsigned int arraySize; struct APIDataEntry *data = getAPIData(state, &arraySize); // inspect this to see what's available to exchange - const char **surfaceNames = getObjectNames(state, "BuildingSurface:Detailed", &arraySize); + char **surfaceNames = getObjectNames(state, "BuildingSurface:Detailed", &arraySize); if (arraySize == 0) { printf("Encountered a file with no BuildingSurface:Detailed, can't run this script on that file! Aborting!"); diff --git a/tst/EnergyPlus/api/TestDataTransfer.py b/tst/EnergyPlus/api/TestDataTransfer.py index 4e011195e93..a73a91b1107 100644 --- a/tst/EnergyPlus/api/TestDataTransfer.py +++ b/tst/EnergyPlus/api/TestDataTransfer.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/tst/EnergyPlus/api/TestFunctional.c b/tst/EnergyPlus/api/TestFunctional.c index 7ff9731cc71..4e9dbe8c814 100644 --- a/tst/EnergyPlus/api/TestFunctional.c +++ b/tst/EnergyPlus/api/TestFunctional.c @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/api/TestFunctional.py b/tst/EnergyPlus/api/TestFunctional.py index 086ec32630f..a1124010ce2 100644 --- a/tst/EnergyPlus/api/TestFunctional.py +++ b/tst/EnergyPlus/api/TestFunctional.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/tst/EnergyPlus/api/TestRuntime.c b/tst/EnergyPlus/api/TestRuntime.c index 0276b83d85e..bfe672dfdeb 100644 --- a/tst/EnergyPlus/api/TestRuntime.c +++ b/tst/EnergyPlus/api/TestRuntime.c @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -125,6 +125,10 @@ void UnitarySystemSizingHandler(EnergyPlusState state) { printf("CALLBACK: %s\n", __PRETTY_FUNCTION__); } +void UserDefinedCallback(EnergyPlusState state) +{ + printf("CALLBACK: %s\n", __PRETTY_FUNCTION__); +} void stdOutHandler(const char *message) { printf("STANDARD OUTPUT CALLBACK: %s\n", message); @@ -181,6 +185,7 @@ int main(int argc, const char *argv[]) callbackEndOfSystemSizing(state, EndOfSystemSizingHandler); callbackEndOfAfterComponentGetInput(state, EndOfAfterComponentGetInputHandler); callbackUnitarySystemSizing(state, UnitarySystemSizingHandler); + callbackUserDefinedComponentModel(state, UserDefinedCallback, "Hello"); registerProgressCallback(state, progressHandler); // registerErrorCallback(errorHandler); energyplus(state, argc, argv); diff --git a/tst/EnergyPlus/api/TestRuntime.py b/tst/EnergyPlus/api/TestRuntime.py index a00162131c0..a3275056deb 100644 --- a/tst/EnergyPlus/api/TestRuntime.py +++ b/tst/EnergyPlus/api/TestRuntime.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/tst/EnergyPlus/api/TestRuntimeDeleteState.c b/tst/EnergyPlus/api/TestRuntimeDeleteState.c index 283c44061e7..4dbf9b7e6ab 100644 --- a/tst/EnergyPlus/api/TestRuntimeDeleteState.c +++ b/tst/EnergyPlus/api/TestRuntimeDeleteState.c @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/api/TestRuntimeDeleteState.py b/tst/EnergyPlus/api/TestRuntimeDeleteState.py index 925f8cdc513..d3923d2bcc0 100644 --- a/tst/EnergyPlus/api/TestRuntimeDeleteState.py +++ b/tst/EnergyPlus/api/TestRuntimeDeleteState.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/tst/EnergyPlus/api/TestRuntimeResetState.c b/tst/EnergyPlus/api/TestRuntimeResetState.c index f52e1440c07..300084f6393 100644 --- a/tst/EnergyPlus/api/TestRuntimeResetState.c +++ b/tst/EnergyPlus/api/TestRuntimeResetState.c @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/api/TestRuntimeResetState.py b/tst/EnergyPlus/api/TestRuntimeResetState.py index 25021e1a90b..dc3290c9f2f 100644 --- a/tst/EnergyPlus/api/TestRuntimeResetState.py +++ b/tst/EnergyPlus/api/TestRuntimeResetState.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/tst/EnergyPlus/api/test_DataTransferTypes.py b/tst/EnergyPlus/api/test_DataTransferTypes.py index 746716154e5..9f79e324d0d 100644 --- a/tst/EnergyPlus/api/test_DataTransferTypes.py +++ b/tst/EnergyPlus/api/test_DataTransferTypes.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/tst/EnergyPlus/api/test_OutputFiles.py b/tst/EnergyPlus/api/test_OutputFiles.py index df945d03554..a35e504487f 100644 --- a/tst/EnergyPlus/api/test_OutputFiles.py +++ b/tst/EnergyPlus/api/test_OutputFiles.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/tst/EnergyPlus/api/test_SysExit.py b/tst/EnergyPlus/api/test_SysExit.py index 3fc348ec879..5ec47b4a62e 100644 --- a/tst/EnergyPlus/api/test_SysExit.py +++ b/tst/EnergyPlus/api/test_SysExit.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/tst/EnergyPlus/unit/AdvancedAFN.unit.cc b/tst/EnergyPlus/unit/AdvancedAFN.unit.cc index 4c9f3751307..13e31474587 100644 --- a/tst/EnergyPlus/unit/AdvancedAFN.unit.cc +++ b/tst/EnergyPlus/unit/AdvancedAFN.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/AirLoopHVACDOAS.unit.cc b/tst/EnergyPlus/unit/AirLoopHVACDOAS.unit.cc index 3576115adc2..06e399e06ed 100644 --- a/tst/EnergyPlus/unit/AirLoopHVACDOAS.unit.cc +++ b/tst/EnergyPlus/unit/AirLoopHVACDOAS.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -3960,12 +3960,8 @@ TEST_F(EnergyPlusFixture, AirLoopHVACDOASTest) " 1.5, !- Nominal Supply Air Flow Rate {m3/s}", " 0.7, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless}", " 0.65, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless}", - " 0.750000, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless}", - " 0.700000, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless}", " 0.7, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless}", " 0.65, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless}", - " 0.750000, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless}", - " 0.700000, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless}", " Outside Air Inlet Node 1, !- Supply Air Inlet Node Name", " DOAS Heat Recovery Supply Outlet, !- Supply Air Outlet Node Name", " AirLoopDOASMixerOutlet, !- Exhaust Air Inlet Node Name", @@ -3977,7 +3973,57 @@ TEST_F(EnergyPlusFixture, AirLoopHVACDOASTest) " 1.7, !- Threshold Temperature {C}", " 0.083, !- Initial Defrost Time Fraction {dimensionless}", " 0.012, !- Rate of Defrost Time Fraction Increase {1/K}", - " Yes; !- Economizer Lockout", + " Yes, !- Economizer Lockout", + " SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name", + " LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name", + " SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name", + " LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name", + + " Table:IndependentVariable,", + " airFlowRatio, !- Name", + " Linear, !- Interpolation Method", + " Linear, !- Extrapolation Method", + " 0.0, !- Minimum Value", + " 1.0, !- Maximum Value", + " , !- Normalization Reference Value", + " Dimensionless, !- Unit Type", + " , !- External File Name", + " , !- External File Column Number", + " , !- External File Starting Row Number", + " 0.75, !- Value 1", + " 1.0; !- Value 2", + + " Table:IndependentVariableList,", + " effectiveness_IndependentVariableList, !- Name", + " airFlowRatio; !- Independent Variable 1 Name", + + " Table:Lookup,", + " SenEffectivenessTable, !- Name", + " effectiveness_IndependentVariableList, !- Independent Variable List Name", + " DivisorOnly, !- Normalization Method", + " 0.7, !- Normalization Divisor", + " 0.0, !- Minimum Output", + " 1.0, !- Maximum Output", + " Dimensionless, !- Output Unit Type", + " , !- External File Name", + " , !- External File Column Number", + " , !- External File Starting Row Number", + " 0.75, !- Output Value 1", + " 0.70; !- Output Value 2", + + " Table:Lookup,", + " LatEffectivenessTable, !- Name", + " effectiveness_IndependentVariableList, !- Independent Variable List Name", + " DivisorOnly, !- Normalization Method", + " 0.65, !- Normalization Divisor", + " 0.0, !- Minimum Output", + " 1.0, !- Maximum Output", + " Dimensionless, !- Output Unit Type", + " , !- External File Name", + " , !- External File Column Number", + " , !- External File Starting Row Number", + " 0.70, !- Output Value 1", + " 0.65; !- Output Value 2", " OutdoorAir:NodeList,", " OutsideAirInletNodes; !- Node or NodeList Name 1", @@ -8313,12 +8359,8 @@ TEST_F(EnergyPlusFixture, AirLoopHVACDOAS_ReportVariableResetTest) " 1.5, !- Nominal Supply Air Flow Rate {m3/s}", " 0.7, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless}", " 0.65, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless}", - " 0.750000, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless}", - " 0.700000, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless}", " 0.7, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless}", " 0.65, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless}", - " 0.750000, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless}", - " 0.700000, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless}", " Outside Air Inlet Node 1, !- Supply Air Inlet Node Name", " DOAS Heat Recovery Supply Outlet, !- Supply Air Outlet Node Name", " AirLoopDOASMixerOutlet, !- Exhaust Air Inlet Node Name", @@ -8330,7 +8372,57 @@ TEST_F(EnergyPlusFixture, AirLoopHVACDOAS_ReportVariableResetTest) " 1.7, !- Threshold Temperature {C}", " 0.083, !- Initial Defrost Time Fraction {dimensionless}", " 0.012, !- Rate of Defrost Time Fraction Increase {1/K}", - " Yes; !- Economizer Lockout", + " Yes, !- Economizer Lockout", + " SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name", + " LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name", + " SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name", + " LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name", + + " Table:IndependentVariable,", + " airFlowRatio, !- Name", + " Linear, !- Interpolation Method", + " Linear, !- Extrapolation Method", + " 0.0, !- Minimum Value", + " 1.0, !- Maximum Value", + " , !- Normalization Reference Value", + " Dimensionless, !- Unit Type", + " , !- External File Name", + " , !- External File Column Number", + " , !- External File Starting Row Number", + " 0.75, !- Value 1", + " 1.0; !- Value 2", + + " Table:IndependentVariableList,", + " effectiveness_IndependentVariableList, !- Name", + " airFlowRatio; !- Independent Variable 1 Name", + + " Table:Lookup,", + " SenEffectivenessTable, !- Name", + " effectiveness_IndependentVariableList, !- Independent Variable List Name", + " DivisorOnly, !- Normalization Method", + " 0.7, !- Normalization Divisor", + " 0.0, !- Minimum Output", + " 1.0, !- Maximum Output", + " Dimensionless, !- Output Unit Type", + " , !- External File Name", + " , !- External File Column Number", + " , !- External File Starting Row Number", + " 0.75, !- Output Value 1", + " 0.70; !- Output Value 2", + + " Table:Lookup,", + " LatEffectivenessTable, !- Name", + " effectiveness_IndependentVariableList, !- Independent Variable List Name", + " DivisorOnly, !- Normalization Method", + " 0.65, !- Normalization Divisor", + " 0.0, !- Minimum Output", + " 1.0, !- Maximum Output", + " Dimensionless, !- Output Unit Type", + " , !- External File Name", + " , !- External File Column Number", + " , !- External File Starting Row Number", + " 0.70, !- Output Value 1", + " 0.65; !- Output Value 2", " OutdoorAir:NodeList,", " OutsideAirInletNodes; !- Node or NodeList Name 1", @@ -11579,6 +11671,11 @@ TEST_F(EnergyPlusFixture, AirLoopHVACDOAS_TestFanDrawThroughPlacement) EXPECT_NEAR(AirLoopDOAS_SplitterInletNode.MassFlowRate, 0.1, 0.0001); EXPECT_NEAR(DOAS_FanInletNode.MassFlowRate, 0.1, 0.0001); EXPECT_NEAR(DOAS_HeatingCOilOutletNode.MassFlowRate, 0.1, 0.0001); + + // Issue 10204 Get AirLoopHVAC:Splitter inlet node number using NodeInputManager::GetOnlySingleNode + EXPECT_EQ(thisAirLoopDOASObjec.m_CompPointerAirLoopSplitter->InletNodeNum, 17); + EXPECT_EQ(thisAirLoopDOASObjec.m_CompPointerAirLoopSplitter->OutletNodeNum[0], 2); + EXPECT_EQ(thisAirLoopDOASObjec.m_CompPointerAirLoopMixer->InletNodeNum[0], 18); } } // namespace EnergyPlus diff --git a/tst/EnergyPlus/unit/AirTerminalSingleDuct.unit.cc b/tst/EnergyPlus/unit/AirTerminalSingleDuct.unit.cc index ef21a98a1a0..aaa67756f8b 100644 --- a/tst/EnergyPlus/unit/AirTerminalSingleDuct.unit.cc +++ b/tst/EnergyPlus/unit/AirTerminalSingleDuct.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/AirTerminalSingleDuctConstantVolumeNoReheat.unit.cc b/tst/EnergyPlus/unit/AirTerminalSingleDuctConstantVolumeNoReheat.unit.cc index c22eb48a369..c481ca3c9c6 100644 --- a/tst/EnergyPlus/unit/AirTerminalSingleDuctConstantVolumeNoReheat.unit.cc +++ b/tst/EnergyPlus/unit/AirTerminalSingleDuctConstantVolumeNoReheat.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc b/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc index 5201ae0f3f5..2980e6cbaff 100644 --- a/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc +++ b/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -189,6 +189,7 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_GetInputPTAC_InletSide) " 0.300, !- Supply Air Flow Rate During Cooling Operation {m3/s}", " 0.300, !- Supply Air Flow Rate During Heating Operation {m3/s}", " , !- Supply Air Flow Rate When No Cooling or Heating is Needed {m3/s}", + " , !- No Load Supply Air Flow Rate Control Set To Low Speed", " 0, !- Outdoor Air Flow Rate During Cooling Operation {m3/s}", " 0, !- Outdoor Air Flow Rate During Heating Operation {m3/s}", " 0, !- Outdoor Air Flow Rate When No Cooling or Heating is Needed {m3/s}", @@ -438,6 +439,7 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_SimPTAC_ATMInletSide) " 0.500, !- Supply Air Flow Rate During Cooling Operation {m3/s}", " 0.500, !- Supply Air Flow Rate During Heating Operation {m3/s}", " , !- Supply Air Flow Rate When No Cooling or Heating is Needed {m3/s}", + " , !- No Load Supply Air Flow Rate Control Set To Low Speed", " 0, !- Outdoor Air Flow Rate During Cooling Operation {m3/s}", " 0, !- Outdoor Air Flow Rate During Heating Operation {m3/s}", " 0, !- Outdoor Air Flow Rate When No Cooling or Heating is Needed {m3/s}", @@ -790,6 +792,7 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_SimPTAC_ATMSupplySide) " 0.500, !- Supply Air Flow Rate During Cooling Operation {m3/s}", " 0.500, !- Supply Air Flow Rate During Heating Operation {m3/s}", " , !- Supply Air Flow Rate When No Cooling or Heating is Needed {m3/s}", + " , !- No Load Supply Air Flow Rate Control Set To Low Speed", " 0, !- Outdoor Air Flow Rate During Cooling Operation {m3/s}", " 0, !- Outdoor Air Flow Rate During Heating Operation {m3/s}", " 0, !- Outdoor Air Flow Rate When No Cooling or Heating is Needed {m3/s}", @@ -1144,6 +1147,7 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_SimPTHP_ATMInletSide) " 0.500, !- Supply Air Flow Rate During Cooling Operation {m3/s}", " 0.500, !- Supply Air Flow Rate During Heating Operation {m3/s}", " , !- Supply Air Flow Rate When No Cooling or Heating is Needed {m3/s}", + " , !- No Load Supply Air Flow Rate Control Set To Low Speed", " 0, !- Outdoor Air Flow Rate During Cooling Operation {m3/s}", " 0, !- Outdoor Air Flow Rate During Heating Operation {m3/s}", " 0, !- Outdoor Air Flow Rate When No Cooling or Heating is Needed {m3/s}", @@ -1581,6 +1585,7 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_SimPTHP_ATMSupplySide) " 0.500, !- Supply Air Flow Rate During Cooling Operation {m3/s}", " 0.500, !- Supply Air Flow Rate During Heating Operation {m3/s}", " , !- Supply Air Flow Rate When No Cooling or Heating is Needed {m3/s}", + " , !- No Load Supply Air Flow Rate Control Set To Low Speed", " 0, !- Outdoor Air Flow Rate During Cooling Operation {m3/s}", " 0, !- Outdoor Air Flow Rate During Heating Operation {m3/s}", " 0, !- Outdoor Air Flow Rate When No Cooling or Heating is Needed {m3/s}", diff --git a/tst/EnergyPlus/unit/AirTerminalSingleDuctPIUReheat.unit.cc b/tst/EnergyPlus/unit/AirTerminalSingleDuctPIUReheat.unit.cc index 6d24f9f77a1..615b8a1176a 100644 --- a/tst/EnergyPlus/unit/AirTerminalSingleDuctPIUReheat.unit.cc +++ b/tst/EnergyPlus/unit/AirTerminalSingleDuctPIUReheat.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/AirflowNetworkComponents.unit.cc b/tst/EnergyPlus/unit/AirflowNetworkComponents.unit.cc index c834fa290a8..d35e797e67b 100644 --- a/tst/EnergyPlus/unit/AirflowNetworkComponents.unit.cc +++ b/tst/EnergyPlus/unit/AirflowNetworkComponents.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -411,9 +411,9 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_TestTriangularWindowWarning) state->dataSurface->Surface(3).Vertex(3).z = 1.0; SurfaceGeometry::AllocateSurfaceWindows(*state, 3); - state->dataSurface->SurfWinOriginalClass(1) = DataSurfaces::SurfaceClass::Window; - state->dataSurface->SurfWinOriginalClass(2) = DataSurfaces::SurfaceClass::Window; - state->dataSurface->SurfWinOriginalClass(3) = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(1).OriginalClass = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(2).OriginalClass = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(3).OriginalClass = DataSurfaces::SurfaceClass::Window; state->dataGlobal->NumOfZones = 1; std::string const idf_objects = delimited_string({ @@ -2257,15 +2257,15 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_TestPolygonalWindows) state->dataSurface->Surface(11).Vertex(3).z = 2.4384; SurfaceGeometry::AllocateSurfaceWindows(*state, 14); - state->dataSurface->SurfWinOriginalClass(4) = DataSurfaces::SurfaceClass::Window; - state->dataSurface->SurfWinOriginalClass(5) = DataSurfaces::SurfaceClass::Window; - state->dataSurface->SurfWinOriginalClass(6) = DataSurfaces::SurfaceClass::Window; - state->dataSurface->SurfWinOriginalClass(9) = DataSurfaces::SurfaceClass::Window; - state->dataSurface->SurfWinOriginalClass(10) = DataSurfaces::SurfaceClass::Window; - state->dataSurface->SurfWinOriginalClass(11) = DataSurfaces::SurfaceClass::Window; - state->dataSurface->SurfWinOriginalClass(12) = DataSurfaces::SurfaceClass::Window; - state->dataSurface->SurfWinOriginalClass(13) = DataSurfaces::SurfaceClass::Window; - state->dataSurface->SurfWinOriginalClass(14) = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(4).OriginalClass = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(5).OriginalClass = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(6).OriginalClass = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(9).OriginalClass = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(10).OriginalClass = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(11).OriginalClass = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(12).OriginalClass = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(13).OriginalClass = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(14).OriginalClass = DataSurfaces::SurfaceClass::Window; state->dataGlobal->NumOfZones = 1; std::string const idf_objects = delimited_string({ diff --git a/tst/EnergyPlus/unit/AirflowNetworkConditions.unit.cc b/tst/EnergyPlus/unit/AirflowNetworkConditions.unit.cc index ff2ca30e7a1..69b1f6d314a 100644 --- a/tst/EnergyPlus/unit/AirflowNetworkConditions.unit.cc +++ b/tst/EnergyPlus/unit/AirflowNetworkConditions.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -107,8 +107,8 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_TestDefaultBehaviourOfSimulationControl state->dataSurface->Surface(2).Sides = 4; SurfaceGeometry::AllocateSurfaceWindows(*state, 2); - state->dataSurface->SurfWinOriginalClass(1) = DataSurfaces::SurfaceClass::Window; - state->dataSurface->SurfWinOriginalClass(2) = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(1).OriginalClass = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(2).OriginalClass = DataSurfaces::SurfaceClass::Window; state->dataGlobal->NumOfZones = 1; std::string const idf_objects = delimited_string({ @@ -208,8 +208,8 @@ TEST_F(EnergyPlusFixture, AirflowNetworkSimulationControl_DefaultSolver) state->dataSurface->Surface(2).Sides = 4; SurfaceGeometry::AllocateSurfaceWindows(*state, 2); - state->dataSurface->SurfWinOriginalClass(1) = DataSurfaces::SurfaceClass::Window; - state->dataSurface->SurfWinOriginalClass(2) = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(1).OriginalClass = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(2).OriginalClass = DataSurfaces::SurfaceClass::Window; state->dataGlobal->NumOfZones = 1; state->dataHeatBal->TotPeople = 1; // Total number of people statements @@ -302,9 +302,9 @@ TEST_F(EnergyPlusFixture, AirflowNetworkSimulationControl_SetSolver) state->dataSurface->Surface(2).Sides = 4; SurfaceGeometry::AllocateSurfaceWindows(*state, 2); - state->dataSurface->SurfWinOriginalClass(1) = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(1).OriginalClass = DataSurfaces::SurfaceClass::Window; ; - state->dataSurface->SurfWinOriginalClass(2) = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(2).OriginalClass = DataSurfaces::SurfaceClass::Window; ; state->dataGlobal->NumOfZones = 1; diff --git a/tst/EnergyPlus/unit/AirflowNetworkHVAC.unit.cc b/tst/EnergyPlus/unit/AirflowNetworkHVAC.unit.cc index fcf8870db71..96d6946094b 100644 --- a/tst/EnergyPlus/unit/AirflowNetworkHVAC.unit.cc +++ b/tst/EnergyPlus/unit/AirflowNetworkHVAC.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -71,6 +71,7 @@ #include #include #include +#include #include #include #include @@ -127,8 +128,8 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_TestZoneVentingSch) state->dataSurface->Surface(2).Sides = 4; SurfaceGeometry::AllocateSurfaceWindows(*state, 2); - state->dataSurface->SurfWinOriginalClass(1) = DataSurfaces::SurfaceClass::Window; - state->dataSurface->SurfWinOriginalClass(2) = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(1).OriginalClass = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(2).OriginalClass = DataSurfaces::SurfaceClass::Window; state->dataGlobal->NumOfZones = 1; std::string const idf_objects = delimited_string({ @@ -2314,8 +2315,8 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_TestZoneVentingSchWithAdaptiveCtrl) state->dataSurface->Surface(2).Sides = 4; SurfaceGeometry::AllocateSurfaceWindows(*state, 2); - state->dataSurface->SurfWinOriginalClass(1) = DataSurfaces::SurfaceClass::Window; - state->dataSurface->SurfWinOriginalClass(2) = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(1).OriginalClass = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(2).OriginalClass = DataSurfaces::SurfaceClass::Window; state->dataGlobal->NumOfZones = 1; state->dataHeatBal->TotPeople = 1; // Total number of people statements @@ -6121,8 +6122,7 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_CheckMultiZoneNodes_NoZoneNode) state->dataSurface->Surface(1).Tilt = 180.0; state->dataSurface->Surface(1).Sides = 4; - state->dataSurface->SurfWinOriginalClass.allocate(1); - state->dataSurface->SurfWinOriginalClass(1) = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(1).OriginalClass = DataSurfaces::SurfaceClass::Window; state->dataAirSystemsData->PrimaryAirSystems.allocate(1); state->dataAirSystemsData->PrimaryAirSystems(1).NumBranches = 1; @@ -6199,8 +6199,7 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_CheckMultiZoneNodes_NoInletNode) state->dataSurface->Surface(1).Tilt = 180.0; state->dataSurface->Surface(1).Sides = 4; - state->dataSurface->SurfWinOriginalClass.allocate(1); - state->dataSurface->SurfWinOriginalClass(1) = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(1).OriginalClass = DataSurfaces::SurfaceClass::Window; state->dataAirSystemsData->PrimaryAirSystems.allocate(1); state->dataAirSystemsData->PrimaryAirSystems(1).NumBranches = 1; @@ -10546,8 +10545,8 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_TestZoneVentingAirBoundary) state->dataSurface->Surface(3).Sides = 4; SurfaceGeometry::AllocateSurfaceWindows(*state, 2); - state->dataSurface->SurfWinOriginalClass(1) = DataSurfaces::SurfaceClass::Window; - state->dataSurface->SurfWinOriginalClass(2) = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(1).OriginalClass = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(2).OriginalClass = DataSurfaces::SurfaceClass::Window; state->dataGlobal->NumOfZones = 1; std::string const idf_objects = delimited_string({ @@ -10663,8 +10662,7 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_TestNoZoneEqpSupportZoneERV) state->dataSurface->Surface(1).Tilt = 180.0; state->dataSurface->Surface(1).Sides = 4; - state->dataSurface->SurfWinOriginalClass.allocate(1); - state->dataSurface->SurfWinOriginalClass(1) = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(1).OriginalClass = DataSurfaces::SurfaceClass::Window; // Create air system state->dataAirSystemsData->PrimaryAirSystems.allocate(1); @@ -10844,8 +10842,7 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_TestZoneEqpSupportZoneERV) state->dataSurface->Surface(1).Tilt = 180.0; state->dataSurface->Surface(1).Sides = 4; - state->dataSurface->SurfWinOriginalClass.allocate(1); - state->dataSurface->SurfWinOriginalClass(1) = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(1).OriginalClass = DataSurfaces::SurfaceClass::Window; // Create air system state->dataAirSystemsData->PrimaryAirSystems.allocate(1); @@ -11012,8 +11009,7 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_TestZoneEqpSupportUnbalancedZoneERV) state->dataSurface->Surface(1).Tilt = 180.0; state->dataSurface->Surface(1).Sides = 4; - state->dataSurface->SurfWinOriginalClass.allocate(1); - state->dataSurface->SurfWinOriginalClass(1) = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(1).OriginalClass = DataSurfaces::SurfaceClass::Window; // Create air system state->dataAirSystemsData->PrimaryAirSystems.allocate(1); @@ -11193,8 +11189,7 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_TestNoZoneEqpSupportHPWH) state->dataSurface->Surface(1).Tilt = 180.0; state->dataSurface->Surface(1).Sides = 4; - state->dataSurface->SurfWinOriginalClass.allocate(1); - state->dataSurface->SurfWinOriginalClass(1) = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(1).OriginalClass = DataSurfaces::SurfaceClass::Window; // Create air system state->dataAirSystemsData->PrimaryAirSystems.allocate(1); @@ -11331,8 +11326,7 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_TestZoneEqpSupportHPWH) state->dataSurface->Surface(1).Tilt = 180.0; state->dataSurface->Surface(1).Sides = 4; - state->dataSurface->SurfWinOriginalClass.allocate(1); - state->dataSurface->SurfWinOriginalClass(1) = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(1).OriginalClass = DataSurfaces::SurfaceClass::Window; // Create air system state->dataAirSystemsData->PrimaryAirSystems.allocate(1); @@ -11460,8 +11454,7 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_TestZoneEqpSupportHPWHZoneAndOA) state->dataSurface->Surface(1).Tilt = 180.0; state->dataSurface->Surface(1).Sides = 4; - state->dataSurface->SurfWinOriginalClass.allocate(1); - state->dataSurface->SurfWinOriginalClass(1) = DataSurfaces::SurfaceClass::Window; + state->dataSurface->Surface(1).OriginalClass = DataSurfaces::SurfaceClass::Window; // Create air system state->dataAirSystemsData->PrimaryAirSystems.allocate(1); @@ -13890,6 +13883,7 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_TestIntraZoneLinkageZoneIndex) " autosize, !- Cooling Supply Air Flow Rate {m3/s}", " autosize, !- Heating Supply Air Flow Rate {m3/s}", " , !- No Load Supply Air Flow Rate {m3/s}", + " , !- No Load Supply Air Flow Rate Control Set To Low Speed", " autosize, !- Cooling Outdoor Air Flow Rate {m3/s}", " autosize, !- Heating Outdoor Air Flow Rate {m3/s}", " autosize, !- No Load Outdoor Air Flow Rate {m3/s}", @@ -16309,4 +16303,3418 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_DuctSizingTest) EXPECT_NEAR(state->afn->DisSysCompDuctData(3).hydraulicDiameter, 0.653543, 0.0001); EXPECT_NEAR(state->afn->DisSysCompDuctData(3).A, 0.335458, 0.0001); } + +TEST_F(EnergyPlusFixture, AirflowNetwork_CheckMultistageHeatingCoil) +{ + // #10389 + std::string const idf_objects = delimited_string({ + "Coil:Heating:Electric:MultiStage,", + " ElectricCoil, !-Name", + " always_avail, !-Availability Schedule Name", + " heating coil air inlet node_unit1, !-Air Inlet Node Name", + " Supp Heating Coil Air Inlet Node_unit1, !-Air Outlet Node Name,", + " !-Temperature Setpoint Node Name", + " 2, !-Number of Stages ", + " 1.00, !-Stage 1 Efficiency{W / W}", + " 4000.0, !-Stage 1 Nominal Capacity {W}", + " 1.00, !-Stage 2 Efficiency{W / W}", + " 6000.0; !-Stage 2 Nominal Capacity {W}", + + "Coil:Heating:Gas:MultiStage,", + " GasCoil, !-Name", + " always_avail, !-Availability Schedule Name", + " heating coil air inlet node_unit1-1, !-Air Inlet Node Name", + " Supp Heating Coil Air Inlet Node_unit1-1, !-Air Outlet Node Name,", + " , !-Temperature Setpoint Node Name", + " , !-Part Load Fraction Correlation Curve Name", + " 20.0, !-Off Cycle Parasitic Gas Load", + " 2, !-Number of Stages ", + " 0.9, !-Stage 1 Gas Efficiency{W / W}", + " 4000.0, !-Stage 1 Nominal Capacity {W}", + " , !-Stage 1 On Cycle Parasitic Electric Load", + " 0.8, !-Stage 2 Efficiency{W / W}", + " 6000.0, !-Stage 2 Nominal Capacity {W}", + " ; !-Stage 2 On Cycle Parasitic Electric Load", + }); + + ASSERT_TRUE(process_idf(idf_objects)); + + state->dataGlobal->NumOfZones = 1; + state->dataHeatBal->Zone.allocate(1); + state->dataHeatBal->Zone(1).Name = "ATTIC ZONE"; + + state->dataSurface->Surface.allocate(1); + state->dataSurface->Surface(1).Name = "ZN004:ROOF001"; + state->dataSurface->Surface(1).Zone = 1; + state->dataSurface->Surface(1).ZoneName = "ATTIC ZONE"; + state->dataSurface->Surface(1).Azimuth = 0.0; + state->dataSurface->Surface(1).ExtBoundCond = 0; + state->dataSurface->Surface(1).HeatTransSurf = true; + state->dataSurface->Surface(1).Tilt = 180.0; + state->dataSurface->Surface(1).Sides = 4; + state->dataSurface->Surface(1).Name = "ZN004:ROOF002"; + state->dataSurface->Surface(1).Zone = 1; + state->dataSurface->Surface(1).ZoneName = "ATTIC ZONE"; + state->dataSurface->Surface(1).Azimuth = 0.0; + state->dataSurface->Surface(1).ExtBoundCond = 0; + state->dataSurface->Surface(1).HeatTransSurf = true; + state->dataSurface->Surface(1).Tilt = 180.0; + state->dataSurface->Surface(1).Sides = 4; + + state->dataSurface->Surface(1).OriginalClass = DataSurfaces::SurfaceClass::Window; + + state->dataAirSystemsData->PrimaryAirSystems.allocate(1); + state->dataAirSystemsData->PrimaryAirSystems(1).NumBranches = 1; + state->dataAirSystemsData->PrimaryAirSystems(1).Branch.allocate(1); + state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).TotalComponents = 1; + state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp.allocate(1); + state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).TypeOf = "Fan:ConstantVolume"; + + state->dataLoopNodes->NumOfNodes = 1; + state->dataLoopNodes->Node.allocate(2); + state->dataLoopNodes->Node(1).FluidType = DataLoopNode::NodeFluidType::Air; + state->dataLoopNodes->NodeID.allocate(1); + state->dataLoopNodes->NodeID(1) = "ATTIC ZONE AIR NODE"; + bool errFlag{false}; + BranchNodeConnections::RegisterNodeConnection(*state, + 1, + "ATTIC ZONE AIR NODE", + DataLoopNode::ConnectionObjectType::FanOnOff, + "Object1", + DataLoopNode::ConnectionType::ZoneNode, + NodeInputManager::CompFluidStream::Primary, + false, + errFlag); + EXPECT_FALSE(errFlag); + + state->dataZoneEquip->ZoneEquipConfig.allocate(1); + state->dataZoneEquip->ZoneEquipConfig(1).IsControlled = true; + state->dataZoneEquip->ZoneEquipConfig(1).ZoneName = "ATTIC ZONE"; + state->dataZoneEquip->ZoneEquipConfig(1).ZoneNode = 1; + state->dataZoneEquip->ZoneEquipConfig(1).NumInletNodes = 0; + state->dataZoneEquip->ZoneEquipConfig(1).NumReturnNodes = 0; + state->dataZoneEquip->ZoneEquipConfig(1).IsControlled = true; + + // One AirflowNetwork:MultiZone:Zone object + state->afn->AirflowNetworkNumOfZones = 1; + state->afn->MultizoneZoneData.allocate(1); + state->afn->MultizoneZoneData(1).ZoneNum = 1; + state->afn->MultizoneZoneData(1).ZoneName = "ATTIC ZONE"; + + // Assume only one AirflowNetwork:Distribution:Node object is set for the Zone Air Node + state->afn->AirflowNetworkNumOfNodes = 1; + state->afn->AirflowNetworkNodeData.allocate(1); + state->afn->AirflowNetworkNodeData(1).Name = "ATTIC ZONE"; + state->afn->AirflowNetworkNodeData(1).EPlusZoneNum = 1; + + state->afn->SplitterNodeNumbers.allocate(2); + state->afn->SplitterNodeNumbers(1) = 0; + state->afn->SplitterNodeNumbers(2) = 0; + + state->afn->DisSysNumOfCoils = 2; + state->afn->DisSysCompCoilData.allocate(2); + state->afn->DisSysCompCoilData(1).name = "ElectricCoil"; + state->afn->DisSysCompCoilData(2).name = "GasCoil"; + state->afn->DisSysCompCoilData(1).EPlusType = "Coil:Heating:Electric:MultiStage"; + state->afn->DisSysCompCoilData(2).EPlusType = "Coil:Heating:Gas:MultiStage"; + state->afn->DisSysCompCoilData(1).AirLoopNum = 1; + state->afn->DisSysCompCoilData(2).AirLoopNum = 2; + + state->dataHeatingCoils->GetCoilsInputFlag = false; + state->dataHeatingCoils->HeatingCoil.allocate(2); + state->dataHeatingCoils->HeatingCoil(1).Name = "ElectricCoil"; + state->dataHeatingCoils->HeatingCoil(2).Name = "GasCoil"; + + // MixedAir::NumOAMixers.allocate(1); + state->afn->validate_distribution(); + + EXPECT_TRUE(compare_err_stream("", true)); +} +TEST_F(EnergyPlusFixture, AirflowNetwork_ZoneOrderTest) +{ + + // Unit test for #10238 + std::string const idf_objects = delimited_string({ + " Version,23.2;", + + " GlobalGeometryRules,", + " LowerLeftCorner, !- Starting Vertex Position", + " Counterclockwise, !- Vertex Entry Direction", + " Relative; !- Coordinate System", + + " BuildingSurface:Detailed,", + " Inter zone floor 1, !- Name", + " Floor, !- Surface Type", + " Interior Floor, !- Construction Name", + " living_unit1, !- Zone Name", + " , !- Space Name", + " Adiabatic, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " NoSun, !- Sun Exposure", + " NoWind, !- Wind Exposure", + " 0.0, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 0,0,2.74390243902439, !- X,Y,Z ==> Vertex 1 {m}", + " 0,9.09981820971244,2.74390243902439, !- X,Y,Z ==> Vertex 2 {m}", + " 12.1330909462833,9.09981820971244,2.74390243902439, !- X,Y,Z ==> Vertex 3 {m}", + " 12.1330909462833,0,2.74390243902439; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " ceiling_unit1, !- Name", + " Ceiling, !- Surface Type", + " Interior Ceiling, !- Construction Name", + " living_unit1, !- Zone Name", + " , !- Space Name", + " Zone, !- Outside Boundary Condition", + " attic_unit1, !- Outside Boundary Condition Object", + " NoSun, !- Sun Exposure", + " NoWind, !- Wind Exposure", + " 0.0, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 0,0,5.33536585365854, !- X,Y,Z ==> Vertex 1 {m}", + " 12.1330909462833,0,5.33536585365854, !- X,Y,Z ==> Vertex 2 {m}", + " 12.1330909462833,9.09981820971244,5.33536585365854, !- X,Y,Z ==> Vertex 3 {m}", + " 0,9.09981820971244,5.33536585365854; !- X,Y,Z ==> Vertex 4 {m}", + + " Zone,", + " living_unit1, !- Name", + " 0.0, !- Direction of Relative North {deg}", + " 0.0, !- X Origin {m}", + " 0.0, !- Y Origin {m}", + " 0.0, !- Z Origin {m}", + " , !- Type", + " 1; !- Multiplier", + + " Zone,", + " attic_unit1, !- Name", + " 0.0, !- Direction of Relative North {deg}", + " 0.0, !- X Origin {m}", + " 0.0, !- Y Origin {m}", + " 0.0, !- Z Origin {m}", + " , !- Type", + " 1; !- Multiplier", + + " Zone,", + " crawlspace_unit1, !- Name", + " 0.0, !- Direction of Relative North {deg}", + " 0.0, !- X Origin {m}", + " 0.0, !- Y Origin {m}", + " 0.0, !- Z Origin {m}", + " , !- Type", + " 1; !- Multiplier", + + " InternalMass,", + " Internalmass_unit1, !- Name", + " InteriorFurnishings, !- Construction Name", + " living_unit1, !- Zone or ZoneList Name", + " , !- Space or SpaceList Name", + " 9.89591078066915; !- Surface Area {m2}", + + " BuildingSurface:Detailed,", + " Roof_front_unit1, !- Name", + " Roof, !- Surface Type", + " Exterior Roof, !- Construction Name", + " attic_unit1, !- Zone Name", + " , !- Space Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " 0.0, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 0,0,5.33536585365854, !- X,Y,Z ==> Vertex 1 {m}", + " 12.1330909462833,0,5.33536585365854, !- X,Y,Z ==> Vertex 2 {m}", + " 12.1330909462833,4.54990910485622,6.6995631975537, !- X,Y,Z ==> Vertex 3 {m}", + " 0,4.54990910485622,6.6995631975537; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " Roof_back_unit1, !- Name", + " Roof, !- Surface Type", + " Exterior Roof, !- Construction Name", + " attic_unit1, !- Zone Name", + " , !- Space Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " 0.0, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 12.1330909462833,9.09981820971244,5.33536585365854, !- X,Y,Z ==> Vertex 1 {m}", + " 0,9.09981820971244,5.33536585365854, !- X,Y,Z ==> Vertex 2 {m}", + " 0,4.54990910485622,6.6995631975537, !- X,Y,Z ==> Vertex 3 {m}", + " 12.1330909462833,4.54990910485622,6.6995631975537; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " Roof_right_unit1, !- Name", + " Wall, !- Surface Type", + " Gable_end, !- Construction Name", + " attic_unit1, !- Zone Name", + " , !- Space Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " , !- View Factor to Ground", + " 3, !- Number of Vertices", + " 12.1330909462833,0,5.33536585365854, !- X,Y,Z ==> Vertex 1 {m}", + " 12.1330909462833,9.09981820971244,5.33536585365854, !- X,Y,Z ==> Vertex 2 {m}", + " 12.1330909462833,4.54990910485622,6.6995631975537; !- X,Y,Z ==> Vertex 3 {m}", + + " BuildingSurface:Detailed,", + " Roof_left_unit1, !- Name", + " Wall, !- Surface Type", + " Gable_end, !- Construction Name", + " attic_unit1, !- Zone Name", + " , !- Space Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " , !- View Factor to Ground", + " 3, !- Number of Vertices", + " 0,9.09981820971244,5.33536585365854, !- X,Y,Z ==> Vertex 1 {m}", + " 0,0,5.33536585365854, !- X,Y,Z ==> Vertex 2 {m}", + " 0,4.54990910485622,6.6995631975537; !- X,Y,Z ==> Vertex 3 {m}", + + " BuildingSurface:Detailed,", + " Wall_ldf_1.unit1, !- Name", + " Wall, !- Surface Type", + " Exterior Wall, !- Construction Name", + " living_unit1, !- Zone Name", + " , !- Space Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " , !- View Factor to Ground", + " 4, !- Number of Vertices", + " 0,0,0.152439024390244, !- X,Y,Z ==> Vertex 1 {m}", + " 12.1330909462833,0,0.152439024390244, !- X,Y,Z ==> Vertex 2 {m}", + " 12.1330909462833,0,2.74390243902439, !- X,Y,Z ==> Vertex 3 {m}", + " 0,0,2.74390243902439; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " Wall_sdr_1.unit1, !- Name", + " Wall, !- Surface Type", + " Exterior Wall, !- Construction Name", + " living_unit1, !- Zone Name", + " , !- Space Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " , !- View Factor to Ground", + " 4, !- Number of Vertices", + " 12.1330909462833,0,0.152439024390244, !- X,Y,Z ==> Vertex 1 {m}", + " 12.1330909462833,9.09981820971244,0.152439024390244, !- X,Y,Z ==> Vertex 2 {m}", + " 12.1330909462833,9.09981820971244,2.74390243902439, !- X,Y,Z ==> Vertex 3 {m}", + " 12.1330909462833,0,2.74390243902439; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " Wall_ldb_1.unit1, !- Name", + " Wall, !- Surface Type", + " Exterior Wall, !- Construction Name", + " living_unit1, !- Zone Name", + " , !- Space Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " , !- View Factor to Ground", + " 4, !- Number of Vertices", + " 12.1330909462833,9.09981820971244,0.152439024390244, !- X,Y,Z ==> Vertex 1 {m}", + " 0,9.09981820971244,0.152439024390244, !- X,Y,Z ==> Vertex 2 {m}", + " 0,9.09981820971244,2.74390243902439, !- X,Y,Z ==> Vertex 3 {m}", + " 12.1330909462833,9.09981820971244,2.74390243902439; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " Wall_sdl_1.unit1, !- Name", + " Wall, !- Surface Type", + " Exterior Wall, !- Construction Name", + " living_unit1, !- Zone Name", + " , !- Space Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " , !- View Factor to Ground", + " 4, !- Number of Vertices", + " 0,9.09981820971244,0.152439024390244, !- X,Y,Z ==> Vertex 1 {m}", + " 0,0,0.152439024390244, !- X,Y,Z ==> Vertex 2 {m}", + " 0,0,2.74390243902439, !- X,Y,Z ==> Vertex 3 {m}", + " 0,9.09981820971244,2.74390243902439; !- X,Y,Z ==> Vertex 4 {m}", + + " Window,", + " Window_ldf_1.unit1, !- Name", + " Exterior Window, !- Construction Name", + " Wall_ldf_1.unit1, !- Building Surface Name", + " , !- Frame and Divider Name", + " 1, !- Multiplier", + " 1, !- Starting X Coordinate {m}", + " 0.914634146341463, !- Starting Z Coordinate {m}", + " 2.70719591738945, !- Length {m}", + " 1.52439024390244; !- Height {m}", + + " Window,", + " Window_ldb_1.unit1, !- Name", + " Exterior Window, !- Construction Name", + " Wall_ldb_1.unit1, !- Building Surface Name", + " , !- Frame and Divider Name", + " 1, !- Multiplier", + " 2.74190122145512, !- Starting X Coordinate {m}", + " 0.914634146341463, !- Starting Z Coordinate {m}", + " 2.70719591738945, !- Length {m}", + " 1.52439024390244; !- Height {m}", + + " Window,", + " Window_sdr_1.unit1, !- Name", + " Exterior Window, !- Construction Name", + " Wall_sdr_1.unit1, !- Building Surface Name", + " , !- Frame and Divider Name", + " 1, !- Multiplier", + " 1, !- Starting X Coordinate {m}", + " 0.914634146341463, !- Starting Z Coordinate {m}", + " 2.70719591738945, !- Length {m}", + " 1.52439024390244; !- Height {m}", + + " Window,", + " Window_sdl_1.unit1, !- Name", + " Exterior Window, !- Construction Name", + " Wall_sdl_1.unit1, !- Building Surface Name", + " , !- Frame and Divider Name", + " 1, !- Multiplier", + " 1, !- Starting X Coordinate {m}", + " 0.914634146341463, !- Starting Z Coordinate {m}", + " 2.70719591738945, !- Length {m}", + " 1.52439024390244; !- Height {m}", + + " Shading:Overhang,", + " Overhang_sdr_1.unit1, !- Name", + " Window_sdr_1.unit1, !- Window or Door Name", + " 0, !- Height above Window or Door {m}", + " 90, !- Tilt Angle from Window/Door {deg}", + " 0, !- Left extension from Window/Door Width {m}", + " 0, !- Right extension from Window/Door Width {m}", + " 0.0152439024390244; !- Depth {m}", + + " BuildingSurface:Detailed,", + " Wall_ldf_2.unit1, !- Name", + " Wall, !- Surface Type", + " Exterior Wall, !- Construction Name", + " living_unit1, !- Zone Name", + " , !- Space Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " , !- View Factor to Ground", + " 4, !- Number of Vertices", + " 0,0,2.74390243902439, !- X,Y,Z ==> Vertex 1 {m}", + " 12.1330909462833,0,2.74390243902439, !- X,Y,Z ==> Vertex 2 {m}", + " 12.1330909462833,0,5.33536585365854, !- X,Y,Z ==> Vertex 3 {m}", + " 0,0,5.33536585365854; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " Wall_sdr_2.unit1, !- Name", + " Wall, !- Surface Type", + " Exterior Wall, !- Construction Name", + " living_unit1, !- Zone Name", + " , !- Space Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " , !- View Factor to Ground", + " 4, !- Number of Vertices", + " 12.1330909462833,0,2.74390243902439, !- X,Y,Z ==> Vertex 1 {m}", + " 12.1330909462833,9.09981820971244,2.74390243902439, !- X,Y,Z ==> Vertex 2 {m}", + " 12.1330909462833,9.09981820971244,5.33536585365854, !- X,Y,Z ==> Vertex 3 {m}", + " 12.1330909462833,0,5.33536585365854; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " Wall_ldb_2.unit1, !- Name", + " Wall, !- Surface Type", + " Exterior Wall, !- Construction Name", + " living_unit1, !- Zone Name", + " , !- Space Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " , !- View Factor to Ground", + " 4, !- Number of Vertices", + " 12.1330909462833,9.09981820971244,2.74390243902439, !- X,Y,Z ==> Vertex 1 {m}", + " 0,9.09981820971244,2.74390243902439, !- X,Y,Z ==> Vertex 2 {m}", + " 0,9.09981820971244,5.33536585365854, !- X,Y,Z ==> Vertex 3 {m}", + " 12.1330909462833,9.09981820971244,5.33536585365854; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " Wall_sdl_2.unit1, !- Name", + " Wall, !- Surface Type", + " Exterior Wall, !- Construction Name", + " living_unit1, !- Zone Name", + " , !- Space Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " , !- View Factor to Ground", + " 4, !- Number of Vertices", + " 0,9.09981820971244,2.74390243902439, !- X,Y,Z ==> Vertex 1 {m}", + " 0,0,2.74390243902439, !- X,Y,Z ==> Vertex 2 {m}", + " 0,0,5.33536585365854, !- X,Y,Z ==> Vertex 3 {m}", + " 0,9.09981820971244,5.33536585365854; !- X,Y,Z ==> Vertex 4 {m}", + + " Window,", + " Window_ldf_2.unit1, !- Name", + " Exterior Window, !- Construction Name", + " Wall_ldf_2.unit1, !- Building Surface Name", + " , !- Frame and Divider Name", + " 1, !- Multiplier", + " 1, !- Starting X Coordinate {m}", + " 0.914634146341463, !- Starting Z Coordinate {m}", + " 2.70719591738945, !- Length {m}", + " 1.52439024390244; !- Height {m}", + + " Window,", + " Window_ldb_2.unit1, !- Name", + " Exterior Window, !- Construction Name", + " Wall_ldb_2.unit1, !- Building Surface Name", + " , !- Frame and Divider Name", + " 1, !- Multiplier", + " 2.74190122145512, !- Starting X Coordinate {m}", + " 0.914634146341463, !- Starting Z Coordinate {m}", + " 2.70719591738945, !- Length {m}", + " 1.52439024390244; !- Height {m}", + + " Window,", + " Window_sdr_2.unit1, !- Name", + " Exterior Window, !- Construction Name", + " Wall_sdr_2.unit1, !- Building Surface Name", + " , !- Frame and Divider Name", + " 1, !- Multiplier", + " 1, !- Starting X Coordinate {m}", + " 0.914634146341463, !- Starting Z Coordinate {m}", + " 2.70719591738945, !- Length {m}", + " 1.52439024390244; !- Height {m}", + + " Window,", + " Window_sdl_2.unit1, !- Name", + " Exterior Window, !- Construction Name", + " Wall_sdl_2.unit1, !- Building Surface Name", + " , !- Frame and Divider Name", + " 1, !- Multiplier", + " 1, !- Starting X Coordinate {m}", + " 0.914634146341463, !- Starting Z Coordinate {m}", + " 2.70719591738945, !- Length {m}", + " 1.52439024390244; !- Height {m}", + + " Shading:Overhang,", + " Overhang_sdr_2.unit1, !- Name", + " Window_sdr_2.unit1, !- Window or Door Name", + " 0, !- Height above Window or Door {m}", + " 90, !- Tilt Angle from Window/Door {deg}", + " 0, !- Left extension from Window/Door Width {m}", + " 0, !- Right extension from Window/Door Width {m}", + " 0.0152439024390244; !- Depth {m}", + + " BuildingSurface:Detailed,", + " Floor_unit1, !- Name", + " Floor, !- Surface Type", + " Exterior Floor, !- Construction Name", + " living_unit1, !- Zone Name", + " , !- Space Name", + " Zone, !- Outside Boundary Condition", + " crawlspace_unit1, !- Outside Boundary Condition Object", + " NoSun, !- Sun Exposure", + " NoWind, !- Wind Exposure", + " 0.0, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 0,0,0.152439024390244, !- X,Y,Z ==> Vertex 1 {m}", + " 0,9.09981820971244,0.152439024390244, !- X,Y,Z ==> Vertex 2 {m}", + " 12.1330909462833,9.09981820971244,0.152439024390244, !- X,Y,Z ==> Vertex 3 {m}", + " 12.1330909462833,0,0.152439024390244; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " BGWall_upper_ldf, !- Name", + " Wall, !- Surface Type", + " Crawl Wall, !- Construction Name", + " crawlspace_unit1, !- Zone Name", + " , !- Space Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " , !- View Factor to Ground", + " 4, !- Number of Vertices", + " 0,0,0, !- X,Y,Z ==> Vertex 1 {m}", + " 12.1330909462833,0,0, !- X,Y,Z ==> Vertex 2 {m}", + " 12.1330909462833,0,0.152439024390244, !- X,Y,Z ==> Vertex 3 {m}", + " 0,0,0.152439024390244; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " BGWall_upper_sdr, !- Name", + " Wall, !- Surface Type", + " Crawl Wall, !- Construction Name", + " crawlspace_unit1, !- Zone Name", + " , !- Space Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " , !- View Factor to Ground", + " 4, !- Number of Vertices", + " 12.1330909462833,0,0, !- X,Y,Z ==> Vertex 1 {m}", + " 12.1330909462833,9.09981820971244,0, !- X,Y,Z ==> Vertex 2 {m}", + " 12.1330909462833,9.09981820971244,0.152439024390244, !- X,Y,Z ==> Vertex 3 {m}", + " 12.1330909462833,0,0.152439024390244; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " BGWall_lower_sdr, !- Name", + " Wall, !- Surface Type", + " Crawl Wall, !- Construction Name", + " crawlspace_unit1, !- Zone Name", + " , !- Space Name", + " Ground, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " NoSun, !- Sun Exposure", + " NoWind, !- Wind Exposure", + " , !- View Factor to Ground", + " 4, !- Number of Vertices", + " 12.1330909462833,0,-0.457317073170732, !- X,Y,Z ==> Vertex 1 {m}", + " 12.1330909462833,9.09981820971244,-0.457317073170732, !- X,Y,Z ==> Vertex 2 {m}", + " 12.1330909462833,9.09981820971244,0, !- X,Y,Z ==> Vertex 3 {m}", + " 12.1330909462833,0,0; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " BGWall_upper_ldb, !- Name", + " Wall, !- Surface Type", + " Crawl Wall, !- Construction Name", + " crawlspace_unit1, !- Zone Name", + " , !- Space Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " , !- View Factor to Ground", + " 4, !- Number of Vertices", + " 12.1330909462833,9.09981820971244,0, !- X,Y,Z ==> Vertex 1 {m}", + " 0,9.09981820971244,0, !- X,Y,Z ==> Vertex 2 {m}", + " 0,9.09981820971244,0.152439024390244, !- X,Y,Z ==> Vertex 3 {m}", + " 12.1330909462833,9.09981820971244,0.152439024390244; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " BGWall_lower_ldb, !- Name", + " Wall, !- Surface Type", + " Crawl Wall, !- Construction Name", + " crawlspace_unit1, !- Zone Name", + " , !- Space Name", + " Ground, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " NoSun, !- Sun Exposure", + " NoWind, !- Wind Exposure", + " , !- View Factor to Ground", + " 4, !- Number of Vertices", + " 12.1330909462833,9.09981820971244,-0.457317073170732, !- X,Y,Z ==> Vertex 1 {m}", + " 0,9.09981820971244,-0.457317073170732, !- X,Y,Z ==> Vertex 2 {m}", + " 0,9.09981820971244,0, !- X,Y,Z ==> Vertex 3 {m}", + " 12.1330909462833,9.09981820971244,0; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " BGWall_upper_sdl, !- Name", + " Wall, !- Surface Type", + " Crawl Wall, !- Construction Name", + " crawlspace_unit1, !- Zone Name", + " , !- Space Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " , !- View Factor to Ground", + " 4, !- Number of Vertices", + " 0,9.09981820971244,0, !- X,Y,Z ==> Vertex 1 {m}", + " 0,0,0, !- X,Y,Z ==> Vertex 2 {m}", + " 0,0,0.152439024390244, !- X,Y,Z ==> Vertex 3 {m}", + " 0,9.09981820971244,0.152439024390244; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " BGWall_lower_sdl, !- Name", + " Wall, !- Surface Type", + " Crawl Wall, !- Construction Name", + " crawlspace_unit1, !- Zone Name", + " , !- Space Name", + " Ground, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " NoSun, !- Sun Exposure", + " NoWind, !- Wind Exposure", + " , !- View Factor to Ground", + " 4, !- Number of Vertices", + " 0,9.09981820971244,-0.457317073170732, !- X,Y,Z ==> Vertex 1 {m}", + " 0,0,-0.457317073170732, !- X,Y,Z ==> Vertex 2 {m}", + " 0,0,0, !- X,Y,Z ==> Vertex 3 {m}", + " 0,9.09981820971244,0; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " Extfloor_unit1, !- Name", + " Floor, !- Surface Type", + " Interior Floor, !- Construction Name", + " crawlspace_unit1, !- Zone Name", + " , !- Space Name", + " Ground, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " NoSun, !- Sun Exposure", + " NoWind, !- Wind Exposure", + " 0.0, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 0,0,-0.457317073170732, !- X,Y,Z ==> Vertex 1 {m}", + " 0,9.09981820971244,-0.457317073170732, !- X,Y,Z ==> Vertex 2 {m}", + " 12.1330909462833,9.09981820971244,-0.457317073170732, !- X,Y,Z ==> Vertex 3 {m}", + " 12.1330909462833,0,-0.457317073170732; !- X,Y,Z ==> Vertex 4 {m}", + + " Door,", + " Door_ldb_unit1, !- Name", + " Exterior Door, !- Construction Name", + " Wall_ldb_1.unit1, !- Building Surface Name", + " 1, !- Multiplier", + " 0.5, !- Starting X Coordinate {m}", + " 0, !- Starting Z Coordinate {m}", + " 1.74190122145513, !- Length {m}", + " 2.13414634146341; !- Height {m}", + + " WindowShadingControl,", + " Shades-living_unit1, !- Name", + " living_unit1, !- Zone Name", + " 1, !- Shading Control Sequence Number", + " InteriorBlind, !- Shading Type", + " window_w_blinds, !- Construction with Shading Name", + " OnIfScheduleAllows, !- Shading Control Type", + " shading_2012iecc, !- Schedule Name", + " , !- Setpoint {W/m2, W or deg C}", + " Yes, !- Shading Control Is Scheduled", + " No, !- Glare Control Is Active", + " , !- Shading Device Material Name", + " , !- Type of Slat Angle Control for Blinds", + " , !- Slat Angle Schedule Name", + " , !- Setpoint 2 {W/m2, deg C or cd/m2}", + " , !- Daylighting Control Object Name", + " Sequential, !- Multiple Surface Control Type", + " Window_ldf_1.unit1, !- Fenestration Surface 1 Name", + " Window_ldb_1.unit1, !- Fenestration Surface 2 Name", + " Window_sdr_1.unit1, !- Fenestration Surface 3 Name", + " Window_sdl_1.unit1, !- Fenestration Surface 4 Name", + " Window_ldf_2.unit1, !- Fenestration Surface 5 Name", + " Window_ldb_2.unit1, !- Fenestration Surface 6 Name", + " Window_sdr_2.unit1, !- Fenestration Surface 7 Name", + " Window_sdl_2.unit1; !- Fenestration Surface 8 Name", + + " SimulationControl,", + " Yes, !- Do Zone Sizing Calculation", + " Yes, !- Do System Sizing Calculation", + " No, !- Do Plant Sizing Calculation", + " Yes, !- Run Simulation for Sizing Periods", + " No, !- Run Simulation for Weather File Run Periods", + " , !- Do HVAC Sizing Simulation for Sizing Periods", + " ; !- Maximum Number of HVAC Sizing Simulation Passes", + + " Building,", + " US+SF+CZ8+hp+crawlspace+IECC_2018, !- Name", + " 0, !- North Axis {deg}", + " Suburbs, !- Terrain", + " 0.04, !- Loads Convergence Tolerance Value {W}", + " 0.4, !- Temperature Convergence Tolerance Value {deltaC}", + " FullExterior, !- Solar Distribution", + " 25, !- Maximum Number of Warmup Days", + " 6; !- Minimum Number of Warmup Days", + + " SurfaceConvectionAlgorithm:Inside,TARP;", + + " Timestep,6;", + + " Site:WaterMainsTemperature,", + " Correlation, !- Calculation Method", + " , !- Temperature Schedule Name", + " -1.525, !- Annual Average Outdoor Air Temperature {C}", + " 36.2; !- Maximum Difference In Monthly Average Outdoor Air Temperatures {deltaC}", + + " Site:Location,", + " Fairbanks Intl Arpt_AK_USA Design_Conditions, !- Name", + " 64.82, !- Latitude {deg}", + " -147.85, !- Longitude {deg}", + " -9.00, !- Time Zone {hr}", + " 133.00; !- Elevation {m}", + + " SizingPeriod:DesignDay,", + " Fairbanks Intl Arpt Ann Htg 99.6% Condns DB, !- Name", + " 1, !- Month", + " 21, !- Day of Month", + " WinterDesignDay, !- Day Type", + " -41.9, !- Maximum Dry-Bulb Temperature {C}", + " 0.0, !- Daily Dry-Bulb Temperature Range {deltaC}", + " DefaultMultipliers, !- Dry-Bulb Temperature Range Modifier Type", + " , !- Dry-Bulb Temperature Range Modifier Day Schedule Name", + " Wetbulb, !- Humidity Condition Type", + " -41.9, !- Wetbulb or DewPoint at Maximum Dry-Bulb {C}", + " , !- Humidity Condition Day Schedule Name", + " , !- Humidity Ratio at Maximum Dry-Bulb {kgWater/kgDryAir}", + " , !- Enthalpy at Maximum Dry-Bulb {J/kg}", + " , !- Daily Wet-Bulb Temperature Range {deltaC}", + " 99737., !- Barometric Pressure {Pa}", + " 0.3, !- Wind Speed {m/s}", + " 20, !- Wind Direction {deg}", + " No, !- Rain Indicator", + " No, !- Snow Indicator", + " No, !- Daylight Saving Time Indicator", + " ASHRAEClearSky, !- Solar Model Indicator", + " , !- Beam Solar Day Schedule Name", + " , !- Diffuse Solar Day Schedule Name", + " , !- ASHRAE Clear Sky Optical Depth for Beam Irradiance (taub) {dimensionless}", + " , !- ASHRAE Clear Sky Optical Depth for Diffuse Irradiance (taud) {dimensionless}", + " 0.00; !- Sky Clearness", + + " SizingPeriod:DesignDay,", + " Fairbanks Intl Arpt Ann Clg .4% Condns DB=>MWB, !- Name", + " 7, !- Month", + " 21, !- Day of Month", + " SummerDesignDay, !- Day Type", + " 27.4, !- Maximum Dry-Bulb Temperature {C}", + " 10.2, !- Daily Dry-Bulb Temperature Range {deltaC}", + " DefaultMultipliers, !- Dry-Bulb Temperature Range Modifier Type", + " , !- Dry-Bulb Temperature Range Modifier Day Schedule Name", + " Wetbulb, !- Humidity Condition Type", + " 16.1, !- Wetbulb or DewPoint at Maximum Dry-Bulb {C}", + " , !- Humidity Condition Day Schedule Name", + " , !- Humidity Ratio at Maximum Dry-Bulb {kgWater/kgDryAir}", + " , !- Enthalpy at Maximum Dry-Bulb {J/kg}", + " , !- Daily Wet-Bulb Temperature Range {deltaC}", + " 99737., !- Barometric Pressure {Pa}", + " 3.1, !- Wind Speed {m/s}", + " 180, !- Wind Direction {deg}", + " No, !- Rain Indicator", + " No, !- Snow Indicator", + " No, !- Daylight Saving Time Indicator", + " ASHRAETau, !- Solar Model Indicator", + " , !- Beam Solar Day Schedule Name", + " , !- Diffuse Solar Day Schedule Name", + " 0.387, !- ASHRAE Clear Sky Optical Depth for Beam Irradiance (taub) {dimensionless}", + " 2.212; !- ASHRAE Clear Sky Optical Depth for Diffuse Irradiance (taud) {dimensionless}", + + " RunPeriod,", + " Jan, !- Name", + " 1, !- Begin Month", + " 1, !- Begin Day of Month", + " , !- Begin Year", + " 1, !- End Month", + " 10, !- End Day of Month", + " , !- End Year", + " Sunday, !- Day of Week for Start Day", + " Yes, !- Use Weather File Holidays and Special Days", + " Yes, !- Use Weather File Daylight Saving Period", + " No, !- Apply Weekend Holiday Rule", + " Yes, !- Use Weather File Rain Indicators", + " Yes, !- Use Weather File Snow Indicators", + " ; !- Treat Weather as Actual", + + " RunPeriod,", + " Mar, !- Name", + " 3, !- Begin Month", + " 1, !- Begin Day of Month", + " , !- Begin Year", + " 3, !- End Month", + " 11, !- End Day of Month", + " , !- End Year", + " Sunday, !- Day of Week for Start Day", + " Yes, !- Use Weather File Holidays and Special Days", + " Yes, !- Use Weather File Daylight Saving Period", + " No, !- Apply Weekend Holiday Rule", + " Yes, !- Use Weather File Rain Indicators", + " Yes, !- Use Weather File Snow Indicators", + " ; !- Treat Weather as Actual", + + " RunPeriod,", + " July, !- Name", + " 7, !- Begin Month", + " 1, !- Begin Day of Month", + " , !- Begin Year", + " 7, !- End Month", + " 10, !- End Day of Month", + " , !- End Year", + " Sunday, !- Day of Week for Start Day", + " Yes, !- Use Weather File Holidays and Special Days", + " Yes, !- Use Weather File Daylight Saving Period", + " No, !- Apply Weekend Holiday Rule", + " Yes, !- Use Weather File Rain Indicators", + " Yes, !- Use Weather File Snow Indicators", + " ; !- Treat Weather as Actual", + + " ScheduleTypeLimits,", + " any number; !- Name", + + " ScheduleTypeLimits,", + " On/Off, !- Name", + " 0, !- Lower Limit Value", + " 1, !- Upper Limit Value", + " Discrete; !- Numeric Type", + + " ScheduleTypeLimits,", + " control_type, !- Name", + " 0, !- Lower Limit Value", + " 4, !- Upper Limit Value", + " Discrete; !- Numeric Type", + + " ScheduleTypeLimits,", + " fraction, !- Name", + " 0, !- Lower Limit Value", + " 1, !- Upper Limit Value", + " Continuous; !- Numeric Type", + + " ScheduleTypeLimits,", + " Temperature, !- Name", + " -60, !- Lower Limit Value", + " 200, !- Upper Limit Value", + " Continuous; !- Numeric Type", + + " Schedule:Compact,", + " activity_sch, !- Name", + " any number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,117.28; !- Field 3", + + " Schedule:Compact,", + " inf_sch, !- Name", + " any number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,1; !- Field 3", + + " Schedule:Compact,", + " zone_control_type, !- Name", + " control_type, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until 24:00,4; !- Field 3", + + " Schedule:Compact,", + " shading_2012iecc, !- Name", + " fraction, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until 24:00,0; !- Field 3", + + " Schedule:Compact,", + " shading_2012iecc_hers, !- Name", + " fraction, !- Schedule Type Limits Name", + " Through: 5/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until 24:00,0.85, !- Field 3", + " Through: 9/30, !- Field 5", + " For: AllDays, !- Field 6", + " Until 24:00,0.7, !- Field 7", + " Through: 12/31, !- Field 9", + " For: AllDays, !- Field 10", + " Until 24:00,0.85; !- Field 11", + + " Schedule:Compact,", + " shading_2009iecc, !- Name", + " any number, !- Schedule Type Limits Name", + " Through: 5/30, !- Field 1", + " For: AllDays, !- Field 2", + " Until 24:00,0.85, !- Field 3", + " Through: 8/31, !- Field 5", + " For: AllDays, !- Field 6", + " Until 24:00,0.7, !- Field 7", + " Through: 12/31, !- Field 9", + " For: AllDays, !- Field 10", + " Until: 24:00,0.85; !- Field 11", + + " Schedule:Compact,", + " dhw_setpt, !- Name", + " Temperature, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until 24:00,48; !- Field 3", + + " Schedule:Constant,DWWaterTempSchedule,Temperature,48.8888888888889;", + + " Schedule:Constant,CWWaterTempSchedule,Temperature,48.8888888888889;", + + " Schedule:Constant,SinkSensSchedule,Fraction,0.687777777777778;", + + " Schedule:Constant,SinkLatSchedule,Fraction,0.312222222222222;", + + " Schedule:Constant,ShowerSensSchedule,Fraction,0.51280276816609;", + + " Schedule:Constant,ShowerLatSchedule,Fraction,0.48719723183391;", + + " Schedule:Constant,BathSensSchedule,Fraction,1;", + + " Schedule:Constant,BathLatSchedule,Fraction,0;", + + " Schedule:Constant,SSBWaterTempSchedule,Temperature,40.5555555555556;", + + " Schedule:Constant,WaterHeaterSP1Schedule,Temperature,48.8888888888889;", + + " Schedule:Constant,WaterHeaterSP2Schedule,Temperature,40.5555555555556;", + + " Schedule:Constant,DHWSupplySetpoint,Temperature,48.8888888888889;", + + " Material,", + " sheathing_consol_layer, !- Name", + " Rough, !- Roughness", + " 0.031115, !- Thickness {m}", + " 0.035329, !- Conductivity {W/m-K}", + " 20.1, !- Density {kg/m3}", + " 1465.415; !- Specific Heat {J/kg-K}", + + " Material,", + " ceil_consol_layer, !- Name", + " Rough, !- Roughness", + " 0.400206234336168, !- Thickness {m}", + " 0.0617176, !- Conductivity {W/m-K}", + " 41.9286, !- Density {kg/m3}", + " 776.25126; !- Specific Heat {J/kg-K}", + + " Material,", + " floor_consol_layer, !- Name", + " Rough, !- Roughness", + " 0.28575, !- Thickness {m}", + " 0.0499577105263158, !- Conductivity {W/m-K}", + " 55.074, !- Density {kg/m3}", + " 916.9311; !- Specific Heat {J/kg-K}", + + " Material,", + " bsmtwall_consol_layer, !- Name", + " Rough, !- Roughness", + " 0.000254, !- Thickness {m}", + " 10.84384, !- Conductivity {W/m-K}", + " 120.801, !- Density {kg/m3}", + " 1036.25775; !- Specific Heat {J/kg-K}", + + " Material,", + " crawlwall_consol_layer, !- Name", + " Rough, !- Roughness", + " 0.000254, !- Thickness {m}", + " 10.84384, !- Conductivity {W/m-K}", + " 120.801, !- Density {kg/m3}", + " 1036.25775; !- Specific Heat {J/kg-K}", + + " Construction,", + " Exterior Wall, !- Name", + " syn_stucco, !- Outside Layer", + " sheathing_consol_layer, !- Layer 2", + " OSB_7/16in, !- Layer 3", + " wall_consol_layer, !- Layer 4", + " Drywall_1/2in; !- Layer 5", + + " Material,", + " wall_consol_layer, !- Name", + " Rough, !- Roughness", + " 0.1397, !- Thickness {m}", + " 0.057165, !- Conductivity {W/m-K}", + " 120.801, !- Density {kg/m3}", + " 1036.25775; !- Specific Heat {J/kg-K}", + + " WindowMaterial:Glazing,", + " Clear Acrylic Plastic, !- Name", + " SpectralAverage, !- Optical Data Type", + " , !- Window Glass Spectral Data Set Name", + " 0.003, !- Thickness {m}", + " 0.92, !- Solar Transmittance at Normal Incidence", + " 0.05, !- Front Side Solar Reflectance at Normal Incidence", + " 0.05, !- Back Side Solar Reflectance at Normal Incidence", + " 0.92, !- Visible Transmittance at Normal Incidence", + " 0.05, !- Front Side Visible Reflectance at Normal Incidence", + " 0.05, !- Back Side Visible Reflectance at Normal Incidence", + " 0.00, !- Infrared Transmittance at Normal Incidence", + " 0.90, !- Front Side Infrared Hemispherical Emissivity", + " 0.90, !- Back Side Infrared Hemispherical Emissivity", + " 0.90; !- Conductivity {W/m-K}", + + " WindowMaterial:Glazing,", + " Diffusing Acrylic Plastic, !- Name", + " SpectralAverage, !- Optical Data Type", + " , !- Window Glass Spectral Data Set Name", + " 0.0022, !- Thickness {m}", + " 0.90, !- Solar Transmittance at Normal Incidence", + " 0.08, !- Front Side Solar Reflectance at Normal Incidence", + " 0.08, !- Back Side Solar Reflectance at Normal Incidence", + " 0.90, !- Visible Transmittance at Normal Incidence", + " 0.08, !- Front Side Visible Reflectance at Normal Incidence", + " 0.08, !- Back Side Visible Reflectance at Normal Incidence", + " 0.00, !- Infrared Transmittance at Normal Incidence", + " 0.90, !- Front Side Infrared Hemispherical Emissivity", + " 0.90, !- Back Side Infrared Hemispherical Emissivity", + " 0.90; !- Conductivity {W/m-K}", + + " Material,", + " Very High Reflectivity Surface, !- Name", + " Smooth, !- Roughness", + " 0.0005, !- Thickness {m}", + " 237, !- Conductivity {W/m-K}", + " 2702, !- Density {kg/m3}", + " 903, !- Specific Heat {J/kg-K}", + " 0.90, !- Thermal Absorptance", + " 0.05, !- Solar Absorptance", + " 0.05; !- Visible Absorptance", + + " Material,", + " GypsumBoard-5/16in, !- Name", + " Rough, !- Roughness", + " 7.93953E-03, !- Thickness {m}", + " 0.1586200, !- Conductivity {W/m-K}", + " 640, !- Density {kg/m3}", + " 1129.6, !- Specific Heat {J/kg-K}", + " 0.9, !- Thermal Absorptance", + " 0.4, !- Solar Absorptance", + " 0.1; !- Visible Absorptance", + + " Material,", + " CopperPipe, !- Name", + " MediumRough, !- Roughness", + " 1.90500386169072E-02, !- Thickness {m}", + " 401, !- Conductivity {W/m-K}", + " 2243.000, !- Density {kg/m3}", + " 837.0000, !- Specific Heat {J/kg-K}", + " 0.9000000, !- Thermal Absorptance", + " 0.6500000, !- Solar Absorptance", + " 0.6500000; !- Visible Absorptance", + + " Material,", + " F08 Metal surface, !- Name", + " Smooth, !- Roughness", + " 0.0008, !- Thickness {m}", + " 45.28, !- Conductivity {W/m-K}", + " 7824, !- Density {kg/m3}", + " 500; !- Specific Heat {J/kg-K}", + + " Material,", + " Concrete_4in, !- Name", + " Rough, !- Roughness", + " 0.1014984, !- Thickness {m}", + " 1.312098, !- Conductivity {W/m-K}", + " 2242.8, !- Density {kg/m3}", + " 465.2; !- Specific Heat {J/kg-K}", + + " Material,", + " Asphalt_shingle, !- Name", + " MediumRough, !- Roughness", + " 6.33985285170672E-03, !- Thickness {m}", + " 0.08186, !- Conductivity {W/m-K}", + " 1121.2917044623, !- Density {kg/m3}", + " 1255.20000949809, !- Specific Heat {J/kg-K}", + " 0.9, !- Thermal Absorptance", + " 0.75; !- Solar Absorptance", + + " Material,", + " Wood_shingle, !- Name", + " MediumSmooth, !- Roughness", + " 1.27000257446048E-02, !- Thickness {m}", + " 0.11388, !- Conductivity {W/m-K}", + " 426.090847695673, !- Density {kg/m3}", + " 1631.76001234752; !- Specific Heat {J/kg-K}", + + " Material,", + " Slate_shingle, !- Name", + " MediumSmooth, !- Roughness", + " 1.27000257446048E-02, !- Thickness {m}", + " 1.44219, !- Conductivity {W/m-K}", + " 1601.845292089, !- Density {kg/m3}", + " 1255.20000949809; !- Specific Heat {J/kg-K}", + + " Material,", + " cement_stucco, !- Name", + " MediumSmooth, !- Roughness", + " 1.905E-02, !- Thickness {m}", + " 0.721, !- Conductivity {W/m-K}", + " 1865.58, !- Density {kg/m3}", + " 878.640006648665; !- Specific Heat {J/kg-K}", + + " Material,", + " syn_stucco, !- Name", + " MediumSmooth, !- Roughness", + " 0.3048E-02, !- Thickness {m}", + " 8.65E-02, !- Conductivity {W/m-K}", + " 400, !- Density {kg/m3}", + " 878.640006648665, !- Specific Heat {J/kg-K}", + " 0.7; !- Thermal Absorptance", + + " Material,", + " Drywall_1/2in, !- Name", + " MediumSmooth, !- Roughness", + " 1.27000257446048E-02, !- Thickness {m}", + " 0.16009, !- Conductivity {W/m-K}", + " 800.922646044499, !- Density {kg/m3}", + " 1087.84000823168; !- Specific Heat {J/kg-K}", + + " Material,", + " OSB_5/8in, !- Name", + " MediumSmooth, !- Roughness", + " 0.015875032180756, !- Thickness {m}", + " 0.1163, !- Conductivity {W/m-K}", + " 544.627399310259, !- Density {kg/m3}", + " 1213.36000918149; !- Specific Heat {J/kg-K}", + + " Material,", + " OSB_7/16in, !- Name", + " MediumSmooth, !- Roughness", + " 0.0111125, !- Thickness {m}", + " 0.1163, !- Conductivity {W/m-K}", + " 544.627399310259, !- Density {kg/m3}", + " 1213.36000918149; !- Specific Heat {J/kg-K}", + + " Material,", + " Blown_R30, !- Name", + " MediumRough, !- Roughness", + " 0.212598430964684, !- Thickness {m}", + " 0.04119, !- Conductivity {W/m-K}", + " 9.61107175253399, !- Density {kg/m3}", + " 836.800006332062; !- Specific Heat {J/kg-K}", + + " Material,", + " Blown_R30_top, !- Name", + " MediumRough, !- Roughness", + " 0.117348237880148, !- Thickness {m}", + " 0.04119, !- Conductivity {W/m-K}", + " 9.61107175253399, !- Density {kg/m3}", + " 836.800006332062, !- Specific Heat {J/kg-K}", + " 0.9, !- Thermal Absorptance", + " 0.7, !- Solar Absorptance", + " 0.7; !- Visible Absorptance", + + " Material,", + " Plywood_3/4in, !- Name", + " Rough, !- Roughness", + " 0.01905, !- Thickness {m}", + " 0.1154577, !- Conductivity {W/m-K}", + " 544.68, !- Density {kg/m3}", + " 674.54, !- Specific Heat {J/kg-K}", + " 0.9, !- Thermal Absorptance", + " 0.7, !- Solar Absorptance", + " 0.7; !- Visible Absorptance", + + " Material,", + " Batt_R19, !- Name", + " MediumRough, !- Roughness", + " 2.54000514892096E-02, !- Thickness {m}", + " 3.47522010738099E-03, !- Conductivity {W/m-K}", + " 9.61107175253399, !- Density {kg/m3}", + " 836.800006332062, !- Specific Heat {J/kg-K}", + " 0.9, !- Thermal Absorptance", + " 0.7, !- Solar Absorptance", + " 0.7; !- Visible Absorptance", + + " Material,", + " Lumber_2x4, !- Name", + " Rough, !- Roughness", + " 0.0890016, !- Thickness {m}", + " 0.1154577, !- Conductivity {W/m-K}", + " 512.64, !- Density {kg/m3}", + " 767.58, !- Specific Heat {J/kg-K}", + " 0.9, !- Thermal Absorptance", + " 0.7, !- Solar Absorptance", + " 0.7; !- Visible Absorptance", + + " Material,", + " Carpet_n_pad, !- Name", + " MediumSmooth, !- Roughness", + " 2.54000514892096E-02, !- Thickness {m}", + " 6.01314018580031E-02, !- Conductivity {W/m-K}", + " 32.03690584178, !- Density {kg/m3}", + " 836.800006332062, !- Specific Heat {J/kg-K}", + " 0.9, !- Thermal Absorptance", + " 0.7, !- Solar Absorptance", + " 0.7; !- Visible Absorptance", + + " Material,", + " Batt_R13, !- Name", + " MediumRough, !- Roughness", + " 0.0889, !- Thickness {m}", + " 0.03876, !- Conductivity {W/m-K}", + " 9.61107175253399, !- Density {kg/m3}", + " 836.800006332062, !- Specific Heat {J/kg-K}", + " 0.9, !- Thermal Absorptance", + " 0.7, !- Solar Absorptance", + " 0.7; !- Visible Absorptance", + + " Material,", + " OSB_1/2in, !- Name", + " MediumSmooth, !- Roughness", + " 1.27000257446048E-02, !- Thickness {m}", + " 0.1163, !- Conductivity {W/m-K}", + " 544.627399310259, !- Density {kg/m3}", + " 1213.36000918149, !- Specific Heat {J/kg-K}", + " 0.9, !- Thermal Absorptance", + " 0.7, !- Solar Absorptance", + " 0.7; !- Visible Absorptance", + + " Material,", + " soil_12in, !- Name", + " Rough, !- Roughness", + " 0.3048, !- Thickness {m}", + " 1.731, !- Conductivity {W/m-K}", + " 1842.3, !- Density {kg/m3}", + " 232.6, !- Specific Heat {J/kg-K}", + " 0.9, !- Thermal Absorptance", + " 0.7, !- Solar Absorptance", + " 0.7; !- Visible Absorptance", + + " Material,", + " door_const, !- Name", + " Smooth, !- Roughness", + " 0.0422695734864227, !- Thickness {m}", + " 0.0720096, !- Conductivity {W/m-K}", + " 512.64, !- Density {kg/m3}", + " 767.58; !- Specific Heat {J/kg-K}", + + " Material,", + " Gyp_board_1/2in, !- Name", + " Rough, !- Roughness", + " 0.01271016, !- Thickness {m}", + " 0.1586200, !- Conductivity {W/m-K}", + " 640, !- Density {kg/m3}", + " 1129.6, !- Specific Heat {J/kg-K}", + " 0.9, !- Thermal Absorptance", + " 0.4, !- Solar Absorptance", + " 0.1; !- Visible Absorptance", + + " Material,", + " Std Wood 6inch, !- Name", + " MediumSmooth, !- Roughness", + " 0.15, !- Thickness {m}", + " 0.12, !- Conductivity {W/m-K}", + " 540.0000, !- Density {kg/m3}", + " 1210, !- Specific Heat {J/kg-K}", + " 0.9000000, !- Thermal Absorptance", + " 0.7000000, !- Solar Absorptance", + " 0.7000000; !- Visible Absorptance", + + " Construction,", + " InteriorFurnishings, !- Name", + " Std Wood 6inch; !- Outside Layer", + + " Construction,", + " ceiling-floor-layer, !- Name", + " Lumber_2x4; !- Outside Layer", + + " Material:NoMass,", + " Manf_wall_airgap, !- Name", + " Smooth, !- Roughness", + " 0.12; !- Thermal Resistance {m2-K/W}", + + " Material:NoMass,", + " Bldg_paper_felt, !- Name", + " Smooth, !- Roughness", + " 1.05666113069662E-02; !- Thermal Resistance {m2-K/W}", + + " Material:NoMass,", + " R_high, !- Name", + " MediumRough, !- Roughness", + " 177; !- Thermal Resistance {m2-K/W}", + + " Material:AirGap,", + " Air_4_in_vert, !- Name", + " 0.158499169604493; !- Thermal Resistance {m2-K/W}", + + " Material:AirGap,", + " 3/4in_air_space, !- Name", + " 0.08513; !- Thermal Resistance {m2-K/W}", + + " Material:AirGap,", + " 3/4in_Reflective_air_space, !- Name", + " 0.246554; !- Thermal Resistance {m2-K/W}", + + " Construction,", + " Exterior Floor, !- Name", + " floor_consol_layer, !- Outside Layer", + " Plywood_3/4in, !- Layer 2", + " Carpet_n_pad; !- Layer 3", + + " Construction,", + " Interior Floor, !- Name", + " Plywood_3/4in, !- Outside Layer", + " Carpet_n_pad; !- Layer 2", + + " Construction,", + " Interior Ceiling, !- Name", + " ceil_consol_layer, !- Outside Layer", + " Drywall_1/2in; !- Layer 2", + + " Construction,", + " attic floor, !- Name", + " Drywall_1/2in, !- Outside Layer", + " ceil_consol_layer; !- Layer 2", + + " Construction,", + " fndn_roof, !- Name", + " Carpet_n_pad, !- Outside Layer", + " Plywood_3/4in, !- Layer 2", + " ceil_consol_layer; !- Layer 3", + + " Construction,", + " interiorwall, !- Name", + " Drywall_1/2in, !- Outside Layer", + " OSB_5/8in, !- Layer 2", + " Drywall_1/2in; !- Layer 3", + + " Construction,", + " Interior Wall, !- Name", + " Drywall_1/2in, !- Outside Layer", + " Air_4_in_vert, !- Layer 2", + " Drywall_1/2in; !- Layer 3", + + " Construction,", + " Exterior Roof, !- Name", + " Asphalt_shingle, !- Outside Layer", + " OSB_1/2in; !- Layer 2", + + " Construction,", + " Exterior Window, !- Name", + " Glass; !- Outside Layer", + + " Construction,", + " Interior Window, !- Name", + " Glass; !- Outside Layer", + + " Construction,", + " Exterior Door, !- Name", + " door_const; !- Outside Layer", + + " Construction,", + " Interior Door, !- Name", + " door_const; !- Outside Layer", + + " Construction,", + " Gable_end, !- Name", + " cement_stucco, !- Outside Layer", + " Bldg_paper_felt, !- Layer 2", + " OSB_5/8in, !- Layer 3", + " Air_4_in_vert, !- Layer 4", + " Drywall_1/2in; !- Layer 5", + + " Construction,", + " crawl_floor, !- Name", + " R_high, !- Outside Layer", + " soil_12in; !- Layer 2", + + " Construction,", + " window_w_blinds, !- Name", + " Glass, !- Outside Layer", + " int_blind; !- Layer 2", + + " Construction,", + " Insulated Pipe, !- Name", + " Pipe Insulation, !- Outside Layer", + " CopperPipe; !- Layer 2", + + " Construction,", + " Plain Pipe, !- Name", + " CopperPipe; !- Outside Layer", + + " Construction,", + " TDD Pipe, !- Name", + " Very High Reflectivity Surface; !- Outside Layer", + + " Construction,", + " TDD Dome, !- Name", + " Clear Acrylic Plastic; !- Outside Layer", + + " Construction,", + " TDD Diffuser, !- Name", + " Diffusing Acrylic Plastic; !- Outside Layer", + + " Construction,", + " crawl wall, !- Name", + " Concrete_4in; !- Outside Layer", + + " WindowMaterial:SimpleGlazingSystem,", + " Glass, !- Name", + " 1.70358, !- U-Factor {W/m2-K}", + " 0.3344, !- Solar Heat Gain Coefficient", + " 0.88; !- Visible Transmittance", + + " WindowMaterial:Blind,", + " int_blind, !- Name", + " Horizontal, !- Slat Orientation", + " 0.025, !- Slat Width {m}", + " 0.01875, !- Slat Separation {m}", + " 0.001, !- Slat Thickness {m}", + " 45.0, !- Slat Angle {deg}", + " 221, !- Slat Conductivity {W/m-K}", + " 0.0, !- Slat Beam Solar Transmittance", + " 0.5, !- Front Side Slat Beam Solar Reflectance", + " 0.5, !- Back Side Slat Beam Solar Reflectance", + " 0.0, !- Slat Diffuse Solar Transmittance", + " 0.5, !- Front Side Slat Diffuse Solar Reflectance", + " 0.5, !- Back Side Slat Diffuse Solar Reflectance", + " 0.0, !- Slat Beam Visible Transmittance", + " 0.5, !- Front Side Slat Beam Visible Reflectance", + " 0.5, !- Back Side Slat Beam Visible Reflectance", + " 0.0, !- Slat Diffuse Visible Transmittance", + " 0.5, !- Front Side Slat Diffuse Visible Reflectance", + " 0.5, !- Back Side Slat Diffuse Visible Reflectance", + " 0.0, !- Slat Infrared Hemispherical Transmittance", + " 0.9, !- Front Side Slat Infrared Hemispherical Emissivity", + " 0.9, !- Back Side Slat Infrared Hemispherical Emissivity", + " 0.050, !- Blind to Glass Distance {m}", + " 0.5, !- Blind Top Opening Multiplier", + " 0.5, !- Blind Bottom Opening Multiplier", + " 0.5, !- Blind Left Side Opening Multiplier", + " 0.5, !- Blind Right Side Opening Multiplier", + " , !- Minimum Slat Angle {deg}", + " ; !- Maximum Slat Angle {deg}", + + " Schedule:Constant,boiler_setpt,Temperature,80;", + + " Schedule:Constant,Compressor Setpoint,Temperature,50;", + + " Schedule:Compact,", + " dhw_setpt_hpwh, !- Name", + " Temperature, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until 24:00,44; !- Field 3", + + " Schedule:Constant,DOAShightemp,Temperature,200;", + + " Schedule:Constant,DOASlowtemp,Temperature,-60;", + + " Schedule:Compact,", + " Supply-Air-Temp-Sch, !- Name", + " Temperature, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,12; !- Field 3", + + " Schedule:Compact,", + " always_avail, !- Name", + " On/Off, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,1; !- Field 3", + + " Schedule:Compact,", + " always_off, !- Name", + " On/Off, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,0; !- Field 3", + + " Schedule:Compact,", + " heating_sch_HRef, !- Name", + " Temperature, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,20; !- Field 3", + + " Schedule:Compact,", + " cooling_sch_HRef, !- Name", + " Temperature, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,25.55; !- Field 3", + + " Schedule:Compact,", + " heating_sch, !- Name", + " Temperature, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,22.2222222222223; !- Field 3", + + " Schedule:Compact,", + " cooling_sch, !- Name", + " Temperature, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,23.888888888889; !- Field 3", + + " Schedule:Compact,", + " heating_sch_HERSprogTstat, !- Name", + " Temperature, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 6:00,21.1111222222223, !- Field 3", + " Until: 23:00,22.2222222222223, !- Field 5", + " Until: 24:00,21.1111222222223; !- Field 7", + + " Schedule:Compact,", + " cooling_sch_HERSprogTstat, !- Name", + " Temperature, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 9:00,23.888888888889, !- Field 3", + " Until: 15:00,24.999988888889, !- Field 5", + " Until: 24:00,23.888888888889; !- Field 7", + + " Schedule:Compact,", + " heating_sch_ERIprogTstat,!- Name", + " Temperature, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 6:00,21.1111222222223, !- Field 3", + " Until: 23:00,22.2222222222223, !- Field 5", + " Until: 24:00,21.1111222222223; !- Field 7", + + " Schedule:Compact,", + " cooling_sch_ERIprogTstat,!- Name", + " Temperature, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 9:00,23.888888888889, !- Field 3", + " Until: 15:00,24.999988888889, !- Field 5", + " Until: 24:00,23.888888888889; !- Field 7", + + " Schedule:Compact,", + " fan_cycle, !- Name", + " any number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,0; !- Field 3", + + " ThermostatSetpoint:DualSetpoint,", + " thermostat_living Dual SP Control, !- Name", + " heating_sch, !- Heating Setpoint Temperature Schedule Name", + " cooling_sch; !- Cooling Setpoint Temperature Schedule Name", + + " Curve:Biquadratic,", + " HPWH-Htg-Cap-fT, !- Name", + " 0.563, !- Coefficient1 Constant", + " 0.0437, !- Coefficient2 x", + " 0.000039, !- Coefficient3 x**2", + " 0.0055, !- Coefficient4 y", + " -.000148, !- Coefficient5 y**2", + " -.000145, !- Coefficient6 x*y", + " 0, !- Minimum Value of x", + " 100, !- Maximum Value of x", + " 0, !- Minimum Value of y", + " 100, !- Maximum Value of y", + " 0; !- Minimum Curve Output", + + " Curve:Biquadratic,", + " HPWH-Htg-COP-fT, !- Name", + " 1.1332, !- Coefficient1 Constant", + " 0.063, !- Coefficient2 x", + " -.0000979, !- Coefficient3 x**2", + " -.00972, !- Coefficient4 y", + " -.0000214, !- Coefficient5 y**2", + " -.000686, !- Coefficient6 x*y", + " 0, !- Minimum Value of x", + " 100, !- Maximum Value of x", + " 0, !- Minimum Value of y", + " 100; !- Maximum Value of y", + + " Curve:Quadratic,", + " HPWH-COP-fPLR, !- Name", + " 1, !- Coefficient1 Constant", + " 0, !- Coefficient2 x", + " 0, !- Coefficient3 x**2", + " 0, !- Minimum Value of x", + " 1; !- Maximum Value of x", + + " Curve:Biquadratic,", + " HPWHHeatingCapFTemp, !- Name", + " 0.369827, !- Coefficient1 Constant", + " 0.043341, !- Coefficient2 x", + " -0.00023, !- Coefficient3 x**2", + " 0.000466, !- Coefficient4 y", + " 0.000026, !- Coefficient5 y**2", + " -0.00027, !- Coefficient6 x*y", + " 0.0, !- Minimum Value of x", + " 40.0, !- Maximum Value of x", + " 20.0, !- Minimum Value of y", + " 90.0, !- Maximum Value of y", + " , !- Minimum Curve Output", + " , !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " HPWHHeatingCOPFTemp, !- Name", + " 1.19713, !- Coefficient1 Constant", + " 0.077849, !- Coefficient2 x", + " -0.0000016, !- Coefficient3 x**2", + " -0.02675, !- Coefficient4 y", + " 0.000296, !- Coefficient5 y**2", + " -0.00112, !- Coefficient6 x*y", + " 0.0, !- Minimum Value of x", + " 40.0, !- Maximum Value of x", + " 20.0, !- Minimum Value of y", + " 90.0, !- Maximum Value of y", + " , !- Minimum Curve Output", + " , !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " HPACCoolCapFT, !- Name", + " 0.766956, !- Coefficient1 Constant", + " 0.0107756, !- Coefficient2 x", + " -0.0000414703, !- Coefficient3 x**2", + " 0.00134961, !- Coefficient4 y", + " -0.000261144, !- Coefficient5 y**2", + " 0.000457488, !- Coefficient6 x*y", + " 12.77778, !- Minimum Value of x", + " 23.88889, !- Maximum Value of x", + " 21.11111, !- Minimum Value of y", + " 46.11111; !- Maximum Value of y", + + " Curve:Biquadratic,", + " HPACCOOLEIRFT, !- Name", + " 0.297145, !- Coefficient1 Constant", + " 0.0430933, !- Coefficient2 x", + " -0.000748766, !- Coefficient3 x**2", + " 0.00597727, !- Coefficient4 y", + " 0.000482112, !- Coefficient5 y**2", + " -0.000956448, !- Coefficient6 x*y", + " 12.77778, !- Minimum Value of x", + " 23.88889, !- Maximum Value of x", + " 21.11111, !- Minimum Value of y", + " 46.11111; !- Maximum Value of y", + + " Curve:Cubic,", + " HPACHeatCapFT, !- Name", + " 0.758746, !- Coefficient1 Constant", + " 0.027626, !- Coefficient2 x", + " 0.000148716, !- Coefficient3 x**2", + " 0.0000034992, !- Coefficient4 x**3", + " -20.0, !- Minimum Value of x", + " 20.0; !- Maximum Value of x", + + " Curve:Cubic,", + " HPACHeatCapFFF, !- Name", + " 0.84, !- Coefficient1 Constant", + " 0.16, !- Coefficient2 x", + " 0.0, !- Coefficient3 x**2", + " 0.0, !- Coefficient4 x**3", + " 0.5, !- Minimum Value of x", + " 1.5; !- Maximum Value of x", + + " Curve:Cubic,", + " HPACHeatEIRFT, !- Name", + " 1.19248, !- Coefficient1 Constant", + " -0.0300438, !- Coefficient2 x", + " 0.00103745, !- Coefficient3 x**2", + " -0.000023328, !- Coefficient4 x**3", + " -20.0, !- Minimum Value of x", + " 20.0; !- Maximum Value of x", + + " Curve:Quadratic,", + " HPACCoolCapFFF, !- Name", + " 0.8, !- Coefficient1 Constant", + " 0.2, !- Coefficient2 x", + " 0.0, !- Coefficient3 x**2", + " 0.5, !- Minimum Value of x", + " 1.5; !- Maximum Value of x", + + " Curve:Quadratic,", + " HPACCOOLEIRFFF, !- Name", + " 1.156, !- Coefficient1 Constant", + " -0.1816, !- Coefficient2 x", + " 0.0256, !- Coefficient3 x**2", + " 0.5, !- Minimum Value of x", + " 1.5; !- Maximum Value of x", + + " Curve:Quadratic,", + " HPACCOOLPLFFPLR, !- Name", + " 0.85, !- Coefficient1 Constant", + " 0.15, !- Coefficient2 x", + " 0.0, !- Coefficient3 x**2", + " 0.0, !- Minimum Value of x", + " 1.0; !- Maximum Value of x", + + " Curve:Quadratic,", + " HPACHeatEIRFFF, !- Name", + " 1.3824, !- Coefficient1 Constant", + " -0.4336, !- Coefficient2 x", + " 0.0512, !- Coefficient3 x**2", + " 0.0, !- Minimum Value of x", + " 1.0; !- Maximum Value of x", + + " Curve:Biquadratic,", + " Defrost_EIR_FT, !- Name", + " 1, !- Coefficient1 Constant", + " 0, !- Coefficient2 x", + " 0, !- Coefficient3 x**2", + " 0, !- Coefficient4 y", + " 0, !- Coefficient5 y**2", + " 0, !- Coefficient6 x*y", + " 0, !- Minimum Value of x", + " 100, !- Maximum Value of x", + " 0, !- Minimum Value of y", + " 100; !- Maximum Value of y", + + " Curve:Biquadratic,", + " dummy-waste-heat-curve, !- Name", + " 1, !- Coefficient1 Constant", + " 0, !- Coefficient2 x", + " 0, !- Coefficient3 x**2", + " 0, !- Coefficient4 y", + " 0, !- Coefficient5 y**2", + " 0, !- Coefficient6 x*y", + " 0, !- Minimum Value of x", + " 50, !- Maximum Value of x", + " 0, !- Minimum Value of y", + " 50, !- Maximum Value of y", + " 1, !- Minimum Curve Output", + " 1, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " ACCoolingCAPFTemp, !- Name", + " 1.5509, !- Coefficient1 Constant", + " -0.07505, !- Coefficient2 x", + " 0.0031, !- Coefficient3 x**2", + " 0.0024, !- Coefficient4 y", + " -0.00005, !- Coefficient5 y**2", + " -0.00043, !- Coefficient6 x*y", + " 0, !- Minimum Value of x", + " 50, !- Maximum Value of x", + " 0, !- Minimum Value of y", + " 50, !- Maximum Value of y", + " 0, !- Minimum Curve Output", + " 5, !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " ACCoolingEIRFTemp, !- Name", + " -0.30428, !- Coefficient1 Constant", + " 0.11805, !- Coefficient2 x", + " -0.00342, !- Coefficient3 x**2", + " -0.00626, !- Coefficient4 y", + " 0.0007, !- Coefficient5 y**2", + " -0.00047, !- Coefficient6 x*y", + " 0, !- Minimum Value of x", + " 50, !- Maximum Value of x", + " 0, !- Minimum Value of y", + " 50, !- Maximum Value of y", + " 0, !- Minimum Curve Output", + " 5, !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " ACCoolingCAPFFF, !- Name", + " 0.718605468, !- Coefficient1 Constant", + " 0.410099989, !- Coefficient2 x", + " -0.128705457, !- Coefficient3 x**2", + " 0, !- Minimum Value of x", + " 1.5, !- Maximum Value of x", + " 0, !- Minimum Curve Output", + " 2, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " ACCoolingEIRFFF, !- Name", + " 1.32299905, !- Coefficient1 Constant", + " -0.477711207, !- Coefficient2 x", + " 0.154712157, !- Coefficient3 x**2", + " 0, !- Minimum Value of x", + " 1.5, !- Maximum Value of x", + " 0, !- Minimum Curve Output", + " 2, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " ACCoolingPLFFPLR, !- Name", + " 0.90, !- Coefficient1 Constant", + " 0.10, !- Coefficient2 x", + " 0.0, !- Coefficient3 x**2", + " 0.0, !- Minimum Value of x", + " 1.0; !- Maximum Value of x", + + " Curve:Biquadratic,", + " HPCoolingCAPFTemp, !- Name", + " 1.55736, !- Coefficient1 Constant", + " -0.074448, !- Coefficient2 x", + " 0.003099, !- Coefficient3 x**2", + " 0.00146, !- Coefficient4 y", + " -0.000041, !- Coefficient5 y**2", + " -0.000427, !- Coefficient6 x*y", + " 0, !- Minimum Value of x", + " 50, !- Maximum Value of x", + " 0, !- Minimum Value of y", + " 50, !- Maximum Value of y", + " 0, !- Minimum Curve Output", + " 5, !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " HPCoolingEIRFTemp, !- Name", + " -0.350448, !- Coefficient1 Constant", + " 0.11681, !- Coefficient2 x", + " -0.0034, !- Coefficient3 x**2", + " -0.001226, !- Coefficient4 y", + " 0.000601, !- Coefficient5 y**2", + " -0.000467, !- Coefficient6 x*y", + " 0, !- Minimum Value of x", + " 50, !- Maximum Value of x", + " 0, !- Minimum Value of y", + " 50, !- Maximum Value of y", + " 0, !- Minimum Curve Output", + " 5, !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " HPCoolingCAPFFF, !- Name", + " 0.718664047, !- Coefficient1 Constant", + " 0.41797409, !- Coefficient2 x", + " -0.136638137, !- Coefficient3 x**2", + " 0, !- Minimum Value of x", + " 1.5, !- Maximum Value of x", + " 0, !- Minimum Curve Output", + " 2, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " HPCoolingEIRFFF, !- Name", + " 1.143487507, !- Coefficient1 Constant", + " -0.13943972, !- Coefficient2 x", + " -0.004047787, !- Coefficient3 x**2", + " 0, !- Minimum Value of x", + " 1.5, !- Maximum Value of x", + " 0, !- Minimum Curve Output", + " 2, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " HPCOOLPLFFPLR, !- Name", + " 0.90, !- Coefficient1 Constant", + " 0.10, !- Coefficient2 x", + " 0.0, !- Coefficient3 x**2", + " 0.0, !- Minimum Value of x", + " 1.0; !- Maximum Value of x", + + " Curve:Biquadratic,", + " HPHeatingCAPFTemp, !- Name", + " 0.876825, !- Coefficient1 Constant", + " -0.002955, !- Coefficient2 x", + " -0.000058, !- Coefficient3 x**2", + " 0.025335, !- Coefficient4 y", + " 0.000196, !- Coefficient5 y**2", + " -0.000043, !- Coefficient6 x*y", + " 0, !- Minimum Value of x", + " 50, !- Maximum Value of x", + " 0, !- Minimum Value of y", + " 50, !- Maximum Value of y", + " 0, !- Minimum Curve Output", + " 5, !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " HPHeatingEIRFTemp, !- Name", + " 0.704658, !- Coefficient1 Constant", + " 0.008767, !- Coefficient2 x", + " 0.000625, !- Coefficient3 x**2", + " -0.009037, !- Coefficient4 y", + " 0.000738, !- Coefficient5 y**2", + " -0.001025, !- Coefficient6 x*y", + " 0, !- Minimum Value of x", + " 50, !- Maximum Value of x", + " 0, !- Minimum Value of y", + " 50, !- Maximum Value of y", + " 0, !- Minimum Curve Output", + " 5, !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " HPHeatingCAPFFF, !- Name", + " 0.694045465, !- Coefficient1 Constant", + " 0.474207981, !- Coefficient2 x", + " -0.168253446, !- Coefficient3 x**2", + " 0, !- Minimum Value of x", + " 1.5, !- Maximum Value of x", + " 0, !- Minimum Curve Output", + " 2, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " HPHeatingEIRFFF, !- Name", + " 2.185418751, !- Coefficient1 Constant", + " -1.942827919, !- Coefficient2 x", + " 0.757409168, !- Coefficient3 x**2", + " 0, !- Minimum Value of x", + " 1.5, !- Maximum Value of x", + " 0, !- Minimum Curve Output", + " 2, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " HPHeatPLFFPLR, !- Name", + " 0.90, !- Coefficient1 Constant", + " 0.10, !- Coefficient2 x", + " 0.0, !- Coefficient3 x**2", + " 0.0, !- Minimum Value of x", + " 1.0; !- Maximum Value of x", + + " Curve:Biquadratic,", + " HPLowStageHeatingCAPFTemp, !- Name", + " 0.84613, !- Coefficient1 Constant", + " -0.002279, !- Coefficient2 x", + " -0.000047, !- Coefficient3 x**2", + " 0.026703, !- Coefficient4 y", + " 0.000201, !- Coefficient5 y**2", + " -0.000079, !- Coefficient6 x*y", + " 0, !- Minimum Value of x", + " 50, !- Maximum Value of x", + " 0, !- Minimum Value of y", + " 50, !- Maximum Value of y", + " 0, !- Minimum Curve Output", + " 5, !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " HPLowStageHeatingEIRFTemp, !- Name", + " 0.551837, !- Coefficient1 Constant", + " 0.02038, !- Coefficient2 x", + " 0.000546, !- Coefficient3 x**2", + " -0.009638, !- Coefficient4 y", + " 0.000785, !- Coefficient5 y**2", + " -0.00125, !- Coefficient6 x*y", + " 0, !- Minimum Value of x", + " 50, !- Maximum Value of x", + " 0, !- Minimum Value of y", + " 50, !- Maximum Value of y", + " 0, !- Minimum Curve Output", + " 5, !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " HPLowStageHeatingCAPFFF, !- Name", + " 0.741466907, !- Coefficient1 Constant", + " 0.378645444, !- Coefficient2 x", + " -0.119754733, !- Coefficient3 x**2", + " 0, !- Minimum Value of x", + " 1.5, !- Maximum Value of x", + " 0, !- Minimum Curve Output", + " 2, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " HPLowStageHeatingEIRFFF, !- Name", + " 2.153618211, !- Coefficient1 Constant", + " -1.737190609, !- Coefficient2 x", + " 0.584269478, !- Coefficient3 x**2", + " 0, !- Minimum Value of x", + " 1.5, !- Maximum Value of x", + " 0, !- Minimum Curve Output", + " 2, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " HPHighStageHeatingCAPFTemp, !- Name", + " 0.818223, !- Coefficient1 Constant", + " 0.001981, !- Coefficient2 x", + " -0.000203, !- Coefficient3 x**2", + " 0.028703, !- Coefficient4 y", + " 0.000207, !- Coefficient5 y**2", + " -0.000071, !- Coefficient6 x*y", + " 0, !- Minimum Value of x", + " 50, !- Maximum Value of x", + " 0, !- Minimum Value of y", + " 50, !- Maximum Value of y", + " 0, !- Minimum Curve Output", + " 5, !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " HPHighStageHeatingEIRFTemp, !- Name", + " 0.81584, !- Coefficient1 Constant", + " -0.00615, !- Coefficient2 x", + " 0.001021, !- Coefficient3 x**2", + " -0.001301, !- Coefficient4 y", + " 0.001083, !- Coefficient5 y**2", + " -0.001487, !- Coefficient6 x*y", + " 0, !- Minimum Value of x", + " 50, !- Maximum Value of x", + " 0, !- Minimum Value of y", + " 50, !- Maximum Value of y", + " 0, !- Minimum Curve Output", + " 5, !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " HPHighStageHeatingCAPFFF,!- Name", + " 0.76634609, !- Coefficient1 Constant", + " 0.32840943, !- Coefficient2 x", + " -0.094701495, !- Coefficient3 x**2", + " 0, !- Minimum Value of x", + " 1.5, !- Maximum Value of x", + " 0, !- Minimum Curve Output", + " 2, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " HPHighStageHeatingEIRFFF,!- Name", + " 2.001041353, !- Coefficient1 Constant", + " -1.58869128, !- Coefficient2 x", + " 0.587593517, !- Coefficient3 x**2", + " 0, !- Minimum Value of x", + " 1.5, !- Maximum Value of x", + " 0, !- Minimum Curve Output", + " 2, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " HP2StageHeatingPLFFPLR, !- Name", + " 0.93, !- Coefficient1 Constant", + " 0.07, !- Coefficient2 x", + " 0.0, !- Coefficient3 x**2", + " 0.0, !- Minimum Value of x", + " 1.0; !- Maximum Value of x", + + " Curve:Biquadratic,", + " HPLowStageCoolingCAPFTemp, !- Name", + " 1.658788, !- Coefficient1 Constant", + " -0.083453, !- Coefficient2 x", + " 0.003424, !- Coefficient3 x**2", + " 0.002433, !- Coefficient4 y", + " -0.000045, !- Coefficient5 y**2", + " -0.000534, !- Coefficient6 x*y", + " 0, !- Minimum Value of x", + " 50, !- Maximum Value of x", + " 0, !- Minimum Value of y", + " 50, !- Maximum Value of y", + " 0, !- Minimum Curve Output", + " 5, !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " HPLowStageCoolingEIRFTemp, !- Name", + " -0.582916, !- Coefficient1 Constant", + " 0.158101, !- Coefficient2 x", + " -0.004398, !- Coefficient3 x**2", + " -0.020335, !- Coefficient4 y", + " 0.00108, !- Coefficient5 y**2", + " -0.00064, !- Coefficient6 x*y", + " 0, !- Minimum Value of x", + " 50, !- Maximum Value of x", + " 0, !- Minimum Value of y", + " 50, !- Maximum Value of y", + " 0, !- Minimum Curve Output", + " 5, !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " HPLowStageCoolingCAPFFF, !- Name", + " 0.655239515, !- Coefficient1 Constant", + " 0.511655216, !- Coefficient2 x", + " -0.166894731, !- Coefficient3 x**2", + " 0, !- Minimum Value of x", + " 1.5, !- Maximum Value of x", + " 0, !- Minimum Curve Output", + " 2, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " HPLowStageCoolingEIRFFF, !- Name", + " 1.639108268, !- Coefficient1 Constant", + " -0.998953996, !- Coefficient2 x", + " 0.359845728, !- Coefficient3 x**2", + " 0, !- Minimum Value of x", + " 1.5, !- Maximum Value of x", + " 0, !- Minimum Curve Output", + " 2, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " HPHighStageCoolingCAPFTemp, !- Name", + " 1.472738, !- Coefficient1 Constant", + " -0.067222, !- Coefficient2 x", + " 0.00292, !- Coefficient3 x**2", + " 0.000052, !- Coefficient4 y", + " -0.00003, !- Coefficient5 y**2", + " -0.000359, !- Coefficient6 x*y", + " 0, !- Minimum Value of x", + " 50, !- Maximum Value of x", + " 0, !- Minimum Value of y", + " 50, !- Maximum Value of y", + " 0, !- Minimum Curve Output", + " 5, !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " HPHighStageCoolingEIRFTemp, !- Name", + " -0.488196, !- Coefficient1 Constant", + " 0.099162, !- Coefficient2 x", + " -0.00237, !- Coefficient3 x**2", + " 0.019503, !- Coefficient4 y", + " 0.00043, !- Coefficient5 y**2", + " -0.001097, !- Coefficient6 x*y", + " 0, !- Minimum Value of x", + " 50, !- Maximum Value of x", + " 0, !- Minimum Value of y", + " 50, !- Maximum Value of y", + " 0, !- Minimum Curve Output", + " 5, !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " HPHighStageCoolingCAPFFF,!- Name", + " 0.618281092, !- Coefficient1 Constant", + " 0.569060264, !- Coefficient2 x", + " -0.187341356, !- Coefficient3 x**2", + " 0, !- Minimum Value of x", + " 1.5, !- Maximum Value of x", + " 0, !- Minimum Curve Output", + " 2, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " HPHighStageCoolingEIRFFF,!- Name", + " 1.570774717, !- Coefficient1 Constant", + " -0.914152018, !- Coefficient2 x", + " 0.343377302, !- Coefficient3 x**2", + " 0, !- Minimum Value of x", + " 1.5, !- Maximum Value of x", + " 0, !- Minimum Curve Output", + " 2, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " HP2StageCoolingPLFFPLR, !- Name", + " 0.93, !- Coefficient1 Constant", + " 0.07, !- Coefficient2 x", + " 0.0, !- Coefficient3 x**2", + " 0.0, !- Minimum Value of x", + " 1.0; !- Maximum Value of x", + + " Curve:Biquadratic,", + " ACLowStageCoolingCAPFTemp, !- Name", + " 1.66458, !- Coefficient1 Constant", + " -0.08039, !- Coefficient2 x", + " 0.0033, !- Coefficient3 x**2", + " 0.00124, !- Coefficient4 y", + " -0.00003, !- Coefficient5 y**2", + " -0.00052, !- Coefficient6 x*y", + " 0, !- Minimum Value of x", + " 50, !- Maximum Value of x", + " 0, !- Minimum Value of y", + " 50, !- Maximum Value of y", + " 0, !- Minimum Curve Output", + " 5, !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " ACLowStageCoolingEIRFTemp, !- Name", + " -0.42738, !- Coefficient1 Constant", + " 0.14191, !- Coefficient2 x", + " -0.00412, !- Coefficient3 x**2", + " -0.01406, !- Coefficient4 y", + " 0.00083, !- Coefficient5 y**2", + " -0.00043, !- Coefficient6 x*y", + " 0, !- Minimum Value of x", + " 50, !- Maximum Value of x", + " 0, !- Minimum Value of y", + " 50, !- Maximum Value of y", + " 0, !- Minimum Curve Output", + " 5, !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " ACLowStageCoolingCAPFFF, !- Name", + " 0.65673024, !- Coefficient1 Constant", + " 0.516470835, !- Coefficient2 x", + " -0.172887149, !- Coefficient3 x**2", + " 0, !- Minimum Value of x", + " 1.5, !- Maximum Value of x", + " 0, !- Minimum Curve Output", + " 2, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " ACLowStageCoolingEIRFFF, !- Name", + " 1.562945114, !- Coefficient1 Constant", + " -0.791859997, !- Coefficient2 x", + " 0.230030877, !- Coefficient3 x**2", + " 0, !- Minimum Value of x", + " 1.5, !- Maximum Value of x", + " 0, !- Minimum Curve Output", + " 2, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " ACHighStageCoolingCAPFTemp, !- Name", + " 1.36788, !- Coefficient1 Constant", + " -0.06257, !- Coefficient2 x", + " 0.0028, !- Coefficient3 x**2", + " 0.00504, !- Coefficient4 y", + " -0.00007, !- Coefficient5 y**2", + " -0.00045, !- Coefficient6 x*y", + " 0, !- Minimum Value of x", + " 50, !- Maximum Value of x", + " 0, !- Minimum Value of y", + " 50, !- Maximum Value of y", + " 0, !- Minimum Curve Output", + " 5, !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " ACHighStageCoolingEIRFTemp, !- Name", + " 0.04232, !- Coefficient1 Constant", + " 0.07892, !- Coefficient2 x", + " -0.00238, !- Coefficient3 x**2", + " -0.00304, !- Coefficient4 y", + " 0.00053, !- Coefficient5 y**2", + " -0.00032, !- Coefficient6 x*y", + " 0, !- Minimum Value of x", + " 50, !- Maximum Value of x", + " 0, !- Minimum Value of y", + " 50, !- Maximum Value of y", + " 0, !- Minimum Curve Output", + " 5, !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " ACHighStageCoolingCAPFFF,!- Name", + " 0.690334551, !- Coefficient1 Constant", + " 0.464383753, !- Coefficient2 x", + " -0.154507638, !- Coefficient3 x**2", + " 0, !- Minimum Value of x", + " 1.5, !- Maximum Value of x", + " 0, !- Minimum Curve Output", + " 2, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " ACHighStageCoolingEIRFFF,!- Name", + " 1.31565404, !- Coefficient1 Constant", + " -0.482467162, !- Coefficient2 x", + " 0.166239001, !- Coefficient3 x**2", + " 0, !- Minimum Value of x", + " 1.5, !- Maximum Value of x", + " 0, !- Minimum Curve Output", + " 2, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " AC2StageCoolingPLFFPLR, !- Name", + " 0.93, !- Coefficient1 Constant", + " 0.07, !- Coefficient2 x", + " 0.0, !- Coefficient3 x**2", + " 0.0, !- Minimum Value of x", + " 1.0; !- Maximum Value of x", + + " Curve:Quadratic,", + " Cool-PLF-fPLR, !- Name", + " 0.80141423, !- Coefficient1 Constant", + " 0.23744685, !- Coefficient2 x", + " -0.0393773, !- Coefficient3 x**2", + " 0, !- Minimum Value of x", + " 1, !- Maximum Value of x", + " 0.7, !- Minimum Curve Output", + " 1; !- Maximum Curve Output", + + " Curve:Cubic,", + " Fan-EIR-fPLR, !- Name", + " 0.00000000, !- Coefficient1 Constant", + " 1.00000000, !- Coefficient2 x", + " 0.00000000, !- Coefficient3 x**2", + " 0.00000000, !- Coefficient4 x**3", + " 0, !- Minimum Value of x", + " 1, !- Maximum Value of x", + " 0, !- Minimum Curve Output", + " 1; !- Maximum Curve Output", + + " Curve:Cubic,", + " ConstantCubic, !- Name", + " 1, !- Coefficient1 Constant", + " 0, !- Coefficient2 x", + " 0, !- Coefficient3 x**2", + " 0, !- Coefficient4 x**3", + " -100, !- Minimum Value of x", + " 100; !- Maximum Value of x", + + " Curve:Biquadratic,", + " Cool-Cap-fT, !- Name", + " 1.26489391, !- Coefficient1 Constant", + " -0.035054982, !- Coefficient2 x", + " 0.00211086, !- Coefficient3 x**2", + " -0.001526886, !- Coefficient4 y", + " -0.0000070308, !- Coefficient5 y**2", + " -0.0004691844, !- Coefficient6 x*y", + " -100, !- Minimum Value of x", + " 100, !- Maximum Value of x", + " -100, !- Minimum Value of y", + " 100; !- Maximum Value of y", + + " Curve:Biquadratic,", + " Cool-EIR-fT, !- Name", + " 0.38402403, !- Coefficient1 Constant", + " 0.029696724, !- Coefficient2 x", + " -0.0011329308, !- Coefficient3 x**2", + " 0.006490674, !- Coefficient4 y", + " 0.0002626992, !- Coefficient5 y**2", + " -0.0001207224, !- Coefficient6 x*y", + " -100, !- Minimum Value of x", + " 100, !- Maximum Value of x", + " -100, !- Minimum Value of y", + " 100; !- Maximum Value of y", + + " AirflowNetwork:SimulationControl,", + " House AirflowNetwork, !- Name", + " MultizoneWithDistribution, !- AirflowNetwork Control", + " SurfaceAverageCalculation, !- Wind Pressure Coefficient Type", + " , !- Height Selection for Local Wind Pressure Calculation", + " LOWRISE, !- Building Type", + " 500, !- Maximum Number of Iterations {dimensionless}", + " , !- Initialization Type", + " 0.001, !- Relative Airflow Convergence Tolerance {dimensionless}", + " 0.00001, !- Absolute Airflow Convergence Tolerance {kg/s}", + " 0, !- Convergence Acceleration Limit {dimensionless}", + " 0, !- Azimuth Angle of Long Axis of Building {deg}", + " 0.75, !- Ratio of Building Width Along Short Axis to Width Along Long Axis", + " , !- Height Dependence of External Node Temperature", + " , !- Solver", + " Yes, !- Allow Unsupported Zone Equipment", + " No; !- Do Distribution Duct Sizing Calculation", + + " AvailabilityManager:Scheduled,", + " System availability, !- Name", + " always_avail; !- Schedule Name", + + " AvailabilityManagerAssignmentList,", + " availability list, !- Name", + " AvailabilityManager:Scheduled, !- Availability Manager 1 Object Type", + " System availability; !- Availability Manager 1 Name", + + " AirflowNetwork:MultiZone:Surface:EffectiveLeakageArea,", + " ZoneLeak_LongWall, !- Name", + " 0.00340012477060435, !- Effective Leakage Area {m2}", + " 1.15, !- Discharge Coefficient {dimensionless}", + " 4, !- Reference Pressure Difference {Pa}", + " 0.65; !- Air Mass Flow Exponent {dimensionless}", + + " AirflowNetwork:MultiZone:Surface:EffectiveLeakageArea,", + " ZoneLeak_ShortWall, !- Name", + " 0.00255009357795326, !- Effective Leakage Area {m2}", + " 1.15, !- Discharge Coefficient {dimensionless}", + " 4, !- Reference Pressure Difference {Pa}", + " 0.65; !- Air Mass Flow Exponent {dimensionless}", + + " AirflowNetwork:MultiZone:Surface:EffectiveLeakageArea,", + " ZoneLeak_Ceiling, !- Name", + " 0.011939399618037, !- Effective Leakage Area {m2}", + " 1.15, !- Discharge Coefficient {dimensionless}", + " 4, !- Reference Pressure Difference {Pa}", + " 0.65; !- Air Mass Flow Exponent {dimensionless}", + + " AirflowNetwork:MultiZone:Surface:EffectiveLeakageArea,", + " ZoneLeak_Floor, !- Name", + " 0.00001, !- Effective Leakage Area {m2}", + " 1.15, !- Discharge Coefficient {dimensionless}", + " 4, !- Reference Pressure Difference {Pa}", + " 0.65; !- Air Mass Flow Exponent {dimensionless}", + + " AirflowNetwork:MultiZone:Surface:EffectiveLeakageArea,", + " AtticVent, !- Name", + " 0.37, !- Effective Leakage Area {m2}", + " 1.15, !- Discharge Coefficient {dimensionless}", + " 4, !- Reference Pressure Difference {Pa}", + " 0.65; !- Air Mass Flow Exponent {dimensionless}", + + " AirflowNetwork:MultiZone:Surface:EffectiveLeakageArea,", + " CrawlVent, !- Name", + " 0.37, !- Effective Leakage Area {m2}", + " 1.15, !- Discharge Coefficient {dimensionless}", + " 4, !- Reference Pressure Difference {Pa}", + " 0.65; !- Air Mass Flow Exponent {dimensionless}", + + " AirflowNetwork:Distribution:Component:LeakageRatio,", + " SupplyLeak1, !- Name", + " 0.00594353600768884, !- Effective Leakage Ratio {dimensionless}", + " 0.566, !- Maximum Flow Rate {m3/s}", + " 25, !- Reference Pressure Difference {Pa}", + " 0.65; !- Air Mass Flow Exponent {dimensionless}", + + " AirflowNetwork:Distribution:Component:LeakageRatio,", + " SupplyLeak2, !- Name", + " 0.0336800373769034, !- Effective Leakage Ratio {dimensionless}", + " 0.566, !- Maximum Flow Rate {m3/s}", + " 25, !- Reference Pressure Difference {Pa}", + " 0.65; !- Air Mass Flow Exponent {dimensionless}", + + " AirflowNetwork:Distribution:Component:LeakageRatio,", + " ReturnLeak1, !- Name", + " 0.0334323900432497, !- Effective Leakage Ratio {dimensionless}", + " 0.566, !- Maximum Flow Rate {m3/s}", + " 25, !- Reference Pressure Difference {Pa}", + " 0.65; !- Air Mass Flow Exponent {dimensionless}", + + " AirflowNetwork:Distribution:Component:LeakageRatio,", + " ReturnLeak2, !- Name", + " 0.00619118334134254, !- Effective Leakage Ratio {dimensionless}", + " 0.566, !- Maximum Flow Rate {m3/s}", + " 25, !- Reference Pressure Difference {Pa}", + " 0.65; !- Air Mass Flow Exponent {dimensionless}", + + " AirflowNetwork:MultiZone:Zone,", + " crawlspace_unit1, !- Zone Name", + " Constant, !- Ventilation Control Mode", + " , !- Ventilation Control Zone Temperature Setpoint Schedule Name", + " , !- Minimum Venting Open Factor {dimensionless}", + " , !- Indoor and Outdoor Temperature Difference Lower Limit For Maximum Venting Open Factor {deltaC}", + " 100, !- Indoor and Outdoor Temperature Difference Upper Limit for Minimum Venting Open Factor {deltaC}", + " , !- Indoor and Outdoor Enthalpy Difference Lower Limit For Maximum Venting Open Factor {deltaJ/kg}", + " 300000, !- Indoor and Outdoor Enthalpy Difference Upper Limit for Minimum Venting Open Factor {deltaJ/kg}", + " inf_sch; !- Venting Availability Schedule Name", + + " AirflowNetwork:MultiZone:Surface,", + " BGWall_upper_ldf, !- Surface Name", + " CrawlVent, !- Leakage Component Name", + " , !- External Node Name", + " 1, !- Window/Door Opening Factor, or Crack Factor {dimensionless}", + " Constant, !- Ventilation Control Mode", + " , !- Ventilation Control Zone Temperature Setpoint Schedule Name", + " , !- Minimum Venting Open Factor {dimensionless}", + " , !- Indoor and Outdoor Temperature Difference Lower Limit For Maximum Venting Open Factor {deltaC}", + " 100, !- Indoor and Outdoor Temperature Difference Upper Limit for Minimum Venting Open Factor {deltaC}", + " , !- Indoor and Outdoor Enthalpy Difference Lower Limit For Maximum Venting Open Factor {deltaJ/kg}", + " 300000, !- Indoor and Outdoor Enthalpy Difference Upper Limit for Minimum Venting Open Factor {deltaJ/kg}", + " inf_sch; !- Venting Availability Schedule Name", + + " AirflowNetwork:MultiZone:Surface,", + " BGWall_upper_ldb, !- Surface Name", + " CrawlVent, !- Leakage Component Name", + " , !- External Node Name", + " 1, !- Window/Door Opening Factor, or Crack Factor {dimensionless}", + " Constant, !- Ventilation Control Mode", + " , !- Ventilation Control Zone Temperature Setpoint Schedule Name", + " , !- Minimum Venting Open Factor {dimensionless}", + " , !- Indoor and Outdoor Temperature Difference Lower Limit For Maximum Venting Open Factor {deltaC}", + " 100, !- Indoor and Outdoor Temperature Difference Upper Limit for Minimum Venting Open Factor {deltaC}", + " , !- Indoor and Outdoor Enthalpy Difference Lower Limit For Maximum Venting Open Factor {deltaJ/kg}", + " 300000, !- Indoor and Outdoor Enthalpy Difference Upper Limit for Minimum Venting Open Factor {deltaJ/kg}", + " inf_sch; !- Venting Availability Schedule Name", + + " AirflowNetwork:MultiZone:Surface,", + " BGWall_upper_sdl, !- Surface Name", + " CrawlVent, !- Leakage Component Name", + " , !- External Node Name", + " 1, !- Window/Door Opening Factor, or Crack Factor {dimensionless}", + " Constant, !- Ventilation Control Mode", + " , !- Ventilation Control Zone Temperature Setpoint Schedule Name", + " , !- Minimum Venting Open Factor {dimensionless}", + " , !- Indoor and Outdoor Temperature Difference Lower Limit For Maximum Venting Open Factor {deltaC}", + " 100, !- Indoor and Outdoor Temperature Difference Upper Limit for Minimum Venting Open Factor {deltaC}", + " , !- Indoor and Outdoor Enthalpy Difference Lower Limit For Maximum Venting Open Factor {deltaJ/kg}", + " 300000, !- Indoor and Outdoor Enthalpy Difference Upper Limit for Minimum Venting Open Factor {deltaJ/kg}", + " inf_sch; !- Venting Availability Schedule Name", + + " AirflowNetwork:MultiZone:Surface,", + " BGWall_upper_sdr, !- Surface Name", + " CrawlVent, !- Leakage Component Name", + " , !- External Node Name", + " 1, !- Window/Door Opening Factor, or Crack Factor {dimensionless}", + " Constant, !- Ventilation Control Mode", + " , !- Ventilation Control Zone Temperature Setpoint Schedule Name", + " , !- Minimum Venting Open Factor {dimensionless}", + " , !- Indoor and Outdoor Temperature Difference Lower Limit For Maximum Venting Open Factor {deltaC}", + " 100, !- Indoor and Outdoor Temperature Difference Upper Limit for Minimum Venting Open Factor {deltaC}", + " , !- Indoor and Outdoor Enthalpy Difference Lower Limit For Maximum Venting Open Factor {deltaJ/kg}", + " 300000, !- Indoor and Outdoor Enthalpy Difference Upper Limit for Minimum Venting Open Factor {deltaJ/kg}", + " inf_sch; !- Venting Availability Schedule Name", + + " Sizing:Zone,", + " living_unit1, !- Zone or ZoneList Name", + " SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method", + " 12, !- Zone Cooling Design Supply Air Temperature {C}", + " , !- Zone Cooling Design Supply Air Temperature Difference {deltaC}", + " SupplyAirTemperature, !- Zone Heating Design Supply Air Temperature Input Method", + " 32.22, !- Zone Heating Design Supply Air Temperature {C}", + " , !- Zone Heating Design Supply Air Temperature Difference {deltaC}", + " 0.008, !- Zone Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir}", + " 0.008, !- Zone Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir}", + " SZ_DSOA_living_unit1, !- Design Specification Outdoor Air Object Name", + " , !- Zone Heating Sizing Factor", + " , !- Zone Cooling Sizing Factor", + " DesignDay, !- Cooling Design Air Flow Method", + " , !- Cooling Design Air Flow Rate {m3/s}", + " 0.000762, !- Cooling Minimum Air Flow per Zone Floor Area {m3/s-m2}", + " , !- Cooling Minimum Air Flow {m3/s}", + " , !- Cooling Minimum Air Flow Fraction", + " DesignDay, !- Heating Design Air Flow Method", + " , !- Heating Design Air Flow Rate {m3/s}", + " 0.002032, !- Heating Maximum Air Flow per Zone Floor Area {m3/s-m2}", + " 0.1415762, !- Heating Maximum Air Flow {m3/s}", + " 0.3, !- Heating Maximum Air Flow Fraction", + " , !- Design Specification Zone Air Distribution Object Name", + " , !- Account for Dedicated Outdoor Air System", + " , !- Dedicated Outdoor Air System Control Strategy", + " , !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C}", + " , !- Dedicated Outdoor Air High Setpoint Temperature for Design {C}", + " Sensible Load Only No Latent Load, !- Zone Load Sizing Method", + " HumidityRatioDifference, !- Zone Latent Cooling Design Supply Air Humidity Ratio Input Method", + " , !- Zone Dehumidification Design Supply Air Humidity Ratio {kgWater/kgDryAir}", + " 0.005, !- Zone Cooling Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir}", + " HumidityRatioDifference, !- Zone Latent Heating Design Supply Air Humidity Ratio Input Method", + " , !- Zone Humidification Design Supply Air Humidity Ratio {kgWater/kgDryAir}", + " 0.005; !- Zone Humidification Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir}", + + " Sizing:System,", + " Central System_unit1, !- AirLoop Name", + " Sensible, !- Type of Load to Size On", + " autosize, !- Design Outdoor Air Flow Rate {m3/s}", + " 1, !- Central Heating Maximum System Air Flow Ratio", + " 7, !- Preheat Design Temperature {C}", + " 0.008, !- Preheat Design Humidity Ratio {kgWater/kgDryAir}", + " 11, !- Precool Design Temperature {C}", + " 0.008, !- Precool Design Humidity Ratio {kgWater/kgDryAir}", + " 12, !- Central Cooling Design Supply Air Temperature {C}", + " 32.22, !- Central Heating Design Supply Air Temperature {C}", + " NonCoincident, !- Type of Zone Sum to Use", + " No, !- 100% Outdoor Air in Cooling", + " No, !- 100% Outdoor Air in Heating", + " 0.008, !- Central Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir}", + " 0.008, !- Central Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir}", + " DesignDay, !- Cooling Supply Air Flow Rate Method", + " , !- Cooling Supply Air Flow Rate {m3/s}", + " , !- Cooling Supply Air Flow Rate Per Floor Area {m3/s-m2}", + " , !- Cooling Fraction of Autosized Cooling Supply Air Flow Rate", + " , !- Cooling Supply Air Flow Rate Per Unit Cooling Capacity {m3/s-W}", + " DesignDay, !- Heating Supply Air Flow Rate Method", + " , !- Heating Supply Air Flow Rate {m3/s}", + " , !- Heating Supply Air Flow Rate Per Floor Area {m3/s-m2}", + " , !- Heating Fraction of Autosized Heating Supply Air Flow Rate", + " , !- Heating Fraction of Autosized Cooling Supply Air Flow Rate", + " , !- Heating Supply Air Flow Rate Per Unit Heating Capacity {m3/s-W}", + " , !- System Outdoor Air Method", + " 1.0, !- Zone Maximum Outdoor Air Fraction {dimensionless}", + " FractionOfAutosizedCoolingCapacity, !- Cooling Design Capacity Method", + " autosize, !- Cooling Design Capacity {W}", + " , !- Cooling Design Capacity Per Floor Area {W/m2}", + " 1.15, !- Fraction of Autosized Cooling Design Capacity", + " FractionOfAutosizedHeatingCapacity, !- Heating Design Capacity Method", + " autosize, !- Heating Design Capacity {W}", + " , !- Heating Design Capacity Per Floor Area {W/m2}", + " 1.25, !- Fraction of Autosized Heating Design Capacity", + " OnOff; !- Central Cooling Capacity Control Method", + + " ZoneControl:Thermostat,", + " Zone Thermostat_unit1, !- Name", + " living_unit1, !- Zone or ZoneList Name", + " zone_control_type, !- Control Type Schedule Name", + " ThermostatSetpoint:DualSetpoint, !- Control 1 Object Type", + " thermostat_living Dual SP Control; !- Control 1 Name", + + " AirflowNetwork:MultiZone:Zone,", + " living_unit1, !- Zone Name", + " NoVent, !- Ventilation Control Mode", + " , !- Ventilation Control Zone Temperature Setpoint Schedule Name", + " 0, !- Minimum Venting Open Factor {dimensionless}", + " 0.0, !- Indoor and Outdoor Temperature Difference Lower Limit For Maximum Venting Open Factor {deltaC}", + " 100.0, !- Indoor and Outdoor Temperature Difference Upper Limit for Minimum Venting Open Factor {deltaC}", + " 0.0, !- Indoor and Outdoor Enthalpy Difference Lower Limit For Maximum Venting Open Factor {deltaJ/kg}", + " 300000.0; !- Indoor and Outdoor Enthalpy Difference Upper Limit for Minimum Venting Open Factor {deltaJ/kg}", + + " AirflowNetwork:MultiZone:Zone,", + " attic_unit1, !- Zone Name", + " Constant, !- Ventilation Control Mode", + " , !- Ventilation Control Zone Temperature Setpoint Schedule Name", + " , !- Minimum Venting Open Factor {dimensionless}", + " , !- Indoor and Outdoor Temperature Difference Lower Limit For Maximum Venting Open Factor {deltaC}", + " 100, !- Indoor and Outdoor Temperature Difference Upper Limit for Minimum Venting Open Factor {deltaC}", + " , !- Indoor and Outdoor Enthalpy Difference Lower Limit For Maximum Venting Open Factor {deltaJ/kg}", + " 300000, !- Indoor and Outdoor Enthalpy Difference Upper Limit for Minimum Venting Open Factor {deltaJ/kg}", + " inf_sch; !- Venting Availability Schedule Name", + + " AirflowNetwork:MultiZone:Surface,", + " Roof_front_unit1, !- Surface Name", + " AtticVent, !- Leakage Component Name", + " , !- External Node Name", + " 1, !- Window/Door Opening Factor, or Crack Factor {dimensionless}", + " Constant, !- Ventilation Control Mode", + " , !- Ventilation Control Zone Temperature Setpoint Schedule Name", + " 0, !- Minimum Venting Open Factor {dimensionless}", + " , !- Indoor and Outdoor Temperature Difference Lower Limit For Maximum Venting Open Factor {deltaC}", + " 100, !- Indoor and Outdoor Temperature Difference Upper Limit for Minimum Venting Open Factor {deltaC}", + " , !- Indoor and Outdoor Enthalpy Difference Lower Limit For Maximum Venting Open Factor {deltaJ/kg}", + " 300000, !- Indoor and Outdoor Enthalpy Difference Upper Limit for Minimum Venting Open Factor {deltaJ/kg}", + " inf_sch; !- Venting Availability Schedule Name", + + " AirflowNetwork:MultiZone:Surface,", + " Roof_back_unit1, !- Surface Name", + " AtticVent, !- Leakage Component Name", + " , !- External Node Name", + " 1, !- Window/Door Opening Factor, or Crack Factor {dimensionless}", + " Constant, !- Ventilation Control Mode", + " , !- Ventilation Control Zone Temperature Setpoint Schedule Name", + " , !- Minimum Venting Open Factor {dimensionless}", + " , !- Indoor and Outdoor Temperature Difference Lower Limit For Maximum Venting Open Factor {deltaC}", + " 100, !- Indoor and Outdoor Temperature Difference Upper Limit for Minimum Venting Open Factor {deltaC}", + " , !- Indoor and Outdoor Enthalpy Difference Lower Limit For Maximum Venting Open Factor {deltaJ/kg}", + " 300000, !- Indoor and Outdoor Enthalpy Difference Upper Limit for Minimum Venting Open Factor {deltaJ/kg}", + " inf_sch; !- Venting Availability Schedule Name", + + " AirflowNetwork:MultiZone:Surface,", + " Roof_right_unit1, !- Surface Name", + " AtticVent, !- Leakage Component Name", + " , !- External Node Name", + " 1, !- Window/Door Opening Factor, or Crack Factor {dimensionless}", + " Constant, !- Ventilation Control Mode", + " , !- Ventilation Control Zone Temperature Setpoint Schedule Name", + " , !- Minimum Venting Open Factor {dimensionless}", + " , !- Indoor and Outdoor Temperature Difference Lower Limit For Maximum Venting Open Factor {deltaC}", + " 100, !- Indoor and Outdoor Temperature Difference Upper Limit for Minimum Venting Open Factor {deltaC}", + " , !- Indoor and Outdoor Enthalpy Difference Lower Limit For Maximum Venting Open Factor {deltaJ/kg}", + " 300000, !- Indoor and Outdoor Enthalpy Difference Upper Limit for Minimum Venting Open Factor {deltaJ/kg}", + " inf_sch; !- Venting Availability Schedule Name", + + " AirflowNetwork:MultiZone:Surface,", + " Roof_left_unit1, !- Surface Name", + " AtticVent, !- Leakage Component Name", + " , !- External Node Name", + " 1, !- Window/Door Opening Factor, or Crack Factor {dimensionless}", + " Constant, !- Ventilation Control Mode", + " , !- Ventilation Control Zone Temperature Setpoint Schedule Name", + " , !- Minimum Venting Open Factor {dimensionless}", + " , !- Indoor and Outdoor Temperature Difference Lower Limit For Maximum Venting Open Factor {deltaC}", + " 100, !- Indoor and Outdoor Temperature Difference Upper Limit for Minimum Venting Open Factor {deltaC}", + " , !- Indoor and Outdoor Enthalpy Difference Lower Limit For Maximum Venting Open Factor {deltaJ/kg}", + " 300000, !- Indoor and Outdoor Enthalpy Difference Upper Limit for Minimum Venting Open Factor {deltaJ/kg}", + " inf_sch; !- Venting Availability Schedule Name", + + " AirflowNetwork:MultiZone:Surface,", + " Floor_unit1, !- Surface Name", + " ZoneLeak_Floor, !- Leakage Component Name", + " , !- External Node Name", + " 1.0, !- Window/Door Opening Factor, or Crack Factor {dimensionless}", + " NoVent; !- Ventilation Control Mode", + + " AirflowNetwork:MultiZone:Surface,", + " ceiling_unit1, !- Surface Name", + " ZoneLeak_Ceiling, !- Leakage Component Name", + " , !- External Node Name", + " 1.0, !- Window/Door Opening Factor, or Crack Factor {dimensionless}", + " NoVent; !- Ventilation Control Mode", + + " AirflowNetwork:MultiZone:Surface,", + " Wall_ldf_1.unit1, !- Surface Name", + " ZoneLeak_LongWall, !- Leakage Component Name", + " , !- External Node Name", + " 1.0, !- Window/Door Opening Factor, or Crack Factor {dimensionless}", + " NoVent; !- Ventilation Control Mode", + + " AirflowNetwork:MultiZone:Surface,", + " Wall_ldb_1.unit1, !- Surface Name", + " ZoneLeak_LongWall, !- Leakage Component Name", + " , !- External Node Name", + " 1.0, !- Window/Door Opening Factor, or Crack Factor {dimensionless}", + " NoVent; !- Ventilation Control Mode", + + " AirflowNetwork:MultiZone:Surface,", + " Wall_sdl_1.unit1, !- Surface Name", + " ZoneLeak_ShortWall, !- Leakage Component Name", + " , !- External Node Name", + " 1, !- Window/Door Opening Factor, or Crack Factor {dimensionless}", + " NoVent; !- Ventilation Control Mode", + + " AirflowNetwork:MultiZone:Surface,", + " Wall_sdr_1.unit1, !- Surface Name", + " ZoneLeak_ShortWall, !- Leakage Component Name", + " , !- External Node Name", + " 1, !- Window/Door Opening Factor, or Crack Factor {dimensionless}", + " NoVent; !- Ventilation Control Mode", + + " AirflowNetwork:MultiZone:Surface,", + " Wall_ldf_2.unit1, !- Surface Name", + " ZoneLeak_LongWall, !- Leakage Component Name", + " , !- External Node Name", + " 1.0, !- Window/Door Opening Factor, or Crack Factor {dimensionless}", + " NoVent; !- Ventilation Control Mode", + + " AirflowNetwork:MultiZone:Surface,", + " Wall_ldb_2.unit1, !- Surface Name", + " ZoneLeak_LongWall, !- Leakage Component Name", + " , !- External Node Name", + " 1, !- Window/Door Opening Factor, or Crack Factor {dimensionless}", + " NoVent; !- Ventilation Control Mode", + + " AirflowNetwork:MultiZone:Surface,", + " Wall_sdr_2.unit1, !- Surface Name", + " ZoneLeak_ShortWall, !- Leakage Component Name", + " , !- External Node Name", + " 1, !- Window/Door Opening Factor, or Crack Factor {dimensionless}", + " NoVent; !- Ventilation Control Mode", + + " AirflowNetwork:MultiZone:Surface,", + " Wall_sdl_2.unit1, !- Surface Name", + " ZoneLeak_ShortWall, !- Leakage Component Name", + " , !- External Node Name", + " 1, !- Window/Door Opening Factor, or Crack Factor {dimensionless}", + " NoVent; !- Ventilation Control Mode", + + " AirflowNetwork:MultiZone:Surface,", + " Wall_sdr_2.unit1, !- Surface Name", + " Zone Exhaust Fan_unit1, !- Leakage Component Name", + " , !- External Node Name", + " 1, !- Window/Door Opening Factor, or Crack Factor {dimensionless}", + " Constant; !- Ventilation Control Mode", + + " AirflowNetwork:MultiZone:Component:ZoneExhaustFan,", + " Zone Exhaust Fan_unit1, !- Name", + " 0.01, !- Air Mass Flow Coefficient When the Zone Exhaust Fan is Off at Reference Conditions {kg/s}", + " 0.667; !- Air Mass Flow Exponent When the Zone Exhaust Fan is Off {dimensionless}", + + " AirflowNetwork:Distribution:Node,", + " EquipmentInletNode_unit1,!- Name", + " Zone Equipment Inlet Node_unit1, !- Component Name or Node Name", + " Other, !- Component Object Type or Node Type", + " 3.0; !- Node Height {m}", + + " AirflowNetwork:Distribution:Node,", + " SplitterNode_unit1, !- Name", + " , !- Component Name or Node Name", + " AirLoopHVAC:ZoneSplitter,!- Component Object Type or Node Type", + " 3.0; !- Node Height {m}", + + " AirflowNetwork:Distribution:Node,", + " ZoneSupplyNode_unit1, !- Name", + " , !- Component Name or Node Name", + " Other, !- Component Object Type or Node Type", + " 3.0; !- Node Height {m}", + + " AirflowNetwork:Distribution:Node,", + " ZoneSupplyRegisterNode_unit1 ATInlet, !- Name", + " Zone Inlet Node_unit1 ATInlet, !- Component Name or Node Name", + " Other, !- Component Object Type or Node Type", + " 3.0; !- Node Height {m}", + + " AirflowNetwork:Distribution:Node,", + " ZoneSupplyRegisterNode_unit1, !- Name", + " Zone Inlet Node_unit1, !- Component Name or Node Name", + " Other, !- Component Object Type or Node Type", + " 3.0; !- Node Height {m}", + + " AirflowNetwork:Distribution:Node,", + " ZoneOutletNode_unit1, !- Name", + " Zone Outlet node_unit1, !- Component Name or Node Name", + " Other, !- Component Object Type or Node Type", + " 3.0; !- Node Height {m}", + + " AirflowNetwork:Distribution:Node,", + " ZoneReturnNode_unit1, !- Name", + " , !- Component Name or Node Name", + " Other, !- Component Object Type or Node Type", + " 3.0; !- Node Height {m}", + + " AirflowNetwork:Distribution:Node,", + " MixerNode_unit1, !- Name", + " , !- Component Name or Node Name", + " AirLoopHVAC:ZoneMixer, !- Component Object Type or Node Type", + " 3.0; !- Node Height {m}", + + " AirflowNetwork:Distribution:Node,", + " MainReturnNode_unit1, !- Name", + " Return Air Mixer Outlet_unit1, !- Component Name or Node Name", + " Other, !- Component Object Type or Node Type", + " 3.0; !- Node Height {m}", + + " AirflowNetwork:Distribution:Node,", + " MainInletNode_unit1, !- Name", + " Air Loop Inlet Node_unit1, !- Component Name or Node Name", + " Other, !- Component Object Type or Node Type", + " 3.0; !- Node Height {m}", + + " AirflowNetwork:Distribution:Node,", + " FanOutletNode_unit1, !- Name", + " Cooling Coil Air Inlet Node_unit1, !- Component Name or Node Name", + " Other, !- Component Object Type or Node Type", + " 3.0; !- Node Height {m}", + + " AirflowNetwork:Distribution:Node,", + " HeatingInletNode_unit1, !- Name", + " Heating Coil Air Inlet Node_unit1, !- Component Name or Node Name", + " Other, !- Component Object Type or Node Type", + " 3.0; !- Node Height {m}", + + " AirflowNetwork:Distribution:Node,", + " HeatingOutletNode_unit1, !- Name", + " Air Loop Outlet Node_unit1, !- Component Name or Node Name", + " Other, !- Component Object Type or Node Type", + " 3.0; !- Node Height {m}", + + " AirflowNetwork:Distribution:Component:Duct,", + " MainTrunk_unit1, !- Name", + " 2, !- Duct Length {m}", + " 0.594903102826768, !- Hydraulic Diameter {m}", + " 0.277996070726916, !- Cross Section Area {m2}", + " 0.0009, !- Surface Roughness {m}", + " 0.01, !- Coefficient for Local Dynamic Loss Due to Fitting {dimensionless}", + " 0.709825, !- Heat Transmittance Coefficient (U-Factor) for Duct Wall Construction {W/m2-K}", + " 0.0000001; !- Overall Moisture Transmittance Coefficient from Air to Air {kg/m2}", + + " AirflowNetwork:Distribution:Component:Duct,", + " ZoneSupply1_unit1, !- Name", + " 2.25, !- Duct Length {m}", + " 0.594903102826768, !- Hydraulic Diameter {m}", + " 0.277996070726916, !- Cross Section Area {m2}", + " 0.0009, !- Surface Roughness {m}", + " 10, !- Coefficient for Local Dynamic Loss Due to Fitting {dimensionless}", + " 0.709825, !- Heat Transmittance Coefficient (U-Factor) for Duct Wall Construction {W/m2-K}", + " 0.0000001; !- Overall Moisture Transmittance Coefficient from Air to Air {kg/m2}", + + " AirflowNetwork:Distribution:Component:Duct,", + " ZoneSupply2_unit1, !- Name", + " 12.75, !- Duct Length {m}", + " 0.594903102826768, !- Hydraulic Diameter {m}", + " 0.277996070726916, !- Cross Section Area {m2}", + " 0.0009, !- Surface Roughness {m}", + " 10, !- Coefficient for Local Dynamic Loss Due to Fitting {dimensionless}", + " 0.709825, !- Heat Transmittance Coefficient (U-Factor) for Duct Wall Construction {W/m2-K}", + " 0.0000001; !- Overall Moisture Transmittance Coefficient from Air to Air {kg/m2}", + + " AirflowNetwork:Distribution:Component:Duct,", + " ZoneReturn1_unit1, !- Name", + " 6.75, !- Duct Length {m}", + " 0.53209751117848, !- Hydraulic Diameter {m}", + " 0.222396856581532, !- Cross Section Area {m2}", + " 0.0009, !- Surface Roughness {m}", + " 9, !- Coefficient for Local Dynamic Loss Due to Fitting {dimensionless}", + " 0.709825, !- Heat Transmittance Coefficient (U-Factor) for Duct Wall Construction {W/m2-K}", + " 0.0000001; !- Overall Moisture Transmittance Coefficient from Air to Air {kg/m2}", + + " AirflowNetwork:Distribution:Component:Duct,", + " ZoneReturn2_unit1, !- Name", + " 1.25, !- Duct Length {m}", + " 0.53209751117848, !- Hydraulic Diameter {m}", + " 0.222396856581532, !- Cross Section Area {m2}", + " 0.0009, !- Surface Roughness {m}", + " 9, !- Coefficient for Local Dynamic Loss Due to Fitting {dimensionless}", + " 0.709825, !- Heat Transmittance Coefficient (U-Factor) for Duct Wall Construction {W/m2-K}", + " 0.0000001; !- Overall Moisture Transmittance Coefficient from Air to Air {kg/m2}", + + " AirflowNetwork:Distribution:Component:Duct,", + " ZoneSupplyLink2_unit1 ATInlet Duct, !- Name", + " 0.0001, !- Duct Length {m}", + " 0.594903102826768, !- Hydraulic Diameter {m}", + " 0.277996070726916, !- Cross Section Area {m2}", + " 0.0009, !- Surface Roughness {m}", + " 0, !- Coefficient for Local Dynamic Loss Due to Fitting {dimensionless}", + " 0.709825, !- Heat Transmittance Coefficient (U-Factor) for Duct Wall Construction {W/m2-K}", + " 0.0000001; !- Overall Moisture Transmittance Coefficient from Air to Air {kg/m2}", + + " AirflowNetwork:Distribution:Component:Duct,", + " MainReturn_unit1, !- Name", + " 1, !- Duct Length {m}", + " 0.53209751117848, !- Hydraulic Diameter {m}", + " 0.222396856581532, !- Cross Section Area {m2}", + " 0.0009, !- Surface Roughness {m}", + " 0.01, !- Coefficient for Local Dynamic Loss Due to Fitting {dimensionless}", + " 0.709825, !- Heat Transmittance Coefficient (U-Factor) for Duct Wall Construction {W/m2-K}", + " 0.0000001; !- Overall Moisture Transmittance Coefficient from Air to Air {kg/m2}", + + " AirflowNetwork:Distribution:Component:Duct,", + " AirLoopReturn_unit1, !- Name", + " 0.1, !- Duct Length {m}", + " 0.53209751117848, !- Hydraulic Diameter {m}", + " 0.222396856581532, !- Cross Section Area {m2}", + " 0.0001, !- Surface Roughness {m}", + " 0.00, !- Coefficient for Local Dynamic Loss Due to Fitting {dimensionless}", + " 0.709825, !- Heat Transmittance Coefficient (U-Factor) for Duct Wall Construction {W/m2-K}", + " 0.0000001; !- Overall Moisture Transmittance Coefficient from Air to Air {kg/m2}", + + " AirflowNetwork:Distribution:Component:Duct,", + " AirLoopSupply_unit1, !- Name", + " 0.1, !- Duct Length {m}", + " 0.594903102826768, !- Hydraulic Diameter {m}", + " 0.277996070726916, !- Cross Section Area {m2}", + " 0.0001, !- Surface Roughness {m}", + " 0.00, !- Coefficient for Local Dynamic Loss Due to Fitting {dimensionless}", + " 0.709825, !- Heat Transmittance Coefficient (U-Factor) for Duct Wall Construction {W/m2-K}", + " 0.0000001; !- Overall Moisture Transmittance Coefficient from Air to Air {kg/m2}", + + " AirflowNetwork:Distribution:Component:Fan,", + " Supply Fan_unit1, !- Fan Name", + " Fan:OnOff; !- Supply Fan Object Type", + + " AirflowNetwork:Distribution:Component:Coil,", + " DX Cooling Coil_unit1, !- Coil Name", + " Coil:Cooling:DX:SingleSpeed, !- Coil Object Type", + " 0.1, !- Air Path Length {m}", + " 1.000; !- Air Path Hydraulic Diameter {m}", + + " AirflowNetwork:Distribution:Component:Duct,", + " ZoneConnectionDuct_unit1,!- Name", + " 0.1, !- Duct Length {m}", + " 0.594903102826768, !- Hydraulic Diameter {m}", + " 0.277996070726916, !- Cross Section Area {m2}", + " 0.0001, !- Surface Roughness {m}", + " 0.00, !- Coefficient for Local Dynamic Loss Due to Fitting {dimensionless}", + " 0.709825, !- Heat Transmittance Coefficient (U-Factor) for Duct Wall Construction {W/m2-K}", + " 0.0000001; !- Overall Moisture Transmittance Coefficient from Air to Air {kg/m2}", + + " AirflowNetwork:Distribution:Component:Coil,", + " Main DX Heating Coil_unit1, !- Coil Name", + " Coil:Heating:DX:Singlespeed, !- Coil Object Type", + " 0.1, !- Air Path Length {m}", + " 1.000; !- Air Path Hydraulic Diameter {m}", + + " AirflowNetwork:Distribution:Node,", + " SuppHeatingInletNode_unit1, !- Name", + " Supp Heating coil air inlet Node_unit1, !- Component Name or Node Name", + " Other, !- Component Object Type or Node Type", + " 3.0; !- Node Height {m}", + + " AirflowNetwork:Distribution:Component:Coil,", + " Supp Heating Coil_unit1, !- Coil Name", + " Coil:Heating:Electric, !- Coil Object Type", + " 0.1, !- Air Path Length {m}", + " 1.000; !- Air Path Hydraulic Diameter {m}", + + " AirflowNetwork:Distribution:Linkage,", + " MainSupplyLink_unit1, !- Name", + " EquipmentInletNode_unit1,!- Node 1 Name", + " SplitterNode_unit1, !- Node 2 Name", + " MainTrunk_unit1, !- Component Name", + " living_unit1; !- Thermal Zone Name", + + " AirflowNetwork:Distribution:Linkage,", + " ZoneSupplyLink_unit1, !- Name", + " SplitterNode_unit1, !- Node 1 Name", + " ZoneSupplyNode_unit1, !- Node 2 Name", + " ZoneSupply1_unit1, !- Component Name", + " living_unit1; !- Thermal Zone Name", + + " AirflowNetwork:Distribution:Linkage,", + " ZoneSupplyLink2_unit1, !- Name", + " ZoneSupplyNode_unit1, !- Node 1 Name", + " ZoneSupplyRegisterNode_unit1 ATInlet, !- Node 2 Name", + " ZoneSupply2_unit1, !- Component Name", + " crawlspace_unit1; !- Thermal Zone Name", + + " AirflowNetwork:Distribution:Linkage,", + " ZoneSupplyLink2_unit1 ATInlet, !- Name", + " ZoneSupplyRegisterNode_unit1 ATInlet, !- Node 1 Name", + " ZoneSupplyRegisterNode_unit1, !- Node 2 Name", + " ZoneSupplyLink2_unit1 ATInlet Duct, !- Component Name", + " crawlspace_unit1; !- Thermal Zone Name", + + " AirflowNetwork:Distribution:Linkage,", + " ZoneSupplyConnectionLink_unit1, !- Name", + " ZoneSupplyRegisterNode_unit1, !- Node 1 Name", + " living_unit1, !- Node 2 Name", + " ZoneConnectionDuct_unit1;!- Component Name", + + " AirflowNetwork:Distribution:Linkage,", + " ZoneReturnConnectionLink_unit1, !- Name", + " living_unit1, !- Node 1 Name", + " ZoneOutletNode_unit1, !- Node 2 Name", + " ZoneConnectionDuct_unit1;!- Component Name", + + " AirflowNetwork:Distribution:Linkage,", + " ZoneReturnLink1_unit1, !- Name", + " Zoneoutletnode_unit1, !- Node 1 Name", + " ZoneReturnNode_unit1, !- Node 2 Name", + " ZoneReturn1_unit1, !- Component Name", + " crawlspace_unit1; !- Thermal Zone Name", + + " AirflowNetwork:Distribution:Linkage,", + " ZoneReturnLink2_unit1, !- Name", + " ZoneReturnNode_unit1, !- Node 1 Name", + " MixerNode_unit1, !- Node 2 Name", + " ZoneReturn2_unit1, !- Component Name", + " living_unit1; !- Thermal Zone Name", + + " AirflowNetwork:Distribution:Linkage,", + " MainReturnLink_unit1, !- Name", + " MixerNode_unit1, !- Node 1 Name", + " MainReturnNode_unit1, !- Node 2 Name", + " MainReturn_unit1, !- Component Name", + " living_unit1; !- Thermal Zone Name", + + " AirflowNetwork:Distribution:Linkage,", + " SystemReturnLink_unit1, !- Name", + " MainReturnNode_unit1, !- Node 1 Name", + " MainInletNode_unit1, !- Node 2 Name", + " AirLoopReturn_unit1; !- Component Name", + + " AirflowNetwork:Distribution:Linkage,", + " SupplyFanLink_unit1, !- Name", + " MainInletNode_unit1, !- Node 1 Name", + " FanOutletNode_unit1, !- Node 2 Name", + " Supply Fan_unit1; !- Component Name", + + " AirflowNetwork:Distribution:Linkage,", + " CoolingCoilLink_unit1, !- Name", + " FanOutletNode_unit1, !- Node 1 Name", + " HeatingInletNode_unit1, !- Node 2 Name", + " DX Cooling Coil_unit1; !- Component Name", + + " AirflowNetwork:Distribution:Linkage,", + " EquipmentAirLoopLink_unit1, !- Name", + " HeatingOutletNode_unit1, !- Node 1 Name", + " EquipmentInletNode_unit1,!- Node 2 Name", + " AirLoopSupply_unit1; !- Component Name", + + " AirflowNetwork:Distribution:Linkage,", + " HeatingCoilLink_unit1, !- Name", + " HeatingInletNode_unit1, !- Node 1 Name", + " SuppHeatingInletNode_unit1, !- Node 2 Name", + " Main DX Heating Coil_unit1; !- Component Name", + + " AirflowNetwork:Distribution:Linkage,", + " SuppHeatingCoilLink_unit1, !- Name", + " SuppHeatingInletNode_unit1, !- Node 1 Name", + " HeatingOutletNode_unit1, !- Node 2 Name", + " Supp Heating Coil_unit1; !- Component Name", + + " AirflowNetwork:Distribution:Linkage,", + " ZoneSupplyLeakLink_unit1,!- Name", + " ZoneSupplyNode_unit1, !- Node 1 Name", + " living_unit1, !- Node 2 Name", + " SupplyLeak1; !- Component Name", + + " AirflowNetwork:Distribution:Linkage,", + " ZoneSupplyLeakLink2_unit1, !- Name", + " ZoneSupplyRegisterNode_unit1 ATInlet, !- Node 1 Name", + " crawlspace_unit1, !- Node 2 Name", + " SupplyLeak2; !- Component Name", + + " AirflowNetwork:Distribution:Linkage,", + " ZoneReturnLeakLink_unit1,!- Name", + " crawlspace_unit1, !- Node 1 Name", + " ZoneReturnNode_unit1, !- Node 2 Name", + " ReturnLeak1; !- Component Name", + + " AirflowNetwork:Distribution:Linkage,", + " ZoneReturnLeakLink2_unit1, !- Name", + " living_unit1, !- Node 1 Name", + " ZoneReturnNode_unit1, !- Node 2 Name", + " ReturnLeak2; !- Component Name", + + " AirTerminal:SingleDuct:ConstantVolume:NoReheat,", + " ZoneDirectAir_unit1, !- Name", + " always_avail, !- Availability Schedule Name", + " Zone Inlet Node_unit1 ATInlet, !- Air Inlet Node Name", + " Zone Inlet Node_unit1, !- Air Outlet Node Name", + " autosize, !- Maximum Air Flow Rate {m3/s}", + " , !- Design Specification Outdoor Air Object Name", + " ; !- Per Person Ventilation Rate Mode", + + " AirLoopHVAC:ZoneSplitter,", + " Zone Supply Air Splitter_unit1, !- Name", + " Zone Equipment Inlet Node_unit1, !- Inlet Node Name", + " Zone Inlet Node_unit1 ATInlet; !- Outlet 1 Node Name", + + " AirLoopHVAC:SupplyPath,", + " SupplyPath_unit1, !- Name", + " Zone Equipment Inlet Node_unit1, !- Supply Air Path Inlet Node Name", + " AirLoopHVAC:ZoneSplitter,!- Component 1 Object Type", + " Zone Supply Air Splitter_unit1; !- Component 1 Name", + + " AirLoopHVAC:ZoneMixer,", + " Zone Return Air Mixer_unit1, !- Name", + " Return Air Mixer Outlet_unit1, !- Outlet Node Name", + " Zone Outlet Node_unit1; !- Inlet 1 Node Name", + + " AirLoopHVAC:ReturnPath,", + " ReturnPath_unit1, !- Name", + " Return Air Mixer Outlet_unit1, !- Return Air Path Outlet Node Name", + " AirLoopHVAC:ZoneMixer, !- Component 1 Object Type", + " Zone Return Air Mixer_unit1; !- Component 1 Name", + + " BranchList,", + " Air Loop Branches_unit1, !- Name", + " Air Loop Main Branch_unit1; !- Branch 1 Name", + + " DesignSpecification:OutdoorAir,", + " SZ_DSOA_living_unit1, !- Name", + " Flow/Zone, !- Outdoor Air Method", + " 0, !- Outdoor Air Flow per Person {m3/s-person}", + " , !- Outdoor Air Flow per Zone Floor Area {m3/s-m2}", + " 0.0283168464628752; !- Outdoor Air Flow per Zone {m3/s}", + + " Coil:Cooling:DX:SingleSpeed,", + " DX Cooling Coil_unit1, !- Name", + " always_avail, !- Availability Schedule Name", + " autosize, !- Gross Rated Total Cooling Capacity {W}", + " autosize, !- Gross Rated Sensible Heat Ratio", + " 4.30390188093723, !- Gross Rated Cooling COP {W/W}", + " autosize, !- Rated Air Flow Rate {m3/s}", + " , !- 2017 Rated Evaporator Fan Power Per Volume Flow Rate {W/(m3/s)}", + " , !- 2023 Rated Evaporator Fan Power Per Volume Flow Rate {W/(m3/s)}", + " Cooling Coil Air Inlet Node_unit1, !- Air Inlet Node Name", + " Heating Coil Air Inlet Node_unit1, !- Air Outlet Node Name", + " HPACCoolCapFT, !- Total Cooling Capacity Function of Temperature Curve Name", + " HPACCoolCapFFF, !- Total Cooling Capacity Function of Flow Fraction Curve Name", + " HPACCOOLEIRFT, !- Energy Input Ratio Function of Temperature Curve Name", + " HPACCOOLEIRFFF, !- Energy Input Ratio Function of Flow Fraction Curve Name", + " HPACCOOLPLFFPLR, !- Part Load Fraction Correlation Curve Name", + " , !- Minimum Outdoor Dry-Bulb Temperature for Compressor Operation {C}", + " , !- Nominal Time for Condensate Removal to Begin {s}", + " ; !- Ratio of Initial Moisture Evaporation Rate and Steady State Latent Capacity {dimensionless}", + + " Fan:OnOff,", + " Supply Fan_unit1, !- Name", + " always_avail, !- Availability Schedule Name", + " 0.50054, !- Fan Total Efficiency", + " 400, !- Pressure Rise {Pa}", + " autosize, !- Maximum Flow Rate {m3/s}", + " 0.863, !- Motor Efficiency", + " 1, !- Motor In Airstream Fraction", + " air loop inlet node_unit1, !- Air Inlet Node Name", + " cooling coil air inlet node_unit1, !- Air Outlet Node Name", + " , !- Fan Power Ratio Function of Speed Ratio Curve Name", + " , !- Fan Efficiency Ratio Function of Speed Ratio Curve Name", + " General; !- End-Use Subcategory", + + " Fan:ZoneExhaust,", + " Zone Exhaust Fan_unit1, !- Name", + " always_avail, !- Availability Schedule Name", + " 0.6, !- Fan Total Efficiency", + " 908.091434122032, !- Pressure Rise {Pa}", + " 0.0283168464628752, !- Maximum Flow Rate {m3/s}", + " Zone Exhaust Node_unit1, !- Air Inlet Node Name", + " zone exhaust fan outlet nodes_unit1, !- Air Outlet Node Name", + " Ventilation, !- End-Use Subcategory", + " , !- Flow Fraction Schedule Name", + " Decoupled; !- System Availability Manager Coupling Mode", + + " AirLoopHVAC,", + " Central System_unit1, !- Name", + " , !- Controller List Name", + " availability list, !- Availability Manager List Name", + " autosize, !- Design Supply Air Flow Rate {m3/s}", + " Air Loop Branches_unit1, !- Branch List Name", + " , !- Connector List Name", + " Air Loop Inlet Node_unit1, !- Supply Side Inlet Node Name", + " Return Air Mixer Outlet_unit1, !- Demand Side Outlet Node Name", + " Zone Equipment Inlet Node_unit1, !- Demand Side Inlet Node Names", + " Air Loop Outlet Node_unit1; !- Supply Side Outlet Node Names", + + " AirLoopHVAC:UnitaryHeatPump:AirToAir,", + " Heat Pump_unit1, !- Name", + " always_avail, !- Availability Schedule Name", + " Air Loop Inlet node_unit1, !- Air Inlet Node Name", + " Air Loop Outlet Node_unit1, !- Air Outlet Node Name", + " autosize, !- Cooling Supply Air Flow Rate {m3/s}", + " autosize, !- Heating Supply Air Flow Rate {m3/s}", + " 0.0, !- No Load Supply Air Flow Rate {m3/s}", + " living_unit1, !- Controlling Zone or Thermostat Location", + " Fan:OnOff, !- Supply Air Fan Object Type", + " Supply Fan_unit1, !- Supply Air Fan Name", + " Coil:Heating:DX:SingleSpeed, !- Heating Coil Object Type", + " Main DX Heating Coil_unit1, !- Heating Coil Name", + " Coil:Cooling:DX:SingleSpeed, !- Cooling Coil Object Type", + " DX Cooling Coil_unit1, !- Cooling Coil Name", + " Coil:Heating:Electric, !- Supplemental Heating Coil Object Type", + " Supp Heating Coil_unit1, !- Supplemental Heating Coil Name", + " 50, !- Maximum Supply Air Temperature from Supplemental Heater {C}", + " 10, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C}", + " BlowThrough, !- Fan Placement", + " fan_cycle; !- Supply Air Fan Operating Mode Schedule Name", + + " Coil:Heating:DX:SingleSpeed,", + " Main DX Heating Coil_unit1, !- Name", + " always_avail, !- Availability Schedule Name", + " autosize, !- Gross Rated Heating Capacity {W}", + " 3.8377982946518, !- Gross Rated Heating COP {W/W}", + " autosize, !- Rated Air Flow Rate {m3/s}", + " , !- 2017 Rated Supply Fan Power Per Volume Flow Rate {W/(m3/s)}", + " , !- 2023 Rated Supply Fan Power Per Volume Flow Rate {W/(m3/s)}", + " Heating Coil Air Inlet Node_unit1, !- Air Inlet Node Name", + " Supp Heating Coil Air Inlet Node_unit1, !- Air Outlet Node Name", + " HPACHeatCapFT, !- Heating Capacity Function of Temperature Curve Name", + " HPACHeatCapFFF, !- Heating Capacity Function of Flow Fraction Curve Name", + " HPACHeatEIRFT, !- Energy Input Ratio Function of Temperature Curve Name", + " HPACHeatEIRFFF, !- Energy Input Ratio Function of Flow Fraction Curve Name", + " HPACCOOLPLFFPLR, !- Part Load Fraction Correlation Curve Name", + " Defrost_EIR_FT, !- Defrost Energy Input Ratio Function of Temperature Curve Name", + " -23.33, !- Minimum Outdoor Dry-Bulb Temperature for Compressor Operation {C}", + " , !- Outdoor Dry-Bulb Temperature to Turn On Compressor {C}", + " 5.0, !- Maximum Outdoor Dry-Bulb Temperature for Defrost Operation {C}", + " 200.0, !- Crankcase Heater Capacity {W}", + " , !- Crankcase Heater Capacity Function of Temperature Curve Name", + " 10.0, !- Maximum Outdoor Dry-Bulb Temperature for Crankcase Heater Operation {C}", + " ReverseCycle, !- Defrost Strategy", + " OnDemand, !- Defrost Control", + " , !- Defrost Time Period Fraction", + " , !- Resistive Defrost Heater Capacity {W}", + " , !- Region number for calculating HSPF", + " , !- Evaporator Air Inlet Node Name", + " , !- Zone Name for Evaporator Placement", + " , !- Secondary Coil Air Flow Rate {m3/s}", + " ; !- Secondary Coil Fan Flow Scaling Factor {m3/s}", + + " Coil:Heating:Electric,", + " Supp Heating Coil_unit1, !- Name", + " always_avail, !- Availability Schedule Name", + " 1, !- Efficiency", + " autosize, !- Nominal Capacity {W}", + " Supp Heating Coil Air Inlet Node_unit1, !- Air Inlet Node Name", + " Air Loop Outlet Node_unit1; !- Air Outlet Node Name", + + " Branch,", + " Air Loop Main Branch_unit1, !- Name", + " , !- Pressure Drop Curve Name", + " AirLoopHVAC:UnitaryHeatPump:AirtoAir, !- Component 1 Object Type", + " Heat Pump_unit1, !- Component 1 Name", + " Air Loop Inlet Node_unit1, !- Component 1 Inlet Node Name", + " Air Loop Outlet Node_unit1; !- Component 1 Outlet Node Name", + + " ZoneHVAC:AirDistributionUnit,", + " ZoneDirectAir_unit1 ADU, !- Name", + " Zone Inlet Node_unit1, !- Air Distribution Unit Outlet Node Name", + " AirTerminal:SingleDuct:ConstantVolume:NoReheat, !- Air Terminal Object Type", + " ZoneDirectAir_unit1; !- Air Terminal Name", + + " NodeList,", + " Zone Inlet Nodes_unit1, !- Name", + " Zone Inlet Node_unit1; !- Node 1 Name", + + " ZoneHVAC:EquipmentList,", + " ZoneEquipment_unit1, !- Name", + " SequentialLoad, !- Load Distribution Scheme", + " ZoneHVAC:AirDistributionUnit, !- Zone Equipment 1 Object Type", + " ZoneDirectAir_unit1 ADU, !- Zone Equipment 1 Name", + " 1, !- Zone Equipment 1 Cooling Sequence", + " 1, !- Zone Equipment 1 Heating or No-Load Sequence", + " , !- Zone Equipment 1 Sequential Cooling Fraction Schedule Name", + " , !- Zone Equipment 1 Sequential Heating Fraction Schedule Name", + " Fan:ZoneExhaust, !- Zone Equipment 2 Object Type", + " Zone Exhaust Fan_unit1, !- Zone Equipment 2 Name", + " 2, !- Zone Equipment 2 Cooling Sequence", + " 2, !- Zone Equipment 2 Heating or No-Load Sequence", + " , !- Zone Equipment 2 Sequential Cooling Fraction Schedule Name", + " ; !- Zone Equipment 2 Sequential Heating Fraction Schedule Name", + + " ZoneHVAC:EquipmentConnections,", + " living_unit1, !- Zone Name", + " ZoneEquipment_unit1, !- Zone Conditioning Equipment List Name", + " zone inlet nodes_unit1, !- Zone Air Inlet Node or NodeList Name", + " Zone Exhaust Node_unit1, !- Zone Air Exhaust Node or NodeList Name", + " Zone Node_unit1, !- Zone Air Node Name", + " Zone Outlet Node_unit1; !- Zone Return Air Node or NodeList Name", + + " Material,", + " Pipe Insulation, !- Name", + " VeryRough, !- Roughness", + " 0.0127032520325203, !- Thickness {m}", + " 0.03317175, !- Conductivity {W/m-K}", + " 91.0, !- Density {kg/m3}", + " 836.0, !- Specific Heat {J/kg-K}", + " 0.9, !- Thermal Absorptance", + " 0.5, !- Solar Absorptance", + " 0.5; !- Visible Absorptance", + + " People,", + " people_unit1, !- Name", + " living_unit1, !- Zone or ZoneList or Space or SpaceList Name", + " Occupancy, !- Number of People Schedule Name", + " People, !- Number of People Calculation Method", + " 3, !- Number of People", + " , !- People per Floor Area {person/m2}", + " , !- Floor Area per Person {m2/person}", + " 0, !- Fraction Radiant", + " autocalculate, !- Sensible Heat Fraction", + " activity_sch, !- Activity Level Schedule Name", + " , !- Carbon Dioxide Generation Rate {m3/s-W}", + " No, !- Enable ASHRAE 55 Comfort Warnings", + " EnclosureAveraged; !- Mean Radiant Temperature Calculation Type", + + " Schedule:Compact,", + " Occupancy, !- Name", + " any number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until 24:00,1.0; !- Field 3", + + " Lights,", + " Living Hardwired Lighting1, !- Name", + " living_unit1, !- Zone or ZoneList or Space or SpaceList Name", + " InteriorLightingHE, !- Schedule Name", + " LightingLevel, !- Design Level Calculation Method", + " 254.905410881937, !- Lighting Level {W}", + " , !- Watts per Zone Floor Area {W/m2}", + " , !- Watts per Person {W/person}", + " 0, !- Return Air Fraction", + " 0.6, !- Fraction Radiant", + " 0.2, !- Fraction Visible", + " 0; !- Fraction Replaceable", + + " Schedule:Compact,", + " InteriorLightingHE, !- Name", + " any number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until 24:00,1.0; !- Field 3", + + " Output:Constructions,Constructions,Materials;", + + " OutputControl:Table:Style,", + " CommaAndHTML, !- Column Separator", + " InchPound; !- Unit Conversion", + + }); + + ASSERT_TRUE(process_idf(idf_objects)); + + state->dataGlobal->DDOnlySimulation = true; + + SimulationManager::ManageSimulation(*state); // run the design day over the warmup period (24 hrs, 25 days) + + // Crawlspace_Unit1 + state->afn->AirflowNetworkNodeData(1).EPlusNodeNum = 0; + // LIving_Unit1 + state->afn->AirflowNetworkNodeData(2).EPlusNodeNum = 4; + // Attic_Unit1 + state->afn->AirflowNetworkNodeData(3).EPlusNodeNum = 0; +} + } // namespace EnergyPlus diff --git a/tst/EnergyPlus/unit/Autosizing/All_Simple_Sizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/All_Simple_Sizing.unit.cc index b0b65317cba..2f9cc38f857 100644 --- a/tst/EnergyPlus/unit/Autosizing/All_Simple_Sizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/All_Simple_Sizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Autosizing/AutosizingFixture.hh b/tst/EnergyPlus/unit/Autosizing/AutosizingFixture.hh index 19d967877d2..35a419cea7e 100644 --- a/tst/EnergyPlus/unit/Autosizing/AutosizingFixture.hh +++ b/tst/EnergyPlus/unit/Autosizing/AutosizingFixture.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Autosizing/BaseClassSizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/BaseClassSizing.unit.cc index 8e677ea9ef0..2f95439824a 100644 --- a/tst/EnergyPlus/unit/Autosizing/BaseClassSizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/BaseClassSizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Autosizing/CoolingAirFlowSizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/CoolingAirFlowSizing.unit.cc index 685ce0cb6f8..c139f4f2e75 100644 --- a/tst/EnergyPlus/unit/Autosizing/CoolingAirFlowSizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/CoolingAirFlowSizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Autosizing/CoolingCapacitySizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/CoolingCapacitySizing.unit.cc index d1ea5d88f4e..e36006bcf82 100644 --- a/tst/EnergyPlus/unit/Autosizing/CoolingCapacitySizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/CoolingCapacitySizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Autosizing/CoolingSHRSizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/CoolingSHRSizing.unit.cc index 9da0957c54b..3c000a04111 100644 --- a/tst/EnergyPlus/unit/Autosizing/CoolingSHRSizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/CoolingSHRSizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesAirInletHumRatSizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesAirInletHumRatSizing.unit.cc index f863b3a759f..3eae1ca72cd 100644 --- a/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesAirInletHumRatSizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesAirInletHumRatSizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesAirInletTempSizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesAirInletTempSizing.unit.cc index 159819a66e1..a7d055797b2 100644 --- a/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesAirInletTempSizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesAirInletTempSizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesAirOutletHumRatSizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesAirOutletHumRatSizing.unit.cc index 50fba037b47..8d331185c42 100644 --- a/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesAirOutletHumRatSizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesAirOutletHumRatSizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesAirOutletTempSizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesAirOutletTempSizing.unit.cc index 8adf9e821b9..6ca1159267a 100644 --- a/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesAirOutletTempSizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesAirOutletTempSizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesWaterInletTempSizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesWaterInletTempSizing.unit.cc index 08e2d27d582..da2e85da0d6 100644 --- a/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesWaterInletTempSizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesWaterInletTempSizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Autosizing/CoolingWaterNumofTubesPerRowSizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/CoolingWaterNumofTubesPerRowSizing.unit.cc index 7935865aa9a..216c4b44b38 100644 --- a/tst/EnergyPlus/unit/Autosizing/CoolingWaterNumofTubesPerRowSizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/CoolingWaterNumofTubesPerRowSizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Autosizing/CoolingWaterflowSizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/CoolingWaterflowSizing.unit.cc index 738c6f8cdae..889e938d240 100644 --- a/tst/EnergyPlus/unit/Autosizing/CoolingWaterflowSizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/CoolingWaterflowSizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Autosizing/HeatingAirFlowSizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/HeatingAirFlowSizing.unit.cc index 5f108039a97..33dfa4445f6 100644 --- a/tst/EnergyPlus/unit/Autosizing/HeatingAirFlowSizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/HeatingAirFlowSizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Autosizing/HeatingAirflowUASizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/HeatingAirflowUASizing.unit.cc index 04c7c287faf..ddc947f1aeb 100644 --- a/tst/EnergyPlus/unit/Autosizing/HeatingAirflowUASizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/HeatingAirflowUASizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Autosizing/HeatingCapacitySizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/HeatingCapacitySizing.unit.cc index 8fecf77c359..83c485868c4 100644 --- a/tst/EnergyPlus/unit/Autosizing/HeatingCapacitySizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/HeatingCapacitySizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Autosizing/HeatingWaterDesAirInletHumRatSizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/HeatingWaterDesAirInletHumRatSizing.unit.cc index 769301a0b97..ea2e9ae086b 100644 --- a/tst/EnergyPlus/unit/Autosizing/HeatingWaterDesAirInletHumRatSizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/HeatingWaterDesAirInletHumRatSizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Autosizing/HeatingWaterDesAirInletTempSizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/HeatingWaterDesAirInletTempSizing.unit.cc index 71ed41c5ed5..a6edf49e8c6 100644 --- a/tst/EnergyPlus/unit/Autosizing/HeatingWaterDesAirInletTempSizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/HeatingWaterDesAirInletTempSizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.unit.cc index 941a1e77866..cc2f948987e 100644 --- a/tst/EnergyPlus/unit/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Autosizing/HeatingWaterDesCoilWaterVolFlowUsedForUASizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/HeatingWaterDesCoilWaterVolFlowUsedForUASizing.unit.cc index 011b2921561..79fb03db904 100644 --- a/tst/EnergyPlus/unit/Autosizing/HeatingWaterDesCoilWaterVolFlowUsedForUASizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/HeatingWaterDesCoilWaterVolFlowUsedForUASizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Autosizing/HeatingWaterflowSizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/HeatingWaterflowSizing.unit.cc index 3744704a359..5a392df807d 100644 --- a/tst/EnergyPlus/unit/Autosizing/HeatingWaterflowSizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/HeatingWaterflowSizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Autosizing/SystemAirFlowSizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/SystemAirFlowSizing.unit.cc index 1e67b904342..c33da12fdad 100644 --- a/tst/EnergyPlus/unit/Autosizing/SystemAirFlowSizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/SystemAirFlowSizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Autosizing/WaterHeatingCapacitySizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/WaterHeatingCapacitySizing.unit.cc index 546fe2b562e..cfa02a5a5f4 100644 --- a/tst/EnergyPlus/unit/Autosizing/WaterHeatingCapacitySizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/WaterHeatingCapacitySizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Autosizing/WaterHeatingCoilUASizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/WaterHeatingCoilUASizing.unit.cc index d236b958b8d..fdcb47709e8 100644 --- a/tst/EnergyPlus/unit/Autosizing/WaterHeatingCoilUASizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/WaterHeatingCoilUASizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/BaseboardElectric.unit.cc b/tst/EnergyPlus/unit/BaseboardElectric.unit.cc index e2bb537cb8e..2872b47864f 100644 --- a/tst/EnergyPlus/unit/BaseboardElectric.unit.cc +++ b/tst/EnergyPlus/unit/BaseboardElectric.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/BaseboardRadiator.unit.cc b/tst/EnergyPlus/unit/BaseboardRadiator.unit.cc index ea3fd25b829..7a5ccf7e017 100644 --- a/tst/EnergyPlus/unit/BaseboardRadiator.unit.cc +++ b/tst/EnergyPlus/unit/BaseboardRadiator.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/BoilerHotWater.unit.cc b/tst/EnergyPlus/unit/BoilerHotWater.unit.cc index 6527b8c9202..0904ceb1a6e 100644 --- a/tst/EnergyPlus/unit/BoilerHotWater.unit.cc +++ b/tst/EnergyPlus/unit/BoilerHotWater.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/BoilerSteam.unit.cc b/tst/EnergyPlus/unit/BoilerSteam.unit.cc index 3034c759c88..689d72add8c 100644 --- a/tst/EnergyPlus/unit/BoilerSteam.unit.cc +++ b/tst/EnergyPlus/unit/BoilerSteam.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/BranchInputManager.unit.cc b/tst/EnergyPlus/unit/BranchInputManager.unit.cc index 799e8af80e2..da12f7d7f71 100644 --- a/tst/EnergyPlus/unit/BranchInputManager.unit.cc +++ b/tst/EnergyPlus/unit/BranchInputManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/BranchNodeConnections.unit.cc b/tst/EnergyPlus/unit/BranchNodeConnections.unit.cc index 3a969751f91..f80e8e05e0b 100644 --- a/tst/EnergyPlus/unit/BranchNodeConnections.unit.cc +++ b/tst/EnergyPlus/unit/BranchNodeConnections.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/CMakeLists.txt b/tst/EnergyPlus/unit/CMakeLists.txt index d2ac8a8c969..409fd871cd0 100644 --- a/tst/EnergyPlus/unit/CMakeLists.txt +++ b/tst/EnergyPlus/unit/CMakeLists.txt @@ -150,6 +150,7 @@ set(test_src ICSCollector.unit.cc IceThermalStorage.unit.cc IdfParser.unit.cc + IndoorGreen.unit.cc InputProcessor.unit.cc IntegratedHeatPump.unit.cc InternalHeatGains.unit.cc @@ -220,7 +221,6 @@ set(test_src SizingAnalysisObjects.unit.cc SizingManager.unit.cc SolarShading.unit.cc - SortAndStringUtilities.unit.cc Standard621SimplifiedProcedure.unit.cc StandardRatings.unit.cc StringUtilities.unit.cc diff --git a/tst/EnergyPlus/unit/CTElectricGenerator.unit.cc b/tst/EnergyPlus/unit/CTElectricGenerator.unit.cc index c0de5170c08..01d0555341c 100644 --- a/tst/EnergyPlus/unit/CTElectricGenerator.unit.cc +++ b/tst/EnergyPlus/unit/CTElectricGenerator.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ChilledCeilingPanelSimple.unit.cc b/tst/EnergyPlus/unit/ChilledCeilingPanelSimple.unit.cc index 1d33c284ce9..6f1382498a4 100644 --- a/tst/EnergyPlus/unit/ChilledCeilingPanelSimple.unit.cc +++ b/tst/EnergyPlus/unit/ChilledCeilingPanelSimple.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ChillerAbsorption.unit.cc b/tst/EnergyPlus/unit/ChillerAbsorption.unit.cc index 0ad6a36b24b..23430376eef 100644 --- a/tst/EnergyPlus/unit/ChillerAbsorption.unit.cc +++ b/tst/EnergyPlus/unit/ChillerAbsorption.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ChillerConstantCOP.unit.cc b/tst/EnergyPlus/unit/ChillerConstantCOP.unit.cc index bb835f782c4..243ab782532 100644 --- a/tst/EnergyPlus/unit/ChillerConstantCOP.unit.cc +++ b/tst/EnergyPlus/unit/ChillerConstantCOP.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ChillerElectric.unit.cc b/tst/EnergyPlus/unit/ChillerElectric.unit.cc index bc347c0f0d7..e0afecb93c2 100644 --- a/tst/EnergyPlus/unit/ChillerElectric.unit.cc +++ b/tst/EnergyPlus/unit/ChillerElectric.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ChillerElectricEIR.unit.cc b/tst/EnergyPlus/unit/ChillerElectricEIR.unit.cc index ab036a094b4..b78b840f5e9 100644 --- a/tst/EnergyPlus/unit/ChillerElectricEIR.unit.cc +++ b/tst/EnergyPlus/unit/ChillerElectricEIR.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ChillerExhaustAbsorption.unit.cc b/tst/EnergyPlus/unit/ChillerExhaustAbsorption.unit.cc index 8a230483e1e..1aaeb633ec5 100644 --- a/tst/EnergyPlus/unit/ChillerExhaustAbsorption.unit.cc +++ b/tst/EnergyPlus/unit/ChillerExhaustAbsorption.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ChillerGasAbsorption.unit.cc b/tst/EnergyPlus/unit/ChillerGasAbsorption.unit.cc index a42d2d8d51e..5f4d4a77ffa 100644 --- a/tst/EnergyPlus/unit/ChillerGasAbsorption.unit.cc +++ b/tst/EnergyPlus/unit/ChillerGasAbsorption.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ChillerIndirectAbsorption.unit.cc b/tst/EnergyPlus/unit/ChillerIndirectAbsorption.unit.cc index 6503818155a..440aaf0adb7 100644 --- a/tst/EnergyPlus/unit/ChillerIndirectAbsorption.unit.cc +++ b/tst/EnergyPlus/unit/ChillerIndirectAbsorption.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Coils/CoilCoolingDX.unit.cc b/tst/EnergyPlus/unit/Coils/CoilCoolingDX.unit.cc index fba27e7206a..96871d18c8a 100644 --- a/tst/EnergyPlus/unit/Coils/CoilCoolingDX.unit.cc +++ b/tst/EnergyPlus/unit/Coils/CoilCoolingDX.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Coils/CoilCoolingDXCurveFitOperatingMode.unit.cc b/tst/EnergyPlus/unit/Coils/CoilCoolingDXCurveFitOperatingMode.unit.cc index 683bf3900b1..d16c8d23f98 100644 --- a/tst/EnergyPlus/unit/Coils/CoilCoolingDXCurveFitOperatingMode.unit.cc +++ b/tst/EnergyPlus/unit/Coils/CoilCoolingDXCurveFitOperatingMode.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Coils/CoilCoolingDXCurveFitPerformance.unit.cc b/tst/EnergyPlus/unit/Coils/CoilCoolingDXCurveFitPerformance.unit.cc index a99b0c9fbc0..13688b51235 100644 --- a/tst/EnergyPlus/unit/Coils/CoilCoolingDXCurveFitPerformance.unit.cc +++ b/tst/EnergyPlus/unit/Coils/CoilCoolingDXCurveFitPerformance.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Coils/CoilCoolingDXCurveFitSpeed.unit.cc b/tst/EnergyPlus/unit/Coils/CoilCoolingDXCurveFitSpeed.unit.cc index fb7291b0347..24a07f28361 100644 --- a/tst/EnergyPlus/unit/Coils/CoilCoolingDXCurveFitSpeed.unit.cc +++ b/tst/EnergyPlus/unit/Coils/CoilCoolingDXCurveFitSpeed.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Coils/CoilCoolingDXFixture.hh b/tst/EnergyPlus/unit/Coils/CoilCoolingDXFixture.hh index 812829ccd2a..2ceb5197ebb 100644 --- a/tst/EnergyPlus/unit/Coils/CoilCoolingDXFixture.hh +++ b/tst/EnergyPlus/unit/Coils/CoilCoolingDXFixture.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/CommandLineInterface.unit.cc b/tst/EnergyPlus/unit/CommandLineInterface.unit.cc index adb7b523cca..d9d23566260 100644 --- a/tst/EnergyPlus/unit/CommandLineInterface.unit.cc +++ b/tst/EnergyPlus/unit/CommandLineInterface.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/CondenserLoopTowers.unit.cc b/tst/EnergyPlus/unit/CondenserLoopTowers.unit.cc index 64f155597bc..d078fad4b8f 100644 --- a/tst/EnergyPlus/unit/CondenserLoopTowers.unit.cc +++ b/tst/EnergyPlus/unit/CondenserLoopTowers.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ConstructionInternalSource.unit.cc b/tst/EnergyPlus/unit/ConstructionInternalSource.unit.cc index aabb6bb6737..5d2f0df1049 100644 --- a/tst/EnergyPlus/unit/ConstructionInternalSource.unit.cc +++ b/tst/EnergyPlus/unit/ConstructionInternalSource.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ConvectionCoefficients.unit.cc b/tst/EnergyPlus/unit/ConvectionCoefficients.unit.cc index 8a91d189adf..4780065a61e 100644 --- a/tst/EnergyPlus/unit/ConvectionCoefficients.unit.cc +++ b/tst/EnergyPlus/unit/ConvectionCoefficients.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/CoolTower.unit.cc b/tst/EnergyPlus/unit/CoolTower.unit.cc index 533df9f7978..a3c648d5900 100644 --- a/tst/EnergyPlus/unit/CoolTower.unit.cc +++ b/tst/EnergyPlus/unit/CoolTower.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/CrossVentMgr.unit.cc b/tst/EnergyPlus/unit/CrossVentMgr.unit.cc index 6ff4962d1d6..0e8267e91e2 100644 --- a/tst/EnergyPlus/unit/CrossVentMgr.unit.cc +++ b/tst/EnergyPlus/unit/CrossVentMgr.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/CurveManager.unit.cc b/tst/EnergyPlus/unit/CurveManager.unit.cc index 71ce6e5f7e7..3cfdfa8e866 100644 --- a/tst/EnergyPlus/unit/CurveManager.unit.cc +++ b/tst/EnergyPlus/unit/CurveManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DElightManager.unit.cc b/tst/EnergyPlus/unit/DElightManager.unit.cc index a724ac1c61e..b618d8bef8a 100644 --- a/tst/EnergyPlus/unit/DElightManager.unit.cc +++ b/tst/EnergyPlus/unit/DElightManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -51,7 +51,6 @@ // EnergyPlus Headers #include #include -#include #include #include #include @@ -354,11 +353,11 @@ TEST_F(EnergyPlusFixture, DElightManagerF_GetInputDElightComplexFenestration_Tes compare_err_stream(""); EXPECT_FALSE(foundErrors); // expect no errors - EXPECT_EQ(1, (int)state->dataDaylightingData->DElightComplexFene.size()); + EXPECT_EQ(1, (int)state->dataDayltg->DElightComplexFene.size()); - EXPECT_EQ("TEST CFS", state->dataDaylightingData->DElightComplexFene(1).Name); - EXPECT_EQ("BTDF^GEN^LIGHTSHELF^1.0^20.0", state->dataDaylightingData->DElightComplexFene(1).ComplexFeneType); - EXPECT_EQ("ZN001:WALL001", state->dataDaylightingData->DElightComplexFene(1).surfName); - EXPECT_EQ("ZN001:WALL001:WIN001", state->dataDaylightingData->DElightComplexFene(1).wndwName); - EXPECT_EQ(0., state->dataDaylightingData->DElightComplexFene(1).feneRota); + EXPECT_EQ("TEST CFS", state->dataDayltg->DElightComplexFene(1).Name); + EXPECT_EQ("BTDF^GEN^LIGHTSHELF^1.0^20.0", state->dataDayltg->DElightComplexFene(1).ComplexFeneType); + EXPECT_EQ("ZN001:WALL001", state->dataDayltg->DElightComplexFene(1).surfName); + EXPECT_EQ("ZN001:WALL001:WIN001", state->dataDayltg->DElightComplexFene(1).wndwName); + EXPECT_EQ(0., state->dataDayltg->DElightComplexFene(1).feneRota); } diff --git a/tst/EnergyPlus/unit/DOASEffectOnZoneSizing.unit.cc b/tst/EnergyPlus/unit/DOASEffectOnZoneSizing.unit.cc index d89c7fd2828..6e62ca3bc2d 100644 --- a/tst/EnergyPlus/unit/DOASEffectOnZoneSizing.unit.cc +++ b/tst/EnergyPlus/unit/DOASEffectOnZoneSizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DXCoils.unit.cc b/tst/EnergyPlus/unit/DXCoils.unit.cc index 976c45c7fd7..292023a52b8 100644 --- a/tst/EnergyPlus/unit/DXCoils.unit.cc +++ b/tst/EnergyPlus/unit/DXCoils.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -2726,8 +2726,8 @@ TEST_F(EnergyPlusFixture, TestMultiSpeedCoolingCrankcaseOutput) EXPECT_FALSE(state->dataDXCoils->DXCoil(1).ReportCoolingCoilCrankcasePower); // These two output variables are listed in rdd for Coil:Cooling:DX:MultiSpeed used for AC only - EXPECT_EQ("Cooling Coil Crankcase Heater Electricity Rate", state->dataOutputProcessor->DDVariableTypes(10).VarNameOnly); - EXPECT_EQ("Cooling Coil Crankcase Heater Electricity Energy", state->dataOutputProcessor->DDVariableTypes(11).VarNameOnly); + EXPECT_EQ("Cooling Coil Crankcase Heater Electricity Rate", state->dataOutputProcessor->ddOutVars[9]->name); + EXPECT_EQ("Cooling Coil Crankcase Heater Electricity Energy", state->dataOutputProcessor->ddOutVars[10]->name); state->dataGlobal->SysSizingCalc = false; state->dataAirLoop->AirLoopInputsFilled = false; @@ -6852,14 +6852,14 @@ TEST_F(EnergyPlusFixture, Test_DHW_End_Use_Cat_Removal) GetDXCoils(*state); VariableSpeedCoils::GetVarSpeedCoilInput(*state); - EXPECT_EQ(24, state->dataOutputProcessor->NumEnergyMeters); - EXPECT_EQ(state->dataOutputProcessor->EnergyMeters(20).Name, "WaterSystems:Electricity"); - EXPECT_EQ(state->dataOutputProcessor->EnergyMeters(20).ResourceType, "Electricity"); - EXPECT_EQ(state->dataOutputProcessor->EnergyMeters(20).EndUse, "WaterSystems"); + EXPECT_EQ(24, state->dataOutputProcessor->meters.size()); + EXPECT_EQ(state->dataOutputProcessor->meters[19]->Name, "WaterSystems:Electricity"); + EXPECT_EQ((int)state->dataOutputProcessor->meters[19]->resource, (int)Constant::eResource::Electricity); + EXPECT_EQ((int)state->dataOutputProcessor->meters[19]->sovEndUseCat, (int)OutputProcessor::SOVEndUseCat::WaterSystem); - EXPECT_EQ(state->dataOutputProcessor->EnergyMeters(21).Name, "General:WaterSystems:Electricity"); - EXPECT_EQ(state->dataOutputProcessor->EnergyMeters(21).ResourceType, "Electricity"); - EXPECT_EQ(state->dataOutputProcessor->EnergyMeters(21).EndUse, "WaterSystems"); + EXPECT_EQ(state->dataOutputProcessor->meters[20]->Name, "General:WaterSystems:Electricity"); + EXPECT_EQ((int)state->dataOutputProcessor->meters[20]->resource, (int)Constant::eResource::Electricity); + EXPECT_EQ((int)state->dataOutputProcessor->meters[20]->sovEndUseCat, (int)OutputProcessor::SOVEndUseCat::WaterSystem); } } // namespace EnergyPlus diff --git a/tst/EnergyPlus/unit/DataEnvironment.unit.cc b/tst/EnergyPlus/unit/DataEnvironment.unit.cc index fb811bbd97c..fb7e8bccc06 100644 --- a/tst/EnergyPlus/unit/DataEnvironment.unit.cc +++ b/tst/EnergyPlus/unit/DataEnvironment.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DataHeatBalance.unit.cc b/tst/EnergyPlus/unit/DataHeatBalance.unit.cc index 8738e9d9444..80eee21ec81 100644 --- a/tst/EnergyPlus/unit/DataHeatBalance.unit.cc +++ b/tst/EnergyPlus/unit/DataHeatBalance.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DataPlant.unit.cc b/tst/EnergyPlus/unit/DataPlant.unit.cc index a6ad55668ed..11219f6a031 100644 --- a/tst/EnergyPlus/unit/DataPlant.unit.cc +++ b/tst/EnergyPlus/unit/DataPlant.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DataRuntimeLanguage.unit.cc b/tst/EnergyPlus/unit/DataRuntimeLanguage.unit.cc index d706b599008..20e1bd043a5 100644 --- a/tst/EnergyPlus/unit/DataRuntimeLanguage.unit.cc +++ b/tst/EnergyPlus/unit/DataRuntimeLanguage.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DataSizing.unit.cc b/tst/EnergyPlus/unit/DataSizing.unit.cc index a5a593602e7..d0b37c56cff 100644 --- a/tst/EnergyPlus/unit/DataSizing.unit.cc +++ b/tst/EnergyPlus/unit/DataSizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DataSurfaceColors.unit.cc b/tst/EnergyPlus/unit/DataSurfaceColors.unit.cc index 6975fc539a4..a20c9a116f4 100644 --- a/tst/EnergyPlus/unit/DataSurfaceColors.unit.cc +++ b/tst/EnergyPlus/unit/DataSurfaceColors.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DataSurfaces.unit.cc b/tst/EnergyPlus/unit/DataSurfaces.unit.cc index f7cff77a847..ce98beeae62 100644 --- a/tst/EnergyPlus/unit/DataSurfaces.unit.cc +++ b/tst/EnergyPlus/unit/DataSurfaces.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DataSystemVariables.unit.cc b/tst/EnergyPlus/unit/DataSystemVariables.unit.cc index c944283f64f..58fbfd0cc6c 100644 --- a/tst/EnergyPlus/unit/DataSystemVariables.unit.cc +++ b/tst/EnergyPlus/unit/DataSystemVariables.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DataZoneEquipment.unit.cc b/tst/EnergyPlus/unit/DataZoneEquipment.unit.cc index ce5263f05d1..597f293ef35 100644 --- a/tst/EnergyPlus/unit/DataZoneEquipment.unit.cc +++ b/tst/EnergyPlus/unit/DataZoneEquipment.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Datasets.unit.cc b/tst/EnergyPlus/unit/Datasets.unit.cc index addbf4e8e72..53d21bcb8a5 100644 --- a/tst/EnergyPlus/unit/Datasets.unit.cc +++ b/tst/EnergyPlus/unit/Datasets.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DaylightingDevices.unit.cc b/tst/EnergyPlus/unit/DaylightingDevices.unit.cc index 83a6c8ae5df..e8d92b35e14 100644 --- a/tst/EnergyPlus/unit/DaylightingDevices.unit.cc +++ b/tst/EnergyPlus/unit/DaylightingDevices.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DaylightingManager.unit.cc b/tst/EnergyPlus/unit/DaylightingManager.unit.cc index 1768a1c8674..12ecc07a65b 100644 --- a/tst/EnergyPlus/unit/DaylightingManager.unit.cc +++ b/tst/EnergyPlus/unit/DaylightingManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -130,6 +130,8 @@ TEST_F(EnergyPlusFixture, DaylightingManager_GetInputDaylightingControls_Test) ASSERT_TRUE(process_idf(idf_objects)); + auto &dl = state->dataDayltg; + bool foundErrors = false; GetZoneData(*state, foundErrors); ASSERT_FALSE(foundErrors); @@ -140,37 +142,40 @@ TEST_F(EnergyPlusFixture, DaylightingManager_GetInputDaylightingControls_Test) EXPECT_EQ(1, numObjs); state->dataViewFactor->NumOfSolarEnclosures = 1; state->dataViewFactor->EnclSolInfo.allocate(state->dataViewFactor->NumOfSolarEnclosures); - state->dataDaylightingData->enclDaylight.allocate(state->dataViewFactor->NumOfSolarEnclosures); + dl->enclDaylight.allocate(state->dataViewFactor->NumOfSolarEnclosures); state->dataInternalHeatGains->GetInternalHeatGainsInputFlag = false; GetInputDayliteRefPt(*state, foundErrors); compare_err_stream(""); EXPECT_FALSE(foundErrors); - EXPECT_EQ(1, (int)state->dataDaylightingData->DaylRefPt.size()); + EXPECT_EQ(1, (int)dl->DaylRefPt.size()); GetDaylightingControls(*state, foundErrors); compare_err_stream(""); EXPECT_FALSE(foundErrors); - EXPECT_EQ("WEST ZONE_DAYLCTRL", state->dataDaylightingData->daylightControl(1).Name); - EXPECT_EQ("WEST ZONE", state->dataDaylightingData->daylightControl(1).ZoneName); - EXPECT_TRUE(compare_enums(DaylightingMethod::SplitFlux, state->dataDaylightingData->daylightControl(1).DaylightMethod)); - EXPECT_TRUE(compare_enums(LtgCtrlType::Continuous, state->dataDaylightingData->daylightControl(1).LightControlType)); + auto const &thisDaylightControl = dl->daylightControl(1); + + EXPECT_EQ("WEST ZONE_DAYLCTRL", thisDaylightControl.Name); + EXPECT_EQ("WEST ZONE", thisDaylightControl.ZoneName); + EXPECT_TRUE(compare_enums(DaylightingMethod::SplitFlux, thisDaylightControl.DaylightMethod)); + EXPECT_TRUE(compare_enums(LtgCtrlType::Continuous, thisDaylightControl.LightControlType)); - EXPECT_EQ(0.3, state->dataDaylightingData->daylightControl(1).MinPowerFraction); - EXPECT_EQ(0.2, state->dataDaylightingData->daylightControl(1).MinLightFraction); - EXPECT_EQ(1, state->dataDaylightingData->daylightControl(1).LightControlSteps); - EXPECT_EQ(1.0, state->dataDaylightingData->daylightControl(1).LightControlProbability); + EXPECT_EQ(0.3, thisDaylightControl.MinPowerFraction); + EXPECT_EQ(0.2, thisDaylightControl.MinLightFraction); + EXPECT_EQ(1, thisDaylightControl.LightControlSteps); + EXPECT_EQ(1.0, thisDaylightControl.LightControlProbability); - EXPECT_EQ(1, state->dataDaylightingData->daylightControl(1).glareRefPtNumber); - EXPECT_EQ(180., state->dataDaylightingData->daylightControl(1).ViewAzimuthForGlare); - EXPECT_EQ(20., state->dataDaylightingData->daylightControl(1).MaxGlareallowed); - EXPECT_EQ(0, state->dataDaylightingData->daylightControl(1).DElightGriddingResolution); + EXPECT_EQ(1, thisDaylightControl.glareRefPtNumber); + EXPECT_EQ(180., thisDaylightControl.ViewAzimuthForGlare); + EXPECT_EQ(20., thisDaylightControl.MaxGlareallowed); + EXPECT_EQ(0, thisDaylightControl.DElightGriddingResolution); - EXPECT_EQ(1, state->dataDaylightingData->daylightControl(1).TotalDaylRefPoints); + EXPECT_EQ(1, thisDaylightControl.TotalDaylRefPoints); - EXPECT_EQ(1, state->dataDaylightingData->daylightControl(1).DaylRefPtNum(1)); - EXPECT_EQ(1., state->dataDaylightingData->daylightControl(1).FracZoneDaylit(1)); - EXPECT_EQ(500., state->dataDaylightingData->daylightControl(1).IllumSetPoint(1)); + auto const &refPt = thisDaylightControl.refPts(1); + EXPECT_EQ(1, refPt.num); + EXPECT_EQ(1., refPt.fracZoneDaylit); + EXPECT_EQ(500., refPt.illumSetPoint); } TEST_F(EnergyPlusFixture, DaylightingManager_GetInputDaylightingControls_3RefPt_Test) @@ -238,6 +243,8 @@ TEST_F(EnergyPlusFixture, DaylightingManager_GetInputDaylightingControls_3RefPt_ ASSERT_TRUE(process_idf(idf_objects)); + auto &dl = state->dataDayltg; + bool foundErrors = false; GetZoneData(*state, foundErrors); ASSERT_FALSE(foundErrors); @@ -245,47 +252,51 @@ TEST_F(EnergyPlusFixture, DaylightingManager_GetInputDaylightingControls_3RefPt_ state->dataHeatBal->space(1).solarEnclosureNum = 1; state->dataViewFactor->NumOfSolarEnclosures = 1; state->dataViewFactor->EnclSolInfo.allocate(state->dataViewFactor->NumOfSolarEnclosures); - state->dataDaylightingData->enclDaylight.allocate(state->dataViewFactor->NumOfSolarEnclosures); + dl->enclDaylight.allocate(state->dataViewFactor->NumOfSolarEnclosures); int numObjs = state->dataInputProcessing->inputProcessor->getNumObjectsFound(*state, "Daylighting:Controls"); GetInputDayliteRefPt(*state, foundErrors); compare_err_stream(""); EXPECT_FALSE(foundErrors); - EXPECT_EQ(3, (int)state->dataDaylightingData->DaylRefPt.size()); + EXPECT_EQ(3, (int)dl->DaylRefPt.size()); GetDaylightingControls(*state, foundErrors); compare_err_stream(""); EXPECT_FALSE(foundErrors); EXPECT_EQ(1, numObjs); - EXPECT_EQ("WEST ZONE_DAYLCTRL", state->dataDaylightingData->daylightControl(1).Name); - EXPECT_EQ("WEST ZONE", state->dataDaylightingData->daylightControl(1).ZoneName); - EXPECT_TRUE(compare_enums(DaylightingMethod::SplitFlux, state->dataDaylightingData->daylightControl(1).DaylightMethod)); - EXPECT_TRUE(compare_enums(LtgCtrlType::Continuous, state->dataDaylightingData->daylightControl(1).LightControlType)); - - EXPECT_EQ(0.3, state->dataDaylightingData->daylightControl(1).MinPowerFraction); - EXPECT_EQ(0.2, state->dataDaylightingData->daylightControl(1).MinLightFraction); - EXPECT_EQ(1, state->dataDaylightingData->daylightControl(1).LightControlSteps); - EXPECT_EQ(1.0, state->dataDaylightingData->daylightControl(1).LightControlProbability); - - EXPECT_EQ(1, state->dataDaylightingData->daylightControl(1).glareRefPtNumber); - EXPECT_EQ(180., state->dataDaylightingData->daylightControl(1).ViewAzimuthForGlare); - EXPECT_EQ(20., state->dataDaylightingData->daylightControl(1).MaxGlareallowed); - EXPECT_EQ(0, state->dataDaylightingData->daylightControl(1).DElightGriddingResolution); - - EXPECT_EQ(3, state->dataDaylightingData->daylightControl(1).TotalDaylRefPoints); - - EXPECT_EQ(1, state->dataDaylightingData->daylightControl(1).DaylRefPtNum(1)); - EXPECT_EQ(0.35, state->dataDaylightingData->daylightControl(1).FracZoneDaylit(1)); - EXPECT_EQ(400., state->dataDaylightingData->daylightControl(1).IllumSetPoint(1)); - - EXPECT_EQ(2, state->dataDaylightingData->daylightControl(1).DaylRefPtNum(2)); - EXPECT_EQ(0.4, state->dataDaylightingData->daylightControl(1).FracZoneDaylit(2)); - EXPECT_EQ(500., state->dataDaylightingData->daylightControl(1).IllumSetPoint(2)); - - EXPECT_EQ(3, state->dataDaylightingData->daylightControl(1).DaylRefPtNum(3)); - EXPECT_EQ(0.25, state->dataDaylightingData->daylightControl(1).FracZoneDaylit(3)); - EXPECT_EQ(450., state->dataDaylightingData->daylightControl(1).IllumSetPoint(3)); + auto const &thisDaylightControl = dl->daylightControl(1); + EXPECT_EQ("WEST ZONE_DAYLCTRL", thisDaylightControl.Name); + EXPECT_EQ("WEST ZONE", thisDaylightControl.ZoneName); + EXPECT_TRUE(compare_enums(DaylightingMethod::SplitFlux, thisDaylightControl.DaylightMethod)); + EXPECT_TRUE(compare_enums(LtgCtrlType::Continuous, thisDaylightControl.LightControlType)); + + EXPECT_EQ(0.3, thisDaylightControl.MinPowerFraction); + EXPECT_EQ(0.2, thisDaylightControl.MinLightFraction); + EXPECT_EQ(1, thisDaylightControl.LightControlSteps); + EXPECT_EQ(1.0, thisDaylightControl.LightControlProbability); + + EXPECT_EQ(1, thisDaylightControl.glareRefPtNumber); + EXPECT_EQ(180., thisDaylightControl.ViewAzimuthForGlare); + EXPECT_EQ(20., thisDaylightControl.MaxGlareallowed); + EXPECT_EQ(0, thisDaylightControl.DElightGriddingResolution); + + EXPECT_EQ(3, thisDaylightControl.TotalDaylRefPoints); + + auto const &refPt1 = thisDaylightControl.refPts(1); + EXPECT_EQ(1, refPt1.num); + EXPECT_EQ(0.35, refPt1.fracZoneDaylit); + EXPECT_EQ(400., refPt1.illumSetPoint); + + auto const &refPt2 = thisDaylightControl.refPts(2); + EXPECT_EQ(2, refPt2.num); + EXPECT_EQ(0.4, refPt2.fracZoneDaylit); + EXPECT_EQ(500., refPt2.illumSetPoint); + + auto const &refPt3 = thisDaylightControl.refPts(3); + EXPECT_EQ(3, refPt3.num); + EXPECT_EQ(0.25, refPt3.fracZoneDaylit); + EXPECT_EQ(450., refPt3.illumSetPoint); } TEST_F(EnergyPlusFixture, DaylightingManager_GetInputDayliteRefPt_Test) @@ -329,6 +340,8 @@ TEST_F(EnergyPlusFixture, DaylightingManager_GetInputDayliteRefPt_Test) ASSERT_TRUE(process_idf(idf_objects)); + auto &dl = state->dataDayltg; + bool foundErrors = false; GetZoneData(*state, foundErrors); ASSERT_FALSE(foundErrors); @@ -336,25 +349,25 @@ TEST_F(EnergyPlusFixture, DaylightingManager_GetInputDayliteRefPt_Test) GetInputDayliteRefPt(*state, foundErrors); compare_err_stream(""); EXPECT_FALSE(foundErrors); - EXPECT_EQ(3, (int)state->dataDaylightingData->DaylRefPt.size()); - - EXPECT_EQ("WEST ZONE_DAYLREFPT1", state->dataDaylightingData->DaylRefPt(1).Name); - EXPECT_EQ(1, state->dataDaylightingData->DaylRefPt(1).ZoneNum); - EXPECT_EQ(3.048, state->dataDaylightingData->DaylRefPt(1).x); - EXPECT_EQ(2.048, state->dataDaylightingData->DaylRefPt(1).y); - EXPECT_EQ(0.7, state->dataDaylightingData->DaylRefPt(1).z); - - EXPECT_EQ("WEST ZONE_DAYLREFPT2", state->dataDaylightingData->DaylRefPt(2).Name); - EXPECT_EQ(1, state->dataDaylightingData->DaylRefPt(2).ZoneNum); - EXPECT_EQ(3.048, state->dataDaylightingData->DaylRefPt(2).x); - EXPECT_EQ(3.048, state->dataDaylightingData->DaylRefPt(2).y); - EXPECT_EQ(0.8, state->dataDaylightingData->DaylRefPt(2).z); - - EXPECT_EQ("WEST ZONE_DAYLREFPT3", state->dataDaylightingData->DaylRefPt(3).Name); - EXPECT_EQ(1, state->dataDaylightingData->DaylRefPt(3).ZoneNum); - EXPECT_EQ(3.048, state->dataDaylightingData->DaylRefPt(3).x); - EXPECT_EQ(4.048, state->dataDaylightingData->DaylRefPt(3).y); - EXPECT_EQ(0.9, state->dataDaylightingData->DaylRefPt(3).z); + EXPECT_EQ(3, (int)dl->DaylRefPt.size()); + + EXPECT_EQ("WEST ZONE_DAYLREFPT1", dl->DaylRefPt(1).Name); + EXPECT_EQ(1, dl->DaylRefPt(1).ZoneNum); + EXPECT_EQ(3.048, dl->DaylRefPt(1).coords.x); + EXPECT_EQ(2.048, dl->DaylRefPt(1).coords.y); + EXPECT_EQ(0.7, dl->DaylRefPt(1).coords.z); + + EXPECT_EQ("WEST ZONE_DAYLREFPT2", dl->DaylRefPt(2).Name); + EXPECT_EQ(1, dl->DaylRefPt(2).ZoneNum); + EXPECT_EQ(3.048, dl->DaylRefPt(2).coords.x); + EXPECT_EQ(3.048, dl->DaylRefPt(2).coords.y); + EXPECT_EQ(0.8, dl->DaylRefPt(2).coords.z); + + EXPECT_EQ("WEST ZONE_DAYLREFPT3", dl->DaylRefPt(3).Name); + EXPECT_EQ(1, dl->DaylRefPt(3).ZoneNum); + EXPECT_EQ(3.048, dl->DaylRefPt(3).coords.x); + EXPECT_EQ(4.048, dl->DaylRefPt(3).coords.y); + EXPECT_EQ(0.9, dl->DaylRefPt(3).coords.z); } TEST_F(EnergyPlusFixture, DaylightingManager_GetInputOutputIlluminanceMap_Test) @@ -391,6 +404,8 @@ TEST_F(EnergyPlusFixture, DaylightingManager_GetInputOutputIlluminanceMap_Test) ASSERT_TRUE(process_idf(idf_objects)); + auto &dl = state->dataDayltg; + bool foundErrors = false; GetZoneData(*state, foundErrors); ASSERT_FALSE(foundErrors); @@ -398,39 +413,41 @@ TEST_F(EnergyPlusFixture, DaylightingManager_GetInputOutputIlluminanceMap_Test) state->dataHeatBal->space(1).solarEnclosureNum = 1; state->dataViewFactor->NumOfSolarEnclosures = 1; state->dataViewFactor->EnclSolInfo.allocate(state->dataViewFactor->NumOfSolarEnclosures); - state->dataDaylightingData->enclDaylight.allocate(state->dataViewFactor->NumOfSolarEnclosures); + dl->enclDaylight.allocate(state->dataViewFactor->NumOfSolarEnclosures); GetInputIlluminanceMap(*state, foundErrors); // compare_err_stream(""); // expecting errors because zone is not really defined - EXPECT_EQ(1, (int)state->dataDaylightingData->IllumMap.size()); + EXPECT_EQ(1, (int)dl->illumMaps.size()); - EXPECT_EQ("MAP1", state->dataDaylightingData->IllumMap(1).Name); - EXPECT_EQ(1, state->dataDaylightingData->IllumMap(1).zoneIndex); - EXPECT_EQ(0, state->dataDaylightingData->IllumMap(1).Z); - EXPECT_EQ(0.1, state->dataDaylightingData->IllumMap(1).Xmin); - EXPECT_EQ(6.0, state->dataDaylightingData->IllumMap(1).Xmax); - EXPECT_EQ(10, state->dataDaylightingData->IllumMap(1).Xnum); - EXPECT_EQ(0.2, state->dataDaylightingData->IllumMap(1).Ymin); - EXPECT_EQ(5.0, state->dataDaylightingData->IllumMap(1).Ymax); - EXPECT_EQ(11, state->dataDaylightingData->IllumMap(1).Ynum); + EXPECT_EQ("MAP1", dl->illumMaps(1).Name); + EXPECT_EQ(1, dl->illumMaps(1).zoneIndex); + EXPECT_EQ(0, dl->illumMaps(1).Z); + EXPECT_EQ(0.1, dl->illumMaps(1).Xmin); + EXPECT_EQ(6.0, dl->illumMaps(1).Xmax); + EXPECT_EQ(10, dl->illumMaps(1).Xnum); + EXPECT_EQ(0.2, dl->illumMaps(1).Ymin); + EXPECT_EQ(5.0, dl->illumMaps(1).Ymax); + EXPECT_EQ(11, dl->illumMaps(1).Ynum); // OutputControl:IlluminanceMap:Style - EXPECT_EQ(',', state->dataDaylightingData->MapColSep); + EXPECT_EQ(',', dl->MapColSep); } TEST_F(EnergyPlusFixture, DaylightingManager_doesDayLightingUseDElight_Test) { EXPECT_FALSE(doesDayLightingUseDElight(*state)); - state->dataDaylightingData->daylightControl.allocate(3); - state->dataDaylightingData->daylightControl(1).DaylightMethod = DaylightingMethod::SplitFlux; - state->dataDaylightingData->daylightControl(2).DaylightMethod = DaylightingMethod::SplitFlux; - state->dataDaylightingData->daylightControl(3).DaylightMethod = DaylightingMethod::SplitFlux; + auto &dl = state->dataDayltg; + + dl->daylightControl.allocate(3); + dl->daylightControl(1).DaylightMethod = DaylightingMethod::SplitFlux; + dl->daylightControl(2).DaylightMethod = DaylightingMethod::SplitFlux; + dl->daylightControl(3).DaylightMethod = DaylightingMethod::SplitFlux; EXPECT_FALSE(doesDayLightingUseDElight(*state)); - state->dataDaylightingData->daylightControl(2).DaylightMethod = DaylightingMethod::DElight; + dl->daylightControl(2).DaylightMethod = DaylightingMethod::DElight; EXPECT_TRUE(doesDayLightingUseDElight(*state)); } @@ -837,6 +854,8 @@ TEST_F(EnergyPlusFixture, DaylightingManager_GetDaylParamInGeoTrans_Test) ASSERT_TRUE(process_idf(idf_objects)); + auto &dl = state->dataDayltg; + bool foundErrors = false; HeatBalanceManager::GetProjectControlData(*state, foundErrors); // read project control data @@ -889,29 +908,32 @@ TEST_F(EnergyPlusFixture, DaylightingManager_GetDaylParamInGeoTrans_Test) state->dataInternalHeatGains->GetInternalHeatGainsInputFlag = false; GetDaylightingParametersInput(*state); - state->dataDaylightingManager->CalcDayltghCoefficients_firstTime = false; + dl->CalcDayltghCoefficients_firstTime = false; compare_err_stream(""); - EXPECT_EQ(3, (int)state->dataDaylightingData->DaylRefPt.size()); + EXPECT_EQ(3, (int)dl->DaylRefPt.size()); + + auto const &thisDaylightControl = dl->daylightControl(1); + auto const &refPt = thisDaylightControl.refPts(1); - EXPECT_NEAR(2.048, state->dataDaylightingData->daylightControl(1).DaylRefPtAbsCoord(1).x, 0.001); - EXPECT_NEAR(3.048, state->dataDaylightingData->daylightControl(1).DaylRefPtAbsCoord(1).y, 0.001); - EXPECT_NEAR(0.9, state->dataDaylightingData->daylightControl(1).DaylRefPtAbsCoord(1).z, 0.001); + EXPECT_NEAR(2.048, refPt.absCoords.x, 0.001); + EXPECT_NEAR(3.048, refPt.absCoords.y, 0.001); + EXPECT_NEAR(0.9, refPt.absCoords.z, 0.001); state->dataHeatBal->Zone(1).RelNorth = 45.; GeometryTransformForDaylighting(*state); - EXPECT_NEAR(3.603, state->dataDaylightingData->daylightControl(1).DaylRefPtAbsCoord(1).x, 0.001); - EXPECT_NEAR(0.707, state->dataDaylightingData->daylightControl(1).DaylRefPtAbsCoord(1).y, 0.001); - EXPECT_NEAR(0.9, state->dataDaylightingData->daylightControl(1).DaylRefPtAbsCoord(1).z, 0.001); + EXPECT_NEAR(3.603, refPt.absCoords.x, 0.001); + EXPECT_NEAR(0.707, refPt.absCoords.y, 0.001); + EXPECT_NEAR(0.9, refPt.absCoords.z, 0.001); state->dataHeatBal->Zone(1).RelNorth = 90.; GeometryTransformForDaylighting(*state); - EXPECT_NEAR(3.048, state->dataDaylightingData->daylightControl(1).DaylRefPtAbsCoord(1).x, 0.001); - EXPECT_NEAR(-2.048, state->dataDaylightingData->daylightControl(1).DaylRefPtAbsCoord(1).y, 0.001); - EXPECT_NEAR(0.9, state->dataDaylightingData->daylightControl(1).DaylRefPtAbsCoord(1).z, 0.001); + EXPECT_NEAR(3.048, refPt.absCoords.x, 0.001); + EXPECT_NEAR(-2.048, refPt.absCoords.y, 0.001); + EXPECT_NEAR(0.9, refPt.absCoords.z, 0.001); state->dataGlobal->BeginSimFlag = true; state->dataGlobal->WeightNow = 1.0; @@ -946,31 +968,33 @@ TEST_F(EnergyPlusFixture, DaylightingManager_ProfileAngle_Test) CosDirSun(2) = 0.470492; CosDirSun(3) = 0.003513; - ProfileAngle(*state, 1, CosDirSun, horiz, ProfAng); + ProfAng = ProfileAngle(*state, 1, CosDirSun, horiz); EXPECT_NEAR(0.00747, ProfAng, 0.00001); - ProfileAngle(*state, 1, CosDirSun, vert, ProfAng); + ProfAng = ProfileAngle(*state, 1, CosDirSun, vert); EXPECT_NEAR(2.06065, ProfAng, 0.00001); CosDirSun(1) = 0.92318; CosDirSun(2) = 0.36483; CosDirSun(3) = 0.12094; - ProfileAngle(*state, 1, CosDirSun, horiz, ProfAng); + ProfAng = ProfileAngle(*state, 1, CosDirSun, horiz); EXPECT_NEAR(0.32010, ProfAng, 0.00001); - ProfileAngle(*state, 1, CosDirSun, vert, ProfAng); + ProfAng = ProfileAngle(*state, 1, CosDirSun, vert); EXPECT_NEAR(1.94715, ProfAng, 0.00001); } TEST_F(EnergyPlusFixture, AssociateWindowShadingControlWithDaylighting_Test) { + auto &dl = state->dataDayltg; + state->dataGlobal->NumOfZones = 4; - state->dataDaylightingData->daylightControl.allocate(4); - state->dataDaylightingData->daylightControl(1).Name = "ZD1"; - state->dataDaylightingData->daylightControl(2).Name = "ZD2"; - state->dataDaylightingData->daylightControl(3).Name = "ZD3"; - state->dataDaylightingData->daylightControl(4).Name = "ZD4"; + dl->daylightControl.allocate(4); + dl->daylightControl(1).Name = "ZD1"; + dl->daylightControl(2).Name = "ZD2"; + dl->daylightControl(3).Name = "ZD3"; + dl->daylightControl(4).Name = "ZD4"; state->dataSurface->TotWinShadingControl = 3; state->dataSurface->WindowShadingControl.allocate(state->dataSurface->TotWinShadingControl); @@ -993,6 +1017,7 @@ TEST_F(EnergyPlusFixture, AssociateWindowShadingControlWithDaylighting_Test) TEST_F(EnergyPlusFixture, CreateShadeDeploymentOrder_test) { + auto &dl = state->dataDayltg; state->dataSurface->TotWinShadingControl = 3; state->dataSurface->WindowShadingControl.allocate(state->dataSurface->TotWinShadingControl); int zn = 1; @@ -1028,50 +1053,50 @@ TEST_F(EnergyPlusFixture, CreateShadeDeploymentOrder_test) state->dataSurface->WindowShadingControl(3).FenestrationIndex(2) = 9; state->dataGlobal->NumOfZones = zn; - state->dataDaylightingData->daylightControl.allocate(state->dataGlobal->NumOfZones); - state->dataDaylightingData->enclDaylight.allocate(state->dataGlobal->NumOfZones); - state->dataDaylightingData->enclDaylight(zn).daylightControlIndexes.emplace_back(1); + dl->daylightControl.allocate(state->dataGlobal->NumOfZones); + dl->enclDaylight.allocate(state->dataGlobal->NumOfZones); + dl->enclDaylight(zn).daylightControlIndexes.emplace_back(1); state->dataHeatBal->Zone.allocate(zn); state->dataHeatBal->Zone(zn).spaceIndexes.emplace_back(1); state->dataHeatBal->space.allocate(zn); state->dataHeatBal->space(1).solarEnclosureNum = 1; - std::size_t maxShadeDeployOrderSize = 0; - maxShadeDeployOrderSize = CreateShadeDeploymentOrder(*state, zn); + CreateShadeDeploymentOrder(*state, zn); - EXPECT_EQ(state->dataDaylightingData->daylightControl(zn).ShadeDeployOrderExtWins.size(), 6ul); - EXPECT_EQ(maxShadeDeployOrderSize, 6ul); + EXPECT_EQ(dl->daylightControl(zn).ShadeDeployOrderExtWins.size(), 6ul); + EXPECT_EQ(dl->maxShadeDeployOrderExtWins, 6); std::vector compare1; compare1.push_back(8); compare1.push_back(9); - EXPECT_EQ(state->dataDaylightingData->daylightControl(zn).ShadeDeployOrderExtWins[0], compare1); + EXPECT_EQ(dl->daylightControl(zn).ShadeDeployOrderExtWins[0], compare1); std::vector compare2; compare2.push_back(1); compare2.push_back(2); compare2.push_back(3); - EXPECT_EQ(state->dataDaylightingData->daylightControl(zn).ShadeDeployOrderExtWins[1], compare2); + EXPECT_EQ(dl->daylightControl(zn).ShadeDeployOrderExtWins[1], compare2); std::vector compare3; compare3.push_back(4); - EXPECT_EQ(state->dataDaylightingData->daylightControl(zn).ShadeDeployOrderExtWins[2], compare3); + EXPECT_EQ(dl->daylightControl(zn).ShadeDeployOrderExtWins[2], compare3); std::vector compare4; compare4.push_back(5); - EXPECT_EQ(state->dataDaylightingData->daylightControl(zn).ShadeDeployOrderExtWins[3], compare4); + EXPECT_EQ(dl->daylightControl(zn).ShadeDeployOrderExtWins[3], compare4); std::vector compare5; compare5.push_back(6); - EXPECT_EQ(state->dataDaylightingData->daylightControl(zn).ShadeDeployOrderExtWins[4], compare5); + EXPECT_EQ(dl->daylightControl(zn).ShadeDeployOrderExtWins[4], compare5); std::vector compare6; compare6.push_back(7); - EXPECT_EQ(state->dataDaylightingData->daylightControl(zn).ShadeDeployOrderExtWins[5], compare6); + EXPECT_EQ(dl->daylightControl(zn).ShadeDeployOrderExtWins[5], compare6); } TEST_F(EnergyPlusFixture, MapShadeDeploymentOrderToLoopNumber_Test) { + auto &dl = state->dataDayltg; state->dataSurface->TotWinShadingControl = 3; state->dataSurface->WindowShadingControl.allocate(state->dataSurface->TotWinShadingControl); int zn = 1; @@ -1108,48 +1133,47 @@ TEST_F(EnergyPlusFixture, MapShadeDeploymentOrderToLoopNumber_Test) state->dataGlobal->NumOfZones = zn; state->dataGlobal->numSpaces = zn; - state->dataDaylightingData->daylightControl.allocate(state->dataGlobal->NumOfZones); - state->dataDaylightingData->enclDaylight.allocate(state->dataGlobal->NumOfZones); - state->dataDaylightingData->enclDaylight(zn).daylightControlIndexes.emplace_back(1); + dl->daylightControl.allocate(state->dataGlobal->NumOfZones); + dl->enclDaylight.allocate(state->dataGlobal->NumOfZones); + dl->enclDaylight(zn).daylightControlIndexes.emplace_back(1); state->dataHeatBal->Zone.allocate(state->dataGlobal->NumOfZones); state->dataHeatBal->Zone(zn).spaceIndexes.emplace_back(1); state->dataHeatBal->space.allocate(state->dataGlobal->numSpaces); state->dataHeatBal->space(zn).solarEnclosureNum = 1; state->dataViewFactor->EnclSolInfo.allocate(state->dataGlobal->NumOfZones); - std::size_t maxShadeDeployOrderSize = 0; - maxShadeDeployOrderSize = CreateShadeDeploymentOrder(*state, zn); + CreateShadeDeploymentOrder(*state, zn); - EXPECT_EQ(state->dataDaylightingData->daylightControl(zn).ShadeDeployOrderExtWins.size(), 6ul); - EXPECT_EQ(maxShadeDeployOrderSize, 6ul); + EXPECT_EQ(dl->daylightControl(zn).ShadeDeployOrderExtWins.size(), 6ul); + EXPECT_EQ(dl->maxShadeDeployOrderExtWins, 6); - state->dataDaylightingData->daylightControl(zn).TotalDaylRefPoints = 1; + dl->daylightControl(zn).TotalDaylRefPoints = 1; state->dataViewFactor->EnclSolInfo(zn).TotalEnclosureDaylRefPoints = 1; - state->dataDaylightingData->enclDaylight(zn).NumOfDayltgExtWins = 9; - state->dataDaylightingData->daylightControl(zn).MapShdOrdToLoopNum.allocate(state->dataDaylightingData->enclDaylight(zn).NumOfDayltgExtWins); - state->dataDaylightingData->enclDaylight(zn).DayltgExtWinSurfNums.allocate(state->dataDaylightingData->enclDaylight(zn).NumOfDayltgExtWins); - state->dataDaylightingData->enclDaylight(zn).DayltgExtWinSurfNums(1) = 1; - state->dataDaylightingData->enclDaylight(zn).DayltgExtWinSurfNums(2) = 2; - state->dataDaylightingData->enclDaylight(zn).DayltgExtWinSurfNums(3) = 3; - state->dataDaylightingData->enclDaylight(zn).DayltgExtWinSurfNums(4) = 4; - state->dataDaylightingData->enclDaylight(zn).DayltgExtWinSurfNums(5) = 5; - state->dataDaylightingData->enclDaylight(zn).DayltgExtWinSurfNums(6) = 6; - state->dataDaylightingData->enclDaylight(zn).DayltgExtWinSurfNums(7) = 7; - state->dataDaylightingData->enclDaylight(zn).DayltgExtWinSurfNums(8) = 8; - state->dataDaylightingData->enclDaylight(zn).DayltgExtWinSurfNums(9) = 9; + dl->enclDaylight(zn).NumOfDayltgExtWins = 9; + dl->daylightControl(zn).MapShdOrdToLoopNum.allocate(dl->enclDaylight(zn).NumOfDayltgExtWins); + dl->enclDaylight(zn).DayltgExtWinSurfNums.allocate(dl->enclDaylight(zn).NumOfDayltgExtWins); + dl->enclDaylight(zn).DayltgExtWinSurfNums(1) = 1; + dl->enclDaylight(zn).DayltgExtWinSurfNums(2) = 2; + dl->enclDaylight(zn).DayltgExtWinSurfNums(3) = 3; + dl->enclDaylight(zn).DayltgExtWinSurfNums(4) = 4; + dl->enclDaylight(zn).DayltgExtWinSurfNums(5) = 5; + dl->enclDaylight(zn).DayltgExtWinSurfNums(6) = 6; + dl->enclDaylight(zn).DayltgExtWinSurfNums(7) = 7; + dl->enclDaylight(zn).DayltgExtWinSurfNums(8) = 8; + dl->enclDaylight(zn).DayltgExtWinSurfNums(9) = 9; MapShadeDeploymentOrderToLoopNumber(*state, zn); - EXPECT_EQ(state->dataDaylightingData->daylightControl(zn).MapShdOrdToLoopNum(1), 8); - EXPECT_EQ(state->dataDaylightingData->daylightControl(zn).MapShdOrdToLoopNum(2), 9); - EXPECT_EQ(state->dataDaylightingData->daylightControl(zn).MapShdOrdToLoopNum(3), 1); - EXPECT_EQ(state->dataDaylightingData->daylightControl(zn).MapShdOrdToLoopNum(4), 2); - EXPECT_EQ(state->dataDaylightingData->daylightControl(zn).MapShdOrdToLoopNum(5), 3); - EXPECT_EQ(state->dataDaylightingData->daylightControl(zn).MapShdOrdToLoopNum(6), 4); - EXPECT_EQ(state->dataDaylightingData->daylightControl(zn).MapShdOrdToLoopNum(7), 5); - EXPECT_EQ(state->dataDaylightingData->daylightControl(zn).MapShdOrdToLoopNum(8), 6); - EXPECT_EQ(state->dataDaylightingData->daylightControl(zn).MapShdOrdToLoopNum(9), 7); + EXPECT_EQ(dl->daylightControl(zn).MapShdOrdToLoopNum(1), 8); + EXPECT_EQ(dl->daylightControl(zn).MapShdOrdToLoopNum(2), 9); + EXPECT_EQ(dl->daylightControl(zn).MapShdOrdToLoopNum(3), 1); + EXPECT_EQ(dl->daylightControl(zn).MapShdOrdToLoopNum(4), 2); + EXPECT_EQ(dl->daylightControl(zn).MapShdOrdToLoopNum(5), 3); + EXPECT_EQ(dl->daylightControl(zn).MapShdOrdToLoopNum(6), 4); + EXPECT_EQ(dl->daylightControl(zn).MapShdOrdToLoopNum(7), 5); + EXPECT_EQ(dl->daylightControl(zn).MapShdOrdToLoopNum(8), 6); + EXPECT_EQ(dl->daylightControl(zn).MapShdOrdToLoopNum(9), 7); } TEST_F(EnergyPlusFixture, DaylightingManager_DayltgInteriorIllum_LuminanceShading_Test) @@ -1387,6 +1411,9 @@ TEST_F(EnergyPlusFixture, DaylightingManager_DayltgInteriorIllum_LuminanceShadin }); ASSERT_TRUE(process_idf(idf_objects)); + + auto &dl = state->dataDayltg; + state->dataGlobal->NumOfTimeStepInHour = 1; ScheduleManager::ProcessScheduleInput(*state); state->dataScheduleMgr->ScheduleInputProcessed = true; @@ -1428,15 +1455,15 @@ TEST_F(EnergyPlusFixture, DaylightingManager_DayltgInteriorIllum_LuminanceShadin // Set the following values to make thisDaylightControl.SourceLumFromWinAtRefPt much larger than // luminance threshold of 2000 (WindowShadingControl SetPoint2) for (int iHr = 1; iHr <= Constant::HoursInDay; ++iHr) { - state->dataDaylightingManager->GILSK(iHr) = {8.0, 8.0, 8.0, 8.0}; + dl->horIllum[iHr].sky = {8.0, 8.0, 8.0, 8.0}; } state->dataGlobal->WeightNow = 0.54; state->dataEnvrn->HISUNF = 28500.0; state->dataEnvrn->HISKF = 12000.0; state->dataEnvrn->SkyClearness = 4.6; - auto &thisDaylgtCtrl = state->dataDaylightingData->daylightControl(ZoneNum); - int numExtWins = state->dataDaylightingData->enclDaylight(1).TotalExtWindows; + auto &thisDaylgtCtrl = dl->daylightControl(ZoneNum); + int numExtWins = dl->enclDaylight(1).TotalExtWindows; int numRefPts = thisDaylgtCtrl.TotalDaylRefPoints; int numSlatAngs = state->dataSurface->actualMaxSlatAngs; @@ -1444,28 +1471,29 @@ TEST_F(EnergyPlusFixture, DaylightingManager_DayltgInteriorIllum_LuminanceShadin for (int iWin = 1; iWin <= numExtWins; ++iWin) { for (int iRefPt = 1; iRefPt <= numRefPts; ++iRefPt) { for (int iSlatAng = 1; iSlatAng <= numSlatAngs; ++iSlatAng) { - thisDaylgtCtrl.DaylIllFacSky(iHr, iWin, iRefPt, iSlatAng) = {0.2, 0.2, 0.2, 0.2}; - thisDaylgtCtrl.DaylBackFacSky(iHr, iWin, iRefPt, iSlatAng) = {0.01, 0.01, 0.01, 0.01}; - thisDaylgtCtrl.DaylSourceFacSky(iHr, iWin, iRefPt, iSlatAng) = {0.9, 0.9, 0.9, 0.9}; + auto &daylFac = thisDaylgtCtrl.daylFac[iHr](iWin, iRefPt, iSlatAng); + daylFac[(int)Lum::Illum].sky = {0.2, 0.2, 0.2, 0.2}; + daylFac[(int)Lum::Illum].sun = 0.02; + daylFac[(int)Lum::Illum].sunDisk = 0.01; + + daylFac[(int)Lum::Back].sky = {0.01, 0.01, 0.01, 0.01}; + daylFac[(int)Lum::Back].sun = 0.01; + daylFac[(int)Lum::Back].sunDisk = 0.01; + daylFac[(int)Lum::Source].sky = {0.9, 0.9, 0.9, 0.9}; + daylFac[(int)Lum::Source].sun = 0.26; + daylFac[(int)Lum::Source].sunDisk = 0.0; } } } } - thisDaylgtCtrl.DaylIllFacSun = 0.02; - thisDaylgtCtrl.DaylIllFacSunDisk = 0.01; - thisDaylgtCtrl.DaylBackFacSun = 0.01; - thisDaylgtCtrl.DaylBackFacSunDisk = 0.01; - thisDaylgtCtrl.DaylSourceFacSun = 0.26; - thisDaylgtCtrl.DaylSourceFacSunDisk = 0.0; - state->dataSurface->SurfWinShadingFlag(ISurf) = WinShadingType::IntShadeConditionallyOff; Dayltg::DayltgInteriorIllum(*state, ZoneNum); EXPECT_TRUE(state->dataSurface->SurfWinShadingFlag(ISurf) == WinShadingType::IntShade); // Set the following values to make thisDaylightControl.SourceLumFromWinAtRefPt 0 for (int iHr = 1; iHr <= Constant::HoursInDay; ++iHr) { - state->dataDaylightingManager->GILSK(iHr) = {100.0, 100.0, 100.0, 100.0}; + dl->horIllum[iHr].sky = {100.0, 100.0, 100.0, 100.0}; } state->dataGlobal->WeightNow = 1.0; state->dataEnvrn->HISUNF = 100.0; @@ -1476,21 +1504,15 @@ TEST_F(EnergyPlusFixture, DaylightingManager_DayltgInteriorIllum_LuminanceShadin for (int iWin = 1; iWin <= numExtWins; ++iWin) { for (int iRefPt = 1; iRefPt <= numRefPts; ++iRefPt) { for (int iSlatAng = 1; iSlatAng <= numSlatAngs; ++iSlatAng) { - thisDaylgtCtrl.DaylIllFacSky(iHr, iWin, iRefPt, iSlatAng) = {0.0, 0.0, 0.0, 0.0}; - thisDaylgtCtrl.DaylBackFacSky(iHr, iWin, iRefPt, iSlatAng) = {0.0, 0.0, 0.0, 0.0}; - thisDaylgtCtrl.DaylSourceFacSky(iHr, iWin, iRefPt, iSlatAng) = {0.0, 0.0, 0.0, 0.0}; + auto &daylFac = thisDaylgtCtrl.daylFac[iHr](iWin, iRefPt, iSlatAng); + daylFac[(int)Lum::Illum] = Illums(); + daylFac[(int)Lum::Source] = Illums(); + daylFac[(int)Lum::Back] = Illums(); } } } } - thisDaylgtCtrl.DaylIllFacSun = 0.0; - thisDaylgtCtrl.DaylIllFacSunDisk = 0.0; - thisDaylgtCtrl.DaylBackFacSun = 0.0; - thisDaylgtCtrl.DaylBackFacSunDisk = 0.0; - thisDaylgtCtrl.DaylSourceFacSun = 0.0; - thisDaylgtCtrl.DaylSourceFacSunDisk = 0.0; - state->dataSurface->SurfWinShadingFlag(ISurf) = WinShadingType::IntShadeConditionallyOff; Dayltg::DayltgInteriorIllum(*state, ZoneNum); EXPECT_TRUE(state->dataSurface->SurfWinShadingFlag(ISurf) == WinShadingType::ShadeOff); @@ -1717,6 +1739,9 @@ TEST_F(EnergyPlusFixture, DaylightingManager_DayltgInteriorIllum_Test) }); ASSERT_TRUE(process_idf(idf_objects)); + + auto &dl = state->dataDayltg; + state->dataGlobal->NumOfTimeStepInHour = 1; ScheduleManager::ProcessScheduleInput(*state); state->dataScheduleMgr->ScheduleInputProcessed = true; @@ -1754,7 +1779,7 @@ TEST_F(EnergyPlusFixture, DaylightingManager_DayltgInteriorIllum_Test) Dayltg::GetDaylightingParametersInput(*state); for (int iHr = 1; iHr <= Constant::HoursInDay; ++iHr) { - state->dataDaylightingManager->GILSK(iHr) = {100.0, 100.0, 100.0, 100.0}; + dl->horIllum[iHr].sky = {100.0, 100.0, 100.0, 100.0}; } state->dataGlobal->WeightNow = 1.0; @@ -1762,8 +1787,8 @@ TEST_F(EnergyPlusFixture, DaylightingManager_DayltgInteriorIllum_Test) state->dataEnvrn->HISKF = 100.0; state->dataEnvrn->SkyClearness = 6.0; - auto &thisDaylgtCtrl = state->dataDaylightingData->daylightControl(ZoneNum); - int numExtWins = state->dataDaylightingData->enclDaylight(1).TotalExtWindows; + auto &thisDaylgtCtrl = dl->daylightControl(ZoneNum); + int numExtWins = dl->enclDaylight(1).TotalExtWindows; int numRefPts = thisDaylgtCtrl.TotalDaylRefPoints; int numSlatAngs = state->dataSurface->actualMaxSlatAngs; @@ -1771,23 +1796,17 @@ TEST_F(EnergyPlusFixture, DaylightingManager_DayltgInteriorIllum_Test) for (int iWin = 1; iWin <= numExtWins; ++iWin) { for (int iRefPt = 1; iRefPt <= numRefPts; ++iRefPt) { for (int iSlatAng = 1; iSlatAng <= numSlatAngs; ++iSlatAng) { - thisDaylgtCtrl.DaylIllFacSky(iHr, iWin, iRefPt, iSlatAng) = {0.0, 0.0, 0.0, 0.0}; - thisDaylgtCtrl.DaylBackFacSky(iHr, iWin, iRefPt, iSlatAng) = {0.0, 0.0, 0.0, 0.0}; - thisDaylgtCtrl.DaylSourceFacSky(iHr, iWin, iRefPt, iSlatAng) = {0.0, 0.0, 0.0, 0.0}; + auto &daylFac = thisDaylgtCtrl.daylFac[iHr](iWin, iRefPt, iSlatAng); + daylFac[(int)Lum::Illum] = Illums(); + daylFac[(int)Lum::Source] = Illums(); + daylFac[(int)Lum::Back] = Illums(); } } } } - // Set all daylighting factors to zero - thisDaylgtCtrl.DaylIllFacSun = 0.0; - thisDaylgtCtrl.DaylIllFacSunDisk = 0.0; - thisDaylgtCtrl.DaylBackFacSun = 0.0; - thisDaylgtCtrl.DaylBackFacSunDisk = 0.0; - thisDaylgtCtrl.DaylSourceFacSun = 0.0; - thisDaylgtCtrl.DaylSourceFacSunDisk = 0.0; Dayltg::DayltgInteriorIllum(*state, ZoneNum); - EXPECT_NEAR(state->dataDaylightingManager->DaylIllum(1), 0.0, 0.001); + EXPECT_NEAR(dl->DaylIllum(1), 0.0, 0.001); int iSky = (int)SkyType::Clear; int DayltgExtWin = 1; @@ -1799,36 +1818,36 @@ TEST_F(EnergyPlusFixture, DaylightingManager_DayltgInteriorIllum_Test) // Set un-shaded surface illuminance factor to 1.0 for RefPt1, 0.1 for RefPt2 // Set shaded surface illuminance factor to 0.5 for RefPt1, 0.05 for RefPt2 int RefPt = 1; - thisDaylgtCtrl.DaylIllFacSky(state->dataGlobal->HourOfDay, DayltgExtWin, RefPt, Unshaded).sky[iSky] = 1.0; - thisDaylgtCtrl.DaylIllFacSky(state->dataGlobal->HourOfDay, DayltgExtWin, RefPt, Shaded).sky[iSky] = 0.5; + thisDaylgtCtrl.daylFac[state->dataGlobal->HourOfDay](DayltgExtWin, RefPt, Unshaded)[(int)Lum::Illum].sky[iSky] = 1.0; + thisDaylgtCtrl.daylFac[state->dataGlobal->HourOfDay](DayltgExtWin, RefPt, Shaded)[(int)Lum::Illum].sky[iSky] = 0.5; RefPt = 2; - thisDaylgtCtrl.DaylIllFacSky(state->dataGlobal->HourOfDay, DayltgExtWin, RefPt, Unshaded).sky[iSky] = 0.1; - thisDaylgtCtrl.DaylIllFacSky(state->dataGlobal->HourOfDay, DayltgExtWin, RefPt, Shaded).sky[iSky] = 0.05; + thisDaylgtCtrl.daylFac[state->dataGlobal->HourOfDay](DayltgExtWin, RefPt, Unshaded)[(int)Lum::Illum].sky[iSky] = 0.1; + thisDaylgtCtrl.daylFac[state->dataGlobal->HourOfDay](DayltgExtWin, RefPt, Shaded)[(int)Lum::Illum].sky[iSky] = 0.05; // Window5 model - expect 100 for unshaded and 50 for shaded (10 and 5 for RefPt2) state->dataSurface->SurfWinWindowModelType(IWin) = WindowModel::Detailed; state->dataSurface->SurfWinShadingFlag(IWin) = DataSurfaces::WinShadingType::NoShade; Dayltg::DayltgInteriorIllum(*state, ZoneNum); - EXPECT_NEAR(state->dataDaylightingManager->DaylIllum(1), 100.0, 0.001); - EXPECT_NEAR(state->dataDaylightingManager->DaylIllum(2), 10.0, 0.001); + EXPECT_NEAR(dl->DaylIllum(1), 100.0, 0.001); + EXPECT_NEAR(dl->DaylIllum(2), 10.0, 0.001); state->dataSurface->SurfWinShadingFlag(IWin) = DataSurfaces::WinShadingType::ExtBlind; Dayltg::DayltgInteriorIllum(*state, ZoneNum); - EXPECT_NEAR(state->dataDaylightingManager->DaylIllum(1), 50.0, 0.001); - EXPECT_NEAR(state->dataDaylightingManager->DaylIllum(2), 5.0, 0.001); + EXPECT_NEAR(dl->DaylIllum(1), 50.0, 0.001); + EXPECT_NEAR(dl->DaylIllum(2), 5.0, 0.001); // BSDF model - expect 100 for unshaded and 100 for shaded (10 for RefPt2 // BSDF does shading differently, it's integrated in the base state state->dataSurface->SurfWinWindowModelType(IWin) = WindowModel::BSDF; state->dataSurface->SurfWinShadingFlag(IWin) = DataSurfaces::WinShadingType::NoShade; Dayltg::DayltgInteriorIllum(*state, ZoneNum); - EXPECT_NEAR(state->dataDaylightingManager->DaylIllum(1), 100.0, 0.001); - EXPECT_NEAR(state->dataDaylightingManager->DaylIllum(2), 10.0, 0.001); + EXPECT_NEAR(dl->DaylIllum(1), 100.0, 0.001); + EXPECT_NEAR(dl->DaylIllum(2), 10.0, 0.001); state->dataSurface->SurfWinShadingFlag(IWin) = DataSurfaces::WinShadingType::ExtBlind; Dayltg::DayltgInteriorIllum(*state, ZoneNum); - EXPECT_NEAR(state->dataDaylightingManager->DaylIllum(1), 100.0, 0.001); - EXPECT_NEAR(state->dataDaylightingManager->DaylIllum(2), 10.0, 0.001); + EXPECT_NEAR(dl->DaylIllum(1), 100.0, 0.001); + EXPECT_NEAR(dl->DaylIllum(2), 10.0, 0.001); } // Test for #7809: Daylighting:Controls has 10 ref points with fraction that do sum exactly to 1, @@ -1967,6 +1986,8 @@ TEST_F(EnergyPlusFixture, DaylightingManager_GetInputDaylightingControls_Roundin ASSERT_TRUE(process_idf(idf_objects)); + auto &dl = state->dataDayltg; + bool foundErrors = false; HeatBalanceManager::GetZoneData(*state, foundErrors); ASSERT_FALSE(foundErrors); @@ -1974,7 +1995,7 @@ TEST_F(EnergyPlusFixture, DaylightingManager_GetInputDaylightingControls_Roundin state->dataHeatBal->space(1).solarEnclosureNum = 1; state->dataViewFactor->NumOfSolarEnclosures = 1; state->dataViewFactor->EnclSolInfo.allocate(state->dataViewFactor->NumOfSolarEnclosures); - state->dataDaylightingData->enclDaylight.allocate(state->dataViewFactor->NumOfSolarEnclosures); + dl->enclDaylight.allocate(state->dataViewFactor->NumOfSolarEnclosures); int numObjs = state->dataInputProcessing->inputProcessor->getNumObjectsFound(*state, "Daylighting:Controls"); EXPECT_EQ(1, numObjs); @@ -1982,7 +2003,7 @@ TEST_F(EnergyPlusFixture, DaylightingManager_GetInputDaylightingControls_Roundin Dayltg::GetInputDayliteRefPt(*state, foundErrors); compare_err_stream(""); EXPECT_FALSE(foundErrors); - EXPECT_EQ(10, (int)state->dataDaylightingData->DaylRefPt.size()); + EXPECT_EQ(10, (int)dl->DaylRefPt.size()); Dayltg::GetDaylightingControls(*state, foundErrors); // Used to throw @@ -1991,33 +2012,34 @@ TEST_F(EnergyPlusFixture, DaylightingManager_GetInputDaylightingControls_Roundin compare_err_stream(""); EXPECT_FALSE(foundErrors); - EXPECT_EQ("WEST ZONE_DAYLCTRL", state->dataDaylightingData->daylightControl(1).Name); - EXPECT_EQ("WEST ZONE", state->dataDaylightingData->daylightControl(1).ZoneName); - EXPECT_TRUE(compare_enums(DaylightingMethod::SplitFlux, state->dataDaylightingData->daylightControl(1).DaylightMethod)); - EXPECT_TRUE(compare_enums(LtgCtrlType::Continuous, state->dataDaylightingData->daylightControl(1).LightControlType)); + auto const &thisDaylightControl = dl->daylightControl(1); + EXPECT_EQ("WEST ZONE_DAYLCTRL", thisDaylightControl.Name); + EXPECT_EQ("WEST ZONE", thisDaylightControl.ZoneName); + EXPECT_TRUE(compare_enums(DaylightingMethod::SplitFlux, thisDaylightControl.DaylightMethod)); + EXPECT_TRUE(compare_enums(LtgCtrlType::Continuous, thisDaylightControl.LightControlType)); - EXPECT_EQ(0.3, state->dataDaylightingData->daylightControl(1).MinPowerFraction); - EXPECT_EQ(0.2, state->dataDaylightingData->daylightControl(1).MinLightFraction); - EXPECT_EQ(1, state->dataDaylightingData->daylightControl(1).LightControlSteps); - EXPECT_EQ(1.0, state->dataDaylightingData->daylightControl(1).LightControlProbability); + EXPECT_EQ(0.3, thisDaylightControl.MinPowerFraction); + EXPECT_EQ(0.2, thisDaylightControl.MinLightFraction); + EXPECT_EQ(1, thisDaylightControl.LightControlSteps); + EXPECT_EQ(1.0, thisDaylightControl.LightControlProbability); - EXPECT_EQ(1, state->dataDaylightingData->daylightControl(1).glareRefPtNumber); - EXPECT_EQ(180., state->dataDaylightingData->daylightControl(1).ViewAzimuthForGlare); - EXPECT_EQ(20., state->dataDaylightingData->daylightControl(1).MaxGlareallowed); - EXPECT_EQ(0, state->dataDaylightingData->daylightControl(1).DElightGriddingResolution); + EXPECT_EQ(1, thisDaylightControl.glareRefPtNumber); + EXPECT_EQ(180., thisDaylightControl.ViewAzimuthForGlare); + EXPECT_EQ(20., thisDaylightControl.MaxGlareallowed); + EXPECT_EQ(0, thisDaylightControl.DElightGriddingResolution); - EXPECT_EQ(10, state->dataDaylightingData->daylightControl(1).TotalDaylRefPoints); + EXPECT_EQ(10, thisDaylightControl.TotalDaylRefPoints); std::vector fractions({0.1053, 0.0936, 0.1213, 0.1018, 0.0893, 0.0842, 0.0882, 0.1026, 0.1134, 0.1003}); Real64 sum(0.0); int i = 1; for (auto frac : fractions) { sum += frac; - EXPECT_EQ(i, state->dataDaylightingData->daylightControl(1).DaylRefPtNum(i)); - EXPECT_EQ(format("WEST ZONE_DAYLREFPT{}", i), - state->dataDaylightingData->DaylRefPt(state->dataDaylightingData->daylightControl(1).DaylRefPtNum(i)).Name); - EXPECT_EQ(frac, state->dataDaylightingData->daylightControl(1).FracZoneDaylit(i)); - EXPECT_EQ(200., state->dataDaylightingData->daylightControl(1).IllumSetPoint(i)); + auto const &refPt = thisDaylightControl.refPts(i); + EXPECT_EQ(i, refPt.num); + EXPECT_EQ(format("WEST ZONE_DAYLREFPT{}", i), dl->DaylRefPt(refPt.num).Name); + EXPECT_EQ(frac, refPt.fracZoneDaylit); + EXPECT_EQ(200., refPt.illumSetPoint); ++i; } @@ -2083,6 +2105,8 @@ TEST_F(EnergyPlusFixture, DaylightingManager_GetInputDaylightingControls_NotArou ASSERT_TRUE(process_idf(idf_objects)); + auto &dl = state->dataDayltg; + bool foundErrors = false; HeatBalanceManager::GetZoneData(*state, foundErrors); ASSERT_FALSE(foundErrors); @@ -2090,7 +2114,7 @@ TEST_F(EnergyPlusFixture, DaylightingManager_GetInputDaylightingControls_NotArou state->dataHeatBal->space(1).solarEnclosureNum = 1; state->dataViewFactor->NumOfSolarEnclosures = 1; state->dataViewFactor->EnclSolInfo.allocate(state->dataViewFactor->NumOfSolarEnclosures); - state->dataDaylightingData->enclDaylight.allocate(state->dataViewFactor->NumOfSolarEnclosures); + dl->enclDaylight.allocate(state->dataViewFactor->NumOfSolarEnclosures); int numObjs = state->dataInputProcessing->inputProcessor->getNumObjectsFound(*state, "Daylighting:Controls"); EXPECT_EQ(1, numObjs); @@ -2098,7 +2122,7 @@ TEST_F(EnergyPlusFixture, DaylightingManager_GetInputDaylightingControls_NotArou Dayltg::GetInputDayliteRefPt(*state, foundErrors); compare_err_stream(""); EXPECT_FALSE(foundErrors); - EXPECT_EQ(2, (int)state->dataDaylightingData->DaylRefPt.size()); + EXPECT_EQ(2, (int)dl->DaylRefPt.size()); Dayltg::GetDaylightingControls(*state, foundErrors); @@ -2527,6 +2551,8 @@ TEST_F(EnergyPlusFixture, DaylightingManager_OutputFormats) ASSERT_TRUE(process_idf(idf_objects)); + auto &dl = state->dataDayltg; + bool foundErrors = false; HeatBalanceManager::GetProjectControlData(*state, foundErrors); // read project control data @@ -2543,7 +2569,7 @@ TEST_F(EnergyPlusFixture, DaylightingManager_OutputFormats) EXPECT_FALSE(foundErrors); // expect no errors state->dataViewFactor->NumOfSolarEnclosures = 1; state->dataViewFactor->EnclSolInfo.allocate(state->dataViewFactor->NumOfSolarEnclosures); - state->dataDaylightingData->enclDaylight.allocate(state->dataViewFactor->NumOfSolarEnclosures); + dl->enclDaylight.allocate(state->dataViewFactor->NumOfSolarEnclosures); state->dataSurfaceGeometry->CosZoneRelNorth.allocate(2); state->dataSurfaceGeometry->SinZoneRelNorth.allocate(2); @@ -2603,27 +2629,29 @@ TEST_F(EnergyPlusFixture, DaylightingManager_OutputFormats) delim); EXPECT_TRUE(compare_eio_stream(eiooutput, true)); // reset eio stream after compare - EXPECT_EQ(4, (int)state->dataDaylightingData->DaylRefPt.size()); + EXPECT_EQ(4, (int)dl->DaylRefPt.size()); - EXPECT_NEAR(2.048, state->dataDaylightingData->daylightControl(1).DaylRefPtAbsCoord(1).x, 0.001); - EXPECT_NEAR(3.048, state->dataDaylightingData->daylightControl(1).DaylRefPtAbsCoord(1).y, 0.001); - EXPECT_NEAR(0.9, state->dataDaylightingData->daylightControl(1).DaylRefPtAbsCoord(1).z, 0.001); + auto const &thisDaylightControl = dl->daylightControl(1); + auto const &refPt = thisDaylightControl.refPts(1); + EXPECT_NEAR(2.048, refPt.absCoords.x, 0.001); + EXPECT_NEAR(3.048, refPt.absCoords.y, 0.001); + EXPECT_NEAR(0.9, refPt.absCoords.z, 0.001); state->dataHeatBal->Zone(1).RelNorth = 45.; GeometryTransformForDaylighting(*state); - EXPECT_NEAR(3.603, state->dataDaylightingData->daylightControl(1).DaylRefPtAbsCoord(1).x, 0.001); - EXPECT_NEAR(0.707, state->dataDaylightingData->daylightControl(1).DaylRefPtAbsCoord(1).y, 0.001); - EXPECT_NEAR(0.9, state->dataDaylightingData->daylightControl(1).DaylRefPtAbsCoord(1).z, 0.001); + EXPECT_NEAR(3.603, refPt.absCoords.x, 0.001); + EXPECT_NEAR(0.707, refPt.absCoords.y, 0.001); + EXPECT_NEAR(0.9, refPt.absCoords.z, 0.001); state->dataHeatBal->Zone(1).RelNorth = 90.; GeometryTransformForDaylighting(*state); - EXPECT_NEAR(3.048, state->dataDaylightingData->daylightControl(1).DaylRefPtAbsCoord(1).x, 0.001); - EXPECT_NEAR(-2.048, state->dataDaylightingData->daylightControl(1).DaylRefPtAbsCoord(1).y, 0.001); - EXPECT_NEAR(0.9, state->dataDaylightingData->daylightControl(1).DaylRefPtAbsCoord(1).z, 0.001); + EXPECT_NEAR(3.048, refPt.absCoords.x, 0.001); + EXPECT_NEAR(-2.048, refPt.absCoords.y, 0.001); + EXPECT_NEAR(0.9, refPt.absCoords.z, 0.001); EXPECT_FALSE(has_dfs_output(true)); @@ -3355,38 +3383,42 @@ TEST_F(EnergyPlusFixture, DaylightingManager_TDD_NoDaylightingControls) EXPECT_TRUE(compare_err_stream(error_string, true)); } -TEST_F(EnergyPlusFixture, DaylightingManager_ReportIllumMap) +TEST_F(EnergyPlusFixture, DaylightingManager_ReportillumMaps) { + auto &dl = state->dataDayltg; + int MapNum = 1; - state->dataDaylightingManager->ReportIllumMap_firstTime = false; + dl->ReportIllumMap_firstTime = false; - state->dataDaylightingManager->FirstTimeMaps.dimension(1, true); - state->dataDaylightingManager->EnvrnPrint.dimension(1, false); + dl->FirstTimeMaps.dimension(1, true); + dl->EnvrnPrint.dimension(1, false); state->dataGlobal->NumOfZones = 1; - state->dataDaylightingData->daylightControl.allocate(1); - state->dataDaylightingData->daylightControl(1).TotalDaylRefPoints = 3; - state->dataDaylightingData->daylightControl(1).DaylRefPtAbsCoord.allocate(state->dataDaylightingData->daylightControl(1).TotalDaylRefPoints); - state->dataDaylightingManager->SavedMnDy.allocate(1); - state->dataDaylightingData->IllumMap.allocate(state->dataGlobal->NumOfZones); - state->dataDaylightingData->IllumMap(MapNum).zoneIndex = 1; - state->dataDaylightingData->daylightControl(1).zoneIndex = 1; - state->dataDaylightingData->MapColSep = DataStringGlobals::CharSemicolon; + dl->daylightControl.allocate(1); + + auto &thisDaylightControl = dl->daylightControl(1); + thisDaylightControl.TotalDaylRefPoints = 3; + thisDaylightControl.refPts.allocate(thisDaylightControl.TotalDaylRefPoints); + dl->SavedMnDy.allocate(1); + dl->illumMaps.allocate(state->dataGlobal->NumOfZones); + dl->illumMaps(MapNum).zoneIndex = 1; + thisDaylightControl.zoneIndex = 1; + dl->MapColSep = DataStringGlobals::CharSemicolon; state->dataEnvrn->CurMnDyHr = "JAN012001"; - state->dataDaylightingManager->SavedMnDy(1) = "JAN01"; + dl->SavedMnDy(1) = "JAN01"; state->dataGlobal->WarmupFlag = true; - state->dataDaylightingData->daylightControl(1).DaylRefPtAbsCoord(1) = {1.23, 2.34, 3.45}; - state->dataDaylightingData->daylightControl(1).DaylRefPtAbsCoord(2) = {4.56, 5.67, 6.78}; - state->dataDaylightingData->daylightControl(1).DaylRefPtAbsCoord(3) = {7.89, 8.90, 9.01}; - state->dataDaylightingData->IllumMap(MapNum).Name = "ThisOne"; - state->dataDaylightingData->IllumMap(MapNum).Z = 23.23; + thisDaylightControl.refPts(1).absCoords = {1.23, 2.34, 3.45}; + thisDaylightControl.refPts(2).absCoords = {4.56, 5.67, 6.78}; + thisDaylightControl.refPts(3).absCoords = {7.89, 8.90, 9.01}; + dl->illumMaps(MapNum).Name = "ThisOne"; + dl->illumMaps(MapNum).Z = 23.23; std::string expectedResultName = "ThisOne at 23.23m"; std::string expectedResultPtsHeader = " RefPt1=(1.23:2.34:3.45), RefPt2=(4.56:5.67:6.78), RefPt3=(7.89:8.90:9.01)"; Dayltg::ReportIllumMap(*state, MapNum); - EXPECT_EQ(expectedResultName, state->dataDaylightingData->IllumMap(1).Name); - EXPECT_EQ(expectedResultPtsHeader, state->dataDaylightingData->IllumMap(MapNum).pointsHeader); + EXPECT_EQ(expectedResultName, dl->illumMaps(1).Name); + EXPECT_EQ(expectedResultPtsHeader, dl->illumMaps(MapNum).pointsHeader); } TEST_F(EnergyPlusFixture, DaylightingManager_DayltgIlluminanceMap) { @@ -3662,8 +3694,11 @@ TEST_F(EnergyPlusFixture, DaylightingManager_DayltgIlluminanceMap) }); ASSERT_TRUE(process_idf(idf_objects)); + + auto &dl = state->dataDayltg; + SimulationManager::ManageSimulation(*state); - EXPECT_EQ(100, state->dataDaylightingData->IllumMapCalc(1).DaylIllumAtMapPt.size()); + EXPECT_EQ(100, dl->illumMaps(1).refPts.size()); // re-set the hour of the day to mid-day state->dataGlobal->TimeStep = 1; @@ -3674,26 +3709,27 @@ TEST_F(EnergyPlusFixture, DaylightingManager_DayltgIlluminanceMap) state->dataWeather->Envrn = 1; Weather::ManageWeather(*state); HeatBalanceManager::ManageHeatBalance(*state); - EXPECT_NEAR(16051, state->dataDaylightingData->IllumMapCalc(1).DaylIllumAtMapPt(5), 1); - EXPECT_NEAR(203, state->dataDaylightingData->IllumMapCalc(1).DaylIllumAtMapPt(10), 1); - EXPECT_NEAR(1294, state->dataDaylightingData->IllumMapCalc(1).DaylIllumAtMapPt(15), 1); - EXPECT_NEAR(412, state->dataDaylightingData->IllumMapCalc(1).DaylIllumAtMapPt(20), 1); - EXPECT_NEAR(257, state->dataDaylightingData->IllumMapCalc(1).DaylIllumAtMapPt(51), 1); - EXPECT_NEAR(316, state->dataDaylightingData->IllumMapCalc(1).DaylIllumAtMapPt(55), 1); - EXPECT_NEAR(255, state->dataDaylightingData->IllumMapCalc(1).DaylIllumAtMapPt(60), 1); - EXPECT_NEAR(209, state->dataDaylightingData->IllumMapCalc(1).DaylIllumAtMapPt(91), 1); - EXPECT_NEAR(209, state->dataDaylightingData->IllumMapCalc(1).DaylIllumAtMapPt(100), 1); + EXPECT_NEAR(16051, dl->illumMaps(1).refPts(5).lums[(int)Lum::Illum], 1); + EXPECT_NEAR(203, dl->illumMaps(1).refPts(10).lums[(int)Lum::Illum], 1); + EXPECT_NEAR(1294, dl->illumMaps(1).refPts(15).lums[(int)Lum::Illum], 1); + EXPECT_NEAR(412, dl->illumMaps(1).refPts(20).lums[(int)Lum::Illum], 1); + EXPECT_NEAR(257, dl->illumMaps(1).refPts(51).lums[(int)Lum::Illum], 1); + EXPECT_NEAR(316, dl->illumMaps(1).refPts(55).lums[(int)Lum::Illum], 1); + EXPECT_NEAR(255, dl->illumMaps(1).refPts(60).lums[(int)Lum::Illum], 1); + EXPECT_NEAR(209, dl->illumMaps(1).refPts(91).lums[(int)Lum::Illum], 1); + EXPECT_NEAR(209, dl->illumMaps(1).refPts(100).lums[(int)Lum::Illum], 1); } TEST_F(EnergyPlusFixture, DaylightingManager_SteppedControl_LowDaylightConditions) { // Test for #9060 + auto &dl = state->dataDayltg; - state->dataDaylightingData->daylightControl.allocate(1); - auto &thisDaylightControl = state->dataDaylightingData->daylightControl(1); + dl->daylightControl.allocate(1); + auto &thisDaylightControl = dl->daylightControl(1); int nRefPts = 1; thisDaylightControl.TotalDaylRefPoints = nRefPts; - thisDaylightControl.DaylRefPtAbsCoord.allocate(nRefPts); + thisDaylightControl.refPts.allocate(nRefPts); state->dataGlobal->NumOfZones = 1; state->dataHeatBal->Zone.allocate(1); @@ -3701,7 +3737,7 @@ TEST_F(EnergyPlusFixture, DaylightingManager_SteppedControl_LowDaylightCondition state->dataGlobal->numSpaces = 1; state->dataHeatBal->space.allocate(1); state->dataHeatBal->space(1).solarEnclosureNum = 1; - state->dataDaylightingData->spacePowerReductionFactor.allocate(1); + dl->spacePowerReductionFactor.allocate(1); thisDaylightControl.zoneIndex = 1; @@ -3711,32 +3747,26 @@ TEST_F(EnergyPlusFixture, DaylightingManager_SteppedControl_LowDaylightCondition thisDaylightControl.AvailSchedNum = -1; // Always Available thisDaylightControl.LightControlSteps = 4; - thisDaylightControl.FracZoneDaylit.allocate(nRefPts); - thisDaylightControl.FracZoneDaylit(1) = 1.0; - - thisDaylightControl.IllumSetPoint.allocate(nRefPts); - thisDaylightControl.IllumSetPoint(1) = 400.0; - - thisDaylightControl.RefPtPowerReductionFactor.allocate(nRefPts); + dl->DaylIllum.allocate(nRefPts); - thisDaylightControl.DaylIllumAtRefPt.allocate(nRefPts); - auto &illum = thisDaylightControl.DaylIllumAtRefPt(1); - state->dataDaylightingManager->DaylIllum.allocate(nRefPts); + auto &refPt = thisDaylightControl.refPts(1); + refPt.fracZoneDaylit = 1.0; + refPt.illumSetPoint = 400.0; - illum = 1.0; + refPt.lums[(int)Lum::Illum] = 1.0; DayltgElecLightingControl(*state); EXPECT_DOUBLE_EQ(1.0, thisDaylightControl.PowerReductionFactor); - illum = 1e-6; + refPt.lums[(int)Lum::Illum] = 1e-6; DayltgElecLightingControl(*state); EXPECT_DOUBLE_EQ(1.0, thisDaylightControl.PowerReductionFactor); - illum = 1e-20; + refPt.lums[(int)Lum::Illum] = 1e-20; DayltgElecLightingControl(*state); EXPECT_DOUBLE_EQ(1.0, thisDaylightControl.PowerReductionFactor); // Test with Lighting Probability - illum = 101.0; + refPt.lums[(int)Lum::Illum] = 101.0; DayltgElecLightingControl(*state); EXPECT_DOUBLE_EQ(0.75, thisDaylightControl.PowerReductionFactor); @@ -3746,7 +3776,7 @@ TEST_F(EnergyPlusFixture, DaylightingManager_SteppedControl_LowDaylightCondition EXPECT_DOUBLE_EQ(1.0, thisDaylightControl.PowerReductionFactor); // Ensure we don't go higher than 1.0 - illum = 1.0; + refPt.lums[(int)Lum::Illum] = 1.0; DayltgElecLightingControl(*state); EXPECT_DOUBLE_EQ(1.0, thisDaylightControl.PowerReductionFactor); } diff --git a/tst/EnergyPlus/unit/DemandResponse.unit.cc b/tst/EnergyPlus/unit/DemandResponse.unit.cc index e1bae6e3d2c..afab05e5b68 100644 --- a/tst/EnergyPlus/unit/DemandResponse.unit.cc +++ b/tst/EnergyPlus/unit/DemandResponse.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DesiccantDehumidifiers.unit.cc b/tst/EnergyPlus/unit/DesiccantDehumidifiers.unit.cc index aac7c079c2f..6695a228258 100644 --- a/tst/EnergyPlus/unit/DesiccantDehumidifiers.unit.cc +++ b/tst/EnergyPlus/unit/DesiccantDehumidifiers.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DisplacementVentMgr.unit.cc b/tst/EnergyPlus/unit/DisplacementVentMgr.unit.cc index 88adf4b53c5..cf4fdf0a76d 100644 --- a/tst/EnergyPlus/unit/DisplacementVentMgr.unit.cc +++ b/tst/EnergyPlus/unit/DisplacementVentMgr.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DualDuct.unit.cc b/tst/EnergyPlus/unit/DualDuct.unit.cc index cbc7bd6002a..7394f05c02b 100644 --- a/tst/EnergyPlus/unit/DualDuct.unit.cc +++ b/tst/EnergyPlus/unit/DualDuct.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/EMSManager.unit.cc b/tst/EnergyPlus/unit/EMSManager.unit.cc index 1f477530de2..0973aa7f625 100644 --- a/tst/EnergyPlus/unit/EMSManager.unit.cc +++ b/tst/EnergyPlus/unit/EMSManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -55,11 +55,11 @@ #include #include #include -#include #include #include #include #include +#include #include #include #include @@ -1593,10 +1593,11 @@ TEST_F(EnergyPlusFixture, EMSManager_TestWindowShadingControlExteriorScreenOptio { // #7586 state->dataSurface->Surface.allocate(2); + state->dataSurface->SurfaceWindow.allocate(2); EnergyPlus::SurfaceGeometry::AllocateSurfaceWindows(*state, 2); state->dataConstruction->Construct.allocate(1); state->dataSurface->WindowShadingControl.allocate(2); - state->dataDaylightingData->ZoneDaylight.allocate(1); + state->dataDayltg->ZoneDaylight.allocate(1); state->dataSurface->Surface(1).Name = "Surface1"; state->dataSurface->Surface(2).Name = "Surface2"; state->dataSurface->Surface(1).Zone = 1; diff --git a/tst/EnergyPlus/unit/EPVector.unit.cc b/tst/EnergyPlus/unit/EPVector.unit.cc index 3e6112ca549..7518d9c3548 100644 --- a/tst/EnergyPlus/unit/EPVector.unit.cc +++ b/tst/EnergyPlus/unit/EPVector.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/EarthTube.unit.cc b/tst/EnergyPlus/unit/EarthTube.unit.cc index 830684766ba..61909cc68d2 100644 --- a/tst/EnergyPlus/unit/EarthTube.unit.cc +++ b/tst/EnergyPlus/unit/EarthTube.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/EcoRoofManager.unit.cc b/tst/EnergyPlus/unit/EcoRoofManager.unit.cc index 91a42b34109..98d7216bb65 100644 --- a/tst/EnergyPlus/unit/EcoRoofManager.unit.cc +++ b/tst/EnergyPlus/unit/EcoRoofManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/EconomicLifeCycleCost.unit.cc b/tst/EnergyPlus/unit/EconomicLifeCycleCost.unit.cc index b2644824466..e67a7790509 100644 --- a/tst/EnergyPlus/unit/EconomicLifeCycleCost.unit.cc +++ b/tst/EnergyPlus/unit/EconomicLifeCycleCost.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -597,6 +597,7 @@ TEST_F(EnergyPlusFixture, EconomicLifeCycleCost_GetInput_EnsureFuelTypesAllRecog const json &enum_values = resource_field.at("enum"); // Should support all fuels + ElectricityXXX (Purchased, Produced, SurplusSold, Net) + // THIS IS BRITTLE AS HECK. DON'T RELY ON SUBSETS OF ENUMERATIONS BEING IN SOME ORDER. constexpr size_t numResources = static_cast(Constant::eFuel::Num) + 3; // Constant::eFuel::Num has 15 fuel types including "None" (which is a fuel type for "OtherEquipment") // "LifeCycleCost:UsePriceEscalation" has 18 fuel types including ElectricityXXX (Purchased, Produced, SurplusSold, Net) @@ -619,10 +620,11 @@ TEST_F(EnergyPlusFixture, EconomicLifeCycleCost_GetInput_EnsureFuelTypesAllRecog }); // All should be valid resources for (const auto &enum_value : enum_values) { - const std::string enum_string = enum_value.get(); + const std::string enum_string = Util::makeUPPER(enum_value.get()); const auto resource = static_cast(getEnumValue(Constant::eResourceNamesUC, enum_string)); - EXPECT_TRUE(compare_enums(Constant::eResource::Invalid, resource)) << "Failed for " << enum_string; + // WHY IS COMPARE ENUMS THIS WAY? + EXPECT_FALSE(compare_enums(Constant::eResource::Invalid, resource, false)) << "Failed for " << enum_string; idf_objects += fmt::format(R"idf( LifeCycleCost:UsePriceEscalation, diff --git a/tst/EnergyPlus/unit/EconomicTariff.unit.cc b/tst/EnergyPlus/unit/EconomicTariff.unit.cc index f411fe2597a..b5b8127e812 100644 --- a/tst/EnergyPlus/unit/EconomicTariff.unit.cc +++ b/tst/EnergyPlus/unit/EconomicTariff.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -256,11 +256,11 @@ TEST_F(EnergyPlusFixture, EconomicTariff_Water_DefaultConv_Test) ASSERT_TRUE(process_idf(idf_objects)); - // Create a water meter - state->dataOutputProcessor->NumEnergyMeters = 1; - state->dataOutputProcessor->EnergyMeters.allocate(state->dataOutputProcessor->NumEnergyMeters); - state->dataOutputProcessor->EnergyMeters(1).Name = "WATER:FACILITY"; - state->dataOutputProcessor->EnergyMeters(1).ResourceType = "WATER"; + // Create a water meter, can't use AddMeter because we would need to create a variable for that + OutputProcessor::Meter *meter = new OutputProcessor::Meter("WATER:FACILITY"); + meter->resource = Constant::eResource::Water; + state->dataOutputProcessor->meters.push_back(meter); + state->dataOutputProcessor->meterMap.insert_or_assign("WATER:FACILITY", state->dataOutputProcessor->meters.size() - 1); UpdateUtilityBills(*state); @@ -300,13 +300,12 @@ TEST_F(EnergyPlusFixture, EconomicTariff_Water_CCF_Test) ASSERT_TRUE(process_idf(idf_objects)); // Create a water meter - state->dataOutputProcessor->NumEnergyMeters = 1; - state->dataOutputProcessor->EnergyMeters.allocate(state->dataOutputProcessor->NumEnergyMeters); - state->dataOutputProcessor->EnergyMeters(1).Name = "WATER:FACILITY"; - state->dataOutputProcessor->EnergyMeters(1).ResourceType = "WATER"; + OutputProcessor::Meter *meter = new Meter("WATER:FACILITY"); + state->dataOutputProcessor->meters.push_back(meter); + meter->resource = Constant::eResource::Water; + state->dataOutputProcessor->meterMap.insert_or_assign("WATER:FACILITY", state->dataOutputProcessor->meters.size() - 1); UpdateUtilityBills(*state); - ; // tariff EXPECT_EQ(1, state->dataEconTariff->numTariff); @@ -341,10 +340,10 @@ TEST_F(EnergyPlusFixture, EconomicTariff_Gas_CCF_Test) ASSERT_TRUE(process_idf(idf_objects)); // Create a water meter - state->dataOutputProcessor->NumEnergyMeters = 1; - state->dataOutputProcessor->EnergyMeters.allocate(state->dataOutputProcessor->NumEnergyMeters); - state->dataOutputProcessor->EnergyMeters(1).Name = "NATURALGAS:FACILITY"; - state->dataOutputProcessor->EnergyMeters(1).ResourceType = "NATURALGAS"; + OutputProcessor::Meter *meter = new Meter("NATURALGAS:FACILITY"); + state->dataOutputProcessor->meters.push_back(meter); + meter->resource = Constant::eResource::NaturalGas; + state->dataOutputProcessor->meterMap.insert_or_assign("NATURALGAS:FACILITY", state->dataOutputProcessor->meters.size() - 1); UpdateUtilityBills(*state); ; @@ -383,10 +382,10 @@ TEST_F(EnergyPlusFixture, EconomicTariff_Electric_CCF_Test) ASSERT_TRUE(process_idf(idf_objects)); // Create a water meter - state->dataOutputProcessor->NumEnergyMeters = 1; - state->dataOutputProcessor->EnergyMeters.allocate(state->dataOutputProcessor->NumEnergyMeters); - state->dataOutputProcessor->EnergyMeters(1).Name = "ELECTRICITY:FACILITY"; - state->dataOutputProcessor->EnergyMeters(1).ResourceType = "ELECTRICITY"; + OutputProcessor::Meter *meter = new Meter("ELECTRICITY:FACILITY"); + state->dataOutputProcessor->meters.push_back(meter); + meter->resource = Constant::eResource::Electricity; + state->dataOutputProcessor->meterMap.insert_or_assign("ELECTRICITY:FACILITY", state->dataOutputProcessor->meters.size() - 1); UpdateUtilityBills(*state); ; @@ -408,12 +407,14 @@ TEST_F(EnergyPlusFixture, EconomicTariff_Electric_CCF_Test) TEST_F(EnergyPlusFixture, EconomicTariff_LEEDtariffReporting_Test) { - state->dataOutputProcessor->NumEnergyMeters = 4; - state->dataOutputProcessor->EnergyMeters.allocate(state->dataOutputProcessor->NumEnergyMeters); - state->dataOutputProcessor->EnergyMeters(1).Name = "ELECTRICITY:FACILITY"; - state->dataOutputProcessor->EnergyMeters(2).Name = "NATURALGAS:FACILITY"; - state->dataOutputProcessor->EnergyMeters(3).Name = "DISTRICTCOOLING:FACILITY"; - state->dataOutputProcessor->EnergyMeters(4).Name = "DISTRICTHEATINGWATER:FACILITY"; + state->dataOutputProcessor->meters.push_back(new Meter("ELECTRICITY:FACILITY")); + state->dataOutputProcessor->meterMap.insert_or_assign("ELECTRICITY:FACILITY", state->dataOutputProcessor->meters.size() - 1); + state->dataOutputProcessor->meters.push_back(new Meter("NATURALGAS:FACILITY")); + state->dataOutputProcessor->meterMap.insert_or_assign("NATURALGAS:FACILITY", state->dataOutputProcessor->meters.size() - 1); + state->dataOutputProcessor->meters.push_back(new Meter("DISTRICTCOOLING:FACILITY")); + state->dataOutputProcessor->meterMap.insert_or_assign("DISTRICTCOOLING:FACILITY", state->dataOutputProcessor->meters.size() - 1); + state->dataOutputProcessor->meters.push_back(new Meter("DISTRICTHEATINGWATER:FACILITY")); + state->dataOutputProcessor->meterMap.insert_or_assign("DISTRICTHEATINGWATER:FACILITY", state->dataOutputProcessor->meters.size() - 1); state->dataEconTariff->numTariff = 4; state->dataEconTariff->tariff.allocate(state->dataEconTariff->numTariff); @@ -422,26 +423,26 @@ TEST_F(EnergyPlusFixture, EconomicTariff_LEEDtariffReporting_Test) state->dataEconTariff->tariff(1).totalAnnualCost = 4151.45; state->dataEconTariff->tariff(1).totalAnnualEnergy = 4855.21; state->dataEconTariff->tariff(1).kindElectricMtr = 3; - state->dataEconTariff->tariff(1).reportMeterIndx = 1; + state->dataEconTariff->tariff(1).reportMeterIndx = GetMeterIndex(*state, "ELECTRICITY:FACILITY"); state->dataEconTariff->tariff(2).tariffName = "SmallCGUnit"; state->dataEconTariff->tariff(2).isSelected = true; state->dataEconTariff->tariff(2).totalAnnualCost = 415.56; state->dataEconTariff->tariff(2).totalAnnualEnergy = 0.00; state->dataEconTariff->tariff(2).kindGasMtr = 1; - state->dataEconTariff->tariff(2).reportMeterIndx = 2; + state->dataEconTariff->tariff(2).reportMeterIndx = GetMeterIndex(*state, "NATURALGAS:FACILITY"); state->dataEconTariff->tariff(3).tariffName = "DistrictCoolingUnit"; state->dataEconTariff->tariff(3).isSelected = true; state->dataEconTariff->tariff(3).totalAnnualCost = 55.22; state->dataEconTariff->tariff(3).totalAnnualEnergy = 8.64; - state->dataEconTariff->tariff(3).reportMeterIndx = 3; + state->dataEconTariff->tariff(3).reportMeterIndx = GetMeterIndex(*state, "DISTRICTCOOLING:FACILITY"); state->dataEconTariff->tariff(4).tariffName = "DistrictHeatingUnit"; state->dataEconTariff->tariff(4).isSelected = true; state->dataEconTariff->tariff(4).totalAnnualCost = 15.98; state->dataEconTariff->tariff(4).totalAnnualEnergy = 1.47; - state->dataEconTariff->tariff(4).reportMeterIndx = 4; + state->dataEconTariff->tariff(4).reportMeterIndx = GetMeterIndex(*state, "DISTRICTHEATINGWATER:FACILITY"); SetPredefinedTables(*state); // need to setup the predefined table entry numbers @@ -1396,16 +1397,21 @@ TEST_F(EnergyPlusFixture, EconomicTariff_LEEDtariff_with_Custom_Meter) EXPECT_FALSE(errors_found); - state->dataOutputProcessor->NumEnergyMeters = 7; - state->dataOutputProcessor->EnergyMeters.allocate(state->dataOutputProcessor->NumEnergyMeters); - state->dataOutputProcessor->EnergyMeters(1).Name = "ELECTRICITY:FACILITY"; - state->dataOutputProcessor->EnergyMeters(2).Name = "ElectricitySurplusSold:Facility"; - - state->dataOutputProcessor->EnergyMeters(3).Name = "NATURALGAS:FACILITY"; - state->dataOutputProcessor->EnergyMeters(4).Name = "DISTRICTCOOLING:FACILITY"; - state->dataOutputProcessor->EnergyMeters(5).Name = "DISTRICTHEATINGWATER:FACILITY"; - state->dataOutputProcessor->EnergyMeters(6).Name = "WATER:FACILITY"; - state->dataOutputProcessor->EnergyMeters(7).Name = "Building Natural Gas"; + state->dataOutputProcessor->meters.push_back(new Meter("ELECTRICITY:FACILITY")); + state->dataOutputProcessor->meterMap.insert_or_assign("ELECTRICITY:FACILITY", state->dataOutputProcessor->meters.size() - 1); + state->dataOutputProcessor->meters.push_back(new Meter("ElectricitySurplusSold:Facility")); + state->dataOutputProcessor->meterMap.insert_or_assign("ELECTRICITYSURPLUSSOLD:FACILITY", state->dataOutputProcessor->meters.size() - 1); + + state->dataOutputProcessor->meters.push_back(new Meter("NATURALGAS:FACILITY")); + state->dataOutputProcessor->meterMap.insert_or_assign("NATURALGAS:FACILITY", state->dataOutputProcessor->meters.size() - 1); + state->dataOutputProcessor->meters.push_back(new Meter("DISTRICTCOOLING:FACILITY")); + state->dataOutputProcessor->meterMap.insert_or_assign("DISTRICTCOOLING:FACILITY", state->dataOutputProcessor->meters.size() - 1); + state->dataOutputProcessor->meters.push_back(new Meter("DISTRICTHEATINGWATER:FACILITY")); + state->dataOutputProcessor->meterMap.insert_or_assign("DISTRICTHEATINGWATER:FACILITY", state->dataOutputProcessor->meters.size() - 1); + state->dataOutputProcessor->meters.push_back(new Meter("WATER:FACILITY")); + state->dataOutputProcessor->meterMap.insert_or_assign("WATER:FACILITY", state->dataOutputProcessor->meters.size() - 1); + state->dataOutputProcessor->meters.push_back(new Meter("Building Natural Gas")); + state->dataOutputProcessor->meterMap.insert_or_assign("BUILDING NATURAL GAS", state->dataOutputProcessor->meters.size() - 1); // int elecFacilMeter = GetMeterIndex(*state, "ELECTRICITY:FACILITY"); // int gasFacilMeter = GetMeterIndex(*state, "NATURALGAS:FACILITY"); @@ -1419,7 +1425,7 @@ TEST_F(EnergyPlusFixture, EconomicTariff_LEEDtariff_with_Custom_Meter) state->dataEconTariff->tariff(1).totalAnnualCost = 1000.0; state->dataEconTariff->tariff(1).totalAnnualEnergy = 10000.0; state->dataEconTariff->tariff(1).kindElectricMtr = 3; - state->dataEconTariff->tariff(1).reportMeterIndx = 1; + state->dataEconTariff->tariff(1).reportMeterIndx = GetMeterIndex(*state, "ELECTRICITY:FACILITY"); state->dataEconTariff->tariff(2).tariffName = "ExampleI-Sell"; state->dataEconTariff->tariff(2).isSelected = true; @@ -1427,7 +1433,7 @@ TEST_F(EnergyPlusFixture, EconomicTariff_LEEDtariff_with_Custom_Meter) state->dataEconTariff->tariff(2).totalAnnualEnergy = 2000.0; state->dataEconTariff->tariff(2).kindElectricMtr = 4; state->dataEconTariff->tariff(2).kindGasMtr = 0; - state->dataEconTariff->tariff(2).reportMeterIndx = 2; + state->dataEconTariff->tariff(2).reportMeterIndx = GetMeterIndex(*state, "ELECTRICITYSURPLUSSOLD:FACILITY"); state->dataEconTariff->tariff(3).tariffName = "ExampleA-Gas"; state->dataEconTariff->tariff(3).isSelected = true; @@ -1435,26 +1441,26 @@ TEST_F(EnergyPlusFixture, EconomicTariff_LEEDtariff_with_Custom_Meter) state->dataEconTariff->tariff(3).totalAnnualEnergy = 3000.0; state->dataEconTariff->tariff(3).kindElectricMtr = 0; state->dataEconTariff->tariff(3).kindGasMtr = 1; - state->dataEconTariff->tariff(3).reportMeterIndx = 3; + state->dataEconTariff->tariff(3).reportMeterIndx = GetMeterIndex(*state, "NATURALGAS:FACILITY"); state->dataEconTariff->tariff(4).tariffName = "DistrictCoolingUnit"; state->dataEconTariff->tariff(4).isSelected = true; state->dataEconTariff->tariff(4).totalAnnualCost = 50.0; state->dataEconTariff->tariff(4).totalAnnualEnergy = 10.0; - state->dataEconTariff->tariff(4).reportMeterIndx = 4; + state->dataEconTariff->tariff(4).reportMeterIndx = GetMeterIndex(*state, "DISTRICTCOOLING:FACILITY"); state->dataEconTariff->tariff(5).tariffName = "DistrictHeatingUnit"; state->dataEconTariff->tariff(5).isSelected = true; state->dataEconTariff->tariff(5).totalAnnualCost = 168; state->dataEconTariff->tariff(5).totalAnnualEnergy = 15; - state->dataEconTariff->tariff(5).reportMeterIndx = 5; + state->dataEconTariff->tariff(5).reportMeterIndx = GetMeterIndex(*state, "DISTRICTHEATINGWATER:FACILITY"); state->dataEconTariff->tariff(6).tariffName = "Water Tariff"; state->dataEconTariff->tariff(6).isSelected = true; state->dataEconTariff->tariff(6).totalAnnualCost = 1050; state->dataEconTariff->tariff(6).totalAnnualEnergy = 150; state->dataEconTariff->tariff(6).kindWaterMtr = 1; - state->dataEconTariff->tariff(6).reportMeterIndx = 6; + state->dataEconTariff->tariff(6).reportMeterIndx = GetMeterIndex(*state, "WATER:FACILITY"); state->dataEconTariff->tariff(7).tariffName = "Sample with All Utilities_NGas"; state->dataEconTariff->tariff(7).isSelected = true; @@ -1462,7 +1468,7 @@ TEST_F(EnergyPlusFixture, EconomicTariff_LEEDtariff_with_Custom_Meter) state->dataEconTariff->tariff(7).totalAnnualEnergy = 3000.0; state->dataEconTariff->tariff(7).kindElectricMtr = 0; state->dataEconTariff->tariff(7).kindGasMtr = 1; - state->dataEconTariff->tariff(7).reportMeterIndx = 7; + state->dataEconTariff->tariff(7).reportMeterIndx = GetMeterIndex(*state, "BUILDING NATURAL GAS"); SetPredefinedTables(*state); // setup the predefined table entry numbers first diff --git a/tst/EnergyPlus/unit/ElectricBaseboardRadiator.unit.cc b/tst/EnergyPlus/unit/ElectricBaseboardRadiator.unit.cc index 929f87f912d..6cbf3d02751 100644 --- a/tst/EnergyPlus/unit/ElectricBaseboardRadiator.unit.cc +++ b/tst/EnergyPlus/unit/ElectricBaseboardRadiator.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -301,6 +301,14 @@ TEST_F(EnergyPlusFixture, RadConvElecBaseboard_Test1) ElectricBaseboardRadiator::GetElectricBaseboardInput(*state); EXPECT_EQ(state->dataElectBaseboardRad->ElecBaseboard(1).ZonePtr, 1); EXPECT_EQ(state->dataElectBaseboardRad->ElecBaseboard(2).ZonePtr, 2); + + int surfNumRight1 = Util::FindItemInList("RIGHT-1", state->dataSurface->Surface); + int surfNumLeft1 = Util::FindItemInList("LEFT-1", state->dataSurface->Surface); + + EXPECT_EQ(state->dataSurface->allGetsRadiantHeatSurfaceList[0], surfNumRight1); + EXPECT_EQ(state->dataSurface->allGetsRadiantHeatSurfaceList[1], surfNumLeft1); + EXPECT_TRUE(state->dataSurface->surfIntConv(surfNumRight1).getsRadiantHeat); + EXPECT_TRUE(state->dataSurface->surfIntConv(surfNumLeft1).getsRadiantHeat); } TEST_F(EnergyPlusFixture, ElectricBaseboardRadConv_SizingTest) diff --git a/tst/EnergyPlus/unit/ElectricPowerServiceManager.unit.cc b/tst/EnergyPlus/unit/ElectricPowerServiceManager.unit.cc index f64ed8998a4..05f2f7cc81d 100644 --- a/tst/EnergyPlus/unit/ElectricPowerServiceManager.unit.cc +++ b/tst/EnergyPlus/unit/ElectricPowerServiceManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/EquipAndOperations.unit.cc b/tst/EnergyPlus/unit/EquipAndOperations.unit.cc index fb564423e98..2e361a5e6af 100644 --- a/tst/EnergyPlus/unit/EquipAndOperations.unit.cc +++ b/tst/EnergyPlus/unit/EquipAndOperations.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/EvaporativeCoolers.unit.cc b/tst/EnergyPlus/unit/EvaporativeCoolers.unit.cc index 4322e2f57ff..73b200dee17 100644 --- a/tst/EnergyPlus/unit/EvaporativeCoolers.unit.cc +++ b/tst/EnergyPlus/unit/EvaporativeCoolers.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/EvaporativeFluidCoolers.unit.cc b/tst/EnergyPlus/unit/EvaporativeFluidCoolers.unit.cc index c320b400b6e..22ed2dd947a 100644 --- a/tst/EnergyPlus/unit/EvaporativeFluidCoolers.unit.cc +++ b/tst/EnergyPlus/unit/EvaporativeFluidCoolers.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ExhaustSystem.unit.cc b/tst/EnergyPlus/unit/ExhaustSystem.unit.cc index 1ce647be21b..071dd01a5eb 100644 --- a/tst/EnergyPlus/unit/ExhaustSystem.unit.cc +++ b/tst/EnergyPlus/unit/ExhaustSystem.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ExteriorEnergyUse.unit.cc b/tst/EnergyPlus/unit/ExteriorEnergyUse.unit.cc index 1bdcac9a5b4..1eb8e0cb3a4 100644 --- a/tst/EnergyPlus/unit/ExteriorEnergyUse.unit.cc +++ b/tst/EnergyPlus/unit/ExteriorEnergyUse.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/FanCoilUnits.unit.cc b/tst/EnergyPlus/unit/FanCoilUnits.unit.cc index b172c3188bd..d4f1699114c 100644 --- a/tst/EnergyPlus/unit/FanCoilUnits.unit.cc +++ b/tst/EnergyPlus/unit/FanCoilUnits.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Fans.unit.cc b/tst/EnergyPlus/unit/Fans.unit.cc index 1bc6349174f..79d20833edd 100644 --- a/tst/EnergyPlus/unit/Fans.unit.cc +++ b/tst/EnergyPlus/unit/Fans.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/FaultsManager.unit.cc b/tst/EnergyPlus/unit/FaultsManager.unit.cc index 98bd3dfe9a5..77a554ba94c 100644 --- a/tst/EnergyPlus/unit/FaultsManager.unit.cc +++ b/tst/EnergyPlus/unit/FaultsManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/FileSystem.unit.cc b/tst/EnergyPlus/unit/FileSystem.unit.cc index 3778c349631..84523d91fe8 100644 --- a/tst/EnergyPlus/unit/FileSystem.unit.cc +++ b/tst/EnergyPlus/unit/FileSystem.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/FiniteDifferenceGroundTemperatureModel.unit.cc b/tst/EnergyPlus/unit/FiniteDifferenceGroundTemperatureModel.unit.cc index f818009c8ff..93ae904eea1 100644 --- a/tst/EnergyPlus/unit/FiniteDifferenceGroundTemperatureModel.unit.cc +++ b/tst/EnergyPlus/unit/FiniteDifferenceGroundTemperatureModel.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc b/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc index 1e9a2f390d8..d4eeeecea77 100644 --- a/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc +++ b/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.hh b/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.hh index 1a5fef76138..7f186172a6d 100644 --- a/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.hh +++ b/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Fixtures/IdfParserFixture.hh b/tst/EnergyPlus/unit/Fixtures/IdfParserFixture.hh index ac7197e1bc1..17884e26698 100644 --- a/tst/EnergyPlus/unit/Fixtures/IdfParserFixture.hh +++ b/tst/EnergyPlus/unit/Fixtures/IdfParserFixture.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Fixtures/InputProcessorFixture.hh b/tst/EnergyPlus/unit/Fixtures/InputProcessorFixture.hh index 58b383ae669..0978709e332 100644 --- a/tst/EnergyPlus/unit/Fixtures/InputProcessorFixture.hh +++ b/tst/EnergyPlus/unit/Fixtures/InputProcessorFixture.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Fixtures/ResultsFrameworkFixture.hh b/tst/EnergyPlus/unit/Fixtures/ResultsFrameworkFixture.hh index 0e56e5c90c3..4fac61d9e00 100644 --- a/tst/EnergyPlus/unit/Fixtures/ResultsFrameworkFixture.hh +++ b/tst/EnergyPlus/unit/Fixtures/ResultsFrameworkFixture.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -85,22 +85,20 @@ protected: return ResultsFramework::CSVWriter::convertToMonth(datetime); } - std::map> getCSVOutputs(EnergyPlusData &state, - json const &data, - OutputProcessor::ReportingFrequency reportingFrequency, - std::vector const &outputVariables) + std::map> + getCSVOutputs(EnergyPlusData &state, json const &data, OutputProcessor::ReportFreq freq, std::vector const &outputVariables) { ResultsFramework::CSVWriter csv(outputVariables.size()); - csv.parseTSOutputs(state, data, outputVariables, reportingFrequency); + csv.parseTSOutputs(state, data, outputVariables, freq); return csv.outputs; } std::map> getCSVOutputs(EnergyPlusData &state, json const &data, ResultsFramework::ResultsFramework const &resultsFramework, - OutputProcessor::ReportingFrequency reportingFrequency) + OutputProcessor::ReportFreq freq) { - return getCSVOutputs(state, data, reportingFrequency, resultsFramework.outputVariables); + return getCSVOutputs(state, data, freq, resultsFramework.outputVariables); } }; diff --git a/tst/EnergyPlus/unit/Fixtures/SQLiteFixture.hh b/tst/EnergyPlus/unit/Fixtures/SQLiteFixture.hh index 99ef234f570..ee3eb1e6c3a 100644 --- a/tst/EnergyPlus/unit/Fixtures/SQLiteFixture.hh +++ b/tst/EnergyPlus/unit/Fixtures/SQLiteFixture.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -105,6 +105,7 @@ protected: ss->str(std::string()); } +#ifdef GET_OUT std::string storageType(const int storageTypeIndex) { return state->dataSQLiteProcedures->sqlite->storageType(storageTypeIndex); @@ -119,7 +120,7 @@ protected: { return state->dataSQLiteProcedures->sqlite->reportingFreqName(reportingFreqIndex); } - +#endif // GET_OUT std::string columnText(const unsigned char *column) { return std::string(reinterpret_cast(column)); diff --git a/tst/EnergyPlus/unit/FluidCoolers.unit.cc b/tst/EnergyPlus/unit/FluidCoolers.unit.cc index 089632484ea..6c88d0d0c4f 100644 --- a/tst/EnergyPlus/unit/FluidCoolers.unit.cc +++ b/tst/EnergyPlus/unit/FluidCoolers.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/FluidProperties.unit.cc b/tst/EnergyPlus/unit/FluidProperties.unit.cc index 6413f899670..86ad3a2978f 100644 --- a/tst/EnergyPlus/unit/FluidProperties.unit.cc +++ b/tst/EnergyPlus/unit/FluidProperties.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/FuelCellElectricGenerator.unit.cc b/tst/EnergyPlus/unit/FuelCellElectricGenerator.unit.cc index 5fd88cf9a33..d776624ef2a 100644 --- a/tst/EnergyPlus/unit/FuelCellElectricGenerator.unit.cc +++ b/tst/EnergyPlus/unit/FuelCellElectricGenerator.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Furnaces.unit.cc b/tst/EnergyPlus/unit/Furnaces.unit.cc index 18c9bee5e4f..afa8e1112d6 100644 --- a/tst/EnergyPlus/unit/Furnaces.unit.cc +++ b/tst/EnergyPlus/unit/Furnaces.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/General.unit.cc b/tst/EnergyPlus/unit/General.unit.cc index 9751ba815ab..d95e697f7a0 100644 --- a/tst/EnergyPlus/unit/General.unit.cc +++ b/tst/EnergyPlus/unit/General.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/GeneralRoutines.unit.cc b/tst/EnergyPlus/unit/GeneralRoutines.unit.cc index e4f2448f4ad..78c826df9d1 100644 --- a/tst/EnergyPlus/unit/GeneralRoutines.unit.cc +++ b/tst/EnergyPlus/unit/GeneralRoutines.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/GroundHeatExchangers.unit.cc b/tst/EnergyPlus/unit/GroundHeatExchangers.unit.cc index 33a4f402343..13b0fb47b1f 100644 --- a/tst/EnergyPlus/unit/GroundHeatExchangers.unit.cc +++ b/tst/EnergyPlus/unit/GroundHeatExchangers.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACControllers.unit.cc b/tst/EnergyPlus/unit/HVACControllers.unit.cc index 7f34fe0f098..f0ff3b1757b 100644 --- a/tst/EnergyPlus/unit/HVACControllers.unit.cc +++ b/tst/EnergyPlus/unit/HVACControllers.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACDXHeatPumpSystem.unit.cc b/tst/EnergyPlus/unit/HVACDXHeatPumpSystem.unit.cc index c864b5bca7c..961c1cfd74f 100644 --- a/tst/EnergyPlus/unit/HVACDXHeatPumpSystem.unit.cc +++ b/tst/EnergyPlus/unit/HVACDXHeatPumpSystem.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACDXSystem.unit.cc b/tst/EnergyPlus/unit/HVACDXSystem.unit.cc index 3fdda661916..af84f085ead 100644 --- a/tst/EnergyPlus/unit/HVACDXSystem.unit.cc +++ b/tst/EnergyPlus/unit/HVACDXSystem.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACFan.unit.cc b/tst/EnergyPlus/unit/HVACFan.unit.cc index 46538cbf814..d1f1ee1042e 100644 --- a/tst/EnergyPlus/unit/HVACFan.unit.cc +++ b/tst/EnergyPlus/unit/HVACFan.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACFourPipeBeam.unit.cc b/tst/EnergyPlus/unit/HVACFourPipeBeam.unit.cc index 28d52fffba3..5b2b101cc49 100644 --- a/tst/EnergyPlus/unit/HVACFourPipeBeam.unit.cc +++ b/tst/EnergyPlus/unit/HVACFourPipeBeam.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACHXAssistedCoolingCoil.unit.cc b/tst/EnergyPlus/unit/HVACHXAssistedCoolingCoil.unit.cc index 6a603565676..52656ea52ba 100644 --- a/tst/EnergyPlus/unit/HVACHXAssistedCoolingCoil.unit.cc +++ b/tst/EnergyPlus/unit/HVACHXAssistedCoolingCoil.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -148,6 +148,7 @@ TEST_F(EnergyPlusFixture, HXAssistCCUnitarySystem_VStest1) " , !- Fraction of Autosized Design Heating Supply Air Flow Rate", " , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W }", " , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W }", + " , !- No Load Supply Air Flow Rate Control Set To Low Speed", " 80; !- Maximum Supply Air Temperature{ C }", " CoilSystem:Cooling:DX:HeatExchangerAssisted,", @@ -163,12 +164,8 @@ TEST_F(EnergyPlusFixture, HXAssistCCUnitarySystem_VStest1) " 1.6, !- Nominal Supply Air Flow Rate {m3/s}", " 0.7, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless}", " 0.65, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless}", - " 0.70000, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless}", - " 0.650000, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless}", " 0.7, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless}", " 0.65, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless}", - " 0.70000, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless}", - " 0.650000, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless}", " DX Cooling Coil Air Inlet Node, !- Supply Air Inlet Node Name", " Heat Recovery Supply Outlet, !- Supply Air Outlet Node Name", " Heat Recovery Exhuast Inlet Node, !- Exhaust Air Inlet Node Name", @@ -180,7 +177,57 @@ TEST_F(EnergyPlusFixture, HXAssistCCUnitarySystem_VStest1) " 1.7, !- Threshold Temperature {C}", " 0.083, !- Initial Defrost Time Fraction {dimensionless}", " 0.012, !- Rate of Defrost Time Fraction Increase {1/K}", - " Yes; !- Economizer Lockout", + " Yes, !- Economizer Lockout", + " SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name", + " LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name", + " SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name", + " LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name", + + " Table:IndependentVariable,", + " airFlowRatio, !- Name", + " Linear, !- Interpolation Method", + " Linear, !- Extrapolation Method", + " 0.0, !- Minimum Value", + " 1.0, !- Maximum Value", + " , !- Normalization Reference Value", + " Dimensionless, !- Unit Type", + " , !- External File Name", + " , !- External File Column Number", + " , !- External File Starting Row Number", + " 0.75, !- Value 1", + " 1.0; !- Value 2", + + " Table:IndependentVariableList,", + " effectiveness_IndependentVariableList, !- Name", + " airFlowRatio; !- Independent Variable 1 Name", + + " Table:Lookup,", + " SenEffectivenessTable, !- Name", + " effectiveness_IndependentVariableList, !- Independent Variable List Name", + " DivisorOnly, !- Normalization Method", + " 0.7, !- Normalization Divisor", + " 0.0, !- Minimum Output", + " 1.0, !- Maximum Output", + " Dimensionless, !- Output Unit Type", + " , !- External File Name", + " , !- External File Column Number", + " , !- External File Starting Row Number", + " 0.75, !- Output Value 1", + " 0.70; !- Output Value 2", + + " Table:Lookup,", + " LatEffectivenessTable, !- Name", + " effectiveness_IndependentVariableList, !- Independent Variable List Name", + " DivisorOnly, !- Normalization Method", + " 0.65, !- Normalization Divisor", + " 0.0, !- Minimum Output", + " 1.0, !- Maximum Output", + " Dimensionless, !- Output Unit Type", + " , !- External File Name", + " , !- External File Column Number", + " , !- External File Starting Row Number", + " 0.70, !- Output Value 1", + " 0.65; !- Output Value 2", " Coil:Cooling:DX:VariableSpeed,", " Main Cooling Coil 1, !- Name", @@ -758,6 +805,7 @@ TEST_F(EnergyPlusFixture, HXAssistCCUnitarySystem_NewDXCoil_Processing_Test) " , !- Fraction of Autosized Design Heating Supply Air Flow Rate", " , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W }", " , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W }", + " , !- No Load Supply Air Flow Rate Control Set To Low Speed", " 80; !- Maximum Supply Air Temperature{ C }", " CoilSystem:Cooling:DX:HeatExchangerAssisted,", @@ -773,12 +821,8 @@ TEST_F(EnergyPlusFixture, HXAssistCCUnitarySystem_NewDXCoil_Processing_Test) " 1.6, !- Nominal Supply Air Flow Rate {m3/s}", " 0.7, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless}", " 0.65, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless}", - " 0.70000, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless}", - " 0.650000, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless}", " 0.7, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless}", " 0.65, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless}", - " 0.70000, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless}", - " 0.650000, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless}", " DX Cooling Coil Air Inlet Node, !- Supply Air Inlet Node Name", " Heat Recovery Supply Outlet, !- Supply Air Outlet Node Name", " Heat Recovery Exhuast Inlet Node, !- Exhaust Air Inlet Node Name", @@ -790,7 +834,57 @@ TEST_F(EnergyPlusFixture, HXAssistCCUnitarySystem_NewDXCoil_Processing_Test) " 1.7, !- Threshold Temperature {C}", " 0.083, !- Initial Defrost Time Fraction {dimensionless}", " 0.012, !- Rate of Defrost Time Fraction Increase {1/K}", - " Yes; !- Economizer Lockout", + " Yes, !- Economizer Lockout", + " SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name", + " LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name", + " SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name", + " LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name", + + " Table:IndependentVariable,", + " airFlowRatio, !- Name", + " Linear, !- Interpolation Method", + " Linear, !- Extrapolation Method", + " 0.0, !- Minimum Value", + " 1.0, !- Maximum Value", + " , !- Normalization Reference Value", + " Dimensionless, !- Unit Type", + " , !- External File Name", + " , !- External File Column Number", + " , !- External File Starting Row Number", + " 0.75, !- Value 1", + " 1.0; !- Value 2", + + " Table:IndependentVariableList,", + " effectiveness_IndependentVariableList, !- Name", + " airFlowRatio; !- Independent Variable 1 Name", + + " Table:Lookup,", + " SenEffectivenessTable, !- Name", + " effectiveness_IndependentVariableList, !- Independent Variable List Name", + " DivisorOnly, !- Normalization Method", + " 0.7, !- Normalization Divisor", + " 0.0, !- Minimum Output", + " 1.0, !- Maximum Output", + " Dimensionless, !- Output Unit Type", + " , !- External File Name", + " , !- External File Column Number", + " , !- External File Starting Row Number", + " 0.75, !- Output Value 1", + " 0.70; !- Output Value 2", + + " Table:Lookup,", + " LatEffectivenessTable, !- Name", + " effectiveness_IndependentVariableList, !- Independent Variable List Name", + " DivisorOnly, !- Normalization Method", + " 0.65, !- Normalization Divisor", + " 0.0, !- Minimum Output", + " 1.0, !- Maximum Output", + " Dimensionless, !- Output Unit Type", + " , !- External File Name", + " , !- External File Column Number", + " , !- External File Starting Row Number", + " 0.70, !- Output Value 1", + " 0.65; !- Output Value 2", " Coil:Cooling:DX,", " Main Cooling Coil 1, !- Name", diff --git a/tst/EnergyPlus/unit/HVACInterfaceManager.unit.cc b/tst/EnergyPlus/unit/HVACInterfaceManager.unit.cc index e07b9e1e333..5b2adee472d 100644 --- a/tst/EnergyPlus/unit/HVACInterfaceManager.unit.cc +++ b/tst/EnergyPlus/unit/HVACInterfaceManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACManager.unit.cc b/tst/EnergyPlus/unit/HVACManager.unit.cc index 8cf1c5e497d..25cbed12953 100644 --- a/tst/EnergyPlus/unit/HVACManager.unit.cc +++ b/tst/EnergyPlus/unit/HVACManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACMultiSpeedHeatPump.unit.cc b/tst/EnergyPlus/unit/HVACMultiSpeedHeatPump.unit.cc index 94887fb46c8..ade35c9269b 100644 --- a/tst/EnergyPlus/unit/HVACMultiSpeedHeatPump.unit.cc +++ b/tst/EnergyPlus/unit/HVACMultiSpeedHeatPump.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACSizingSimulationManager.unit.cc b/tst/EnergyPlus/unit/HVACSizingSimulationManager.unit.cc index 1c61b976cd9..b26bb33c5ab 100644 --- a/tst/EnergyPlus/unit/HVACSizingSimulationManager.unit.cc +++ b/tst/EnergyPlus/unit/HVACSizingSimulationManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -123,10 +123,10 @@ class HVACSizingSimulationManagerTest : public EnergyPlusFixture state->dataGlobal->NumOfTimeStepInHour = 4; state->dataWeather->TimeStepFraction = 1.0 / double(state->dataGlobal->NumOfTimeStepInHour); - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).TimeStep = &state->dataGlobal->TimeStepZone; - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute = 0; // init - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep = &state->dataHVACGlobal->TimeStepSys; - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute = 0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].TimeStep = &state->dataGlobal->TimeStepZone; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].CurMinute = 0; // init + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep = &state->dataHVACGlobal->TimeStepSys; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].CurMinute = 0; } virtual void TearDown() @@ -186,20 +186,20 @@ TEST_F(HVACSizingSimulationManagerTest, WeatherFileDaysTest3) testSizeSimManagerObj.sizingLogger.SetupSizingLogsNewEnvironment(*state); for (state->dataGlobal->HourOfDay = 1; state->dataGlobal->HourOfDay <= 24; ++state->dataGlobal->HourOfDay) { // Begin hour loop ... - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute = 0.0; - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute = 0.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].CurMinute = 0.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].CurMinute = 0.0; for (state->dataGlobal->TimeStep = 1; state->dataGlobal->TimeStep <= state->dataGlobal->NumOfTimeStepInHour; ++state->dataGlobal->TimeStep) { for (int SysTimestepLoop = 1; SysTimestepLoop <= state->dataHVACGlobal->NumOfSysTimeSteps; ++SysTimestepLoop) { - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute += - (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep) * 60.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].CurMinute += + (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep) * 60.0; state->dataLoopNodes->Node(1).MassFlowRate = state->dataGlobal->HourOfDay * 0.1; state->dataLoopNodes->Node(1).Temp = 10.0; state->dataPlnt->PlantLoop(1).HeatingDemand = state->dataGlobal->HourOfDay * 10.0; testSizeSimManagerObj.sizingLogger.UpdateSizingLogValuesSystemStep(*state); } - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute += - (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).TimeStep) * 60.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].CurMinute += + (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].TimeStep) * 60.0; testSizeSimManagerObj.sizingLogger.UpdateSizingLogValuesZoneStep(*state); } // TimeStep loop } // ... End hour loop. @@ -212,12 +212,12 @@ TEST_F(HVACSizingSimulationManagerTest, WeatherFileDaysTest3) state->dataWeather->Environment(state->dataWeather->Envrn).DesignDayNum = 2; testSizeSimManagerObj.sizingLogger.SetupSizingLogsNewEnvironment(*state); for (state->dataGlobal->HourOfDay = 1; state->dataGlobal->HourOfDay <= 24; ++state->dataGlobal->HourOfDay) { // Begin hour loop ... - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute = 0.0; - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute = 0.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].CurMinute = 0.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].CurMinute = 0.0; for (state->dataGlobal->TimeStep = 1; state->dataGlobal->TimeStep <= state->dataGlobal->NumOfTimeStepInHour; ++state->dataGlobal->TimeStep) { for (int SysTimestepLoop = 1; SysTimestepLoop <= state->dataHVACGlobal->NumOfSysTimeSteps; ++SysTimestepLoop) { - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute += - (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep) * 60.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].CurMinute += + (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep) * 60.0; state->dataLoopNodes->Node(1).MassFlowRate = state->dataGlobal->HourOfDay * 0.1; state->dataLoopNodes->Node(1).Temp = 10.0; @@ -225,8 +225,8 @@ TEST_F(HVACSizingSimulationManagerTest, WeatherFileDaysTest3) testSizeSimManagerObj.sizingLogger.UpdateSizingLogValuesSystemStep(*state); } - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute += - (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).TimeStep) * 60.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].CurMinute += + (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].TimeStep) * 60.0; testSizeSimManagerObj.sizingLogger.UpdateSizingLogValuesZoneStep(*state); } // TimeStep loop } // End hour loop. @@ -240,21 +240,21 @@ TEST_F(HVACSizingSimulationManagerTest, WeatherFileDaysTest3) while (state->dataGlobal->DayOfSim < state->dataGlobal->NumOfDayInEnvrn) { ++state->dataGlobal->DayOfSim; for (state->dataGlobal->HourOfDay = 1; state->dataGlobal->HourOfDay <= 24; ++state->dataGlobal->HourOfDay) { // Begin hour loop ... - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute = 0.0; - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute = 0.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].CurMinute = 0.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].CurMinute = 0.0; for (state->dataGlobal->TimeStep = 1; state->dataGlobal->TimeStep <= state->dataGlobal->NumOfTimeStepInHour; ++state->dataGlobal->TimeStep) { for (int SysTimestepLoop = 1; SysTimestepLoop <= state->dataHVACGlobal->NumOfSysTimeSteps; ++SysTimestepLoop) { - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute += - (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep) * 60.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].CurMinute += + (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep) * 60.0; state->dataLoopNodes->Node(1).MassFlowRate = state->dataGlobal->HourOfDay * 0.1; state->dataLoopNodes->Node(1).Temp = 10.0; state->dataPlnt->PlantLoop(1).HeatingDemand = state->dataGlobal->HourOfDay * 10.0; testSizeSimManagerObj.sizingLogger.UpdateSizingLogValuesSystemStep(*state); } - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute += - (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).TimeStep) * 60.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].CurMinute += + (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].TimeStep) * 60.0; testSizeSimManagerObj.sizingLogger.UpdateSizingLogValuesZoneStep(*state); } // TimeStep loop } // ... End hour loop. @@ -269,21 +269,21 @@ TEST_F(HVACSizingSimulationManagerTest, WeatherFileDaysTest3) while (state->dataGlobal->DayOfSim < state->dataGlobal->NumOfDayInEnvrn) { ++state->dataGlobal->DayOfSim; for (state->dataGlobal->HourOfDay = 1; state->dataGlobal->HourOfDay <= 24; ++state->dataGlobal->HourOfDay) { // Begin hour loop ... - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute = 0.0; - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute = 0.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].CurMinute = 0.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].CurMinute = 0.0; for (state->dataGlobal->TimeStep = 1; state->dataGlobal->TimeStep <= state->dataGlobal->NumOfTimeStepInHour; ++state->dataGlobal->TimeStep) { for (int SysTimestepLoop = 1; SysTimestepLoop <= state->dataHVACGlobal->NumOfSysTimeSteps; ++SysTimestepLoop) { - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute += - (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep) * 60.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].CurMinute += + (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep) * 60.0; state->dataLoopNodes->Node(1).MassFlowRate = state->dataGlobal->HourOfDay * 0.1; state->dataLoopNodes->Node(1).Temp = 10.0; state->dataPlnt->PlantLoop(1).HeatingDemand = state->dataGlobal->HourOfDay * 10.0; testSizeSimManagerObj.sizingLogger.UpdateSizingLogValuesSystemStep(*state); } - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute += - (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).TimeStep) * 60.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].CurMinute += + (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].TimeStep) * 60.0; testSizeSimManagerObj.sizingLogger.UpdateSizingLogValuesZoneStep(*state); } // TimeStep loop } // ... End hour loop. @@ -402,20 +402,20 @@ TEST_F(HVACSizingSimulationManagerTest, TopDownTestSysTimestep3) state->dataWeather->Environment(state->dataWeather->Envrn).DesignDayNum = 1; testSizeSimManagerObj.sizingLogger.SetupSizingLogsNewEnvironment(*state); for (state->dataGlobal->HourOfDay = 1; state->dataGlobal->HourOfDay <= 24; ++state->dataGlobal->HourOfDay) { // Begin hour loop ... - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute = 0.0; - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute = 0.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].CurMinute = 0.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].CurMinute = 0.0; for (state->dataGlobal->TimeStep = 1; state->dataGlobal->TimeStep <= state->dataGlobal->NumOfTimeStepInHour; ++state->dataGlobal->TimeStep) { for (int SysTimestepLoop = 1; SysTimestepLoop <= state->dataHVACGlobal->NumOfSysTimeSteps; ++SysTimestepLoop) { - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute += - (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep) * 60.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].CurMinute += + (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep) * 60.0; state->dataLoopNodes->Node(1).MassFlowRate = state->dataGlobal->HourOfDay * 0.1; state->dataLoopNodes->Node(1).Temp = 10.0; state->dataPlnt->PlantLoop(1).HeatingDemand = state->dataGlobal->HourOfDay * 10.0; testSizeSimManagerObj.sizingLogger.UpdateSizingLogValuesSystemStep(*state); } - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute += - (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).TimeStep) * 60.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].CurMinute += + (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].TimeStep) * 60.0; testSizeSimManagerObj.sizingLogger.UpdateSizingLogValuesZoneStep(*state); } // TimeStep loop } // ... End hour loop. @@ -427,12 +427,12 @@ TEST_F(HVACSizingSimulationManagerTest, TopDownTestSysTimestep3) state->dataWeather->Environment(state->dataWeather->Envrn).DesignDayNum = 2; testSizeSimManagerObj.sizingLogger.SetupSizingLogsNewEnvironment(*state); for (state->dataGlobal->HourOfDay = 1; state->dataGlobal->HourOfDay <= 24; ++state->dataGlobal->HourOfDay) { // Begin hour loop ... - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute = 0.0; - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute = 0.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].CurMinute = 0.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].CurMinute = 0.0; for (state->dataGlobal->TimeStep = 1; state->dataGlobal->TimeStep <= state->dataGlobal->NumOfTimeStepInHour; ++state->dataGlobal->TimeStep) { for (int SysTimestepLoop = 1; SysTimestepLoop <= state->dataHVACGlobal->NumOfSysTimeSteps; ++SysTimestepLoop) { - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute += - (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep) * 60.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].CurMinute += + (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep) * 60.0; state->dataLoopNodes->Node(1).MassFlowRate = state->dataGlobal->HourOfDay * 0.1; state->dataLoopNodes->Node(1).Temp = 10.0; @@ -440,8 +440,8 @@ TEST_F(HVACSizingSimulationManagerTest, TopDownTestSysTimestep3) testSizeSimManagerObj.sizingLogger.UpdateSizingLogValuesSystemStep(*state); } - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute += - (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).TimeStep) * 60.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].CurMinute += + (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].TimeStep) * 60.0; testSizeSimManagerObj.sizingLogger.UpdateSizingLogValuesZoneStep(*state); } // TimeStep loop } // End hour loop. @@ -549,13 +549,13 @@ TEST_F(HVACSizingSimulationManagerTest, TopDownTestSysTimestep1) state->dataWeather->Environment(state->dataWeather->Envrn).DesignDayNum = 1; testSizeSimManagerObj.sizingLogger.SetupSizingLogsNewEnvironment(*state); for (state->dataGlobal->HourOfDay = 1; state->dataGlobal->HourOfDay <= 24; ++state->dataGlobal->HourOfDay) { // Begin hour loop ... - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute = 0.0; - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute = 0.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].CurMinute = 0.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].CurMinute = 0.0; for (state->dataGlobal->TimeStep = 1; state->dataGlobal->TimeStep <= state->dataGlobal->NumOfTimeStepInHour; ++state->dataGlobal->TimeStep) { for (int SysTimestepLoop = 1; SysTimestepLoop <= state->dataHVACGlobal->NumOfSysTimeSteps; ++SysTimestepLoop) { - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute += - (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep) * 60.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].CurMinute += + (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep) * 60.0; state->dataLoopNodes->Node(1).MassFlowRate = state->dataGlobal->HourOfDay * 0.1; state->dataLoopNodes->Node(1).Temp = 10.0; @@ -563,8 +563,8 @@ TEST_F(HVACSizingSimulationManagerTest, TopDownTestSysTimestep1) testSizeSimManagerObj.sizingLogger.UpdateSizingLogValuesSystemStep(*state); } // E+ doesn't really update zone step data until system steps are done - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute += - (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).TimeStep) * 60.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].CurMinute += + (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].TimeStep) * 60.0; testSizeSimManagerObj.sizingLogger.UpdateSizingLogValuesZoneStep(*state); } // TimeStep loop } // ... End hour loop. @@ -576,13 +576,13 @@ TEST_F(HVACSizingSimulationManagerTest, TopDownTestSysTimestep1) state->dataWeather->Environment(state->dataWeather->Envrn).DesignDayNum = 2; testSizeSimManagerObj.sizingLogger.SetupSizingLogsNewEnvironment(*state); for (state->dataGlobal->HourOfDay = 1; state->dataGlobal->HourOfDay <= 24; ++state->dataGlobal->HourOfDay) { // Begin hour loop ... - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute = 0.0; - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute = 0.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].CurMinute = 0.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].CurMinute = 0.0; for (state->dataGlobal->TimeStep = 1; state->dataGlobal->TimeStep <= state->dataGlobal->NumOfTimeStepInHour; ++state->dataGlobal->TimeStep) { for (int SysTimestepLoop = 1; SysTimestepLoop <= state->dataHVACGlobal->NumOfSysTimeSteps; ++SysTimestepLoop) { - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute += - (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep) * 60.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].CurMinute += + (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep) * 60.0; state->dataLoopNodes->Node(1).MassFlowRate = state->dataGlobal->HourOfDay * 0.1; state->dataLoopNodes->Node(1).Temp = 10.0; @@ -590,8 +590,8 @@ TEST_F(HVACSizingSimulationManagerTest, TopDownTestSysTimestep1) testSizeSimManagerObj.sizingLogger.UpdateSizingLogValuesSystemStep(*state); } - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute += - (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).TimeStep) * 60.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].CurMinute += + (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].TimeStep) * 60.0; testSizeSimManagerObj.sizingLogger.UpdateSizingLogValuesZoneStep(*state); } // TimeStep loop } // End hour loop. @@ -638,8 +638,8 @@ TEST_F(HVACSizingSimulationManagerTest, VarySysTimesteps) state->dataWeather->Environment(state->dataWeather->Envrn).DesignDayNum = 1; testSizeSimManagerObj.sizingLogger.SetupSizingLogsNewEnvironment(*state); for (state->dataGlobal->HourOfDay = 1; state->dataGlobal->HourOfDay <= 24; ++state->dataGlobal->HourOfDay) { // Begin hour loop ... - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute = 0.0; - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute = 0.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].CurMinute = 0.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].CurMinute = 0.0; for (state->dataGlobal->TimeStep = 1; state->dataGlobal->TimeStep <= state->dataGlobal->NumOfTimeStepInHour; ++state->dataGlobal->TimeStep) { state->dataHVACGlobal->NumOfSysTimeSteps = state->dataGlobal->TimeStep; @@ -647,8 +647,8 @@ TEST_F(HVACSizingSimulationManagerTest, VarySysTimesteps) state->dataHVACGlobal->TimeStepSysSec = state->dataHVACGlobal->TimeStepSys * Constant::SecInHour; for (int SysTimestepLoop = 1; SysTimestepLoop <= state->dataHVACGlobal->NumOfSysTimeSteps; ++SysTimestepLoop) { - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute += - (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep) * 60.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].CurMinute += + (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep) * 60.0; state->dataLoopNodes->Node(1).MassFlowRate = state->dataGlobal->HourOfDay * 0.1; state->dataLoopNodes->Node(1).Temp = 10.0; @@ -656,8 +656,8 @@ TEST_F(HVACSizingSimulationManagerTest, VarySysTimesteps) testSizeSimManagerObj.sizingLogger.UpdateSizingLogValuesSystemStep(*state); } // E+ doesn't really update zone step data until system steps are done - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute += - (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).TimeStep) * 60.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].CurMinute += + (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].TimeStep) * 60.0; testSizeSimManagerObj.sizingLogger.UpdateSizingLogValuesZoneStep(*state); } // TimeStep loop } // ... End hour loop. @@ -669,16 +669,16 @@ TEST_F(HVACSizingSimulationManagerTest, VarySysTimesteps) state->dataWeather->Environment(state->dataWeather->Envrn).DesignDayNum = 2; testSizeSimManagerObj.sizingLogger.SetupSizingLogsNewEnvironment(*state); for (state->dataGlobal->HourOfDay = 1; state->dataGlobal->HourOfDay <= 24; ++state->dataGlobal->HourOfDay) { // Begin hour loop ... - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute = 0.0; - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute = 0.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].CurMinute = 0.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].CurMinute = 0.0; for (state->dataGlobal->TimeStep = 1; state->dataGlobal->TimeStep <= state->dataGlobal->NumOfTimeStepInHour; ++state->dataGlobal->TimeStep) { state->dataHVACGlobal->NumOfSysTimeSteps = state->dataGlobal->TimeStep; state->dataHVACGlobal->TimeStepSys = state->dataGlobal->TimeStepZone / state->dataHVACGlobal->NumOfSysTimeSteps; state->dataHVACGlobal->TimeStepSysSec = state->dataHVACGlobal->TimeStepSys * Constant::SecInHour; for (int SysTimestepLoop = 1; SysTimestepLoop <= state->dataHVACGlobal->NumOfSysTimeSteps; ++SysTimestepLoop) { - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute += - (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep) * 60.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].CurMinute += + (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep) * 60.0; state->dataLoopNodes->Node(1).MassFlowRate = state->dataGlobal->HourOfDay * 0.1; state->dataLoopNodes->Node(1).Temp = 10.0; @@ -686,8 +686,8 @@ TEST_F(HVACSizingSimulationManagerTest, VarySysTimesteps) testSizeSimManagerObj.sizingLogger.UpdateSizingLogValuesSystemStep(*state); } - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute += - (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).TimeStep) * 60.0; + state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].CurMinute += + (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].TimeStep) * 60.0; testSizeSimManagerObj.sizingLogger.UpdateSizingLogValuesZoneStep(*state); } // TimeStep loop } // End hour loop. diff --git a/tst/EnergyPlus/unit/HVACStandaloneERV.unit.cc b/tst/EnergyPlus/unit/HVACStandaloneERV.unit.cc index 0c246715d57..7da709f20cf 100644 --- a/tst/EnergyPlus/unit/HVACStandaloneERV.unit.cc +++ b/tst/EnergyPlus/unit/HVACStandaloneERV.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACUnitaryBypassVAV.unit.cc b/tst/EnergyPlus/unit/HVACUnitaryBypassVAV.unit.cc index 7f3ef4dc76b..d86fd03af3b 100644 --- a/tst/EnergyPlus/unit/HVACUnitaryBypassVAV.unit.cc +++ b/tst/EnergyPlus/unit/HVACUnitaryBypassVAV.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc b/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc index 68f17f37af8..98f3b25a4db 100644 --- a/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc +++ b/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HWBaseboardRadiator.unit.cc b/tst/EnergyPlus/unit/HWBaseboardRadiator.unit.cc index ecda6657890..1d92e5a3a85 100644 --- a/tst/EnergyPlus/unit/HWBaseboardRadiator.unit.cc +++ b/tst/EnergyPlus/unit/HWBaseboardRadiator.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -320,6 +320,11 @@ TEST_F(EnergyPlusFixture, HWBaseboardRadiator_HWBaseboardWaterInputTest) GetHWBaseboardInput(*state); + int surfNumTheFloor = Util::FindItemInList("THEFLOOR", state->dataSurface->Surface); + + EXPECT_EQ(state->dataSurface->allGetsRadiantHeatSurfaceList[0], surfNumTheFloor); + EXPECT_TRUE(state->dataSurface->surfIntConv(surfNumTheFloor).getsRadiantHeat); + ASSERT_NEAR(state->dataHWBaseboardRad->HWBaseboard(1).FracDistribToSurf(1), 0.8, absTol); ASSERT_NEAR(state->dataHWBaseboardRad->HWBaseboardDesignObject(1).FracRadiant, 0.4, absTol); ASSERT_NEAR(state->dataHWBaseboardRad->HWBaseboardDesignObject(1).FracDistribPerson, 0.2, absTol); diff --git a/tst/EnergyPlus/unit/HeatBalFiniteDiffManager.unit.cc b/tst/EnergyPlus/unit/HeatBalFiniteDiffManager.unit.cc index 53e4fd2bc4c..8cb15ac2520 100644 --- a/tst/EnergyPlus/unit/HeatBalFiniteDiffManager.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalFiniteDiffManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HeatBalanceAirManager.unit.cc b/tst/EnergyPlus/unit/HeatBalanceAirManager.unit.cc index 931f2a4753c..eb9143cfe47 100644 --- a/tst/EnergyPlus/unit/HeatBalanceAirManager.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalanceAirManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HeatBalanceIntRadExchange.unit.cc b/tst/EnergyPlus/unit/HeatBalanceIntRadExchange.unit.cc index 6f4f3341249..3e5dfa6557d 100644 --- a/tst/EnergyPlus/unit/HeatBalanceIntRadExchange.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalanceIntRadExchange.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HeatBalanceKivaManager.unit.cc b/tst/EnergyPlus/unit/HeatBalanceKivaManager.unit.cc index fd17bc16cc3..8fabd9ae51d 100644 --- a/tst/EnergyPlus/unit/HeatBalanceKivaManager.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalanceKivaManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HeatBalanceManager.unit.cc b/tst/EnergyPlus/unit/HeatBalanceManager.unit.cc index cd6928b6846..44c804764ae 100644 --- a/tst/EnergyPlus/unit/HeatBalanceManager.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalanceManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -56,7 +56,6 @@ #include #include #include -#include #include #include #include @@ -66,6 +65,7 @@ #include #include #include +#include #include #include #include @@ -682,10 +682,10 @@ TEST_F(EnergyPlusFixture, HeatBalanceManager_ZoneAirMassFlowConservationReportVa EXPECT_FALSE(ErrorsFound); // first 2 have indexes swapped now since they are in lexicigraphical order now according to the new input processor - EXPECT_EQ("WEST ZONE:Zone Air Mass Balance Exhaust Mass Flow Rate", state->dataOutputProcessor->RVariableTypes(1).VarName); - EXPECT_EQ("EAST ZONE:Zone Air Mass Balance Exhaust Mass Flow Rate", state->dataOutputProcessor->RVariableTypes(2).VarName); - EXPECT_EQ(1, state->dataOutputProcessor->RVariableTypes(1).ReportID); - EXPECT_EQ(2, state->dataOutputProcessor->RVariableTypes(2).ReportID); + EXPECT_EQ("WEST ZONE:Zone Air Mass Balance Exhaust Mass Flow Rate", state->dataOutputProcessor->outVars[0]->keyColonName); + EXPECT_EQ("EAST ZONE:Zone Air Mass Balance Exhaust Mass Flow Rate", state->dataOutputProcessor->outVars[1]->keyColonName); + EXPECT_EQ(1, state->dataOutputProcessor->outVars[0]->ReportID); + EXPECT_EQ(2, state->dataOutputProcessor->outVars[1]->ReportID); } TEST_F(EnergyPlusFixture, HeatBalanceManager_GetMaterialRoofVegetation) @@ -1596,7 +1596,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceManager_EMSConstructionTest) EXPECT_EQ(state->dataSurface->Surface(winSurfNum).Construction, win1ConstNum); Real64 transSol = state->dataSurface->SurfWinSysSolTransmittance(winSurfNum); EXPECT_GT(transSol, 0.8); - Real64 refPtIllum = state->dataDaylightingData->daylightControl(1).DaylIllumAtRefPt(1); + Real64 refPtIllum = state->dataDayltg->daylightControl(1).refPts(1).lums[(int)DataSurfaces::Lum::Illum]; EXPECT_GT(refPtIllum, 3000.0); // Test 2 - Set time of day to afternoon - should use low transmittance window @@ -1611,7 +1611,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceManager_EMSConstructionTest) EXPECT_EQ(state->dataSurface->Surface(winSurfNum).Construction, win2ConstNum); transSol = state->dataSurface->SurfWinSysSolTransmittance(winSurfNum); EXPECT_LT(transSol, 0.2); - refPtIllum = state->dataDaylightingData->daylightControl(1).DaylIllumAtRefPt(1); + refPtIllum = state->dataDayltg->daylightControl(1).refPts(1).lums[(int)DataSurfaces::Lum::Illum]; EXPECT_LT(refPtIllum, 1000.0); } diff --git a/tst/EnergyPlus/unit/HeatBalanceMovableInsulation.unit.cc b/tst/EnergyPlus/unit/HeatBalanceMovableInsulation.unit.cc index 67299d880da..aade0752abe 100644 --- a/tst/EnergyPlus/unit/HeatBalanceMovableInsulation.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalanceMovableInsulation.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc b/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc index 9fc4785c0f5..bd86992b63f 100644 --- a/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -57,7 +57,6 @@ #include #include #include -#include #include #include #include @@ -69,6 +68,7 @@ #include #include #include +#include #include #include #include @@ -303,8 +303,8 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_ComputeIntThermalAbsorpFacto Material::MaterialBase *p = new Material::MaterialBase; state->dataMaterial->Material.push_back(p); } - state->dataSurface->SurfaceWindow(1).EffShBlindEmiss(1) = 0.1; - state->dataSurface->SurfaceWindow(1).EffGlassEmiss(1) = 0.1; + state->dataSurface->SurfaceWindow(1).EffShBlindEmiss[1] = 0.1; + state->dataSurface->SurfaceWindow(1).EffGlassEmiss[1] = 0.1; state->dataSurface->Surface(1).HeatTransSurf = true; state->dataSurface->Surface(1).Construction = 1; @@ -2556,7 +2556,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_SurfaceCOnstructionIndexTest AllocateSurfaceHeatBalArrays(*state); // allocates a host of variables related to CTF calculations OutputProcessor::GetReportVariableInput(*state); - EXPECT_EQ(state->dataOutputProcessor->ReqRepVars(2).VarName, "SURFACE CONSTRUCTION INDEX"); + EXPECT_EQ(state->dataOutputProcessor->reqVars[1]->name, "SURFACE CONSTRUCTION INDEX"); } TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestSurfTempCalcHeatBalanceAddSourceTerm) @@ -3678,18 +3678,17 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestResilienceMetricReport) EXPECT_EQ(2, state->dataHeatBal->Resilience(1).ZoneCO2LevelOccuHourBins[1]); EXPECT_EQ(1, state->dataHeatBal->Resilience(1).ZoneCO2LevelOccupiedHourBins[1]); - state->dataDaylightingData->ZoneDaylight.allocate(state->dataGlobal->NumOfZones); + state->dataDayltg->ZoneDaylight.allocate(state->dataGlobal->NumOfZones); int totDaylightingControls = state->dataGlobal->NumOfZones; - state->dataDaylightingData->daylightControl.allocate(totDaylightingControls); - state->dataDaylightingData->daylightControl(1).DaylightMethod = Dayltg::DaylightingMethod::SplitFlux; - state->dataDaylightingData->daylightControl(1).zoneIndex = 1; - state->dataDaylightingData->daylightControl(1).TotalDaylRefPoints = 1; - state->dataDaylightingData->ZoneDaylight(1).totRefPts = 1; - state->dataDaylightingData->daylightControl(1).DaylIllumAtRefPt.allocate(1); - state->dataDaylightingData->daylightControl(1).IllumSetPoint.allocate(1); - state->dataDaylightingData->daylightControl(1).PowerReductionFactor = 0.5; - state->dataDaylightingData->daylightControl(1).DaylIllumAtRefPt(1) = 300; - state->dataDaylightingData->daylightControl(1).IllumSetPoint(1) = 400; + state->dataDayltg->daylightControl.allocate(totDaylightingControls); + state->dataDayltg->daylightControl(1).DaylightMethod = Dayltg::DaylightingMethod::SplitFlux; + state->dataDayltg->daylightControl(1).zoneIndex = 1; + state->dataDayltg->daylightControl(1).TotalDaylRefPoints = 1; + state->dataDayltg->ZoneDaylight(1).totRefPts = 1; + state->dataDayltg->daylightControl(1).refPts.allocate(1); + state->dataDayltg->daylightControl(1).PowerReductionFactor = 0.5; + state->dataDayltg->daylightControl(1).refPts(1).lums[(int)DataSurfaces::Lum::Illum] = 300; + state->dataDayltg->daylightControl(1).refPts(1).illumSetPoint = 400; state->dataOutRptTab->displayVisualResilienceSummary = true; ReportVisualResilience(*state); @@ -4401,18 +4400,17 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestVisualResilienceReportRe state->dataHeatBal->People(1).NumberOfPeople = 2; state->dataHeatBal->People(1).NumberOfPeoplePtr = 1; - state->dataDaylightingData->ZoneDaylight.allocate(state->dataGlobal->NumOfZones); + state->dataDayltg->ZoneDaylight.allocate(state->dataGlobal->NumOfZones); int totDaylightingControls = state->dataGlobal->NumOfZones; - state->dataDaylightingData->daylightControl.allocate(totDaylightingControls); - state->dataDaylightingData->daylightControl(1).DaylightMethod = Dayltg::DaylightingMethod::SplitFlux; - state->dataDaylightingData->daylightControl(1).zoneIndex = 1; - state->dataDaylightingData->daylightControl(1).TotalDaylRefPoints = 1; - state->dataDaylightingData->ZoneDaylight(1).totRefPts = 1; - state->dataDaylightingData->daylightControl(1).DaylIllumAtRefPt.allocate(1); - state->dataDaylightingData->daylightControl(1).IllumSetPoint.allocate(1); - state->dataDaylightingData->daylightControl(1).PowerReductionFactor = 0.5; - state->dataDaylightingData->daylightControl(1).DaylIllumAtRefPt(1) = 300; - state->dataDaylightingData->daylightControl(1).IllumSetPoint(1) = 400; + state->dataDayltg->daylightControl.allocate(totDaylightingControls); + state->dataDayltg->daylightControl(1).DaylightMethod = Dayltg::DaylightingMethod::SplitFlux; + state->dataDayltg->daylightControl(1).zoneIndex = 1; + state->dataDayltg->daylightControl(1).TotalDaylRefPoints = 1; + state->dataDayltg->ZoneDaylight(1).totRefPts = 1; + state->dataDayltg->daylightControl(1).refPts.allocate(1); + state->dataDayltg->daylightControl(1).PowerReductionFactor = 0.5; + state->dataDayltg->daylightControl(1).refPts(1).lums[(int)DataSurfaces::Lum::Illum] = 300; + state->dataDayltg->daylightControl(1).refPts(1).illumSetPoint = 400; state->dataOutRptTab->displayVisualResilienceSummary = true; int NoBins = 4; @@ -4427,7 +4425,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestVisualResilienceReportRe state->dataScheduleMgr->Schedule.allocate(1); state->dataScheduleMgr->Schedule(1).CurrentValue = 0; - state->dataDaylightingData->daylightControl(1).IllumSetPoint(1) = 250; + state->dataDayltg->daylightControl(1).refPts(1).illumSetPoint = 250; for (int hour = 1; hour <= 4; hour++) { state->dataGlobal->HourOfDay = hour; ReportVisualResilience(*state); @@ -4447,7 +4445,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestVisualResilienceReportRe EXPECT_NEAR(0.0, state->dataHeatBalFanSys->ZoneLightingLevelOccupiedHourBinsRepPeriod(1, 1)[3], 1e-8); state->dataScheduleMgr->Schedule(1).CurrentValue = 0.4; - state->dataDaylightingData->daylightControl(1).IllumSetPoint(1) = 600; + state->dataDayltg->daylightControl(1).refPts(1).illumSetPoint = 600; for (int hour = 5; hour <= 7; hour++) { state->dataGlobal->HourOfDay = hour; ReportVisualResilience(*state); @@ -4467,7 +4465,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestVisualResilienceReportRe EXPECT_NEAR(3.0, state->dataHeatBalFanSys->ZoneLightingLevelOccupiedHourBinsRepPeriod(1, 1)[3], 1e-8); state->dataScheduleMgr->Schedule(1).CurrentValue = 1.0; - state->dataDaylightingData->daylightControl(1).IllumSetPoint(1) = 70; + state->dataDayltg->daylightControl(1).refPts(1).illumSetPoint = 70; for (int hour = 8; hour <= 10; hour++) { state->dataGlobal->HourOfDay = hour; ReportVisualResilience(*state); @@ -4487,7 +4485,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestVisualResilienceReportRe EXPECT_NEAR(3.0, state->dataHeatBalFanSys->ZoneLightingLevelOccupiedHourBinsRepPeriod(1, 1)[3], 1e-8); state->dataScheduleMgr->Schedule(1).CurrentValue = 1.0; - state->dataDaylightingData->daylightControl(1).IllumSetPoint(1) = 600; + state->dataDayltg->daylightControl(1).refPts(1).illumSetPoint = 600; for (int hour = 13; hour <= 15; hour++) { state->dataGlobal->HourOfDay = hour; ReportVisualResilience(*state); @@ -4507,7 +4505,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestVisualResilienceReportRe EXPECT_NEAR(3.0, state->dataHeatBalFanSys->ZoneLightingLevelOccupiedHourBinsRepPeriod(1, 2)[3], 1e-8); state->dataScheduleMgr->Schedule(1).CurrentValue = 1.0; - state->dataDaylightingData->daylightControl(1).IllumSetPoint(1) = 70; + state->dataDayltg->daylightControl(1).refPts(1).illumSetPoint = 70; for (int hour = 16; hour <= 18; hour++) { state->dataGlobal->HourOfDay = hour; ReportVisualResilience(*state); @@ -4912,8 +4910,8 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_IncSolarMultiplier) state->dataConstruction->Construct(ConstrNum).TransSolBeamCoef = 0.2; state->dataSurface->SurfaceWindow.allocate(totSurf); - state->dataSurface->SurfaceWindow(SurfNum).OutProjSLFracMult(state->dataGlobal->HourOfDay) = 999.0; - state->dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult(state->dataGlobal->HourOfDay) = 888.0; + state->dataSurface->SurfaceWindow(SurfNum).OutProjSLFracMult[state->dataGlobal->HourOfDay] = 999.0; + state->dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult[state->dataGlobal->HourOfDay] = 888.0; SolarShading::AllocateModuleArrays(*state); state->dataHeatBal->SurfSunlitFrac = 1.0; @@ -5332,8 +5330,8 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestInitHBDaylightingNoExtWi thisSurf.RadEnclIndex = 1; } state->dataViewFactor->EnclSolInfo(1).TotalEnclosureDaylRefPoints = 1; - state->dataDaylightingData->enclDaylight.allocate(1); - state->dataDaylightingData->enclDaylight(1).hasSplitFluxDaylighting = true; + state->dataDayltg->enclDaylight.allocate(1); + state->dataDayltg->enclDaylight(1).hasSplitFluxDaylighting = true; InitSurfaceHeatBalance(*state); EXPECT_FALSE(has_err_output(true)); } diff --git a/tst/EnergyPlus/unit/HeatPumpWaterToWaterSimple.unit.cc b/tst/EnergyPlus/unit/HeatPumpWaterToWaterSimple.unit.cc index 54850af17bd..48d901c587f 100644 --- a/tst/EnergyPlus/unit/HeatPumpWaterToWaterSimple.unit.cc +++ b/tst/EnergyPlus/unit/HeatPumpWaterToWaterSimple.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HeatRecovery.unit.cc b/tst/EnergyPlus/unit/HeatRecovery.unit.cc index 95c28fd2237..67b01238656 100644 --- a/tst/EnergyPlus/unit/HeatRecovery.unit.cc +++ b/tst/EnergyPlus/unit/HeatRecovery.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -119,14 +119,14 @@ TEST_F(EnergyPlusFixture, HeatRecovery_HRTest) state->dataHeatRecovery->ExchCond(ExchNum).SecInletNode = 3; state->dataHeatRecovery->ExchCond(ExchNum).SecOutletNode = 4; state->dataHeatRecovery->ExchCond(ExchNum).SchedPtr = -1; - state->dataHeatRecovery->ExchCond(ExchNum).HeatEffectSensible75 = 0.75; state->dataHeatRecovery->ExchCond(ExchNum).HeatEffectSensible100 = 0.75; - state->dataHeatRecovery->ExchCond(ExchNum).HeatEffectLatent75 = 0.0; state->dataHeatRecovery->ExchCond(ExchNum).HeatEffectLatent100 = 0.0; - state->dataHeatRecovery->ExchCond(ExchNum).CoolEffectSensible75 = 0.75; state->dataHeatRecovery->ExchCond(ExchNum).CoolEffectSensible100 = 0.75; - state->dataHeatRecovery->ExchCond(ExchNum).CoolEffectLatent75 = 0.0; state->dataHeatRecovery->ExchCond(ExchNum).CoolEffectLatent100 = 0.0; + state->dataHeatRecovery->ExchCond(ExchNum).HeatEffectSensibleCurveIndex = 0; + state->dataHeatRecovery->ExchCond(ExchNum).HeatEffectLatentCurveIndex = 0; + state->dataHeatRecovery->ExchCond(ExchNum).CoolEffectSensibleCurveIndex = 0; + state->dataHeatRecovery->ExchCond(ExchNum).CoolEffectLatentCurveIndex = 0; state->dataHeatRecovery->ExchCond(ExchNum).Name = "Test Heat Recovery 1"; state->dataHeatRecovery->ExchCond(ExchNum).ExchType = HX_AIRTOAIR_GENERIC; @@ -176,7 +176,7 @@ TEST_F(EnergyPlusFixture, HeatRecovery_HRTest) thisHX.CalcAirToAirGenericHeatExch(*state, HXUnitOn, FirstHVACIteration, FanOpMode, EconomizerFlag, HighHumCtrlFlag); thisHX.UpdateHeatRecovery(*state); Toutlet = (state->dataHeatRecovery->ExchCond(ExchNum).SupInTemp + - (state->dataHeatRecovery->ExchCond(ExchNum).CoolEffectSensible75 * + (state->dataHeatRecovery->ExchCond(ExchNum).CoolEffectSensible100 * (state->dataHeatRecovery->ExchCond(ExchNum).SecInTemp - state->dataHeatRecovery->ExchCond(ExchNum).SupInTemp))); Tnode = state->dataHeatRecovery->ExchCond(ExchNum).SupOutTemp; EXPECT_DOUBLE_EQ(Toutlet, Tnode); @@ -187,7 +187,7 @@ TEST_F(EnergyPlusFixture, HeatRecovery_HRTest) thisHX.CalcAirToAirGenericHeatExch(*state, HXUnitOn, FirstHVACIteration, FanOpMode, EconomizerFlag, HighHumCtrlFlag); thisHX.UpdateHeatRecovery(*state); Toutlet = (state->dataHeatRecovery->ExchCond(ExchNum).SupInTemp + - (state->dataHeatRecovery->ExchCond(ExchNum).CoolEffectSensible75 * + (state->dataHeatRecovery->ExchCond(ExchNum).CoolEffectSensible100 * (state->dataHeatRecovery->ExchCond(ExchNum).SecInTemp - state->dataHeatRecovery->ExchCond(ExchNum).SupInTemp))); Tnode = state->dataHeatRecovery->ExchCond(ExchNum).SupOutTemp; EXPECT_DOUBLE_EQ(Toutlet, Tnode); @@ -257,7 +257,7 @@ TEST_F(EnergyPlusFixture, HeatRecovery_HRTest) thisHX.CalcAirToAirGenericHeatExch(*state, HXUnitOn, FirstHVACIteration, FanOpMode, EconomizerFlag, HighHumCtrlFlag); thisHX.UpdateHeatRecovery(*state); EXPECT_DOUBLE_EQ((state->dataHeatRecovery->ExchCond(ExchNum).SupInTemp + - (state->dataHeatRecovery->ExchCond(ExchNum).CoolEffectSensible75 * + (state->dataHeatRecovery->ExchCond(ExchNum).CoolEffectSensible100 * (state->dataHeatRecovery->ExchCond(ExchNum).SecInTemp - state->dataHeatRecovery->ExchCond(ExchNum).SupInTemp))), state->dataLoopNodes->Node(state->dataHeatRecovery->ExchCond(ExchNum).SupOutletNode).Temp); @@ -267,7 +267,7 @@ TEST_F(EnergyPlusFixture, HeatRecovery_HRTest) thisHX.CalcAirToAirGenericHeatExch(*state, HXUnitOn, FirstHVACIteration, FanOpMode, EconomizerFlag, HighHumCtrlFlag); thisHX.UpdateHeatRecovery(*state); EXPECT_DOUBLE_EQ((state->dataHeatRecovery->ExchCond(ExchNum).SupInTemp + - (state->dataHeatRecovery->ExchCond(ExchNum).CoolEffectSensible75 * + (state->dataHeatRecovery->ExchCond(ExchNum).CoolEffectSensible100 * (state->dataHeatRecovery->ExchCond(ExchNum).SecInTemp - state->dataHeatRecovery->ExchCond(ExchNum).SupInTemp))), state->dataLoopNodes->Node(state->dataHeatRecovery->ExchCond(ExchNum).SupOutletNode).Temp); @@ -302,7 +302,7 @@ TEST_F(EnergyPlusFixture, HeatRecovery_HRTest) thisHX.CalcAirToAirGenericHeatExch(*state, HXUnitOn, FirstHVACIteration, FanOpMode, EconomizerFlag, HighHumCtrlFlag, PartLoadRatio); thisHX.UpdateHeatRecovery(*state); EXPECT_DOUBLE_EQ((state->dataHeatRecovery->ExchCond(ExchNum).SupInTemp + - (state->dataHeatRecovery->ExchCond(ExchNum).CoolEffectSensible75 * + (state->dataHeatRecovery->ExchCond(ExchNum).CoolEffectSensible100 * (state->dataHeatRecovery->ExchCond(ExchNum).SecInTemp - state->dataHeatRecovery->ExchCond(ExchNum).SupInTemp))), state->dataLoopNodes->Node(state->dataHeatRecovery->ExchCond(ExchNum).SupOutletNode).Temp); } @@ -387,12 +387,8 @@ TEST_F(EnergyPlusFixture, HeatRecoveryHXOnManinBranch_GetInputTest) " 4.71947443200001, !- Nominal Supply Air Flow Rate { m3 / s }", " 0, !- Sensible Effectiveness at 100 % Heating Air Flow { dimensionless }", " 0.5, !- Latent Effectiveness at 100 % Heating Air Flow { dimensionless }", - " 0, !- Sensible Effectiveness at 75 % Heating Air Flow { dimensionless }", - " 0.5, !- Latent Effectiveness at 75 % Heating Air Flow { dimensionless }", " 0, !- Sensible Effectiveness at 100 % Cooling Air Flow { dimensionless }", " 0.5, !- Latent Effectiveness at 100 % Cooling Air Flow { dimensionless }", - " 0, !- Sensible Effectiveness at 75 % Cooling Air Flow { dimensionless }", - " 0.5, !- Latent Effectiveness at 75 % Cooling Air Flow { dimensionless }", " AHU Heating Coil Outlet, !- Supply Air Inlet Node Name", " AHU Supply fan Inlet, !- Supply Air Outlet Node Name", " AHU relief air outlet, !- Exhaust Air Inlet Node Name", @@ -3040,12 +3036,8 @@ TEST_F(EnergyPlusFixture, HeatRecoveryHXOnMainBranch_SimHeatRecoveryTest) " autosize, !- Nominal Supply Air Flow Rate {m3/s}", " 0.7, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless}", " 0.65, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless}", - " 0.750000, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless}", - " 0.700000, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless}", " 0.7, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless}", " 0.65, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless}", - " 0.750000, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless}", - " 0.700000, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless}", " DOAS Mixed Air Outlet, !- Supply Air Inlet Node Name", " DOAS Heat Recovery Supply Outlet, !- Supply Air Outlet Node Name", " DOAS Relief Air Outlet, !- Exhaust Air Inlet Node Name", @@ -3057,7 +3049,57 @@ TEST_F(EnergyPlusFixture, HeatRecoveryHXOnMainBranch_SimHeatRecoveryTest) " 1.7, !- Threshold Temperature {C}", " 0.083, !- Initial Defrost Time Fraction {dimensionless}", " 0.012, !- Rate of Defrost Time Fraction Increase {1/K}", - " Yes; !- Economizer Lockout", + " Yes, !- Economizer Lockout", + " SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name", + " LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name", + " SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name", + " LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name", + + " Table:IndependentVariable,", + " airFlowRatio, !- Name", + " Linear, !- Interpolation Method", + " Linear, !- Extrapolation Method", + " 0.0, !- Minimum Value", + " 1.0, !- Maximum Value", + " , !- Normalization Reference Value", + " Dimensionless, !- Unit Type", + " , !- External File Name", + " , !- External File Column Number", + " , !- External File Starting Row Number", + " 0.75, !- Value 1", + " 1.0; !- Value 2", + + " Table:IndependentVariableList,", + " effectiveness_IndependentVariableList, !- Name", + " airFlowRatio; !- Independent Variable 1 Name", + + " Table:Lookup,", + " SenEffectivenessTable, !- Name", + " effectiveness_IndependentVariableList, !- Independent Variable List Name", + " DivisorOnly, !- Normalization Method", + " 0.7, !- Normalization Divisor", + " 0.0, !- Minimum Output", + " 1.0, !- Maximum Output", + " Dimensionless, !- Output Unit Type", + " , !- External File Name", + " , !- External File Column Number", + " , !- External File Starting Row Number", + " 0.75, !- Output Value 1", + " 0.70; !- Output Value 2", + + " Table:Lookup,", + " LatEffectivenessTable, !- Name", + " effectiveness_IndependentVariableList, !- Independent Variable List Name", + " DivisorOnly, !- Normalization Method", + " 0.65, !- Normalization Divisor", + " 0.0, !- Minimum Output", + " 1.0, !- Maximum Output", + " Dimensionless, !- Output Unit Type", + " , !- External File Name", + " , !- External File Column Number", + " , !- External File Starting Row Number", + " 0.70, !- Output Value 1", + " 0.65; !- Output Value 2", "Controller:WaterCoil,", " DOAS Cooling Coil Controller, !- Name", @@ -3971,12 +4013,8 @@ TEST_F(EnergyPlusFixture, HeatRecovery_AirFlowSizing) " autosize, !- Nominal Supply Air Flow Rate {m3/s}", " 0.76, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless}", " 0.68, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless}", - " 0.81, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless}", - " 0.73, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless}", " 0.76, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless}", " 0.68, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless}", - " 0.81, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless}", - " 0.73, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless}", " ERV OA Inlet Node, !- Supply Air Inlet Node Name", " HR Pri Air Outlet Node, !- Supply Air Outlet Node Name", " Zone 1 Exhaust Node, !- Exhaust Air Inlet Node Name", @@ -4081,12 +4119,8 @@ TEST_F(EnergyPlusFixture, HeatRecovery_HeatExchangerGenericCalcTest) " 0.5, !- Nominal Supply Air Flow Rate {m3/s}", " 0.70, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless}", " 0.60, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless}", - " 0.70, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless}", - " 0.60, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless}", " 0.75, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless}", " 0.60, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless}", - " 0.75, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless}", - " 0.60, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless}", " VAV WITH REHEAT_OAInlet Node, !- Supply Air Inlet Node Name", " VAV WITH REHEAT Heat Recovery Outlet Node, !- Supply Air Outlet Node Name", " VAV WITH REHEAT_OARelief Node, !- Exhaust Air Inlet Node Name", @@ -4209,12 +4243,8 @@ TEST_F(EnergyPlusFixture, HeatRecovery_NominalAirFlowAutosizeTest) " autosize, !- Nominal Supply Air Flow Rate {m3/s}", " 0.76, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless}", " 0.0, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless}", - " 0.81, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless}", - " 0.0, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless}", " 0.76, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless}", " 0.0, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless}", - " 0.81, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless}", - " 0.0, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless}", " OA Inlet Node, !- Supply Air Inlet Node Name", " HX Pri Air Outlet Node, !- Supply Air Outlet Node Name", " Return Air Node, !- Exhaust Air Inlet Node Name", diff --git a/tst/EnergyPlus/unit/HeatingCoils.unit.cc b/tst/EnergyPlus/unit/HeatingCoils.unit.cc index 3b70e84c8c9..d7298b9f3de 100644 --- a/tst/EnergyPlus/unit/HeatingCoils.unit.cc +++ b/tst/EnergyPlus/unit/HeatingCoils.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HighTempRadiantSystem.unit.cc b/tst/EnergyPlus/unit/HighTempRadiantSystem.unit.cc index 797b8ed23cb..588d712ee3f 100644 --- a/tst/EnergyPlus/unit/HighTempRadiantSystem.unit.cc +++ b/tst/EnergyPlus/unit/HighTempRadiantSystem.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -124,6 +124,8 @@ TEST_F(EnergyPlusFixture, HighTempRadiantSystemTest_GetHighTempRadiantSystem) EXPECT_TRUE(compare_err_stream(error_string01, true)); EXPECT_TRUE(ErrorsFound); + EXPECT_EQ(state->dataSurface->allGetsRadiantHeatSurfaceList[0], 1); + EXPECT_TRUE(state->dataSurface->surfIntConv(1).getsRadiantHeat); } TEST_F(EnergyPlusFixture, HighTempRadiantSystemTest_SizeHighTempRadiantSystemScalableFlagSetTest) diff --git a/tst/EnergyPlus/unit/Humidifiers.unit.cc b/tst/EnergyPlus/unit/Humidifiers.unit.cc index 1e01d2e119d..f70e06d83d0 100644 --- a/tst/EnergyPlus/unit/Humidifiers.unit.cc +++ b/tst/EnergyPlus/unit/Humidifiers.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HybridModel.unit.cc b/tst/EnergyPlus/unit/HybridModel.unit.cc index 050b53bfd0f..c3c51bfb859 100644 --- a/tst/EnergyPlus/unit/HybridModel.unit.cc +++ b/tst/EnergyPlus/unit/HybridModel.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ICEngineElectricGenerator.unit.cc b/tst/EnergyPlus/unit/ICEngineElectricGenerator.unit.cc index dca3eab3576..bf93e2f3ba9 100644 --- a/tst/EnergyPlus/unit/ICEngineElectricGenerator.unit.cc +++ b/tst/EnergyPlus/unit/ICEngineElectricGenerator.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ICSCollector.unit.cc b/tst/EnergyPlus/unit/ICSCollector.unit.cc index 9445408de49..27dc6c0e750 100644 --- a/tst/EnergyPlus/unit/ICSCollector.unit.cc +++ b/tst/EnergyPlus/unit/ICSCollector.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/IceThermalStorage.unit.cc b/tst/EnergyPlus/unit/IceThermalStorage.unit.cc index 559d27dc960..7557db23957 100644 --- a/tst/EnergyPlus/unit/IceThermalStorage.unit.cc +++ b/tst/EnergyPlus/unit/IceThermalStorage.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/IdfParser.unit.cc b/tst/EnergyPlus/unit/IdfParser.unit.cc index d8260187688..c4725b15e94 100644 --- a/tst/EnergyPlus/unit/IdfParser.unit.cc +++ b/tst/EnergyPlus/unit/IdfParser.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/IndoorGreen.unit.cc b/tst/EnergyPlus/unit/IndoorGreen.unit.cc new file mode 100644 index 00000000000..d978512846c --- /dev/null +++ b/tst/EnergyPlus/unit/IndoorGreen.unit.cc @@ -0,0 +1,221 @@ +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, +// The Regents of the University of California, through Lawrence Berkeley National Laboratory +// (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge +// National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other +// contributors. All rights reserved. +// +// NOTICE: This Software was developed under funding from the U.S. Department of Energy and the +// U.S. Government consequently retains certain rights. As such, the U.S. Government has been +// granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, +// worldwide license in the Software to reproduce, distribute copies to the public, prepare +// derivative works, and perform publicly and display publicly, and to permit others to do so. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted +// provided that the following conditions are met: +// +// (1) Redistributions of source code must retain the above copyright notice, this list of +// conditions and the following disclaimer. +// +// (2) Redistributions in binary form must reproduce the above copyright notice, this list of +// conditions and the following disclaimer in the documentation and/or other materials +// provided with the distribution. +// +// (3) Neither the name of the University of California, Lawrence Berkeley National Laboratory, +// the University of Illinois, U.S. Dept. of Energy nor the names of its contributors may be +// used to endorse or promote products derived from this software without specific prior +// written permission. +// +// (4) Use of EnergyPlus(TM) Name. If Licensee (i) distributes the software in stand-alone form +// without changes from the version obtained under this License, or (ii) Licensee makes a +// reference solely to the software portion of its product, Licensee must refer to the +// software as "EnergyPlus version X" software, where "X" is the version number Licensee +// obtained under this License and may not use a different name for the software. Except as +// specifically required in this Section (4), Licensee shall not use in a company name, a +// product name, in advertising, publicity, or other promotional activities any name, trade +// name, trademark, logo, or other designation of "EnergyPlus", "E+", "e+" or confusingly +// similar designation, without the U.S. Department of Energy's prior written consent. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY +// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +#include + +// Google Test Headers +#include + +// EnergyPlus Headers +#include "Fixtures/EnergyPlusFixture.hh" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +using namespace EnergyPlus; + +TEST_F(EnergyPlusFixture, IndoorGreen_CheckGetInputDataFunction) +{ + bool ErrorsFound(false); + int IndoorGreenNum(1); + std::string const idf_objects = delimited_string({ + + " Zone,", + " SPACE1-1, !- Name", + " 0, !- Direction of Relative North {deg}", + " 0.0, !- X Origin {m}", + " 0.0, !- Y Origin {m}", + " 0.0, !- Z Origin {m}", + " , !- Type", + " , !- Multiplier", + " , !- Ceiling Height {m}", + " , !- Volume {m3}", + " , !- Floor Area {m2}", + " , !- Zone Inside Convection Algorithm", + " , !- Zone Outside Convection Algorithm", + " No; !- Part of Total Floor Area", + + " Construction,", + " INT-WALL, !- Name", + " GP02; !- Outside Layer", + + " Material,", + " GP02, !- Name", + " MediumSmooth, !- Roughness", + " 0.1016, !- Thickness {m}", + " 0.16, !- Conductivity {W/m-K}", + " 801, !- Density {kg/m3}", + " 837, !- Specific Heat {J/kg-K}", + " 0.9, !- Thermal Absorptance", + " 0.75, !- Solar Absorptance", + " 0.75; !- Visible Absorptance", + + " BuildingSurface:Detailed,", + " SPACE1-1SouthPartition, !-Name", + " WALL, !-Surface Type", + " INT-WALL, !-Construction Name", + " SPACE1-1, !-Zone Name", + " , !-Space Name", + " Adiabatic, !-Outside Boundary Condition", + " , !-Outside Boundary Condition Object", + " NoSun, !-Sun Exposure", + " NoWind, !-Wind Exposure", + " 0, !-View Factor to Ground", + " 4, !-Number of Vertices", + " 5, 1.5, 2, !- X,Y,Z ==> Vertex 1 {m}", + " 5, 1.5, 0.0, !- X,Y,Z ==> Vertex 2 {m}", + " 20, 1.5, 0.0, !- X,Y,Z ==> Vertex 3 {m}", + " 20, 1.5, 2; !- X,Y,Z ==> Vertex 3 {m}", + + " Schedule:Compact,", + " AlwaysOn, !- Name", + " Fraction, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00, !- Field 3", + " 1.0; !- Field 4", + + " Schedule:Compact,", + " AlwaysOff, !- Name", + " Fraction, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00, !- Field 3", + " 0.0; !- Field 4", + + " IndoorLivingWall,", + " Space1-1IndoorLivingWall, !-Name", + " SPACE1-1SouthPartition, !-Surface Name", + " AlwaysOn, !-Schedule Name", + " Penman-Monteith, !-ET Calculation Method", + " LED, !-Lighting Method", + " AlwaysOff, !-LED Intensity Schedule Name", + " , !-Daylighting Control Name", + " , !-LED - Daylight Targeted Lighting Intensity Schedule Name", + " 30, !- Total Leaf Area {m2}", + " 32.5, !- LED Nominal Intensity {umol_m2s}", + " 640, !- LED Nominal Power {W}", + " 0.6; !- Radiant Fraction of LED Lights", + }); + + ASSERT_TRUE(process_idf(idf_objects)); + + Material::GetMaterialData(*state, ErrorsFound); + EXPECT_FALSE(ErrorsFound); + + HeatBalanceManager::GetConstructData(*state, ErrorsFound); + EXPECT_FALSE(ErrorsFound); + + HeatBalanceManager::GetZoneData(*state, ErrorsFound); + EXPECT_FALSE(ErrorsFound); + + state->dataSurfaceGeometry->CosZoneRelNorth.allocate(1); + state->dataSurfaceGeometry->SinZoneRelNorth.allocate(1); + state->dataSurfaceGeometry->CosZoneRelNorth(1) = std::cos(-state->dataHeatBal->Zone(1).RelNorth * Constant::DegToRadians); + state->dataSurfaceGeometry->SinZoneRelNorth(1) = std::sin(-state->dataHeatBal->Zone(1).RelNorth * Constant::DegToRadians); + state->dataSurfaceGeometry->CosBldgRelNorth = 1.0; + state->dataSurfaceGeometry->SinBldgRelNorth = 0.0; + + SurfaceGeometry::GetSurfaceData(*state, ErrorsFound); + EXPECT_FALSE(ErrorsFound); + + state->dataHVACGlobal->TimeStepSys = 1; + state->dataHVACGlobal->TimeStepSysSec = state->dataHVACGlobal->TimeStepSys * Constant::SecInHour; + + state->dataGlobal->NumOfTimeStepInHour = 1; + state->dataGlobal->MinutesPerTimeStep = 60 / state->dataGlobal->NumOfTimeStepInHour; + state->dataGlobal->TimeStep = 1; + state->dataGlobal->HourOfDay = 1; + state->dataEnvrn->DayOfWeek = 1; + state->dataEnvrn->DayOfYear_Schedule = 1; + ScheduleManager::UpdateScheduleValues(*state); + + IndoorGreen::GetIndoorGreenInput(*state, ErrorsFound); // setup indoor living wall data + EXPECT_FALSE(ErrorsFound); // expect no errors + auto &thisindoorgreen = state->dataIndoorGreen->indoorGreens(IndoorGreenNum); + EXPECT_EQ(thisindoorgreen.LeafArea, 30.0); + EXPECT_EQ((int)thisindoorgreen.lightingMethod, (int)IndoorGreen::LightingMethod::LED); + EXPECT_EQ((int)thisindoorgreen.etCalculationMethod, (int)IndoorGreen::ETCalculationMethod::PenmanMonteith); +} +TEST_F(EnergyPlusFixture, IndoorGreen_CheckETFunction) +{ + bool ErrorsFound(false); + int IndoorGreenNum(1); + Real64 ZonePreTemp = 0.0; // C + Real64 ZonePreHum = 0.001; + Real64 LAI = 1.0; + Real64 SwithF = 1.0; + state->dataIndoorGreen->indoorGreens.allocate(IndoorGreenNum); + auto &thisindoorgreen = state->dataIndoorGreen->indoorGreens(IndoorGreenNum); + thisindoorgreen.ZCO2 = 400; // ppm + thisindoorgreen.ZPPFD = 0; // umol/(m2s) + thisindoorgreen.ZVPD = 2000; // Pa + thisindoorgreen.ETRate = IndoorGreen::ETBaseFunction(*state, ZonePreTemp, ZonePreHum, thisindoorgreen.ZPPFD, thisindoorgreen.ZVPD, LAI, SwithF); + EXPECT_EQ(thisindoorgreen.ETRate, 0.0); +} diff --git a/tst/EnergyPlus/unit/InputProcessor.unit.cc b/tst/EnergyPlus/unit/InputProcessor.unit.cc index 6c3420ab478..f70c835762d 100644 --- a/tst/EnergyPlus/unit/InputProcessor.unit.cc +++ b/tst/EnergyPlus/unit/InputProcessor.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -57,7 +57,6 @@ #include #include #include -#include #include #include @@ -2077,7 +2076,7 @@ TEST_F(InputProcessorFixture, getObjectItem_json1) cAlphaFields, cNumericFields); - EXPECT_TRUE(compare_containers(std::vector({"SIMPLEANDTABULAR", ""}), Alphas)); + EXPECT_TRUE(compare_containers(std::vector({"SIMPLEANDTABULAR", "USEOUTPUTCONTROLTABLESTYLE"}), Alphas)); EXPECT_TRUE(compare_containers(std::vector({"Option Type", "Unit Conversion for Tabular Data"}), cAlphaFields)); EXPECT_TRUE(compare_containers(std::vector({}), cNumericFields)); EXPECT_TRUE(compare_containers(std::vector({}), lNumericBlanks)); @@ -2136,9 +2135,14 @@ TEST_F(InputProcessorFixture, getObjectItem_json2) cAlphaFields, cNumericFields); - EXPECT_TRUE(compare_containers( - std::vector({"MAIN GAS HUMIDIFIER", "", "THERMALEFFICIENCYFPLR", "MIXED AIR NODE 1", "MAIN HUMIDIFIER OUTLET NODE", "", ""}), - Alphas)); + EXPECT_TRUE(compare_containers(std::vector({"MAIN GAS HUMIDIFIER", + "", + "THERMALEFFICIENCYFPLR", + "MIXED AIR NODE 1", + "MAIN HUMIDIFIER OUTLET NODE", + "", + "FIXEDINLETWATERTEMPERATURE"}), + Alphas)); EXPECT_TRUE(compare_containers(std::vector({"Name", "Availability Schedule Name", "Thermal Efficiency Modifier Curve Name", @@ -2521,7 +2525,7 @@ TEST_F(InputProcessorFixture, getObjectItem_truncated_obj_pulled_up_semicolon) cNumericFields); EXPECT_EQ(1, NumAlphas); - EXPECT_TRUE(compare_containers(std::vector({"HPACCOOLEIRFT SPEED", "", "", ""}), Alphas)); + EXPECT_TRUE(compare_containers(std::vector({"HPACCOOLEIRFT SPEED", "DIMENSIONLESS", "DIMENSIONLESS", "DIMENSIONLESS"}), Alphas)); EXPECT_TRUE(compare_containers(std::vector({ "Name", "Input Unit Type for X", @@ -2643,8 +2647,8 @@ TEST_F(InputProcessorFixture, getObjectItem_truncated_sizing_system_min_fields) EXPECT_TRUE(compare_containers(std::vector({false, false, false, false, false, false, false, true, true, true, true}), lAlphaBlanks)); EXPECT_EQ(26, NumNumbers); - EXPECT_TRUE(compare_containers(std::vector({-99999, 0.4, 7, 0.0085, 11.0, 0.0085, 12.8, 16.7, 0.0085, 0.0085, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, -99999, 0, 0, -99999, 0, 0, 0}), + EXPECT_TRUE(compare_containers(std::vector({-99999, 0.4, 7, 0.0085, 11.0, 0.0085, 12.8, 16.7, 0.0085, 0.0085, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, -99999, 0, 0, -99999, 0, 0, -99999}), Numbers)); EXPECT_TRUE(compare_containers(std::vector({false, false, false, false, false, false, false, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true}), @@ -2785,7 +2789,7 @@ TEST_F(InputProcessorFixture, getObjectItem_truncated_autosize_fields) cNumericFields); EXPECT_EQ(2, NumAlphas); - EXPECT_TRUE(compare_containers(std::vector({"MAIN GAS HUMIDIFIER", "", "", "", "", "", ""}), Alphas)); + EXPECT_TRUE(compare_containers(std::vector({"MAIN GAS HUMIDIFIER", "", "", "", "", "", "FIXEDINLETWATERTEMPERATURE"}), Alphas)); EXPECT_TRUE(compare_containers(std::vector({"Name", "Availability Schedule Name", "Thermal Efficiency Modifier Curve Name", @@ -2801,7 +2805,7 @@ TEST_F(InputProcessorFixture, getObjectItem_truncated_autosize_fields) std::vector({"Rated Capacity", "Rated Gas Use Rate", "Thermal Efficiency", "Rated Fan Power", "Auxiliary Electric Power"}), cNumericFields)); EXPECT_TRUE(compare_containers(std::vector({false, true, true, true, true}), lNumericBlanks)); - EXPECT_TRUE(compare_containers(std::vector({-99999, 0, 0, 0, 0}), Numbers)); + EXPECT_TRUE(compare_containers(std::vector({-99999, 0, 0.8, 0, 0}), Numbers)); EXPECT_EQ(1, IOStatus); } @@ -2847,6 +2851,7 @@ TEST_F(InputProcessorFixture, getObjectItem_unitary_system_input) " , !- Fraction of Autosized Design Heating Supply Air Flow Rate", " , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W }", " , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W }", + " , !- No Load Supply Air Flow Rate Control Set To Low Speed ", " 80; !- Maximum Supply Air Temperature{ C }", }); @@ -2884,7 +2889,7 @@ TEST_F(InputProcessorFixture, getObjectItem_unitary_system_input) cAlphaFields, cNumericFields); - EXPECT_EQ(22, NumAlphas); + EXPECT_EQ(23, NumAlphas); EXPECT_TRUE(compare_containers(std::vector({"GASHEAT DXAC FURNACE 1", "LOAD", "EAST ZONE", @@ -2907,6 +2912,7 @@ TEST_F(InputProcessorFixture, getObjectItem_unitary_system_input) "SUPPLYAIRFLOWRATE", "SUPPLYAIRFLOWRATE", "SUPPLYAIRFLOWRATE", + "YES", "", "", "", @@ -2915,14 +2921,14 @@ TEST_F(InputProcessorFixture, getObjectItem_unitary_system_input) Alphas)); EXPECT_TRUE( compare_containers(std::vector({false, false, false, false, false, false, false, false, false, false, false, false, false, false, - false, true, true, false, false, false, false, false, true, true, true, true, true}), + false, true, true, false, false, false, false, false, true, true, true, true, true, true}), lAlphaBlanks)); EXPECT_EQ(17, NumNumbers); EXPECT_TRUE(compare_containers(std::vector({true, true, false, true, true, true, false, true, true, true, false, true, true, true, true, true, false, true, true, true, true, true}), lNumericBlanks)); - EXPECT_TRUE(compare_containers(std::vector({1, 2, 1.6, 0, 0, 0, 1.6, 0, 0, 0, 1.6, 0, 0, 0, 0, 0, 80, 0, 0, 0, 0, 0}), Numbers)); + EXPECT_TRUE(compare_containers(std::vector({1, 2, 1.6, 0, 0, 0, 1.6, 0, 0, 0, 1.6, 0, 0, 0, 0, 0, 80, 21, 0, 0, 0, 80}), Numbers)); EXPECT_EQ(1, IOStatus); } @@ -3033,12 +3039,12 @@ TEST_F(InputProcessorFixture, getObjectItem_test_zone_input) cNumericFields); EXPECT_EQ(1, NumAlphas); - EXPECT_TRUE(compare_containers(std::vector({"EAST ZONE", "", "", ""}), Alphas)); + EXPECT_TRUE(compare_containers(std::vector({"EAST ZONE", "", "", "YES"}), Alphas)); EXPECT_TRUE(compare_containers(std::vector({false, true, true, true}), lAlphaBlanks)); EXPECT_EQ(8, NumNumbers); EXPECT_TRUE(compare_containers(std::vector({false, false, false, false, false, false, false, false, true}), lNumericBlanks)); - EXPECT_TRUE(compare_containers(std::vector({0, 0, 0, 0, 1, 1, -99999, -99999, 0}), Numbers)); + EXPECT_TRUE(compare_containers(std::vector({0, 0, 0, 0, 1, 1, -99999, -99999, -99999}), Numbers)); EXPECT_EQ(1, IOStatus); } @@ -3313,7 +3319,7 @@ TEST_F(InputProcessorFixture, getObjectItem_schedule_objects) cNumericFields); EXPECT_EQ(1, NumAlphas); - EXPECT_TRUE(compare_containers(std::vector({"ANY NUMBER", "", ""}), Alphas)); + EXPECT_TRUE(compare_containers(std::vector({"ANY NUMBER", "", "DIMENSIONLESS"}), Alphas)); EXPECT_TRUE(compare_containers(std::vector({false, true, true}), lAlphaBlanks)); EXPECT_EQ(0, NumNumbers); @@ -3416,7 +3422,7 @@ TEST_F(InputProcessorFixture, getObjectItem_fan_on_off) EXPECT_EQ(4, NumAlphas); EXPECT_TRUE(compare_containers( - std::vector({"SUPPLY FAN 1", "FANANDCOILAVAILSCHED", "ZONE EXHAUST NODE", "DX COOLING COIL AIR INLET NODE", "", "", ""}), + std::vector({"SUPPLY FAN 1", "FANANDCOILAVAILSCHED", "ZONE EXHAUST NODE", "DX COOLING COIL AIR INLET NODE", "", "", "General"}), Alphas)); EXPECT_TRUE(compare_containers(std::vector({false, false, false, false, true, true, true}), lAlphaBlanks)); @@ -3479,7 +3485,7 @@ TEST_F(InputProcessorFixture, getObjectItem_curve_quadratic) *state, CurrentModuleObject, 1, Alphas, NumAlphas, Numbers, NumNumbers, IOStatus, lNumericBlanks, lAlphaBlanks, cAlphaFields, cNumericFields); EXPECT_EQ(1, NumAlphas); - EXPECT_TRUE(compare_containers(std::vector({"COOLCAPFFF", "", ""}), Alphas)); + EXPECT_TRUE(compare_containers(std::vector({"COOLCAPFFF", "DIMENSIONLESS", "DIMENSIONLESS"}), Alphas)); EXPECT_TRUE(compare_containers(std::vector({false, true, true}), lAlphaBlanks)); EXPECT_EQ(5, NumNumbers); @@ -3513,7 +3519,7 @@ TEST_F(InputProcessorFixture, getObjectItem_curve_quadratic) cNumericFields2); EXPECT_EQ(1, NumAlphas2); - EXPECT_TRUE(compare_containers(std::vector({"COOLEIRFFF", "", ""}), Alphas2)); + EXPECT_TRUE(compare_containers(std::vector({"COOLEIRFFF", "DIMENSIONLESS", "DIMENSIONLESS"}), Alphas2)); EXPECT_TRUE(compare_containers(std::vector({false, true, true}), lAlphaBlanks2)); EXPECT_EQ(5, NumNumbers2); @@ -3547,7 +3553,7 @@ TEST_F(InputProcessorFixture, getObjectItem_curve_quadratic) cNumericFields3); EXPECT_EQ(1, NumAlphas3); - EXPECT_TRUE(compare_containers(std::vector({"PLFFPLR", "", ""}), Alphas3)); + EXPECT_TRUE(compare_containers(std::vector({"PLFFPLR", "DIMENSIONLESS", "DIMENSIONLESS"}), Alphas3)); EXPECT_TRUE(compare_containers(std::vector({false, true, true}), lAlphaBlanks3)); EXPECT_EQ(5, NumNumbers3); @@ -4455,8 +4461,8 @@ TEST_F(InputProcessorFixture, epJSONgetObjectItem_minfields) EXPECT_NEAR(state->dataIPShortCut->rNumericArgs(3), 0.5, 0.0001); // Defaults from schema EXPECT_NEAR(state->dataIPShortCut->rNumericArgs(2), 0.9, 0.0001); - // Fields beyond min-fields come back as blank or zero, even if they have a default - EXPECT_NEAR(state->dataIPShortCut->rNumericArgs(4), 0.0, 0.0001); + // Fields beyond min-fields come back as the default value + EXPECT_NEAR(state->dataIPShortCut->rNumericArgs(4), 0.7, 0.0001); } TEST_F(InputProcessorFixture, epJSONgetFieldValue_fromJSON) diff --git a/tst/EnergyPlus/unit/IntegratedHeatPump.unit.cc b/tst/EnergyPlus/unit/IntegratedHeatPump.unit.cc index beb7b635708..ff468afacaa 100644 --- a/tst/EnergyPlus/unit/IntegratedHeatPump.unit.cc +++ b/tst/EnergyPlus/unit/IntegratedHeatPump.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/InternalHeatGains.unit.cc b/tst/EnergyPlus/unit/InternalHeatGains.unit.cc index 2ec75f14687..fefbdcfbd18 100644 --- a/tst/EnergyPlus/unit/InternalHeatGains.unit.cc +++ b/tst/EnergyPlus/unit/InternalHeatGains.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -712,8 +712,8 @@ TEST_F(EnergyPlusFixture, InternalHeatGains_CheckZoneComponentLoadSubtotals) // ** NOTE: If this unit test fails, the likely cause is that a new internal gain type was added, but it was not added to one of the subtotal // types in InternalHeatGains::GatherComponentLoadsIntGain() this also means that the new type may be missing from other places that collect - // internal gains by subgroups, such as the room air models and output reporting for zone-level gains search for IntGainTypeOf_Lights for places - // where these types of subtotals occur and add the new type as appropriate + // internal gains by subgroups, such as the room air models and output reporting for zone-level gains search for + // "DataHeatBalance::IntGainType::Lights" for places where these types of subtotals occur and add the new type as appropriate EXPECT_EQ(totConvGains, expectedTotConvGains); // cleanup diff --git a/tst/EnergyPlus/unit/KusudaAchenbachGroundTemperatureModel.unit.cc b/tst/EnergyPlus/unit/KusudaAchenbachGroundTemperatureModel.unit.cc index 1b98ddf7fb5..95eda652181 100644 --- a/tst/EnergyPlus/unit/KusudaAchenbachGroundTemperatureModel.unit.cc +++ b/tst/EnergyPlus/unit/KusudaAchenbachGroundTemperatureModel.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/LowTempRadiantSystem.unit.cc b/tst/EnergyPlus/unit/LowTempRadiantSystem.unit.cc index b9e75a9ede4..92c260ed026 100644 --- a/tst/EnergyPlus/unit/LowTempRadiantSystem.unit.cc +++ b/tst/EnergyPlus/unit/LowTempRadiantSystem.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Material.unit.cc b/tst/EnergyPlus/unit/Material.unit.cc index ff919d26417..ad43140ec2f 100644 --- a/tst/EnergyPlus/unit/Material.unit.cc +++ b/tst/EnergyPlus/unit/Material.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/MicroCHPElectricGenerator.unit.cc b/tst/EnergyPlus/unit/MicroCHPElectricGenerator.unit.cc index 38e41532bbd..c0dd0e25c32 100644 --- a/tst/EnergyPlus/unit/MicroCHPElectricGenerator.unit.cc +++ b/tst/EnergyPlus/unit/MicroCHPElectricGenerator.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/MicroturbineElectricGenerator.unit.cc b/tst/EnergyPlus/unit/MicroturbineElectricGenerator.unit.cc index 70ad47b291e..5aecfe82193 100644 --- a/tst/EnergyPlus/unit/MicroturbineElectricGenerator.unit.cc +++ b/tst/EnergyPlus/unit/MicroturbineElectricGenerator.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/MixedAir.unit.cc b/tst/EnergyPlus/unit/MixedAir.unit.cc index 9c7a58c5aaa..77793bce9c7 100644 --- a/tst/EnergyPlus/unit/MixedAir.unit.cc +++ b/tst/EnergyPlus/unit/MixedAir.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -4851,12 +4851,8 @@ TEST_F(EnergyPlusFixture, MixedAir_MiscGetsPart2) " autosize, !- Nominal Supply Air Flow Rate {m3/s}", " 0.7, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless}", " 0.65, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless}", - " 0.750000, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless}", - " 0.700000, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless}", " 0.7, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless}", " 0.65, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless}", - " 0.750000, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless}", - " 0.700000, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless}", " DOAS Mixed Air Outlet, !- Supply Air Inlet Node Name", " DOAS Heat Recovery Supply Outlet, !- Supply Air Outlet Node Name", " DOAS Relief Air Outlet, !- Exhaust Air Inlet Node Name", @@ -4868,7 +4864,57 @@ TEST_F(EnergyPlusFixture, MixedAir_MiscGetsPart2) " 1.7, !- Threshold Temperature {C}", " 0.083, !- Initial Defrost Time Fraction {dimensionless}", " 0.012, !- Rate of Defrost Time Fraction Increase {1/K}", - " Yes; !- Economizer Lockout", + " Yes, !- Economizer Lockout", + " SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name", + " LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name", + " SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name", + " LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name", + + " Table:IndependentVariable,", + " airFlowRatio, !- Name", + " Linear, !- Interpolation Method", + " Linear, !- Extrapolation Method", + " 0.0, !- Minimum Value", + " 1.0, !- Maximum Value", + " , !- Normalization Reference Value", + " Dimensionless, !- Unit Type", + " , !- External File Name", + " , !- External File Column Number", + " , !- External File Starting Row Number", + " 0.75, !- Value 1", + " 1.0; !- Value 2", + + " Table:IndependentVariableList,", + " effectiveness_IndependentVariableList, !- Name", + " airFlowRatio; !- Independent Variable 1 Name", + + " Table:Lookup,", + " SenEffectivenessTable, !- Name", + " effectiveness_IndependentVariableList, !- Independent Variable List Name", + " DivisorOnly, !- Normalization Method", + " 0.7, !- Normalization Divisor", + " 0.0, !- Minimum Output", + " 1.0, !- Maximum Output", + " Dimensionless, !- Output Unit Type", + " , !- External File Name", + " , !- External File Column Number", + " , !- External File Starting Row Number", + " 0.75, !- Output Value 1", + " 0.70; !- Output Value 2", + + " Table:Lookup,", + " LatEffectivenessTable, !- Name", + " effectiveness_IndependentVariableList, !- Independent Variable List Name", + " DivisorOnly, !- Normalization Method", + " 0.65, !- Normalization Divisor", + " 0.0, !- Minimum Output", + " 1.0, !- Maximum Output", + " Dimensionless, !- Output Unit Type", + " , !- External File Name", + " , !- External File Column Number", + " , !- External File Starting Row Number", + " 0.70, !- Output Value 1", + " 0.65; !- Output Value 2", "Controller:WaterCoil,", " DOAS Cooling Coil Controller, !- Name", @@ -6979,12 +7025,8 @@ TEST_F(EnergyPlusFixture, OAController_FixedMinimum_MinimumLimitTypeTest) " AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s}", " 0.70, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless}", " 0.60, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless}", - " 0.70, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless}", - " 0.60, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless}", " 0.75, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless}", " 0.60, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless}", - " 0.75, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless}", - " 0.60, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless}", " Outside Air Inlet Node, !- Supply Air Inlet Node Name", " OA HR Outlet Node, !- Supply Air Outlet Node Name", " Relief Air Outlet Node, !- Exhaust Air Inlet Node Name", @@ -7175,12 +7217,8 @@ TEST_F(EnergyPlusFixture, OAController_HighExhaustMassFlowTest) " AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s}", " 0.70, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless}", " 0.60, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless}", - " 0.70, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless}", - " 0.60, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless}", " 0.75, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless}", " 0.60, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless}", - " 0.75, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless}", - " 0.60, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless}", " Outside Air Inlet Node, !- Supply Air Inlet Node Name", " OA HR Outlet Node, !- Supply Air Outlet Node Name", " Relief Air Outlet Node, !- Exhaust Air Inlet Node Name", @@ -7426,12 +7464,8 @@ TEST_F(EnergyPlusFixture, OAController_LowExhaustMassFlowTest) " AUTOSIZE, !- Nominal Supply Air Flow Rate {m3/s}", " 0.70, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless}", " 0.60, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless}", - " 0.70, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless}", - " 0.60, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless}", " 0.75, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless}", " 0.60, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless}", - " 0.75, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless}", - " 0.60, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless}", " OA Sys HC Outlet Node, !- Supply Air Inlet Node Name", " OA HR Outlet Node, !- Supply Air Outlet Node Name", " Relief Air Outlet Node, !- Exhaust Air Inlet Node Name", diff --git a/tst/EnergyPlus/unit/MixerComponent.unit.cc b/tst/EnergyPlus/unit/MixerComponent.unit.cc index b8c1219239e..ee812ca78c9 100644 --- a/tst/EnergyPlus/unit/MixerComponent.unit.cc +++ b/tst/EnergyPlus/unit/MixerComponent.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/MoistureBalanceEMPD.unit.cc b/tst/EnergyPlus/unit/MoistureBalanceEMPD.unit.cc index 6a0aa175832..3ae7a8bf95c 100644 --- a/tst/EnergyPlus/unit/MoistureBalanceEMPD.unit.cc +++ b/tst/EnergyPlus/unit/MoistureBalanceEMPD.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/NodeInputManager.unit.cc b/tst/EnergyPlus/unit/NodeInputManager.unit.cc index 5a30be00f28..b61b18d8ec6 100644 --- a/tst/EnergyPlus/unit/NodeInputManager.unit.cc +++ b/tst/EnergyPlus/unit/NodeInputManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/OASystemHWPreheatCoil.unit.cc b/tst/EnergyPlus/unit/OASystemHWPreheatCoil.unit.cc index 49930168d50..ac99e523cae 100644 --- a/tst/EnergyPlus/unit/OASystemHWPreheatCoil.unit.cc +++ b/tst/EnergyPlus/unit/OASystemHWPreheatCoil.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/OccupantDiversity.unit.cc b/tst/EnergyPlus/unit/OccupantDiversity.unit.cc index e6667197850..1636e528928 100644 --- a/tst/EnergyPlus/unit/OccupantDiversity.unit.cc +++ b/tst/EnergyPlus/unit/OccupantDiversity.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/OutAirNodeManager.unit.cc b/tst/EnergyPlus/unit/OutAirNodeManager.unit.cc index 0523c842162..41105bf25dc 100644 --- a/tst/EnergyPlus/unit/OutAirNodeManager.unit.cc +++ b/tst/EnergyPlus/unit/OutAirNodeManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/OutdoorAirUnit.unit.cc b/tst/EnergyPlus/unit/OutdoorAirUnit.unit.cc index a34948f8b45..53db78d3abf 100644 --- a/tst/EnergyPlus/unit/OutdoorAirUnit.unit.cc +++ b/tst/EnergyPlus/unit/OutdoorAirUnit.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/OutputFiles.unit.cc b/tst/EnergyPlus/unit/OutputFiles.unit.cc index 94f6df42088..6d04767db4b 100644 --- a/tst/EnergyPlus/unit/OutputFiles.unit.cc +++ b/tst/EnergyPlus/unit/OutputFiles.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/OutputProcessor.unit.cc b/tst/EnergyPlus/unit/OutputProcessor.unit.cc index 94fe22c3634..dbcd5b61df5 100644 --- a/tst/EnergyPlus/unit/OutputProcessor.unit.cc +++ b/tst/EnergyPlus/unit/OutputProcessor.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -78,81 +78,67 @@ namespace OutputProcessor { TEST_F(SQLiteFixture, OutputProcessor_TestGetMeteredVariables) { - int constexpr NumVariables = 2; - Array1D_int VarIndexes(NumVariables); // Variable Numbers - Array1D VarTypes(NumVariables); // Variable Types (1=integer, 2=real, 3=meter) - Array1D IndexTypes(NumVariables); // Variable Index Types (1=Zone,2=HVAC) - Array1D unitsForVar(NumVariables); // units from enum for each variable - Array1D ResourceTypes(NumVariables); // ResourceTypes for each variable - Array1D_string EndUses(NumVariables); // EndUses for each variable - Array1D_string Groups(NumVariables); // Groups for each variable - Array1D_string Names(NumVariables); // Variable Names for each variable - Reference RVar; - + auto &op = state->dataOutputProcessor; std::string TypeOfComp = "ZONEHVAC:TERMINALUNIT:VARIABLEREFRIGERANTFLOW"; std::string NameOfComp = "FC-5-1B"; - int NumFound; - - GetMeteredVariables( - *state, TypeOfComp, NameOfComp, VarIndexes, VarTypes, IndexTypes, unitsForVar, ResourceTypes, EndUses, Groups, Names, NumFound); + int NumFound = GetNumMeteredVariables(*state, TypeOfComp, NameOfComp); EXPECT_EQ(0, NumFound); - state->dataOutputProcessor->NumOfRVariable = 2; - state->dataOutputProcessor->RVariableTypes.allocate(state->dataOutputProcessor->NumOfRVariable); NameOfComp = "OUTSIDELIGHTS"; - RVar.allocate(); - RVar().MeterArrayPtr = 1; - state->dataOutputProcessor->RVariableTypes(1).KeyNameOnlyUC = NameOfComp; - state->dataOutputProcessor->RVariableTypes(1).VarPtr = RVar; - state->dataOutputProcessor->VarMeterArrays.allocate(1); + OutVarReal *realVar = new OutVarReal(); + realVar->keyUC = NameOfComp; + op->outVars.push_back(realVar); - state->dataOutputProcessor->VarMeterArrays(1).NumOnMeters = 1; - state->dataOutputProcessor->VarMeterArrays(1).OnMeters(1) = 1; + Meter *meter = new Meter("NewMeter"); + meter->resource = Constant::eResource::Electricity; + op->meters.push_back(meter); - state->dataOutputProcessor->EnergyMeters.allocate(10); - state->dataOutputProcessor->EnergyMeters(1).ResourceType = NameOfComp; + meter->srcVarNums.push_back(op->outVars.size() - 1); + realVar->meterNums.push_back(op->meters.size() - 1); - GetMeteredVariables( - *state, TypeOfComp, NameOfComp, VarIndexes, VarTypes, IndexTypes, unitsForVar, ResourceTypes, EndUses, Groups, Names, NumFound); + NumFound = GetNumMeteredVariables(*state, TypeOfComp, NameOfComp); EXPECT_EQ(1, NumFound); } TEST_F(SQLiteFixture, OutputProcessor_reportTSMeters_PrintESOTimeStamp) { - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 1, 1, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", 1, "C", 1, false); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 2, 2, "Facility:Electricity", "", "Facility:Electricity", 1, "J", 1, true); - - state->dataOutputProcessor->NumEnergyMeters = 2; - state->dataOutputProcessor->EnergyMeters.allocate(state->dataOutputProcessor->NumEnergyMeters); - state->dataOutputProcessor->EnergyMeters(1).CurTSValue = 999.9; - state->dataOutputProcessor->EnergyMeters(1).TSValue = 999.9; - state->dataOutputProcessor->EnergyMeters(1).RptTS = true; - state->dataOutputProcessor->EnergyMeters(1).RptAccTS = false; - state->dataOutputProcessor->EnergyMeters(1).RptTSFO = false; - state->dataOutputProcessor->EnergyMeters(1).RptAccTSFO = false; - state->dataOutputProcessor->EnergyMeters(1).TSRptNum = 1; - state->dataOutputProcessor->EnergyMeters(1).TSRptNumChr = "1"; - state->dataOutputProcessor->EnergyMeters(1).TSAccRptNum = 1; - state->dataOutputProcessor->EnergyMeters(1).SMValue = 999.9; - - state->dataOutputProcessor->EnergyMeters(2).CurTSValue = 9999.9; - state->dataOutputProcessor->EnergyMeters(2).TSValue = 9999.9; - state->dataOutputProcessor->EnergyMeters(2).RptTS = true; - state->dataOutputProcessor->EnergyMeters(2).RptAccTS = false; - state->dataOutputProcessor->EnergyMeters(2).RptTSFO = false; - state->dataOutputProcessor->EnergyMeters(2).RptAccTSFO = false; - state->dataOutputProcessor->EnergyMeters(2).TSRptNum = 2; - state->dataOutputProcessor->EnergyMeters(2).TSRptNumChr = "2"; - state->dataOutputProcessor->EnergyMeters(2).TSAccRptNum = 2; - state->dataOutputProcessor->EnergyMeters(2).SMValue = 9999.9; - - state->dataOutputProcessor->TimeStepStampReportNbr = 1; - state->dataOutputProcessor->TimeStepStampReportChr = "1"; + auto &op = state->dataOutputProcessor; + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->createSQLiteReportDictionaryRecord( + 1, StoreType::Averaged, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", TimeStepType::Zone, "C", ReportFreq::Hour, false); + sql->createSQLiteReportDictionaryRecord( + 2, StoreType::Summed, "Facility:Electricity", "", "Facility:Electricity", TimeStepType::Zone, "J", ReportFreq::Hour, true); + + Meter *meter1 = new Meter("Meter1"); + op->meters.push_back(meter1); + auto &period1TS = meter1->periods[(int)ReportFreq::TimeStep]; + meter1->CurTSValue = 999.99; + period1TS.Value = 999.9; + period1TS.Rpt = true; + period1TS.accRpt = false; + period1TS.RptFO = false; + period1TS.accRptFO = false; + period1TS.RptNum = 1; + period1TS.accRptNum = 1; + meter1->periods[(int)ReportFreq::Simulation].Value = 999.9; + + Meter *meter2 = new Meter("Meter2"); + op->meters.push_back(meter2); + auto &period2TS = meter2->periods[(int)ReportFreq::TimeStep]; + meter2->CurTSValue = 9999.99; + period2TS.Value = 9999.9; + period2TS.Rpt = true; + period2TS.accRpt = false; + period2TS.RptFO = false; + period2TS.accRptFO = false; + period2TS.RptNum = 2; + period2TS.accRptNum = 2; + meter2->periods[(int)ReportFreq::Simulation].Value = 9999.9; + + op->freqStampReportNums[(int)ReportFreq::TimeStep] = 1; state->dataGlobal->DayOfSim = 1; state->dataGlobal->DayOfSimChr = "1"; state->dataGlobal->HourOfDay = 1; @@ -189,37 +175,40 @@ namespace OutputProcessor { TEST_F(SQLiteFixture, OutputProcessor_reportTSMeters) { - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 1, 1, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", 1, "C", 1, false); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 2, 2, "Facility:Electricity", "", "Facility:Electricity", 1, "J", 1, true); - - state->dataOutputProcessor->NumEnergyMeters = 2; - state->dataOutputProcessor->EnergyMeters.allocate(state->dataOutputProcessor->NumEnergyMeters); - state->dataOutputProcessor->EnergyMeters(1).CurTSValue = 999.9; - state->dataOutputProcessor->EnergyMeters(1).TSValue = 999.9; - state->dataOutputProcessor->EnergyMeters(1).RptTS = true; - state->dataOutputProcessor->EnergyMeters(1).RptAccTS = false; - state->dataOutputProcessor->EnergyMeters(1).RptTSFO = false; - state->dataOutputProcessor->EnergyMeters(1).RptAccTSFO = false; - state->dataOutputProcessor->EnergyMeters(1).TSRptNum = 1; - state->dataOutputProcessor->EnergyMeters(1).TSRptNumChr = "1"; - state->dataOutputProcessor->EnergyMeters(1).TSAccRptNum = 1; - state->dataOutputProcessor->EnergyMeters(1).SMValue = 999.9; - - state->dataOutputProcessor->EnergyMeters(2).CurTSValue = 9999.9; - state->dataOutputProcessor->EnergyMeters(2).TSValue = 9999.9; - state->dataOutputProcessor->EnergyMeters(2).RptTS = true; - state->dataOutputProcessor->EnergyMeters(2).RptAccTS = false; - state->dataOutputProcessor->EnergyMeters(2).RptTSFO = false; - state->dataOutputProcessor->EnergyMeters(2).RptAccTSFO = false; - state->dataOutputProcessor->EnergyMeters(2).TSRptNum = 2; - state->dataOutputProcessor->EnergyMeters(2).TSRptNumChr = "2"; - state->dataOutputProcessor->EnergyMeters(2).TSAccRptNum = 2; - state->dataOutputProcessor->EnergyMeters(2).SMValue = 9999.9; - - state->dataOutputProcessor->TimeStepStampReportNbr = 1; - state->dataOutputProcessor->TimeStepStampReportChr = "1"; + auto &op = state->dataOutputProcessor; + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->createSQLiteReportDictionaryRecord( + 1, StoreType::Averaged, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", TimeStepType::Zone, "C", ReportFreq::Hour, false); + sql->createSQLiteReportDictionaryRecord( + 2, StoreType::Summed, "Facility:Electricity", "", "Facility:Electricity", TimeStepType::Zone, "J", ReportFreq::Hour, true); + + Meter *meter1 = new Meter("Meter1"); + op->meters.push_back(meter1); + auto &period1TS = meter1->periods[(int)ReportFreq::TimeStep]; + meter1->CurTSValue = 999.99; + period1TS.Value = 999.9; + period1TS.Rpt = true; + period1TS.accRpt = false; + period1TS.RptFO = false; + period1TS.accRptFO = false; + period1TS.RptNum = 1; + period1TS.accRptNum = 1; + meter1->periods[(int)ReportFreq::Simulation].Value = 999.9; + + Meter *meter2 = new Meter("Meter2"); + op->meters.push_back(meter2); + auto &period2TS = meter2->periods[(int)ReportFreq::TimeStep]; + meter2->CurTSValue = 9999.99; + period2TS.Value = 9999.9; + period2TS.Rpt = true; + period2TS.accRpt = false; + period2TS.RptFO = false; + period2TS.accRptFO = false; + period2TS.RptNum = 2; + period2TS.accRptNum = 2; + meter2->periods[(int)ReportFreq::Simulation].Value = 9999.9; + + op->freqStampReportNums[(int)ReportFreq::TimeStep] = 1; state->dataGlobal->DayOfSim = 1; state->dataGlobal->DayOfSimChr = "1"; state->dataGlobal->HourOfDay = 1; @@ -256,35 +245,40 @@ namespace OutputProcessor { TEST_F(SQLiteFixture, OutputProcessor_reportHRMeters) { - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 1, 1, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", 1, "C", 1, false); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 2, 2, "Facility:Electricity", "", "Facility:Electricity", 1, "J", 1, true); - - state->dataOutputProcessor->NumEnergyMeters = 2; - state->dataOutputProcessor->EnergyMeters.allocate(state->dataOutputProcessor->NumEnergyMeters); - state->dataOutputProcessor->EnergyMeters(1).RptHR = true; - state->dataOutputProcessor->EnergyMeters(1).RptHRFO = true; - state->dataOutputProcessor->EnergyMeters(1).RptAccHR = false; - state->dataOutputProcessor->EnergyMeters(1).RptAccHRFO = false; - state->dataOutputProcessor->EnergyMeters(1).HRRptNum = 1; - state->dataOutputProcessor->EnergyMeters(1).HRRptNumChr = "1"; - state->dataOutputProcessor->EnergyMeters(1).HRValue = 999.9; - state->dataOutputProcessor->EnergyMeters(1).HRAccRptNum = 1; - state->dataOutputProcessor->EnergyMeters(1).SMValue = 999.9; - - state->dataOutputProcessor->EnergyMeters(2).RptHR = true; - state->dataOutputProcessor->EnergyMeters(2).RptHRFO = true; - state->dataOutputProcessor->EnergyMeters(2).RptAccHR = false; - state->dataOutputProcessor->EnergyMeters(2).RptAccHRFO = false; - state->dataOutputProcessor->EnergyMeters(2).HRRptNum = 2; - state->dataOutputProcessor->EnergyMeters(2).HRRptNumChr = "2"; - state->dataOutputProcessor->EnergyMeters(2).HRValue = 9999.9; - state->dataOutputProcessor->EnergyMeters(2).HRAccRptNum = 2; - state->dataOutputProcessor->EnergyMeters(2).SMValue = 9999.9; - - state->dataOutputProcessor->TimeStepStampReportNbr = 1; - state->dataOutputProcessor->TimeStepStampReportChr = "1"; + auto &op = state->dataOutputProcessor; + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->createSQLiteReportDictionaryRecord( + 1, StoreType::Averaged, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", TimeStepType::Zone, "C", ReportFreq::Hour, false); + sql->createSQLiteReportDictionaryRecord( + 2, StoreType::Summed, "Facility:Electricity", "", "Facility:Electricity", TimeStepType::Zone, "J", ReportFreq::Hour, true); + + Meter *meter1 = new Meter("Meter1"); + op->meters.push_back(meter1); + auto &period1HR = meter1->periods[(int)ReportFreq::Hour]; + meter1->CurTSValue = 999.99; + period1HR.Value = 999.9; + period1HR.Rpt = true; + period1HR.accRpt = false; + period1HR.RptFO = true; + period1HR.accRptFO = false; + period1HR.RptNum = 1; + period1HR.accRptNum = 1; + meter1->periods[(int)ReportFreq::Simulation].Value = 999.9; + + Meter *meter2 = new Meter("Meter2"); + op->meters.push_back(meter2); + auto &period2HR = meter2->periods[(int)ReportFreq::Hour]; + meter2->CurTSValue = 9999.99; + period2HR.Value = 9999.9; + period2HR.Rpt = true; + period2HR.accRpt = false; + period2HR.RptFO = true; + period2HR.accRptFO = false; + period2HR.RptNum = 2; + period2HR.accRptNum = 2; + meter2->periods[(int)ReportFreq::Simulation].Value = 9999.9; + + op->freqStampReportNums[(int)ReportFreq::Hour] = op->freqStampReportNums[(int)ReportFreq::TimeStep] = 1; state->dataGlobal->DayOfSim = 1; state->dataGlobal->DayOfSimChr = "1"; state->dataGlobal->HourOfDay = 1; @@ -294,7 +288,7 @@ namespace OutputProcessor { state->dataEnvrn->DayOfWeek = 2; state->dataEnvrn->HolidayIndex = 3 + 7; // Holiday index is now based on the full set of dayTypeNames - ReportHRMeters(*state, true); + ReportMeters(*state, ReportFreq::Hour, true); auto result = queryResult("SELECT * FROM Time;", "Time"); @@ -317,43 +311,48 @@ namespace OutputProcessor { TEST_F(SQLiteFixture, OutputProcessor_reportDYMeters) { - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 1, 1, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", 1, "C", 1, false); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 2, 2, "Facility:Electricity", "", "Facility:Electricity", 1, "J", 1, true); - - state->dataOutputProcessor->NumEnergyMeters = 2; - state->dataOutputProcessor->EnergyMeters.allocate(state->dataOutputProcessor->NumEnergyMeters); - state->dataOutputProcessor->EnergyMeters(1).RptDY = true; - state->dataOutputProcessor->EnergyMeters(1).RptDYFO = true; - state->dataOutputProcessor->EnergyMeters(1).RptAccDY = false; - state->dataOutputProcessor->EnergyMeters(1).RptAccDYFO = false; - state->dataOutputProcessor->EnergyMeters(1).DYRptNum = 1; - state->dataOutputProcessor->EnergyMeters(1).DYRptNumChr = "1"; - state->dataOutputProcessor->EnergyMeters(1).DYValue = 999.9; - state->dataOutputProcessor->EnergyMeters(1).DYAccRptNum = 1; - state->dataOutputProcessor->EnergyMeters(1).SMValue = 999.9; - state->dataOutputProcessor->EnergyMeters(1).DYMaxVal = 4283136.2524843821; - state->dataOutputProcessor->EnergyMeters(1).DYMaxValDate = 12210160; - state->dataOutputProcessor->EnergyMeters(1).DYMinVal = 4283136.2516839253; - state->dataOutputProcessor->EnergyMeters(1).DYMinValDate = 12210110; - - state->dataOutputProcessor->EnergyMeters(2).RptDY = true; - state->dataOutputProcessor->EnergyMeters(2).RptDYFO = true; - state->dataOutputProcessor->EnergyMeters(2).RptAccDY = false; - state->dataOutputProcessor->EnergyMeters(2).RptAccDYFO = false; - state->dataOutputProcessor->EnergyMeters(2).DYRptNum = 2; - state->dataOutputProcessor->EnergyMeters(2).DYRptNumChr = "2"; - state->dataOutputProcessor->EnergyMeters(2).DYValue = 9999.9; - state->dataOutputProcessor->EnergyMeters(2).DYAccRptNum = 2; - state->dataOutputProcessor->EnergyMeters(2).SMValue = 9999.9; - state->dataOutputProcessor->EnergyMeters(2).DYMaxVal = 4283136.2524843821; - state->dataOutputProcessor->EnergyMeters(2).DYMaxValDate = 12210160; - state->dataOutputProcessor->EnergyMeters(2).DYMinVal = 4283136.2516839253; - state->dataOutputProcessor->EnergyMeters(2).DYMinValDate = 12210110; - - state->dataOutputProcessor->DailyStampReportNbr = 1; - state->dataOutputProcessor->DailyStampReportChr = "1"; + auto &op = state->dataOutputProcessor; + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->createSQLiteReportDictionaryRecord( + 1, StoreType::Averaged, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", TimeStepType::Zone, "C", ReportFreq::Hour, false); + sql->createSQLiteReportDictionaryRecord( + 2, StoreType::Summed, "Facility:Electricity", "", "Facility:Electricity", TimeStepType::Zone, "J", ReportFreq::Hour, true); + + Meter *meter1 = new Meter("Meter1"); + op->meters.push_back(meter1); + auto &period1DY = meter1->periods[(int)ReportFreq::Day]; + meter1->CurTSValue = 999.99; + period1DY.Value = 999.9; + period1DY.Rpt = true; + period1DY.accRpt = false; + period1DY.RptFO = true; + period1DY.accRptFO = false; + period1DY.RptNum = 1; + period1DY.accRptNum = 1; + meter1->periods[(int)ReportFreq::Simulation].Value = 999.9; + period1DY.MaxVal = 4283136.2524843821; + period1DY.MaxValDate = 12210160; + period1DY.MinVal = 4283136.2516839253; + period1DY.MinValDate = 12210110; + + Meter *meter2 = new Meter("Meter2"); + op->meters.push_back(meter2); + auto &period2DY = meter2->periods[(int)ReportFreq::Day]; + meter2->CurTSValue = 9999.99; + period2DY.Value = 9999.9; + period2DY.Rpt = true; + period2DY.accRpt = false; + period2DY.RptFO = true; + period2DY.accRptFO = false; + period2DY.RptNum = 2; + period2DY.accRptNum = 2; + meter2->periods[(int)ReportFreq::Simulation].Value = 9999.9; + period2DY.MaxVal = 4283136.2524843821; + period2DY.MaxValDate = 12210160; + period2DY.MinVal = 4283136.2516839253; + period2DY.MinValDate = 12210110; + + op->freqStampReportNums[(int)ReportFreq::Day] = 1; state->dataGlobal->DayOfSim = 1; state->dataGlobal->DayOfSimChr = "1"; state->dataGlobal->HourOfDay = 1; @@ -363,7 +362,7 @@ namespace OutputProcessor { state->dataEnvrn->DayOfWeek = 2; state->dataEnvrn->HolidayIndex = 3 + 7; // Holiday index is now based on the full set of dayTypeNames - ReportDYMeters(*state, true); + ReportMeters(*state, ReportFreq::Day, true); auto result = queryResult("SELECT * FROM Time;", "Time"); @@ -391,43 +390,48 @@ namespace OutputProcessor { TEST_F(SQLiteFixture, OutputProcessor_reportMNMeters) { - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 1, 1, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", 1, "C", 1, false); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 2, 2, "Facility:Electricity", "", "Facility:Electricity", 1, "J", 1, true); - - state->dataOutputProcessor->NumEnergyMeters = 2; - state->dataOutputProcessor->EnergyMeters.allocate(state->dataOutputProcessor->NumEnergyMeters); - state->dataOutputProcessor->EnergyMeters(1).RptMN = true; - state->dataOutputProcessor->EnergyMeters(1).RptMNFO = true; - state->dataOutputProcessor->EnergyMeters(1).RptAccMN = false; - state->dataOutputProcessor->EnergyMeters(1).RptAccMNFO = false; - state->dataOutputProcessor->EnergyMeters(1).MNRptNum = 1; - state->dataOutputProcessor->EnergyMeters(1).MNRptNumChr = "1"; - state->dataOutputProcessor->EnergyMeters(1).MNValue = 999.9; - state->dataOutputProcessor->EnergyMeters(1).MNAccRptNum = 1; - state->dataOutputProcessor->EnergyMeters(1).SMValue = 999.9; - state->dataOutputProcessor->EnergyMeters(1).MNMaxVal = 4283136.2524843821; - state->dataOutputProcessor->EnergyMeters(1).MNMaxValDate = 12210160; - state->dataOutputProcessor->EnergyMeters(1).MNMinVal = 4283136.2516839253; - state->dataOutputProcessor->EnergyMeters(1).MNMinValDate = 12210110; - - state->dataOutputProcessor->EnergyMeters(2).RptMN = true; - state->dataOutputProcessor->EnergyMeters(2).RptMNFO = true; - state->dataOutputProcessor->EnergyMeters(2).RptAccMN = false; - state->dataOutputProcessor->EnergyMeters(2).RptAccMNFO = false; - state->dataOutputProcessor->EnergyMeters(2).MNRptNum = 2; - state->dataOutputProcessor->EnergyMeters(2).MNRptNumChr = "2"; - state->dataOutputProcessor->EnergyMeters(2).MNValue = 9999.9; - state->dataOutputProcessor->EnergyMeters(2).MNAccRptNum = 2; - state->dataOutputProcessor->EnergyMeters(2).SMValue = 9999.9; - state->dataOutputProcessor->EnergyMeters(2).MNMaxVal = 4283136.2524843821; - state->dataOutputProcessor->EnergyMeters(2).MNMaxValDate = 12210160; - state->dataOutputProcessor->EnergyMeters(2).MNMinVal = 4283136.2516839253; - state->dataOutputProcessor->EnergyMeters(2).MNMinValDate = 12210110; - - state->dataOutputProcessor->MonthlyStampReportNbr = 1; - state->dataOutputProcessor->MonthlyStampReportChr = "1"; + auto &op = state->dataOutputProcessor; + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->createSQLiteReportDictionaryRecord( + 1, StoreType::Averaged, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", TimeStepType::Zone, "C", ReportFreq::Hour, false); + sql->createSQLiteReportDictionaryRecord( + 2, StoreType::Summed, "Facility:Electricity", "", "Facility:Electricity", TimeStepType::Zone, "J", ReportFreq::Hour, true); + + Meter *meter1 = new Meter("Meter1"); + op->meters.push_back(meter1); + auto &period1MN = meter1->periods[(int)ReportFreq::Month]; + meter1->CurTSValue = 999.99; + period1MN.Value = 999.9; + period1MN.Rpt = true; + period1MN.accRpt = false; + period1MN.RptFO = true; + period1MN.accRptFO = false; + period1MN.RptNum = 1; + period1MN.accRptNum = 1; + meter1->periods[(int)ReportFreq::Simulation].Value = 999.9; + period1MN.MaxVal = 4283136.2524843821; + period1MN.MaxValDate = 12210160; + period1MN.MinVal = 4283136.2516839253; + period1MN.MinValDate = 12210110; + + Meter *meter2 = new Meter("Meter2"); + op->meters.push_back(meter2); + auto &period2MN = meter2->periods[(int)ReportFreq::Month]; + meter2->CurTSValue = 9999.99; + period2MN.Value = 9999.9; + period2MN.Rpt = true; + period2MN.accRpt = false; + period2MN.RptFO = true; + period2MN.accRptFO = false; + period2MN.RptNum = 2; + period2MN.accRptNum = 2; + meter2->periods[(int)ReportFreq::Simulation].Value = 9999.9; + period2MN.MaxVal = 4283136.2524843821; + period2MN.MaxValDate = 12210160; + period2MN.MinVal = 4283136.2516839253; + period2MN.MinValDate = 12210110; + + op->freqStampReportNums[(int)ReportFreq::Month] = 1; state->dataGlobal->DayOfSim = 1; state->dataGlobal->DayOfSimChr = "1"; state->dataGlobal->HourOfDay = 1; @@ -437,7 +441,7 @@ namespace OutputProcessor { state->dataEnvrn->DayOfWeek = 2; state->dataEnvrn->HolidayIndex = 3 + 7; // Holiday index is now based on the full set of dayTypeNames - ReportMNMeters(*state, true); + ReportMeters(*state, ReportFreq::Month, true); auto result = queryResult("SELECT * FROM Time;", "Time"); @@ -465,43 +469,48 @@ namespace OutputProcessor { TEST_F(SQLiteFixture, OutputProcessor_reportSMMeters) { - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 1, 1, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", 1, "C", 1, false); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 2, 2, "Facility:Electricity", "", "Facility:Electricity", 1, "J", 1, true); - - state->dataOutputProcessor->NumEnergyMeters = 2; - state->dataOutputProcessor->EnergyMeters.allocate(state->dataOutputProcessor->NumEnergyMeters); - state->dataOutputProcessor->EnergyMeters(1).RptSM = true; - state->dataOutputProcessor->EnergyMeters(1).RptSMFO = true; - state->dataOutputProcessor->EnergyMeters(1).RptAccSM = false; - state->dataOutputProcessor->EnergyMeters(1).RptAccSMFO = false; - state->dataOutputProcessor->EnergyMeters(1).SMRptNum = 1; - state->dataOutputProcessor->EnergyMeters(1).SMRptNumChr = "1"; - state->dataOutputProcessor->EnergyMeters(1).SMValue = 999.9; - state->dataOutputProcessor->EnergyMeters(1).SMAccRptNum = 1; - state->dataOutputProcessor->EnergyMeters(1).SMValue = 999.9; - state->dataOutputProcessor->EnergyMeters(1).SMMaxVal = 4283136.2524843821; - state->dataOutputProcessor->EnergyMeters(1).SMMaxValDate = 12210160; - state->dataOutputProcessor->EnergyMeters(1).SMMinVal = 4283136.2516839253; - state->dataOutputProcessor->EnergyMeters(1).SMMinValDate = 12210110; - - state->dataOutputProcessor->EnergyMeters(2).RptSM = true; - state->dataOutputProcessor->EnergyMeters(2).RptSMFO = true; - state->dataOutputProcessor->EnergyMeters(2).RptAccSM = false; - state->dataOutputProcessor->EnergyMeters(2).RptAccSMFO = false; - state->dataOutputProcessor->EnergyMeters(2).SMRptNum = 2; - state->dataOutputProcessor->EnergyMeters(2).SMRptNumChr = "2"; - state->dataOutputProcessor->EnergyMeters(2).SMValue = 9999.9; - state->dataOutputProcessor->EnergyMeters(2).SMAccRptNum = 2; - state->dataOutputProcessor->EnergyMeters(2).SMValue = 9999.9; - state->dataOutputProcessor->EnergyMeters(2).SMMaxVal = 4283136.2524843821; - state->dataOutputProcessor->EnergyMeters(2).SMMaxValDate = 12210160; - state->dataOutputProcessor->EnergyMeters(2).SMMinVal = 4283136.2516839253; - state->dataOutputProcessor->EnergyMeters(2).SMMinValDate = 12210110; - - state->dataOutputProcessor->RunPeriodStampReportNbr = 1; - state->dataOutputProcessor->RunPeriodStampReportChr = "1"; + auto &op = state->dataOutputProcessor; + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->createSQLiteReportDictionaryRecord( + 1, StoreType::Averaged, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", TimeStepType::Zone, "C", ReportFreq::Hour, false); + sql->createSQLiteReportDictionaryRecord( + 2, StoreType::Summed, "Facility:Electricity", "", "Facility:Electricity", TimeStepType::Zone, "J", ReportFreq::Hour, true); + + Meter *meter1 = new Meter("Meter1"); + op->meters.push_back(meter1); + auto &period1SM = meter1->periods[(int)ReportFreq::Simulation]; + meter1->CurTSValue = 999.99; + period1SM.Value = 999.9; + period1SM.Rpt = true; + period1SM.accRpt = false; + period1SM.RptFO = true; + period1SM.accRptFO = false; + period1SM.RptNum = 1; + period1SM.accRptNum = 1; + meter1->periods[(int)ReportFreq::Simulation].Value = 999.9; + period1SM.MaxVal = 4283136.2524843821; + period1SM.MaxValDate = 12210160; + period1SM.MinVal = 4283136.2516839253; + period1SM.MinValDate = 12210110; + + Meter *meter2 = new Meter("Meter2"); + op->meters.push_back(meter2); + auto &period2SM = meter2->periods[(int)ReportFreq::Simulation]; + meter2->CurTSValue = 9999.99; + period2SM.Value = 9999.9; + period2SM.Rpt = true; + period2SM.accRpt = false; + period2SM.RptFO = true; + period2SM.accRptFO = false; + period2SM.RptNum = 2; + period2SM.accRptNum = 2; + meter2->periods[(int)ReportFreq::Simulation].Value = 9999.9; + period2SM.MaxVal = 4283136.2524843821; + period2SM.MaxValDate = 12210160; + period2SM.MinVal = 4283136.2516839253; + period2SM.MinValDate = 12210110; + + op->freqStampReportNums[(int)ReportFreq::Simulation] = 1; state->dataGlobal->DayOfSim = 1; state->dataGlobal->DayOfSimChr = "1"; state->dataGlobal->HourOfDay = 1; @@ -511,7 +520,7 @@ namespace OutputProcessor { state->dataEnvrn->DayOfWeek = 2; state->dataEnvrn->HolidayIndex = 3 + 7; // Holiday index is now based on the full set of dayTypeNames - ReportSMMeters(*state, true); + ReportMeters(*state, ReportFreq::Simulation, true); auto result = queryResult("SELECT * FROM Time;", "Time"); @@ -539,43 +548,48 @@ namespace OutputProcessor { TEST_F(SQLiteFixture, OutputProcessor_reportYRMeters) { - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 1, 1, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", 1, "C", 1, false); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 2, 2, "Facility:Electricity", "", "Facility:Electricity", 1, "J", 1, true); - - state->dataOutputProcessor->NumEnergyMeters = 2; - state->dataOutputProcessor->EnergyMeters.allocate(state->dataOutputProcessor->NumEnergyMeters); - state->dataOutputProcessor->EnergyMeters(1).RptYR = true; - state->dataOutputProcessor->EnergyMeters(1).RptYRFO = true; - state->dataOutputProcessor->EnergyMeters(1).RptAccYR = false; - state->dataOutputProcessor->EnergyMeters(1).RptAccYRFO = false; - state->dataOutputProcessor->EnergyMeters(1).YRRptNum = 1; - state->dataOutputProcessor->EnergyMeters(1).YRRptNumChr = "1"; - state->dataOutputProcessor->EnergyMeters(1).YRValue = 999.9; - state->dataOutputProcessor->EnergyMeters(1).YRAccRptNum = 1; - state->dataOutputProcessor->EnergyMeters(1).YRValue = 999.9; - state->dataOutputProcessor->EnergyMeters(1).YRMaxVal = 4283136.2524843821; - state->dataOutputProcessor->EnergyMeters(1).YRMaxValDate = 12210160; - state->dataOutputProcessor->EnergyMeters(1).YRMinVal = 4283136.2516839253; - state->dataOutputProcessor->EnergyMeters(1).YRMinValDate = 12210110; - - state->dataOutputProcessor->EnergyMeters(2).RptYR = true; - state->dataOutputProcessor->EnergyMeters(2).RptYRFO = true; - state->dataOutputProcessor->EnergyMeters(2).RptAccYR = false; - state->dataOutputProcessor->EnergyMeters(2).RptAccYRFO = false; - state->dataOutputProcessor->EnergyMeters(2).YRRptNum = 2; - state->dataOutputProcessor->EnergyMeters(2).YRRptNumChr = "2"; - state->dataOutputProcessor->EnergyMeters(2).YRValue = 9999.9; - state->dataOutputProcessor->EnergyMeters(2).YRAccRptNum = 2; - state->dataOutputProcessor->EnergyMeters(2).YRValue = 9999.9; - state->dataOutputProcessor->EnergyMeters(2).YRMaxVal = 4283136.2524843821; - state->dataOutputProcessor->EnergyMeters(2).YRMaxValDate = 12210160; - state->dataOutputProcessor->EnergyMeters(2).YRMinVal = 4283136.2516839253; - state->dataOutputProcessor->EnergyMeters(2).YRMinValDate = 12210110; - - state->dataOutputProcessor->YearlyStampReportNbr = 1; - state->dataOutputProcessor->YearlyStampReportChr = "1"; + auto &op = state->dataOutputProcessor; + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->createSQLiteReportDictionaryRecord( + 1, StoreType::Averaged, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", TimeStepType::Zone, "C", ReportFreq::Hour, false); + sql->createSQLiteReportDictionaryRecord( + 2, StoreType::Summed, "Facility:Electricity", "", "Facility:Electricity", TimeStepType::Zone, "J", ReportFreq::Hour, true); + + Meter *meter1 = new Meter("Meter1"); + op->meters.push_back(meter1); + auto &period1YR = meter1->periods[(int)ReportFreq::Year]; + meter1->CurTSValue = 999.99; + period1YR.Value = 999.9; + period1YR.Rpt = true; + period1YR.accRpt = false; + period1YR.RptFO = true; + period1YR.accRptFO = false; + period1YR.RptNum = 1; + period1YR.accRptNum = 1; + meter1->periods[(int)ReportFreq::Simulation].Value = 999.9; + period1YR.MaxVal = 4283136.2524843821; + period1YR.MaxValDate = 12210160; + period1YR.MinVal = 4283136.2516839253; + period1YR.MinValDate = 12210110; + + Meter *meter2 = new Meter("Meter2"); + op->meters.push_back(meter2); + auto &period2YR = meter2->periods[(int)ReportFreq::Year]; + meter2->CurTSValue = 9999.99; + period2YR.Value = 9999.9; + period2YR.Rpt = true; + period2YR.accRpt = false; + period2YR.RptFO = true; + period2YR.accRptFO = false; + period2YR.RptNum = 2; + period2YR.accRptNum = 2; + meter2->periods[(int)ReportFreq::Simulation].Value = 9999.9; + period2YR.MaxVal = 4283136.2524843821; + period2YR.MaxValDate = 12210160; + period2YR.MinVal = 4283136.2516839253; + period2YR.MinValDate = 12210110; + + op->freqStampReportNums[(int)ReportFreq::Year] = 1; state->dataGlobal->DayOfSim = 1; state->dataGlobal->DayOfSimChr = "1"; state->dataGlobal->HourOfDay = 1; @@ -587,7 +601,7 @@ namespace OutputProcessor { state->dataEnvrn->DayOfWeek = 2; state->dataEnvrn->HolidayIndex = 3 + 7; // Holiday index is now based on the full set of dayTypeNames - OutputProcessor::ReportYRMeters(*state, true); + ReportMeters(*state, ReportFreq::Year, true); auto result = queryResult("SELECT * FROM Time;", "Time"); @@ -615,17 +629,12 @@ namespace OutputProcessor { TEST_F(SQLiteFixture, OutputProcessor_writeTimeStampFormatData) { - state->dataOutputProcessor->TimeStepStampReportNbr = 1; - state->dataOutputProcessor->TimeStepStampReportChr = "1"; - - int DailyStampReportNbr = 1; - std::string DailyStampReportChr = "1"; - - int MonthlyStampReportNbr = 1; - std::string MonthlyStampReportChr = "1"; + auto &op = state->dataOutputProcessor; + op->freqStampReportNums[(int)ReportFreq::TimeStep] = 1; - int RunPeriodStampReportNbr = 1; - std::string RunPeriodStampReportChr = "1"; + int DailyStampReportNum = 1; + int MonthlyStampReportNum = 1; + int RunPeriodStampReportNum = 1; state->dataGlobal->DayOfSim = 1; std::string DayOfSimChr = "1"; @@ -641,9 +650,8 @@ namespace OutputProcessor { // TSMeter WriteTimeStampFormatData(*state, state->files.mtr, - ReportingFrequency::TimeStep, - state->dataOutputProcessor->TimeStepStampReportNbr, - state->dataOutputProcessor->TimeStepStampReportChr, + ReportFreq::TimeStep, + op->freqStampReportNums[(int)ReportFreq::TimeStep], DayOfSimChr, PrintTimeStamp, Month, @@ -658,9 +666,8 @@ namespace OutputProcessor { // TSMeter WriteTimeStampFormatData(*state, state->files.mtr, - ReportingFrequency::EachCall, - state->dataOutputProcessor->TimeStepStampReportNbr, - state->dataOutputProcessor->TimeStepStampReportChr, + ReportFreq::EachCall, + op->freqStampReportNums[(int)ReportFreq::TimeStep], DayOfSimChr, PrintTimeStamp, Month, @@ -675,16 +682,15 @@ namespace OutputProcessor { // HRMeter WriteTimeStampFormatData(*state, state->files.mtr, - ReportingFrequency::Hourly, - state->dataOutputProcessor->TimeStepStampReportNbr, - state->dataOutputProcessor->TimeStepStampReportChr, + ReportFreq::Hour, + op->freqStampReportNums[(int)ReportFreq::TimeStep], DayOfSimChr, PrintTimeStamp, Month, DayOfMonth, state->dataGlobal->HourOfDay, - _, - _, + -1, // EndMinute + -1, // StartMinute DSTIndicator, ScheduleManager::dayTypeNames[CurDayType]); EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,1,12,21, 0, 1, 0.00,60.00,WinterDesignDay"}, "\n"))); @@ -692,16 +698,15 @@ namespace OutputProcessor { // DYMeter WriteTimeStampFormatData(*state, state->files.mtr, - ReportingFrequency::Daily, - DailyStampReportNbr, - DailyStampReportChr, + ReportFreq::Day, + DailyStampReportNum, DayOfSimChr, PrintTimeStamp, Month, DayOfMonth, - _, - _, - _, + -1, // Hour + -1, // EndMinute + -1, // StartMinute DSTIndicator, ScheduleManager::dayTypeNames[CurDayType]); EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,1,12,21, 0,WinterDesignDay"}, "\n"))); @@ -709,52 +714,49 @@ namespace OutputProcessor { // MNMeter WriteTimeStampFormatData(*state, state->files.mtr, - ReportingFrequency::Monthly, - MonthlyStampReportNbr, - MonthlyStampReportChr, + ReportFreq::Month, + MonthlyStampReportNum, DayOfSimChr, PrintTimeStamp, Month, - _, - _, - _, - _, - _, - _); + -1, // DayOfMonth + -1, // Hour + -1, // EndMinute + -1, // StartMinute + -1, // DST + ""); // dayType EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,1,12"}, "\n"))); // SMMeter WriteTimeStampFormatData(*state, state->files.mtr, - ReportingFrequency::Simulation, - RunPeriodStampReportNbr, - RunPeriodStampReportChr, + ReportFreq::Simulation, + RunPeriodStampReportNum, DayOfSimChr, PrintTimeStamp, - _, - _, - _, - _, - _, - _, - _); + -1, // Month + -1, // DayOfMonth + -1, // Hour + -1, // EndMinute + -1, // StartMinute + -1, // DST + ""); // dayType EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,1"}, "\n"))); // Bad input WriteTimeStampFormatData(*state, state->files.mtr, - static_cast(999), - RunPeriodStampReportNbr, - RunPeriodStampReportChr, + static_cast(999), + RunPeriodStampReportNum, DayOfSimChr, PrintTimeStamp, - _, - _, - _, - _, - _, - _, - _); + -1, // Month + -1, // DayOfMonth + -1, // Hour + -1, // EndMinute + -1, // StartMinute + -1, // DST + ""); // dayType EXPECT_EQ("SQLite3 message, Illegal reportingInterval passed to WriteTimeStampFormatData: 999\n", ss->str()); ss->str(std::string()); @@ -773,65 +775,57 @@ namespace OutputProcessor { TEST_F(SQLiteFixture, OutputProcessor_writeReportMeterData) { + auto &sql = state->dataSQLiteProcedures->sqlite; state->dataGlobal->MinutesPerTimeStep = 10; - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(4, 1, 1, 0, 2017, false); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 1, 1, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", 1, "C", 1, false); + sql->createSQLiteTimeIndexRecord(ReportFreq::Simulation, 1, 1, 0, 2017, false); + sql->createSQLiteReportDictionaryRecord( + 1, StoreType::Averaged, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", TimeStepType::Zone, "C", ReportFreq::Hour, false); - WriteReportMeterData(*state, 1, "1", 999.9, ReportingFrequency::TimeStep, 0.0, 0, 0.0, 0, false); + WriteReportMeterData(*state, 1, 999.9, ReportFreq::TimeStep, 0.0, 0, 0.0, 0, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,999.9"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,999.9"}, "\n"))); - WriteReportMeterData(*state, 1, "1", 999.9, ReportingFrequency::EachCall, 0.0, 0, 0.0, 0, false); + WriteReportMeterData(*state, 1, 999.9, ReportFreq::EachCall, 0.0, 0, 0.0, 0, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,999.9"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,999.9"}, "\n"))); - WriteReportMeterData( - *state, 1, "1", 616771620.98702729, ReportingFrequency::Hourly, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460, false); + WriteReportMeterData(*state, 1, 616771620.98702729, ReportFreq::Hour, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,616771620.9870273"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,616771620.9870273"}, "\n"))); - WriteReportMeterData( - *state, 1, "1", 616771620.98702729, ReportingFrequency::Daily, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460, false); + WriteReportMeterData(*state, 1, 616771620.98702729, ReportFreq::Day, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,616771620.9870273,4283136.251683925, 1,10,4283136.2587211775,24,60"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,616771620.9870273,4283136.251683925, 1,10,4283136.2587211775,24,60"}, "\n"))); - WriteReportMeterData( - *state, 1, "1", 616771620.98702729, ReportingFrequency::Monthly, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460, false); + WriteReportMeterData(*state, 1, 616771620.98702729, ReportFreq::Month, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,616771620.9870273,4283136.251683925,21, 1,10,4283136.2587211775,21,24,60"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,616771620.9870273,4283136.251683925,21, 1,10,4283136.2587211775,21,24,60"}, "\n"))); WriteReportMeterData( - *state, 1, "1", 616771620.98702729, ReportingFrequency::Simulation, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460, false); + *state, 1, 616771620.98702729, ReportFreq::Simulation, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,616771620.9870273,4283136.251683925,12,21, 1,10,4283136.2587211775,12,21,24,60"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,616771620.9870273,4283136.251683925,12,21, 1,10,4283136.2587211775,12,21,24,60"}, "\n"))); - WriteReportMeterData( - *state, 1, "1", 616771620.98702729, ReportingFrequency::TimeStep, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460, true); + WriteReportMeterData(*state, 1, 616771620.98702729, ReportFreq::TimeStep, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,616771620.9870273"}, "\n"))); - WriteReportMeterData( - *state, 1, "1", 616771620.98702729, ReportingFrequency::EachCall, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460, true); + WriteReportMeterData(*state, 1, 616771620.98702729, ReportFreq::EachCall, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,616771620.9870273"}, "\n"))); - WriteReportMeterData( - *state, 1, "1", 616771620.98702729, ReportingFrequency::Hourly, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460, true); + WriteReportMeterData(*state, 1, 616771620.98702729, ReportFreq::Hour, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,616771620.9870273"}, "\n"))); - WriteReportMeterData( - *state, 1, "1", 616771620.98702729, ReportingFrequency::Daily, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460, true); + WriteReportMeterData(*state, 1, 616771620.98702729, ReportFreq::Day, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,616771620.9870273,4283136.251683925, 1,10,4283136.2587211775,24,60"}, "\n"))); - WriteReportMeterData( - *state, 1, "1", 616771620.98702729, ReportingFrequency::Monthly, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460, true); + WriteReportMeterData(*state, 1, 616771620.98702729, ReportFreq::Month, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,616771620.9870273,4283136.251683925,21, 1,10,4283136.2587211775,21,24,60"}, "\n"))); - WriteReportMeterData( - *state, 1, "1", 616771620.98702729, ReportingFrequency::Simulation, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460, true); + WriteReportMeterData(*state, 1, 616771620.98702729, ReportFreq::Simulation, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,616771620.9870273,4283136.251683925,12,21, 1,10,4283136.2587211775,12,21,24,60"}, "\n"))); - WriteReportMeterData(*state, 1, "1", 0, ReportingFrequency::TimeStep, 0.0, 0, 0.0, 0, false); + WriteReportMeterData(*state, 1, 0, ReportFreq::TimeStep, 0.0, 0, 0.0, 0, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,0.0"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,0.0"}, "\n"))); @@ -868,137 +862,65 @@ namespace OutputProcessor { TEST_F(SQLiteFixture, OutputProcessor_writeReportRealData) { - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(4, 1, 1, 0, 2017, false); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 1, 1, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", 1, "C", 1, false); + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->createSQLiteTimeIndexRecord(ReportFreq::Simulation, 1, 1, 0, 2017, false); + sql->createSQLiteReportDictionaryRecord( + 1, StoreType::Averaged, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", TimeStepType::Zone, "C", ReportFreq::Hour, false); - WriteReportRealData(*state, 1, "1", 999.9, StoreType::Summed, 1, ReportingFrequency::TimeStep, 0.0, 0, 0.0, 0); + WriteReportRealData(*state, 1, 999.9, StoreType::Summed, 1, ReportFreq::TimeStep, 0.0, 0, 0.0, 0); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,999.9"}, "\n"))); - WriteReportRealData(*state, 1, "1", 999.9, StoreType::Summed, 1, ReportingFrequency::EachCall, 0.0, 0, 0.0, 0); + WriteReportRealData(*state, 1, 999.9, StoreType::Summed, 1, ReportFreq::EachCall, 0.0, 0, 0.0, 0); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,999.9"}, "\n"))); - WriteReportRealData(*state, 1, "1", 999.9, StoreType::Summed, 1, ReportingFrequency::Hourly, 0.0, 0, 0.0, 0); + WriteReportRealData(*state, 1, 999.9, StoreType::Summed, 1, ReportFreq::Hour, 0.0, 0, 0.0, 0); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,999.9"}, "\n"))); - WriteReportRealData(*state, - 1, - "1", - 616771620.98702729, - StoreType::Summed, - 1, - ReportingFrequency::Daily, - 4283136.2516839253, - 12210110, - 4283136.2587211775, - 12212460); + WriteReportRealData( + *state, 1, 616771620.98702729, StoreType::Summed, 1, ReportFreq::Day, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,616771620.9870273,4283136.251683925, 1,10,4283136.2587211775,24,60"}, "\n"))); - WriteReportRealData(*state, - 1, - "1", - 616771620.98702729, - StoreType::Summed, - 1, - ReportingFrequency::Monthly, - 4283136.2516839253, - 12210110, - 4283136.2587211775, - 12212460); + WriteReportRealData( + *state, 1, 616771620.98702729, StoreType::Summed, 1, ReportFreq::Month, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,616771620.9870273,4283136.251683925,21, 1,10,4283136.2587211775,21,24,60"}, "\n"))); - WriteReportRealData(*state, - 1, - "1", - 616771620.98702729, - StoreType::Summed, - 1, - ReportingFrequency::Simulation, - 4283136.2516839253, - 12210110, - 4283136.2587211775, - 12212460); + WriteReportRealData( + *state, 1, 616771620.98702729, StoreType::Summed, 1, ReportFreq::Simulation, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,616771620.9870273,4283136.251683925,12,21, 1,10,4283136.2587211775,12,21,24,60"}, "\n"))); - WriteReportRealData(*state, - 1, - "1", - 616771620.98702729, - StoreType::Averaged, - 10, - ReportingFrequency::TimeStep, - 4283136.2516839253, - 12210110, - 4283136.2587211775, - 12212460); + WriteReportRealData( + *state, 1, 616771620.98702729, StoreType::Averaged, 10, ReportFreq::TimeStep, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,61677162.09870273"}, "\n"))); - WriteReportRealData(*state, - 1, - "1", - 616771620.98702729, - StoreType::Averaged, - 10, - ReportingFrequency::EachCall, - 4283136.2516839253, - 12210110, - 4283136.2587211775, - 12212460); + WriteReportRealData( + *state, 1, 616771620.98702729, StoreType::Averaged, 10, ReportFreq::EachCall, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,61677162.09870273"}, "\n"))); - WriteReportRealData(*state, - 1, - "1", - 616771620.98702729, - StoreType::Averaged, - 10, - ReportingFrequency::Hourly, - 4283136.2516839253, - 12210110, - 4283136.2587211775, - 12212460); + WriteReportRealData( + *state, 1, 616771620.98702729, StoreType::Averaged, 10, ReportFreq::Hour, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,61677162.09870273"}, "\n"))); - WriteReportRealData(*state, - 1, - "1", - 616771620.98702729, - StoreType::Averaged, - 10, - ReportingFrequency::Daily, - 4283136.2516839253, - 12210110, - 4283136.2587211775, - 12212460); + WriteReportRealData( + *state, 1, 616771620.98702729, StoreType::Averaged, 10, ReportFreq::Day, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,61677162.09870273,4283136.251683925, 1,10,4283136.2587211775,24,60"}, "\n"))); - WriteReportRealData(*state, - 1, - "1", - 616771620.98702729, - StoreType::Averaged, - 10, - ReportingFrequency::Monthly, - 4283136.2516839253, - 12210110, - 4283136.2587211775, - 12212460); + WriteReportRealData( + *state, 1, 616771620.98702729, StoreType::Averaged, 10, ReportFreq::Month, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,61677162.09870273,4283136.251683925,21, 1,10,4283136.2587211775,21,24,60"}, "\n"))); WriteReportRealData(*state, 1, - "1", 616771620.98702729, StoreType::Averaged, 10, - ReportingFrequency::Simulation, + ReportFreq::Simulation, 4283136.2516839253, 12210110, 4283136.2587211775, 12212460); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,61677162.09870273,4283136.251683925,12,21, 1,10,4283136.2587211775,12,21,24,60"}, "\n"))); - WriteReportRealData(*state, 1, "1", 0, StoreType::Summed, 1, ReportingFrequency::TimeStep, 0.0, 0, 0.0, 0); + WriteReportRealData(*state, 1, 0, StoreType::Summed, 1, ReportFreq::TimeStep, 0.0, 0, 0.0, 0); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,0.0"}, "\n"))); auto reportDataResults = queryResult("SELECT * FROM ReportData;", "ReportData"); @@ -1032,56 +954,51 @@ namespace OutputProcessor { TEST_F(SQLiteFixture, OutputProcessor_writeReportIntegerData) { - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(4, 1, 1, 0, 2017, false); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 1, 1, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", 1, "C", 1, false); + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->createSQLiteTimeIndexRecord(ReportFreq::Simulation, 1, 1, 0, 2017, false); + sql->createSQLiteReportDictionaryRecord( + 1, StoreType::Averaged, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", TimeStepType::Zone, "C", ReportFreq::Hour, false); - WriteReportIntegerData(*state, 1, "1", 999.9, StoreType::Summed, 1, ReportingFrequency::TimeStep, 0, 0, 0, 0); + WriteReportIntegerData(*state, 1, 999.9, StoreType::Summed, 1, ReportFreq::TimeStep, 0, 0, 0, 0); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,999.900000"}, "\n"))); - WriteReportIntegerData(*state, 1, "1", 999.9, StoreType::Summed, 1, ReportingFrequency::EachCall, 0, 0, 0, 0); + WriteReportIntegerData(*state, 1, 999.9, StoreType::Summed, 1, ReportFreq::EachCall, 0, 0, 0, 0); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,999.900000"}, "\n"))); - WriteReportIntegerData(*state, 1, "1", 999.9, StoreType::Summed, 1, ReportingFrequency::Hourly, 0, 0, 0, 0); + WriteReportIntegerData(*state, 1, 999.9, StoreType::Summed, 1, ReportFreq::Hour, 0, 0, 0, 0); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,999.900000"}, "\n"))); - WriteReportIntegerData( - *state, 1, "1", 616771620.98702729, StoreType::Summed, 1, ReportingFrequency::Daily, 4283136, 12210110, 4283196, 12212460); + WriteReportIntegerData(*state, 1, 616771620.98702729, StoreType::Summed, 1, ReportFreq::Day, 4283136, 12210110, 4283196, 12212460); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,616771620.987027,4283136, 1,10,4283196,24,60"}, "\n"))); - WriteReportIntegerData( - *state, 1, "1", 616771620.98702729, StoreType::Summed, 1, ReportingFrequency::Monthly, 4283136, 12210110, 4283196, 12212460); + WriteReportIntegerData(*state, 1, 616771620.98702729, StoreType::Summed, 1, ReportFreq::Month, 4283136, 12210110, 4283196, 12212460); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,616771620.987027,4283136,21, 1,10,4283196,21,24,60"}, "\n"))); - WriteReportIntegerData( - *state, 1, "1", 616771620.98702729, StoreType::Summed, 1, ReportingFrequency::Simulation, 4283136, 12210110, 4283196, 12212460); + WriteReportIntegerData(*state, 1, 616771620.98702729, StoreType::Summed, 1, ReportFreq::Simulation, 4283136, 12210110, 4283196, 12212460); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,616771620.987027,4283136,12,21, 1,10,4283196,12,21,24,60"}, "\n"))); - WriteReportIntegerData(*state, 1, "1", 616771620.98702729, StoreType::Averaged, 10, ReportingFrequency::TimeStep, 0, 0, 0, 0); + WriteReportIntegerData(*state, 1, 616771620.98702729, StoreType::Averaged, 10, ReportFreq::TimeStep, 0, 0, 0, 0); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,61677162.098703"}, "\n"))); - WriteReportIntegerData(*state, 1, "1", 616771620.98702729, StoreType::Averaged, 10, ReportingFrequency::EachCall, 0, 0, 0, 0); + WriteReportIntegerData(*state, 1, 616771620.98702729, StoreType::Averaged, 10, ReportFreq::EachCall, 0, 0, 0, 0); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,61677162.098703"}, "\n"))); - WriteReportIntegerData(*state, 1, "1", 616771620.98702729, StoreType::Averaged, 10, ReportingFrequency::Hourly, 0, 0, 0, 0); + WriteReportIntegerData(*state, 1, 616771620.98702729, StoreType::Averaged, 10, ReportFreq::Hour, 0, 0, 0, 0); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,61677162.098703"}, "\n"))); - WriteReportIntegerData( - *state, 1, "1", 616771620.98702729, StoreType::Averaged, 10, ReportingFrequency::Daily, 4283136, 12210110, 4283196, 12212460); + WriteReportIntegerData(*state, 1, 616771620.98702729, StoreType::Averaged, 10, ReportFreq::Day, 4283136, 12210110, 4283196, 12212460); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,61677162.098703,4283136, 1,10,4283196,24,60"}, "\n"))); - WriteReportIntegerData( - *state, 1, "1", 616771620.98702729, StoreType::Averaged, 10, ReportingFrequency::Monthly, 4283136, 12210110, 4283196, 12212460); + WriteReportIntegerData(*state, 1, 616771620.98702729, StoreType::Averaged, 10, ReportFreq::Month, 4283136, 12210110, 4283196, 12212460); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,61677162.098703,4283136,21, 1,10,4283196,21,24,60"}, "\n"))); - WriteReportIntegerData( - *state, 1, "1", 616771620.98702729, StoreType::Averaged, 10, ReportingFrequency::Simulation, 4283136, 12210110, 4283196, 12212460); + WriteReportIntegerData(*state, 1, 616771620.98702729, StoreType::Averaged, 10, ReportFreq::Simulation, 4283136, 12210110, 4283196, 12212460); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,61677162.098703,4283136,12,21, 1,10,4283196,12,21,24,60"}, "\n"))); - WriteReportIntegerData(*state, 1, "1", 0, StoreType::Summed, 1, ReportingFrequency::TimeStep, 0, 0, 0, 0); + WriteReportIntegerData(*state, 1, 0, StoreType::Summed, 1, ReportFreq::TimeStep, 0, 0, 0, 0); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,0.0"}, "\n"))); - WriteReportIntegerData(*state, 1, "1", 25.75, StoreType::Averaged, 720, ReportingFrequency::Monthly, 0, 4010115, 1, 4011560); + WriteReportIntegerData(*state, 1, 25.75, StoreType::Averaged, 720, ReportFreq::Month, 0, 4010115, 1, 4011560); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,0.035764,0, 1, 1,15,1, 1,15,60"}, "\n"))); auto reportDataResults = queryResult("SELECT * FROM ReportData;", "ReportData"); @@ -1117,29 +1034,30 @@ namespace OutputProcessor { TEST_F(SQLiteFixture, OutputProcessor_writeNumericData_1) { - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(4, 1, 1, 0, 2017, false); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 1, 1, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", 1, "C", 1, false); + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->createSQLiteTimeIndexRecord(ReportFreq::Simulation, 1, 1, 0, 2017, false); + sql->createSQLiteReportDictionaryRecord( + 1, StoreType::Averaged, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", TimeStepType::Zone, "C", ReportFreq::Hour, false); - WriteNumericData(*state, 1, "1", 999); + WriteNumericData(*state, 1, 999); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,999"}, "\n"))); - WriteNumericData(*state, 1, "1", 0); + WriteNumericData(*state, 1, 0); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,0"}, "\n"))); - WriteNumericData(*state, 1, "1", -999); + WriteNumericData(*state, 1, -999); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,-999"}, "\n"))); - WriteNumericData(*state, 1, "1", 999.9); + WriteNumericData(*state, 1, 999.9); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,999.9"}, "\n"))); - WriteNumericData(*state, 1, "1", 0.0); + WriteNumericData(*state, 1, 0.0); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,0.0"}, "\n"))); - WriteNumericData(*state, 1, "1", -999.9); + WriteNumericData(*state, 1, -999.9); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,-999.9"}, "\n"))); - WriteNumericData(*state, 1, "1", 0); + WriteNumericData(*state, 1, 0); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,0"}, "\n"))); auto reportDataResults = queryResult("SELECT * FROM ReportData;", "ReportData"); @@ -1215,27 +1133,16 @@ namespace OutputProcessor { bool error_found = false; for (auto const &meterType : resource_map) { - GetStandardMeterResourceType(*state, out_resource_type, meterType.first, error_found); - EXPECT_EQ(meterType.second, out_resource_type); + Constant::eResource resource = static_cast(getEnumValue(Constant::eResourceNamesUC, meterType.first)); + EXPECT_EQ(meterType.second, Constant::eResourceNames[(int)resource]); EXPECT_FALSE(error_found); } - state->dataSQLiteProcedures->sqlite->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time"); - - auto const meterType = "BAD INPUT"; - out_resource_type = "BAD INPUT"; - - GetStandardMeterResourceType(*state, out_resource_type, meterType, error_found); + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time"); - EXPECT_EQ(meterType, out_resource_type); - EXPECT_TRUE(error_found); - - auto errorData = queryResult("SELECT * FROM Errors;", "Errors"); - - ASSERT_EQ(1ul, errorData.size()); - std::vector errorData0{ - "1", "1", "1", "GetStandardMeterResourceType: Illegal OutResourceType (for Meters) Entered=BAD INPUT", "1"}; - EXPECT_EQ(errorData0, errorData[0]); + Constant::eResource resource = static_cast(getEnumValue(Constant::eResourceNamesUC, "BAD INPUT")); + EXPECT_EQ((int)resource, (int)Constant::eResource::Invalid); } TEST_F(SQLiteFixture, OutputProcessor_determineIndexGroupKeyFromMeterName) @@ -1259,23 +1166,22 @@ namespace OutputProcessor { TEST_F(SQLiteFixture, OutputProcessor_validateTimeStepType) { - std::map const resource_map = { - // Zone - {OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::TimeStepType::Zone}, - // System - {OutputProcessor::SOVTimeStepType::HVAC, OutputProcessor::TimeStepType::System}, - {OutputProcessor::SOVTimeStepType::System, OutputProcessor::TimeStepType::System}, - {OutputProcessor::SOVTimeStepType::Plant, OutputProcessor::TimeStepType::System}}; + std::map const resource_map = {// Zone + {SOVTimeStepType::Zone, TimeStepType::Zone}, + // System + {SOVTimeStepType::HVAC, TimeStepType::System}, + {SOVTimeStepType::System, TimeStepType::System}, + {SOVTimeStepType::Plant, TimeStepType::System}}; for (auto const &indexGroup : resource_map) { - EXPECT_TRUE(compare_enums(indexGroup.second, ValidateTimeStepType(*state, indexGroup.first))); + EXPECT_EQ((int)indexGroup.second, (int)sovTimeStep2TimeStep[(int)indexGroup.first]); } } TEST_F(SQLiteFixture, OutputProcessor_standardIndexTypeKey) { - EXPECT_EQ("Zone", StandardTimeStepTypeKey(OutputProcessor::TimeStepType::Zone)); - EXPECT_EQ("HVAC", StandardTimeStepTypeKey(OutputProcessor::TimeStepType::System)); + EXPECT_EQ("Zone", timeStepNames[(int)TimeStepType::Zone]); + EXPECT_EQ("HVAC", timeStepNames[(int)TimeStepType::System]); // It's no longer possible to pass something that isn't part of the enum, that's kind of the point of using an enum! // EXPECT_EQ("UNKW", StandardTimeStepTypeKey(0)); @@ -1285,66 +1191,64 @@ namespace OutputProcessor { TEST_F(SQLiteFixture, OutputProcessor_validateVariableType) { - std::map const resource_map = {{OutputProcessor::SOVStoreType::State, StoreType::Averaged}, - {OutputProcessor::SOVStoreType::Average, StoreType::Averaged}, - {OutputProcessor::SOVStoreType::NonState, StoreType::Summed}, - {OutputProcessor::SOVStoreType::Summed, StoreType::Summed}}; + std::map const resource_map = {{SOVStoreType::State, StoreType::Averaged}, + {SOVStoreType::Average, StoreType::Averaged}, + {SOVStoreType::NonState, StoreType::Summed}, + {SOVStoreType::Summed, StoreType::Summed}}; for (auto const &variableType : resource_map) { - EXPECT_TRUE(compare_enums(variableType.second, validateVariableType(*state, variableType.first))); + EXPECT_EQ((int)variableType.second, (int)sovStoreType2StoreType[(int)variableType.first]); } } TEST_F(SQLiteFixture, OutputProcessor_standardVariableTypeKey) { - EXPECT_EQ("Average", standardVariableTypeKey(StoreType::Averaged)); - EXPECT_EQ("Sum", standardVariableTypeKey(StoreType::Summed)); - EXPECT_EQ("Unknown", standardVariableTypeKey(static_cast(0))); + EXPECT_EQ("Average", storeTypeNames[(int)StoreType::Averaged]); + EXPECT_EQ("Sum", storeTypeNames[(int)StoreType::Summed]); } TEST_F(SQLiteFixture, OutputProcessor_determineMeterIPUnits) { - OutputProcessor::RT_IPUnits ipUnits = OutputProcessor::RT_IPUnits::Invalid; + auto &sql = state->dataSQLiteProcedures->sqlite; + RT_IPUnits ipUnits = RT_IPUnits::Invalid; bool errorFound = false; - DetermineMeterIPUnits(*state, ipUnits, "ELEC", OutputProcessor::Unit::J, errorFound); - EXPECT_TRUE(compare_enums(RT_IPUnits::Electricity, ipUnits)); + ipUnits = GetResourceIPUnits(*state, Constant::eResource::ElectricityProduced, Constant::Units::J, errorFound); + EXPECT_EQ((int)RT_IPUnits::Electricity, (int)ipUnits); EXPECT_FALSE(errorFound); - DetermineMeterIPUnits(*state, ipUnits, "GAS", OutputProcessor::Unit::J, errorFound); - EXPECT_TRUE(compare_enums(RT_IPUnits::Gas, ipUnits)); + ipUnits = GetResourceIPUnits(*state, Constant::eResource::NaturalGas, Constant::Units::J, errorFound); + EXPECT_EQ((int)RT_IPUnits::Gas, (int)ipUnits); EXPECT_FALSE(errorFound); - DetermineMeterIPUnits(*state, ipUnits, "COOL", OutputProcessor::Unit::J, errorFound); - EXPECT_TRUE(compare_enums(RT_IPUnits::Cooling, ipUnits)); + ipUnits = GetResourceIPUnits(*state, Constant::eResource::DistrictCooling, Constant::Units::J, errorFound); + EXPECT_EQ((int)RT_IPUnits::Cooling, (int)ipUnits); EXPECT_FALSE(errorFound); - DetermineMeterIPUnits(*state, ipUnits, "WATER", OutputProcessor::Unit::m3, errorFound); - EXPECT_TRUE(compare_enums(RT_IPUnits::Water, ipUnits)); + ipUnits = GetResourceIPUnits(*state, Constant::eResource::MainsWater, Constant::Units::m3, errorFound); + EXPECT_EQ((int)RT_IPUnits::Water, (int)ipUnits); EXPECT_FALSE(errorFound); - DetermineMeterIPUnits(*state, ipUnits, "OTHER", OutputProcessor::Unit::m3, errorFound); - EXPECT_TRUE(compare_enums(RT_IPUnits::OtherM3, ipUnits)); + ipUnits = GetResourceIPUnits(*state, Constant::eResource::Source, Constant::Units::m3, errorFound); + EXPECT_EQ((int)RT_IPUnits::OtherM3, (int)ipUnits); EXPECT_FALSE(errorFound); - DetermineMeterIPUnits(*state, ipUnits, "OTHER", OutputProcessor::Unit::kg, errorFound); - EXPECT_TRUE(compare_enums(RT_IPUnits::OtherKG, ipUnits)); + ipUnits = GetResourceIPUnits(*state, Constant::eResource::Source, Constant::Units::kg, errorFound); + EXPECT_EQ((int)RT_IPUnits::OtherKG, (int)ipUnits); EXPECT_FALSE(errorFound); - DetermineMeterIPUnits(*state, ipUnits, "OTHER", OutputProcessor::Unit::L, errorFound); - EXPECT_TRUE(compare_enums(RT_IPUnits::OtherL, ipUnits)); + ipUnits = GetResourceIPUnits(*state, Constant::eResource::Source, Constant::Units::L, errorFound); + EXPECT_EQ((int)RT_IPUnits::OtherL, (int)ipUnits); EXPECT_FALSE(errorFound); - state->dataSQLiteProcedures->sqlite->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time"); + sql->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time"); - ipUnits = OutputProcessor::RT_IPUnits::Invalid; - DetermineMeterIPUnits(*state, ipUnits, "UNKONWN", OutputProcessor::Unit::unknown, errorFound); // was "badunits" - EXPECT_TRUE(compare_enums(RT_IPUnits::OtherJ, ipUnits)); + ipUnits = GetResourceIPUnits(*state, Constant::eResource::Source, Constant::Units::unknown, errorFound); // was "badunits" + EXPECT_EQ((int)RT_IPUnits::OtherJ, (int)ipUnits); EXPECT_TRUE(errorFound); - ipUnits = OutputProcessor::RT_IPUnits::Invalid; - DetermineMeterIPUnits(*state, ipUnits, "ELEC", OutputProcessor::Unit::unknown, errorFound); // was "kWh" - EXPECT_TRUE(compare_enums(RT_IPUnits::Electricity, ipUnits)); + ipUnits = GetResourceIPUnits(*state, Constant::eResource::Electricity, Constant::Units::unknown, errorFound); // was "kWh" + EXPECT_EQ((int)RT_IPUnits::Electricity, (int)ipUnits); EXPECT_TRUE(errorFound); auto errorData = queryResult("SELECT * FROM Errors;", "Errors"); @@ -1390,394 +1294,152 @@ namespace OutputProcessor { TEST_F(SQLiteFixture, OutputProcessor_writeMeterDictionaryItem) { + auto &sql = state->dataSQLiteProcedures->sqlite; InitializeOutput(*state); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(4, 1, 1, 0, 2017, false); - - WriteMeterDictionaryItem(*state, - ReportingFrequency::TimeStep, - StoreType::Averaged, - 1, - -999, - "indexGroup", - "1", - "meterName", - OutputProcessor::Unit::J, - false, - false); + sql->createSQLiteTimeIndexRecord(ReportFreq::Simulation, 1, 1, 0, 2017, false); + + WriteMeterDictionaryItem( + *state, ReportFreq::TimeStep, StoreType::Averaged, 1, -999, "indexGroup", "meterName", Constant::Units::J, false, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,1,meterName [J] !TimeStep"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1,meterName [J] !TimeStep"}, "\n"))); WriteMeterDictionaryItem( - *state, ReportingFrequency::TimeStep, StoreType::Summed, 2, -999, "indexGroup", "2", "meterName", OutputProcessor::Unit::W, false, false); + *state, ReportFreq::TimeStep, StoreType::Summed, 2, -999, "indexGroup", "meterName", Constant::Units::W, false, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"2,1,meterName [W] !TimeStep"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"2,1,meterName [W] !TimeStep"}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::TimeStep, - StoreType::Averaged, - 3, - -999, - "indexGroup", - "3", - "meterName", - OutputProcessor::Unit::J, - true, - false); + WriteMeterDictionaryItem( + *state, ReportFreq::TimeStep, StoreType::Averaged, 3, -999, "indexGroup", "meterName", Constant::Units::J, true, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"3,1,Cumulative meterName [J] !TimeStep"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"3,1,Cumulative meterName [J] !TimeStep"}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::TimeStep, - StoreType::Averaged, - 4, - -999, - "indexGroup", - "4", - "meterName", - OutputProcessor::Unit::W, - false, - true); + WriteMeterDictionaryItem( + *state, ReportFreq::TimeStep, StoreType::Averaged, 4, -999, "indexGroup", "meterName", Constant::Units::W, false, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"4,1,meterName [W] !TimeStep"}, "\n"))); WriteMeterDictionaryItem( - *state, ReportingFrequency::TimeStep, StoreType::Averaged, 5, -999, "indexGroup", "5", "meterName", OutputProcessor::Unit::W, true, true); + *state, ReportFreq::TimeStep, StoreType::Averaged, 5, -999, "indexGroup", "meterName", Constant::Units::W, true, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"5,1,Cumulative meterName [W] !TimeStep"}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::EachCall, - StoreType::Averaged, - 6, - -999, - "indexGroup", - "6", - "meterName", - OutputProcessor::Unit::J, - false, - false); + WriteMeterDictionaryItem( + *state, ReportFreq::EachCall, StoreType::Averaged, 6, -999, "indexGroup", "meterName", Constant::Units::J, false, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"6,1,meterName [J] !Each Call"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"6,1,meterName [J] !Each Call"}, "\n"))); WriteMeterDictionaryItem( - *state, ReportingFrequency::EachCall, StoreType::Summed, 7, -999, "indexGroup", "7", "meterName", OutputProcessor::Unit::J, false, false); + *state, ReportFreq::EachCall, StoreType::Summed, 7, -999, "indexGroup", "meterName", Constant::Units::J, false, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"7,1,meterName [J] !Each Call"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"7,1,meterName [J] !Each Call"}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::EachCall, - StoreType::Averaged, - 8, - -999, - "indexGroup", - "8", - "meterName", - OutputProcessor::Unit::J, - true, - false); + WriteMeterDictionaryItem( + *state, ReportFreq::EachCall, StoreType::Averaged, 8, -999, "indexGroup", "meterName", Constant::Units::J, true, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"8,1,Cumulative meterName [J] !Each Call"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"8,1,Cumulative meterName [J] !Each Call"}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::EachCall, - StoreType::Averaged, - 9, - -999, - "indexGroup", - "9", - "meterName", - OutputProcessor::Unit::J, - false, - true); + WriteMeterDictionaryItem( + *state, ReportFreq::EachCall, StoreType::Averaged, 9, -999, "indexGroup", "meterName", Constant::Units::J, false, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"9,1,meterName [J] !Each Call"}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::EachCall, - StoreType::Averaged, - 10, - -999, - "indexGroup", - "10", - "meterName", - OutputProcessor::Unit::J, - true, - true); + WriteMeterDictionaryItem( + *state, ReportFreq::EachCall, StoreType::Averaged, 10, -999, "indexGroup", "meterName", Constant::Units::J, true, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"10,1,Cumulative meterName [J] !Each Call"}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::Hourly, - StoreType::Averaged, - 11, - -999, - "indexGroup", - "11", - "meterName", - OutputProcessor::Unit::J, - false, - false); + WriteMeterDictionaryItem( + *state, ReportFreq::Hour, StoreType::Averaged, 11, -999, "indexGroup", "meterName", Constant::Units::J, false, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"11,1,meterName [J] !Hourly"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"11,1,meterName [J] !Hourly"}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::Hourly, - StoreType::Summed, - 12, - -999, - "indexGroup", - "12", - "meterName", - OutputProcessor::Unit::None, - false, - false); + WriteMeterDictionaryItem( + *state, ReportFreq::Hour, StoreType::Summed, 12, -999, "indexGroup", "meterName", Constant::Units::None, false, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"12,1,meterName [] !Hourly"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"12,1,meterName [] !Hourly"}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::Hourly, - StoreType::Averaged, - 13, - -999, - "indexGroup", - "13", - "meterName", - OutputProcessor::Unit::None, - true, - false); + WriteMeterDictionaryItem( + *state, ReportFreq::Hour, StoreType::Averaged, 13, -999, "indexGroup", "meterName", Constant::Units::None, true, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"13,1,Cumulative meterName [] !Hourly"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"13,1,Cumulative meterName [] !Hourly"}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::Hourly, - StoreType::Averaged, - 14, - -999, - "indexGroup", - "14", - "meterName", - OutputProcessor::Unit::None, - false, - true); + WriteMeterDictionaryItem( + *state, ReportFreq::Hour, StoreType::Averaged, 14, -999, "indexGroup", "meterName", Constant::Units::None, false, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"14,1,meterName [] !Hourly"}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::Hourly, - StoreType::Averaged, - 15, - -999, - "indexGroup", - "15", - "meterName", - OutputProcessor::Unit::None, - true, - true); + WriteMeterDictionaryItem( + *state, ReportFreq::Hour, StoreType::Averaged, 15, -999, "indexGroup", "meterName", Constant::Units::None, true, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"15,1,Cumulative meterName [] !Hourly"}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::Daily, - StoreType::Averaged, - 16, - -999, - "indexGroup", - "16", - "meterName", - OutputProcessor::Unit::None, - false, - false); + WriteMeterDictionaryItem( + *state, ReportFreq::Day, StoreType::Averaged, 16, -999, "indexGroup", "meterName", Constant::Units::None, false, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"16,7,meterName [] !Daily [Value,Min,Hour,Minute,Max,Hour,Minute]"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"16,7,meterName [] !Daily [Value,Min,Hour,Minute,Max,Hour,Minute]"}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::Daily, - StoreType::Summed, - 17, - -999, - "indexGroup", - "17", - "meterName", - OutputProcessor::Unit::None, - false, - false); + WriteMeterDictionaryItem( + *state, ReportFreq::Day, StoreType::Summed, 17, -999, "indexGroup", "meterName", Constant::Units::None, false, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"17,7,meterName [] !Daily [Value,Min,Hour,Minute,Max,Hour,Minute]"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"17,7,meterName [] !Daily [Value,Min,Hour,Minute,Max,Hour,Minute]"}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::Daily, - StoreType::Averaged, - 18, - -999, - "indexGroup", - "18", - "meterName", - OutputProcessor::Unit::deltaC, - true, - false); + WriteMeterDictionaryItem( + *state, ReportFreq::Day, StoreType::Averaged, 18, -999, "indexGroup", "meterName", Constant::Units::deltaC, true, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"18,1,Cumulative meterName [deltaC] !Daily "}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"18,1,Cumulative meterName [deltaC] !Daily "}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::Daily, - StoreType::Averaged, - 19, - -999, - "indexGroup", - "19", - "meterName", - OutputProcessor::Unit::deltaC, - false, - true); + WriteMeterDictionaryItem( + *state, ReportFreq::Day, StoreType::Averaged, 19, -999, "indexGroup", "meterName", Constant::Units::deltaC, false, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"19,7,meterName [deltaC] !Daily [Value,Min,Hour,Minute,Max,Hour,Minute]"}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::Daily, - StoreType::Averaged, - 20, - -999, - "indexGroup", - "20", - "meterName", - OutputProcessor::Unit::deltaC, - true, - true); + WriteMeterDictionaryItem( + *state, ReportFreq::Day, StoreType::Averaged, 20, -999, "indexGroup", "meterName", Constant::Units::deltaC, true, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"20,1,Cumulative meterName [deltaC] !Daily "}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::Monthly, - StoreType::Averaged, - 21, - -999, - "indexGroup", - "21", - "meterName", - OutputProcessor::Unit::deltaC, - false, - false); + WriteMeterDictionaryItem( + *state, ReportFreq::Month, StoreType::Averaged, 21, -999, "indexGroup", "meterName", Constant::Units::deltaC, false, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"21,9,meterName [deltaC] !Monthly [Value,Min,Day,Hour,Minute,Max,Day,Hour,Minute]"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"21,9,meterName [deltaC] !Monthly [Value,Min,Day,Hour,Minute,Max,Day,Hour,Minute]"}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::Monthly, - StoreType::Summed, - 22, - -999, - "indexGroup", - "22", - "meterName", - OutputProcessor::Unit::deltaC, - false, - false); + WriteMeterDictionaryItem( + *state, ReportFreq::Month, StoreType::Summed, 22, -999, "indexGroup", "meterName", Constant::Units::deltaC, false, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"22,9,meterName [deltaC] !Monthly [Value,Min,Day,Hour,Minute,Max,Day,Hour,Minute]"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"22,9,meterName [deltaC] !Monthly [Value,Min,Day,Hour,Minute,Max,Day,Hour,Minute]"}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::Monthly, - StoreType::Averaged, - 23, - -999, - "indexGroup", - "23", - "meterName", - OutputProcessor::Unit::deltaC, - true, - false); + WriteMeterDictionaryItem( + *state, ReportFreq::Month, StoreType::Averaged, 23, -999, "indexGroup", "meterName", Constant::Units::deltaC, true, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"23,1,Cumulative meterName [deltaC] !Monthly "}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"23,1,Cumulative meterName [deltaC] !Monthly "}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::Monthly, - StoreType::Averaged, - 24, - -999, - "indexGroup", - "24", - "meterName", - OutputProcessor::Unit::deltaC, - false, - true); + WriteMeterDictionaryItem( + *state, ReportFreq::Month, StoreType::Averaged, 24, -999, "indexGroup", "meterName", Constant::Units::deltaC, false, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"24,9,meterName [deltaC] !Monthly [Value,Min,Day,Hour,Minute,Max,Day,Hour,Minute]"}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::Monthly, - StoreType::Averaged, - 25, - -999, - "indexGroup", - "25", - "meterName", - OutputProcessor::Unit::deltaC, - true, - true); + WriteMeterDictionaryItem( + *state, ReportFreq::Month, StoreType::Averaged, 25, -999, "indexGroup", "meterName", Constant::Units::deltaC, true, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"25,1,Cumulative meterName [deltaC] !Monthly "}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::Simulation, - StoreType::Averaged, - 26, - -999, - "indexGroup", - "26", - "meterName", - OutputProcessor::Unit::deltaC, - false, - false); + WriteMeterDictionaryItem( + *state, ReportFreq::Simulation, StoreType::Averaged, 26, -999, "indexGroup", "meterName", Constant::Units::deltaC, false, false); EXPECT_TRUE(compare_mtr_stream( delimited_string({"26,11,meterName [deltaC] !RunPeriod [Value,Min,Month,Day,Hour,Minute,Max,Month,Day,Hour,Minute]"}, "\n"))); EXPECT_TRUE(compare_eso_stream( delimited_string({"26,11,meterName [deltaC] !RunPeriod [Value,Min,Month,Day,Hour,Minute,Max,Month,Day,Hour,Minute]"}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::Simulation, - StoreType::Summed, - 27, - -999, - "indexGroup", - "27", - "meterName", - OutputProcessor::Unit::deltaC, - false, - false); + WriteMeterDictionaryItem( + *state, ReportFreq::Simulation, StoreType::Summed, 27, -999, "indexGroup", "meterName", Constant::Units::deltaC, false, false); EXPECT_TRUE(compare_mtr_stream( delimited_string({"27,11,meterName [deltaC] !RunPeriod [Value,Min,Month,Day,Hour,Minute,Max,Month,Day,Hour,Minute]"}, "\n"))); EXPECT_TRUE(compare_eso_stream( delimited_string({"27,11,meterName [deltaC] !RunPeriod [Value,Min,Month,Day,Hour,Minute,Max,Month,Day,Hour,Minute]"}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::Simulation, - StoreType::Averaged, - 28, - -999, - "indexGroup", - "28", - "meterName", - OutputProcessor::Unit::deltaC, - true, - false); + WriteMeterDictionaryItem( + *state, ReportFreq::Simulation, StoreType::Averaged, 28, -999, "indexGroup", "meterName", Constant::Units::deltaC, true, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"28,1,Cumulative meterName [deltaC] !RunPeriod "}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"28,1,Cumulative meterName [deltaC] !RunPeriod "}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::Simulation, - StoreType::Averaged, - 29, - -999, - "indexGroup", - "29", - "meterName", - OutputProcessor::Unit::deltaC, - false, - true); + WriteMeterDictionaryItem( + *state, ReportFreq::Simulation, StoreType::Averaged, 29, -999, "indexGroup", "meterName", Constant::Units::deltaC, false, true); EXPECT_TRUE(compare_mtr_stream( delimited_string({"29,11,meterName [deltaC] !RunPeriod [Value,Min,Month,Day,Hour,Minute,Max,Month,Day,Hour,Minute]"}, "\n"))); - WriteMeterDictionaryItem(*state, - ReportingFrequency::Simulation, - StoreType::Averaged, - 30, - -999, - "indexGroup", - "30", - "meterName", - OutputProcessor::Unit::deltaC, - true, - true); + WriteMeterDictionaryItem( + *state, ReportFreq::Simulation, StoreType::Averaged, 30, -999, "indexGroup", "meterName", Constant::Units::deltaC, true, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"30,1,Cumulative meterName [deltaC] !RunPeriod "}, "\n"))); auto reportDataDictionaryResults = queryResult("SELECT * FROM ReportDataDictionary;", "ReportDataDictionary"); @@ -1819,14 +1481,20 @@ namespace OutputProcessor { {"28", "1", "Avg", "indexGroup", timeStepTypeString, "Cumulative ", "meterName", "Run Period", "", "deltaC"}, {"29", "1", "Avg", "indexGroup", timeStepTypeString, "", "meterName", "Run Period", "", "deltaC"}, {"30", "1", "Avg", "indexGroup", timeStepTypeString, "Cumulative ", "meterName", "Run Period", "", "deltaC"}}); - EXPECT_EQ(reportDataDictionary, reportDataDictionaryResults); + + EXPECT_EQ(reportDataDictionary.size(), reportDataDictionaryResults.size()); + for (int i = 0; i < (int)reportDataDictionary.size(); ++i) { + EXPECT_EQ(reportDataDictionary[i], reportDataDictionaryResults[i]); + } } TEST_F(SQLiteFixture, OutputProcessor_writeReportVariableDictionaryItem) { + auto &op = state->dataOutputProcessor; + auto &sql = state->dataSQLiteProcedures->sqlite; InitializeOutput(*state); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(4, 1, 1, 0, 2017, false); + sql->createSQLiteTimeIndexRecord(ReportFreq::Simulation, 1, 1, 0, 2017, false); // Store expected results std::vector> expectedReportDataDictionary; @@ -1836,512 +1504,482 @@ namespace OutputProcessor { // For now I don't accept anything else than TimeStepZone or TimeStepSystem, but to make it easier if we need to change that later // and to preserve the original test (passing int=3 before should have defaulted to Zone...) - OutputProcessor::TimeStepType aThirdTimeStepType = OutputProcessor::TimeStepType::Zone; + TimeStepType aThirdTimeStepType = TimeStepType::Zone; std::string aThirdTimeStepString = timeStepZoneString; WriteReportVariableDictionaryItem(*state, - ReportingFrequency::TimeStep, + ReportFreq::TimeStep, StoreType::Averaged, 1, -999, "indexGroup", - "1", "keyedValue", "variableName", - OutputProcessor::TimeStepType::Zone, - OutputProcessor::Unit::m3_s, - _, - {}); + TimeStepType::Zone, + Constant::Units::m3_s, + "", + ""); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1,keyedValue,variableName [m3/s] !TimeStep"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::TimeStep, + ReportFreq::TimeStep, StoreType::Summed, 2, -999, "indexGroup", - "2", "keyedValue", "variableName", - OutputProcessor::TimeStepType::Zone, - OutputProcessor::Unit::m3_s, - _, - {}); + TimeStepType::Zone, + Constant::Units::m3_s, + "", + ""); EXPECT_TRUE(compare_eso_stream(delimited_string({"2,1,keyedValue,variableName [m3/s] !TimeStep"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::TimeStep, + ReportFreq::TimeStep, StoreType::Averaged, 3, -999, "indexGroup", - "3", "keyedValue", "variableName", - OutputProcessor::TimeStepType::Zone, - OutputProcessor::Unit::m3_s, - _, + TimeStepType::Zone, + Constant::Units::m3_s, + "", "scheduleName"); EXPECT_TRUE(compare_eso_stream(delimited_string({"3,1,keyedValue,variableName [m3/s] !TimeStep,scheduleName"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::TimeStep, + ReportFreq::TimeStep, StoreType::Averaged, 4, -999, "indexGroup", - "4", "keyedValue", "variableName", - OutputProcessor::TimeStepType::System, - OutputProcessor::Unit::m3_s, - _, - {}); + TimeStepType::System, + Constant::Units::m3_s, + "", + ""); EXPECT_TRUE(compare_eso_stream(delimited_string({"4,1,keyedValue,variableName [m3/s] !TimeStep"}, "\n"))); // Hum, can no longer pass Something else than what's in the enum... WriteReportVariableDictionaryItem(*state, - ReportingFrequency::TimeStep, + ReportFreq::TimeStep, StoreType::Averaged, 5, -999, "indexGroup", - "5", "keyedValue", "variableName", aThirdTimeStepType, - OutputProcessor::Unit::m3_s, - _, - {}); + Constant::Units::m3_s, + "", + ""); EXPECT_TRUE(compare_eso_stream(delimited_string({"5,1,keyedValue,variableName [m3/s] !TimeStep"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::EachCall, + ReportFreq::EachCall, StoreType::Averaged, 6, -999, "indexGroup", - "6", "keyedValue", "variableName", - OutputProcessor::TimeStepType::Zone, - OutputProcessor::Unit::m3_s, - _, - {}); + TimeStepType::Zone, + Constant::Units::m3_s, + "", + ""); EXPECT_TRUE(compare_eso_stream(delimited_string({"6,1,keyedValue,variableName [m3/s] !Each Call"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::EachCall, + ReportFreq::EachCall, StoreType::Summed, 7, -999, "indexGroup", - "7", "keyedValue", "variableName", - OutputProcessor::TimeStepType::Zone, - OutputProcessor::Unit::m3_s, - _, - {}); + TimeStepType::Zone, + Constant::Units::m3_s, + "", + ""); EXPECT_TRUE(compare_eso_stream(delimited_string({"7,1,keyedValue,variableName [m3/s] !Each Call"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::EachCall, + ReportFreq::EachCall, StoreType::Averaged, 8, -999, "indexGroup", - "8", "keyedValue", "variableName", - OutputProcessor::TimeStepType::Zone, - OutputProcessor::Unit::m3_s, - _, + TimeStepType::Zone, + Constant::Units::m3_s, + "", "scheduleName"); EXPECT_TRUE(compare_eso_stream(delimited_string({"8,1,keyedValue,variableName [m3/s] !Each Call,scheduleName"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::EachCall, + ReportFreq::EachCall, StoreType::Averaged, 9, -999, "indexGroup", - "9", "keyedValue", "variableName", - OutputProcessor::TimeStepType::System, - OutputProcessor::Unit::m3_s, - _, - {}); + TimeStepType::System, + Constant::Units::m3_s, + "", + ""); EXPECT_TRUE(compare_eso_stream(delimited_string({"9,1,keyedValue,variableName [m3/s] !Each Call"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::EachCall, + ReportFreq::EachCall, StoreType::Averaged, 10, -999, "indexGroup", - "10", "keyedValue", "variableName", aThirdTimeStepType, - OutputProcessor::Unit::m3_s, - _, - {}); + Constant::Units::m3_s, + "", + ""); EXPECT_TRUE(compare_eso_stream(delimited_string({"10,1,keyedValue,variableName [m3/s] !Each Call"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::Hourly, + ReportFreq::Hour, StoreType::Averaged, 11, -999, "indexGroup", - "11", "keyedValue", "variableName", - OutputProcessor::TimeStepType::Zone, - OutputProcessor::Unit::m3_s, - _, - {}); - EXPECT_TRUE(state->dataOutputProcessor->TrackingHourlyVariables); - state->dataOutputProcessor->TrackingHourlyVariables = false; + TimeStepType::Zone, + Constant::Units::m3_s, + "", + ""); + EXPECT_TRUE(op->freqTrackingVariables[(int)ReportFreq::Hour]); + op->freqTrackingVariables[(int)ReportFreq::Hour] = false; EXPECT_TRUE(compare_eso_stream(delimited_string({"11,1,keyedValue,variableName [m3/s] !Hourly"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::Hourly, + ReportFreq::Hour, StoreType::Summed, 12, -999, "indexGroup", - "12", "keyedValue", "variableName", - OutputProcessor::TimeStepType::Zone, - OutputProcessor::Unit::m3_s, - _, - {}); - EXPECT_TRUE(state->dataOutputProcessor->TrackingHourlyVariables); - state->dataOutputProcessor->TrackingHourlyVariables = false; + TimeStepType::Zone, + Constant::Units::m3_s, + "", + ""); + EXPECT_TRUE(op->freqTrackingVariables[(int)ReportFreq::Hour]); + op->freqTrackingVariables[(int)ReportFreq::Hour] = false; EXPECT_TRUE(compare_eso_stream(delimited_string({"12,1,keyedValue,variableName [m3/s] !Hourly"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::Hourly, + ReportFreq::Hour, StoreType::Averaged, 13, -999, "indexGroup", - "13", "keyedValue", "variableName", - OutputProcessor::TimeStepType::Zone, - OutputProcessor::Unit::m3_s, - _, + TimeStepType::Zone, + Constant::Units::m3_s, + "", "scheduleName"); - EXPECT_TRUE(state->dataOutputProcessor->TrackingHourlyVariables); - state->dataOutputProcessor->TrackingHourlyVariables = false; + EXPECT_TRUE(op->freqTrackingVariables[(int)ReportFreq::Hour]); + op->freqTrackingVariables[(int)ReportFreq::Hour] = false; EXPECT_TRUE(compare_eso_stream(delimited_string({"13,1,keyedValue,variableName [m3/s] !Hourly,scheduleName"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::Hourly, + ReportFreq::Hour, StoreType::Averaged, 14, -999, "indexGroup", - "14", "keyedValue", "variableName", - OutputProcessor::TimeStepType::System, - OutputProcessor::Unit::m3_s, - _, - {}); - EXPECT_TRUE(state->dataOutputProcessor->TrackingHourlyVariables); - state->dataOutputProcessor->TrackingHourlyVariables = false; + TimeStepType::System, + Constant::Units::m3_s, + "", + ""); + EXPECT_TRUE(op->freqTrackingVariables[(int)ReportFreq::Hour]); + op->freqTrackingVariables[(int)ReportFreq::Hour] = false; EXPECT_TRUE(compare_eso_stream(delimited_string({"14,1,keyedValue,variableName [m3/s] !Hourly"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::Hourly, + ReportFreq::Hour, StoreType::Averaged, 15, -999, "indexGroup", - "15", "keyedValue", "variableName", aThirdTimeStepType, - OutputProcessor::Unit::m3_s, - _, - {}); - EXPECT_TRUE(state->dataOutputProcessor->TrackingHourlyVariables); - state->dataOutputProcessor->TrackingHourlyVariables = false; + Constant::Units::m3_s, + "", + ""); + EXPECT_TRUE(op->freqTrackingVariables[(int)ReportFreq::Hour]); + op->freqTrackingVariables[(int)ReportFreq::Hour] = false; EXPECT_TRUE(compare_eso_stream(delimited_string({"15,1,keyedValue,variableName [m3/s] !Hourly"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::Daily, + ReportFreq::Day, StoreType::Averaged, 16, -999, "indexGroup", - "16", "keyedValue", "variableName", - OutputProcessor::TimeStepType::Zone, - OutputProcessor::Unit::m3_s, - _, - {}); - EXPECT_TRUE(state->dataOutputProcessor->TrackingDailyVariables); - state->dataOutputProcessor->TrackingDailyVariables = false; + TimeStepType::Zone, + Constant::Units::m3_s, + "", + ""); + EXPECT_TRUE(op->freqTrackingVariables[(int)ReportFreq::Day]); + op->freqTrackingVariables[(int)ReportFreq::Day] = false; EXPECT_TRUE( compare_eso_stream(delimited_string({"16,7,keyedValue,variableName [m3/s] !Daily [Value,Min,Hour,Minute,Max,Hour,Minute]"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::Daily, + ReportFreq::Day, StoreType::Summed, 17, -999, "indexGroup", - "17", "keyedValue", "variableName", - OutputProcessor::TimeStepType::Zone, - OutputProcessor::Unit::m3_s, - _, - {}); - EXPECT_TRUE(state->dataOutputProcessor->TrackingDailyVariables); - state->dataOutputProcessor->TrackingDailyVariables = false; + TimeStepType::Zone, + Constant::Units::m3_s, + "", + ""); + EXPECT_TRUE(op->freqTrackingVariables[(int)ReportFreq::Day]); + op->freqTrackingVariables[(int)ReportFreq::Day] = false; EXPECT_TRUE( compare_eso_stream(delimited_string({"17,7,keyedValue,variableName [m3/s] !Daily [Value,Min,Hour,Minute,Max,Hour,Minute]"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::Daily, + ReportFreq::Day, StoreType::Averaged, 18, -999, "indexGroup", - "18", "keyedValue", "variableName", - OutputProcessor::TimeStepType::Zone, - OutputProcessor::Unit::m3_s, - _, + TimeStepType::Zone, + Constant::Units::m3_s, + "", "scheduleName"); - EXPECT_TRUE(state->dataOutputProcessor->TrackingDailyVariables); - state->dataOutputProcessor->TrackingDailyVariables = false; + EXPECT_TRUE(op->freqTrackingVariables[(int)ReportFreq::Day]); + op->freqTrackingVariables[(int)ReportFreq::Day] = false; EXPECT_TRUE(compare_eso_stream( delimited_string({"18,7,keyedValue,variableName [m3/s] !Daily [Value,Min,Hour,Minute,Max,Hour,Minute],scheduleName"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::Daily, + ReportFreq::Day, StoreType::Averaged, 19, -999, "indexGroup", - "19", "keyedValue", "variableName", - OutputProcessor::TimeStepType::System, - OutputProcessor::Unit::m3_s, - _, - {}); - EXPECT_TRUE(state->dataOutputProcessor->TrackingDailyVariables); - state->dataOutputProcessor->TrackingDailyVariables = false; + TimeStepType::System, + Constant::Units::m3_s, + "", + ""); + EXPECT_TRUE(op->freqTrackingVariables[(int)ReportFreq::Day]); + op->freqTrackingVariables[(int)ReportFreq::Day] = false; EXPECT_TRUE( compare_eso_stream(delimited_string({"19,7,keyedValue,variableName [m3/s] !Daily [Value,Min,Hour,Minute,Max,Hour,Minute]"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::Daily, + ReportFreq::Day, StoreType::Averaged, 20, -999, "indexGroup", - "20", "keyedValue", "variableName", aThirdTimeStepType, - OutputProcessor::Unit::m3_s, - _, - {}); - EXPECT_TRUE(state->dataOutputProcessor->TrackingDailyVariables); - state->dataOutputProcessor->TrackingDailyVariables = false; + Constant::Units::m3_s, + "", + ""); + EXPECT_TRUE(op->freqTrackingVariables[(int)ReportFreq::Day]); + op->freqTrackingVariables[(int)ReportFreq::Day] = false; EXPECT_TRUE( compare_eso_stream(delimited_string({"20,7,keyedValue,variableName [m3/s] !Daily [Value,Min,Hour,Minute,Max,Hour,Minute]"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::Monthly, + ReportFreq::Month, StoreType::Averaged, 21, -999, "indexGroup", - "21", "keyedValue", "variableName", - OutputProcessor::TimeStepType::Zone, - OutputProcessor::Unit::m3_s, - _, - {}); - EXPECT_TRUE(state->dataOutputProcessor->TrackingMonthlyVariables); - state->dataOutputProcessor->TrackingMonthlyVariables = false; + TimeStepType::Zone, + Constant::Units::m3_s, + "", + ""); + EXPECT_TRUE(op->freqTrackingVariables[(int)ReportFreq::Month]); + op->freqTrackingVariables[(int)ReportFreq::Month] = false; EXPECT_TRUE(compare_eso_stream( delimited_string({"21,9,keyedValue,variableName [m3/s] !Monthly [Value,Min,Day,Hour,Minute,Max,Day,Hour,Minute]"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::Monthly, + ReportFreq::Month, StoreType::Summed, 22, -999, "indexGroup", - "22", "keyedValue", "variableName", - OutputProcessor::TimeStepType::Zone, - OutputProcessor::Unit::m3_s, - _, - {}); - EXPECT_TRUE(state->dataOutputProcessor->TrackingMonthlyVariables); - state->dataOutputProcessor->TrackingMonthlyVariables = false; + TimeStepType::Zone, + Constant::Units::m3_s, + "", + ""); + EXPECT_TRUE(op->freqTrackingVariables[(int)ReportFreq::Month]); + op->freqTrackingVariables[(int)ReportFreq::Month] = false; EXPECT_TRUE(compare_eso_stream( delimited_string({"22,9,keyedValue,variableName [m3/s] !Monthly [Value,Min,Day,Hour,Minute,Max,Day,Hour,Minute]"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::Monthly, + ReportFreq::Month, StoreType::Averaged, 23, -999, "indexGroup", - "23", "keyedValue", "variableName", - OutputProcessor::TimeStepType::Zone, - OutputProcessor::Unit::m3_s, - _, + TimeStepType::Zone, + Constant::Units::m3_s, + "", "scheduleName"); - EXPECT_TRUE(state->dataOutputProcessor->TrackingMonthlyVariables); - state->dataOutputProcessor->TrackingMonthlyVariables = false; + EXPECT_TRUE(op->freqTrackingVariables[(int)ReportFreq::Month]); + op->freqTrackingVariables[(int)ReportFreq::Month] = false; EXPECT_TRUE(compare_eso_stream( delimited_string({"23,9,keyedValue,variableName [m3/s] !Monthly [Value,Min,Day,Hour,Minute,Max,Day,Hour,Minute],scheduleName"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::Monthly, + ReportFreq::Month, StoreType::Averaged, 24, -999, "indexGroup", - "24", "keyedValue", "variableName", - OutputProcessor::TimeStepType::System, - OutputProcessor::Unit::m3_s, - _, - {}); - EXPECT_TRUE(state->dataOutputProcessor->TrackingMonthlyVariables); - state->dataOutputProcessor->TrackingMonthlyVariables = false; + TimeStepType::System, + Constant::Units::m3_s, + "", + ""); + EXPECT_TRUE(op->freqTrackingVariables[(int)ReportFreq::Month]); + op->freqTrackingVariables[(int)ReportFreq::Month] = false; EXPECT_TRUE(compare_eso_stream( delimited_string({"24,9,keyedValue,variableName [m3/s] !Monthly [Value,Min,Day,Hour,Minute,Max,Day,Hour,Minute]"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::Monthly, + ReportFreq::Month, StoreType::Averaged, 25, -999, "indexGroup", - "25", "keyedValue", "variableName", aThirdTimeStepType, - OutputProcessor::Unit::m3_s, - _, - {}); - EXPECT_TRUE(state->dataOutputProcessor->TrackingMonthlyVariables); - state->dataOutputProcessor->TrackingMonthlyVariables = false; + Constant::Units::m3_s, + "", + ""); + EXPECT_TRUE(op->freqTrackingVariables[(int)ReportFreq::Month]); + op->freqTrackingVariables[(int)ReportFreq::Month] = false; EXPECT_TRUE(compare_eso_stream( delimited_string({"25,9,keyedValue,variableName [m3/s] !Monthly [Value,Min,Day,Hour,Minute,Max,Day,Hour,Minute]"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::Simulation, + ReportFreq::Simulation, StoreType::Averaged, 26, -999, "indexGroup", - "26", "keyedValue", "variableName", - OutputProcessor::TimeStepType::Zone, - OutputProcessor::Unit::m3_s, - _, - {}); - EXPECT_TRUE(state->dataOutputProcessor->TrackingRunPeriodVariables); - state->dataOutputProcessor->TrackingRunPeriodVariables = false; + TimeStepType::Zone, + Constant::Units::m3_s, + "", + ""); + EXPECT_TRUE(op->freqTrackingVariables[(int)ReportFreq::Simulation]); + op->freqTrackingVariables[(int)ReportFreq::Simulation] = false; EXPECT_TRUE(compare_eso_stream( delimited_string({"26,11,keyedValue,variableName [m3/s] !RunPeriod [Value,Min,Month,Day,Hour,Minute,Max,Month,Day,Hour,Minute]"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::Simulation, + ReportFreq::Simulation, StoreType::Summed, 27, -999, "indexGroup", - "27", "keyedValue", "variableName", - OutputProcessor::TimeStepType::Zone, - OutputProcessor::Unit::m3_s, - _, - {}); - EXPECT_TRUE(state->dataOutputProcessor->TrackingRunPeriodVariables); - state->dataOutputProcessor->TrackingRunPeriodVariables = false; + TimeStepType::Zone, + Constant::Units::m3_s, + "", + ""); + EXPECT_TRUE(op->freqTrackingVariables[(int)ReportFreq::Simulation]); + op->freqTrackingVariables[(int)ReportFreq::Simulation] = false; EXPECT_TRUE(compare_eso_stream( delimited_string({"27,11,keyedValue,variableName [m3/s] !RunPeriod [Value,Min,Month,Day,Hour,Minute,Max,Month,Day,Hour,Minute]"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::Simulation, + ReportFreq::Simulation, StoreType::Averaged, 28, -999, "indexGroup", - "28", "keyedValue", "variableName", - OutputProcessor::TimeStepType::Zone, - OutputProcessor::Unit::m3_s, - _, + TimeStepType::Zone, + Constant::Units::m3_s, + "", "scheduleName"); - EXPECT_TRUE(state->dataOutputProcessor->TrackingRunPeriodVariables); - state->dataOutputProcessor->TrackingRunPeriodVariables = false; + EXPECT_TRUE(op->freqTrackingVariables[(int)ReportFreq::Simulation]); + op->freqTrackingVariables[(int)ReportFreq::Simulation] = false; EXPECT_TRUE(compare_eso_stream(delimited_string( {"28,11,keyedValue,variableName [m3/s] !RunPeriod [Value,Min,Month,Day,Hour,Minute,Max,Month,Day,Hour,Minute],scheduleName"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::Simulation, + ReportFreq::Simulation, StoreType::Averaged, 29, -999, "indexGroup", - "29", "keyedValue", "variableName", - OutputProcessor::TimeStepType::System, - OutputProcessor::Unit::m3_s, - _, - {}); - EXPECT_TRUE(state->dataOutputProcessor->TrackingRunPeriodVariables); - state->dataOutputProcessor->TrackingRunPeriodVariables = false; + TimeStepType::System, + Constant::Units::m3_s, + "", + ""); + EXPECT_TRUE(op->freqTrackingVariables[(int)ReportFreq::Simulation]); + op->freqTrackingVariables[(int)ReportFreq::Simulation] = false; EXPECT_TRUE(compare_eso_stream( delimited_string({"29,11,keyedValue,variableName [m3/s] !RunPeriod [Value,Min,Month,Day,Hour,Minute,Max,Month,Day,Hour,Minute]"}, "\n"))); WriteReportVariableDictionaryItem(*state, - ReportingFrequency::Simulation, + ReportFreq::Simulation, StoreType::Averaged, 30, -999, "indexGroup", - "30", "keyedValue", "variableName", aThirdTimeStepType, - OutputProcessor::Unit::m3_s, - _, - {}); - EXPECT_TRUE(state->dataOutputProcessor->TrackingRunPeriodVariables); - state->dataOutputProcessor->TrackingRunPeriodVariables = false; + Constant::Units::m3_s, + "", + ""); + EXPECT_TRUE(op->freqTrackingVariables[(int)ReportFreq::Simulation]); + op->freqTrackingVariables[(int)ReportFreq::Simulation] = false; EXPECT_TRUE(compare_eso_stream( delimited_string({"30,11,keyedValue,variableName [m3/s] !RunPeriod [Value,Min,Month,Day,Hour,Minute,Max,Month,Day,Hour,Minute]"}, "\n"))); @@ -2383,21 +2021,22 @@ namespace OutputProcessor { TEST_F(SQLiteFixture, OutputProcessor_writeCumulativeReportMeterData) { - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(4, 1, 1, 0, 2017, false); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 1, 1, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", 1, "C", 1, false); + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->createSQLiteTimeIndexRecord(ReportFreq::Simulation, 1, 1, 0, 2017, false); + sql->createSQLiteReportDictionaryRecord( + 1, StoreType::Averaged, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", TimeStepType::Zone, "C", ReportFreq::Hour, false); - WriteCumulativeReportMeterData(*state, 1, "1", 616771620.98702729, true); + WriteCumulativeReportMeterData(*state, 1, 616771620.98702729, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,616771620.9870273"}, "\n"))); - WriteCumulativeReportMeterData(*state, 1, "1", 616771620.98702729, false); + WriteCumulativeReportMeterData(*state, 1, 616771620.98702729, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,616771620.9870273"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,616771620.9870273"}, "\n"))); - WriteCumulativeReportMeterData(*state, 1, "1", 0, true); + WriteCumulativeReportMeterData(*state, 1, 0, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,0.0"}, "\n"))); - WriteCumulativeReportMeterData(*state, 1, "1", 0, false); + WriteCumulativeReportMeterData(*state, 1, 0, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,0.0"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,0.0"}, "\n"))); @@ -2419,210 +2058,211 @@ namespace OutputProcessor { TEST_F(SQLiteFixture, OutputProcessor_writeNumericData_2) { - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(4, 1, 1, 0, 2017, false); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 1, 1, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", 1, "C", 1, false); + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->createSQLiteTimeIndexRecord(ReportFreq::Simulation, 1, 1, 0, 2017, false); + sql->createSQLiteReportDictionaryRecord( + 1, StoreType::Averaged, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", TimeStepType::Zone, "C", ReportFreq::Hour, false); - WriteNumericData(*state, 1, "1", 0); + WriteNumericData(*state, 1, 0); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,0"}, "\n"))); - WriteNumericData(*state, 1, "1", 0.1); + WriteNumericData(*state, 1, 0.1); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,0.1"}, "\n"))); - WriteNumericData(*state, 1, "1", -0.1); + WriteNumericData(*state, 1, -0.1); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,-0.1"}, "\n"))); - WriteNumericData(*state, 1, "1", 1.0e-2); + WriteNumericData(*state, 1, 1.0e-2); #if defined(_WIN32) && _MSC_VER < 1900 EXPECT_TRUE(compare_eso_stream(delimited_string({"1,0.01"}, "\n"))); #else EXPECT_TRUE(compare_eso_stream(delimited_string({"1,0.01"}, "\n"))); #endif - WriteNumericData(*state, 1, "1", 1.0e-3); + WriteNumericData(*state, 1, 1.0e-3); #if defined(_WIN32) && _MSC_VER < 1900 EXPECT_TRUE(compare_eso_stream(delimited_string({"1,0.001"}, "\n"))); #else EXPECT_TRUE(compare_eso_stream(delimited_string({"1,0.001"}, "\n"))); #endif - WriteNumericData(*state, 1, "1", 1.0e-4); + WriteNumericData(*state, 1, 1.0e-4); #if defined(_WIN32) && _MSC_VER < 1900 EXPECT_TRUE(compare_eso_stream(delimited_string({"1,0.0001"}, "\n"))); #else EXPECT_TRUE(compare_eso_stream(delimited_string({"1,0.0001"}, "\n"))); #endif - WriteNumericData(*state, 1, "1", 1.0e-5); + WriteNumericData(*state, 1, 1.0e-5); #if defined(_WIN32) && _MSC_VER < 1900 EXPECT_TRUE(compare_eso_stream(delimited_string({"1,0.00001"}, "\n"))); #else EXPECT_TRUE(compare_eso_stream(delimited_string({"1,0.00001"}, "\n"))); #endif - WriteNumericData(*state, 1, "1", 1.0e-6); + WriteNumericData(*state, 1, 1.0e-6); #if defined(_WIN32) && _MSC_VER < 1900 EXPECT_TRUE(compare_eso_stream(delimited_string({"1,0.000001"}, "\n"))); #else EXPECT_TRUE(compare_eso_stream(delimited_string({"1,0.000001"}, "\n"))); #endif - WriteNumericData(*state, 1, "1", 1.0e-7); + WriteNumericData(*state, 1, 1.0e-7); #if defined(_WIN32) && _MSC_VER < 1900 EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1e-7"}, "\n"))); #else EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1e-7"}, "\n"))); #endif - WriteNumericData(*state, 1, "1", 1.0e-8); + WriteNumericData(*state, 1, 1.0e-8); #if defined(_WIN32) && _MSC_VER < 1900 EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1e-8"}, "\n"))); #else EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1e-8"}, "\n"))); #endif - WriteNumericData(*state, 1, "1", 1.0e-9); + WriteNumericData(*state, 1, 1.0e-9); #if defined(_WIN32) && _MSC_VER < 1900 EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1e-9"}, "\n"))); #else EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1e-9"}, "\n"))); #endif - WriteNumericData(*state, 1, "1", 1.0e-10); + WriteNumericData(*state, 1, 1.0e-10); #if defined(_WIN32) && _MSC_VER < 1900 EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1e-10"}, "\n"))); #else EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1e-10"}, "\n"))); #endif - WriteNumericData(*state, 1, "1", 1.0e-11); + WriteNumericData(*state, 1, 1.0e-11); #if defined(_WIN32) && _MSC_VER < 1900 EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1e-11"}, "\n"))); #else EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1e-11"}, "\n"))); #endif - WriteNumericData(*state, 1, "1", 1.0e-12); + WriteNumericData(*state, 1, 1.0e-12); #if defined(_WIN32) && _MSC_VER < 1900 EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1e-12"}, "\n"))); #else EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1e-12"}, "\n"))); #endif - WriteNumericData(*state, 1, "1", 1.0e-13); + WriteNumericData(*state, 1, 1.0e-13); #if defined(_WIN32) && _MSC_VER < 1900 EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1e-13"}, "\n"))); #else EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1e-13"}, "\n"))); #endif - WriteNumericData(*state, 1, "1", 1.0e-14); + WriteNumericData(*state, 1, 1.0e-14); #if defined(_WIN32) && _MSC_VER < 1900 EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1e-14"}, "\n"))); #else EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1e-14"}, "\n"))); #endif - WriteNumericData(*state, 1, "1", 1.0e-15); + WriteNumericData(*state, 1, 1.0e-15); #if defined(_WIN32) && _MSC_VER < 1900 EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1e-15"}, "\n"))); #else EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1e-15"}, "\n"))); #endif - WriteNumericData(*state, 1, "1", 1.0e-16); + WriteNumericData(*state, 1, 1.0e-16); #if defined(_WIN32) && _MSC_VER < 1900 EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1e-16"}, "\n"))); #else EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1e-16"}, "\n"))); #endif - WriteNumericData(*state, 1, "1", -1.0e-16); + WriteNumericData(*state, 1, -1.0e-16); #if defined(_WIN32) && _MSC_VER < 1900 EXPECT_TRUE(compare_eso_stream(delimited_string({"1,-1e-16"}, "\n"))); #else EXPECT_TRUE(compare_eso_stream(delimited_string({"1,-1e-16"}, "\n"))); #endif - WriteNumericData(*state, 1, "1", 1.0e-19); + WriteNumericData(*state, 1, 1.0e-19); #if defined(_WIN32) && _MSC_VER < 1900 EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1e-19"}, "\n"))); #else EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1e-19"}, "\n"))); #endif - WriteNumericData(*state, 1, "1", 0.5); + WriteNumericData(*state, 1, 0.5); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,0.5"}, "\n"))); - WriteNumericData(*state, 1, "1", 1.0); + WriteNumericData(*state, 1, 1.0); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1.0"}, "\n"))); - WriteNumericData(*state, 1, "1", 10.0); + WriteNumericData(*state, 1, 10.0); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,10.0"}, "\n"))); - WriteNumericData(*state, 1, "1", 1.0e2); + WriteNumericData(*state, 1, 1.0e2); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,100.0"}, "\n"))); - WriteNumericData(*state, 1, "1", 1.0e3); + WriteNumericData(*state, 1, 1.0e3); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1000.0"}, "\n"))); - WriteNumericData(*state, 1, "1", 1.0e4); + WriteNumericData(*state, 1, 1.0e4); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,10000.0"}, "\n"))); - WriteNumericData(*state, 1, "1", 1.0e5); + WriteNumericData(*state, 1, 1.0e5); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,100000.0"}, "\n"))); - WriteNumericData(*state, 1, "1", 1.0e6); + WriteNumericData(*state, 1, 1.0e6); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1000000.0"}, "\n"))); - WriteNumericData(*state, 1, "1", 1.0e7); + WriteNumericData(*state, 1, 1.0e7); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,10000000.0"}, "\n"))); - WriteNumericData(*state, 1, "1", 1.0e8); + WriteNumericData(*state, 1, 1.0e8); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,100000000.0"}, "\n"))); - WriteNumericData(*state, 1, "1", 1.0e9); + WriteNumericData(*state, 1, 1.0e9); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1000000000.0"}, "\n"))); - WriteNumericData(*state, 1, "1", 1.0e10); + WriteNumericData(*state, 1, 1.0e10); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,10000000000.0"}, "\n"))); - WriteNumericData(*state, 1, "1", 1.0e11); + WriteNumericData(*state, 1, 1.0e11); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,100000000000.0"}, "\n"))); - WriteNumericData(*state, 1, "1", 1.0e12); + WriteNumericData(*state, 1, 1.0e12); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1000000000000.0"}, "\n"))); - WriteNumericData(*state, 1, "1", 1.0e13); + WriteNumericData(*state, 1, 1.0e13); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,10000000000000.0"}, "\n"))); - WriteNumericData(*state, 1, "1", 1.0e14); + WriteNumericData(*state, 1, 1.0e14); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,100000000000000.0"}, "\n"))); - WriteNumericData(*state, 1, "1", 1.0e15); + WriteNumericData(*state, 1, 1.0e15); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1000000000000000.0"}, "\n"))); - WriteNumericData(*state, 1, "1", 1.0e16); + WriteNumericData(*state, 1, 1.0e16); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,10000000000000000.0"}, "\n"))); - WriteNumericData(*state, 1, "1", 1.0e17); + WriteNumericData(*state, 1, 1.0e17); #if defined(_WIN32) && _MSC_VER < 1900 EXPECT_TRUE(compare_eso_stream(delimited_string({"1,100000000000000000.0"}, "\n"))); #else EXPECT_TRUE(compare_eso_stream(delimited_string({"1,100000000000000000.0"}, "\n"))); #endif - WriteNumericData(*state, 1, "1", -1.0e16); + WriteNumericData(*state, 1, -1.0e16); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,-10000000000000000.0"}, "\n"))); - WriteNumericData(*state, 1, "1", -1.0e17); + WriteNumericData(*state, 1, -1.0e17); #if defined(_WIN32) && _MSC_VER < 1900 EXPECT_TRUE(compare_eso_stream(delimited_string({"1,-100000000000000000.0"}, "\n"))); #else EXPECT_TRUE(compare_eso_stream(delimited_string({"1,-100000000000000000.0"}, "\n"))); #endif - WriteNumericData(*state, 1, "1", 1.0e25); + WriteNumericData(*state, 1, 1.0e25); #if defined(_WIN32) && _MSC_VER < 1900 EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1e25"}, "\n"))); #else @@ -2683,52 +2323,52 @@ namespace OutputProcessor { TEST_F(SQLiteFixture, OutputProcessor_addMeter) { + auto &sql = state->dataSQLiteProcedures->sqlite; + auto &op = state->dataOutputProcessor; + auto const name("testMeter"); - OutputProcessor::Unit const units(OutputProcessor::Unit::J); - auto const resourceType("ELEC"); - auto const endUse("testEndUse"); + Constant::Units const units(Constant::Units::J); + Constant::eResource resource = Constant::eResource::Electricity; + SOVEndUseCat sovEndUseCat = SOVEndUseCat::ExteriorLights; auto const endUseSub("testEndUseSub"); - auto const group("testGroup"); - - EXPECT_EQ(0, state->dataOutputProcessor->NumEnergyMeters); - EXPECT_EQ(0ul, state->dataOutputProcessor->EnergyMeters.size()); - - AddMeter(*state, name, units, resourceType, endUse, endUseSub, group); - - ASSERT_EQ(1, state->dataOutputProcessor->NumEnergyMeters); - ASSERT_EQ(1ul, state->dataOutputProcessor->EnergyMeters.size()); - - EXPECT_EQ(name, state->dataOutputProcessor->EnergyMeters(1).Name); - EXPECT_EQ(resourceType, state->dataOutputProcessor->EnergyMeters(1).ResourceType); - EXPECT_EQ(endUse, state->dataOutputProcessor->EnergyMeters(1).EndUse); - EXPECT_EQ(endUseSub, state->dataOutputProcessor->EnergyMeters(1).EndUseSub); - EXPECT_EQ(group, state->dataOutputProcessor->EnergyMeters(1).Group); - EXPECT_TRUE(compare_enums(units, state->dataOutputProcessor->EnergyMeters(1).Units)); - EXPECT_EQ(1, state->dataOutputProcessor->EnergyMeters(1).TSRptNum); - EXPECT_EQ(2, state->dataOutputProcessor->EnergyMeters(1).HRRptNum); - EXPECT_EQ(3, state->dataOutputProcessor->EnergyMeters(1).DYRptNum); - EXPECT_EQ(4, state->dataOutputProcessor->EnergyMeters(1).MNRptNum); - EXPECT_EQ(5, state->dataOutputProcessor->EnergyMeters(1).YRRptNum); - EXPECT_EQ(6, state->dataOutputProcessor->EnergyMeters(1).SMRptNum); - EXPECT_EQ(7, state->dataOutputProcessor->EnergyMeters(1).TSAccRptNum); - EXPECT_EQ(8, state->dataOutputProcessor->EnergyMeters(1).HRAccRptNum); - EXPECT_EQ(9, state->dataOutputProcessor->EnergyMeters(1).DYAccRptNum); - EXPECT_EQ(10, state->dataOutputProcessor->EnergyMeters(1).MNAccRptNum); - EXPECT_EQ(11, state->dataOutputProcessor->EnergyMeters(1).YRAccRptNum); - EXPECT_EQ(12, state->dataOutputProcessor->EnergyMeters(1).SMAccRptNum); - - EXPECT_EQ(1, state->dataOutputProcessor->NumEnergyMeters); - EXPECT_EQ(1ul, state->dataOutputProcessor->EnergyMeters.size()); - - state->dataSQLiteProcedures->sqlite->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time"); + SOVGroup sovGroup = SOVGroup::Building; + + EXPECT_EQ(0ul, op->meters.size()); + + AddMeter(*state, name, units, resource, sovEndUseCat, endUseSub, sovGroup, -1); + + ASSERT_EQ(1ul, op->meters.size()); + + EXPECT_EQ(name, op->meters[0]->Name); + EXPECT_EQ((int)resource, (int)op->meters[0]->resource); + EXPECT_EQ((int)sovEndUseCat, (int)op->meters[0]->sovEndUseCat); + EXPECT_EQ(endUseSub, op->meters[0]->EndUseSub); + EXPECT_EQ((int)sovGroup, (int)op->meters[0]->sovGroup); + EXPECT_EQ((int)units, (int)op->meters[0]->units); + EXPECT_EQ(1, op->meters[0]->periods[(int)ReportFreq::TimeStep].RptNum); + EXPECT_EQ(2, op->meters[0]->periods[(int)ReportFreq::Hour].RptNum); + EXPECT_EQ(3, op->meters[0]->periods[(int)ReportFreq::Day].RptNum); + EXPECT_EQ(4, op->meters[0]->periods[(int)ReportFreq::Month].RptNum); + EXPECT_EQ(6, op->meters[0]->periods[(int)ReportFreq::Simulation].RptNum); + EXPECT_EQ(5, op->meters[0]->periods[(int)ReportFreq::Year].RptNum); + EXPECT_EQ(7, op->meters[0]->periods[(int)ReportFreq::TimeStep].accRptNum); + EXPECT_EQ(8, op->meters[0]->periods[(int)ReportFreq::Hour].accRptNum); + EXPECT_EQ(9, op->meters[0]->periods[(int)ReportFreq::Day].accRptNum); + EXPECT_EQ(10, op->meters[0]->periods[(int)ReportFreq::Month].accRptNum); + EXPECT_EQ(12, op->meters[0]->periods[(int)ReportFreq::Simulation].accRptNum); + EXPECT_EQ(11, op->meters[0]->periods[(int)ReportFreq::Year].accRptNum); + + EXPECT_EQ(1ul, op->meters.size()); + + sql->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time"); auto const name2("testMeter2"); - OutputProcessor::Unit const units2(OutputProcessor::Unit::unknown); // was "kwh" - auto const resourceType2("OTHER"); - auto const endUse2("testEndUse2"); + Constant::Units const units2 = Constant::Units::unknown; // was "kwh" + Constant::eResource resource2 = Constant::eResource::None; + SOVEndUseCat sovEndUseCat2 = SOVEndUseCat::Refrigeration; auto const endUseSub2("testEndUseSub2"); - auto const group2("testGroup2"); - AddMeter(*state, name2, units2, resourceType2, endUse2, endUseSub2, group2); + SOVGroup sovGroup2 = SOVGroup::Plant; + AddMeter(*state, name2, units2, resource2, sovEndUseCat2, endUseSub2, sovGroup2, -1); auto errorData = queryResult("SELECT * FROM Errors;", "Errors"); @@ -2741,84 +2381,45 @@ namespace OutputProcessor { "1"}; EXPECT_EQ(errorData0, errorData[0]); - ASSERT_EQ(2, state->dataOutputProcessor->NumEnergyMeters); - ASSERT_EQ(2ul, state->dataOutputProcessor->EnergyMeters.size()); + ASSERT_EQ(2ul, op->meters.size()); } + // We're not really doing things this way anymore TEST_F(SQLiteFixture, OutputProcessor_validateNStandardizeMeterTitles) { - std::vector> input_map = {{"J", "ELECTRICITY", "INTERIOR LIGHTS", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "INTERIOR LIGHTS", "endUseSub", "SYSTEM"}, - {"J", "ELECTRICITY", "INTERIOR LIGHTS", "endUseSub", "PLANT"}, - {"J", "ELECTRICITY", "INTERIOR LIGHTS", "endUseSub", "BUILDING", "zoneName"}, + auto &sql = state->dataSQLiteProcedures->sqlite; + std::vector> input_map = {{"J", "ELECTRICITY", "INTERIORLIGHTS", "endUseSub", "HVAC"}, + {"J", "ELECTRICITY", "INTERIORLIGHTS", "endUseSub", "HVAC"}, + {"J", "ELECTRICITY", "INTERIORLIGHTS", "endUseSub", "PLANT"}, + {"J", "ELECTRICITY", "INTERIORLIGHTS", "endUseSub", "BUILDING", "zoneName"}, {"J", "ELECTRICITY", "INTERIORLIGHTS", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "EXTERIOR LIGHTS", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "EXTERIORLIGHTS", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "HEATING", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "HTG", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "HEATPRODUCED", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "COOLING", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "CLG", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "DOMESTICHOTWATER", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "DHW", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "DOMESTIC HOT WATER", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "COGEN", "endUseSub", "HVAC"}, + {"J", "ELECTRICITY", "WATERSYSTEMS", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "COGENERATION", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "INTERIOREQUIPMENT", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "INTERIOR EQUIPMENT", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "EXTERIOREQUIPMENT", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "EXTERIOR EQUIPMENT", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "EXT EQ", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "EXTERIOREQ", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "EXTERIOR:WATEREQUIPMENT", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "PURCHASEDHOTWATER", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "DISTRICTHOTWATER", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "PURCHASED HEATING", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "PURCHASEDCOLDWATER", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "DISTRICTCHILLEDWATER", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "PURCHASEDCHILLEDWATER", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "PURCHASED COLD WATER", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "PURCHASED COOLING", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "FANS", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "FAN", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "HEATINGCOILS", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "HEATINGCOIL", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "HEATING COILS", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "HEATING COIL", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "COOLINGCOILS", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "COOLINGCOIL", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "COOLING COILS", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "COOLING COIL", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "PUMPS", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "PUMP", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "FREECOOLING", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "FREE COOLING", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "LOOPTOLOOP", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "CHILLERS", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "CHILLER", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "BOILERS", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "BOILER", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "BASEBOARD", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "BASEBOARDS", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "HEATREJECTION", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "HEAT REJECTION", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "HUMIDIFIER", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "HUMIDIFIERS", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "HEATRECOVERY", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "HEAT RECOVERY", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "PHOTOVOLTAICS", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "PV", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "PHOTOVOLTAIC", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "WINDTURBINES", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "WT", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "WINDTURBINE", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "ELECTRICSTORAGE", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "HEAT RECOVERY FOR COOLING", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "HEATRECOVERYFORCOOLING", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "HEATRECOVERYCOOLING", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "HEAT RECOVERY FOR HEATING", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "HEATRECOVERYFORHEATING", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "HEATRECOVERYHEATING", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "ELECTRICITYEMISSIONS", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "PURCHASEDELECTRICITYEMISSIONS", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "SOLDELECTRICITYEMISSIONS", "endUseSub", "HVAC"}, @@ -2835,15 +2436,10 @@ namespace OutputProcessor { {"J", "ELECTRICITY", "REFRIGERATION", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "COLDSTORAGECHARGE", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "COLDSTORAGEDISCHARGE", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "WATERSYSTEMS", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "WATERSYSTEM", "endUseSub", "HVAC"}, - // { "J", "ELECTRICITY", "Water System", "endUseSub", "HVAC" }, // This one fails because - // Water System isn't a proper choice (needs to be upper cased in code...) {"J", "ELECTRICITY", "RAINWATER", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "CONDENSATE", "endUseSub", "HVAC"}, {"J", "ELECTRICITY", "WELLWATER", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "MAINSWATER", "endUseSub", "HVAC"}, - {"J", "ELECTRICITY", "PURCHASEDWATER", "endUseSub", "HVAC"}}; + {"J", "ELECTRICITY", "MAINSWATER", "endUseSub", "HVAC"}}; std::vector const result_map = {"Electricity:Facility", "Electricity:HVAC", @@ -2882,8 +2478,8 @@ namespace OutputProcessor { "endUseSub:CoolingCoils:Electricity", "Pumps:Electricity", "endUseSub:Pumps:Electricity", - "Freecooling:Electricity", - "endUseSub:Freecooling:Electricity", + "FreeCooling:Electricity", + "endUseSub:FreeCooling:Electricity", "LoopToLoop:Electricity", "endUseSub:LoopToLoop:Electricity", "Chillers:Electricity", @@ -2940,101 +2536,69 @@ namespace OutputProcessor { "endUseSub:ColdStorageCharge:Electricity", "ColdStorageDischarge:Electricity", "endUseSub:ColdStorageDischarge:Electricity", - "Rainwater:Electricity", - "endUseSub:Rainwater:Electricity", + "RainWater:Electricity", + "endUseSub:RainWater:Electricity", "Condensate:Electricity", "endUseSub:Condensate:Electricity", - "Wellwater:Electricity", - "endUseSub:Wellwater:Electricity", + "WellWater:Electricity", + "endUseSub:WellWater:Electricity", "MainsWater:Electricity", "endUseSub:MainsWater:Electricity"}; + auto &op = state->dataOutputProcessor; + InitializeOutput(*state); bool errorFound = false; for (auto &meter : input_map) { errorFound = false; - if (meter.size() == 5) { - ValidateNStandardizeMeterTitles(*state, - OutputProcessor::Unit::J, - meter[1], - meter[2], - meter[3], - meter[4], - errorFound, - "", - ""); // the first argument was meter[ 0 ] - } else if (meter.size() == 6) { - ValidateNStandardizeMeterTitles(*state, - OutputProcessor::Unit::J, - meter[1], - meter[2], - meter[3], - meter[4], - errorFound, - meter[5], - ""); // the first argument was meter[ 0 ] - } - EXPECT_FALSE(errorFound); + SOVEndUseCat sovEndUseCat = static_cast(getEnumValue(sovEndUseCatNamesUC, meter[2])); + std::string stdEndUseSub = standardizeEndUseSub(sovEndUseCat, meter[3]); + SOVGroup sovGroup = static_cast(getEnumValue(sovGroupNamesUC, meter[4])); + + EXPECT_FALSE(compare_enums(SOVEndUseCat::Invalid, sovEndUseCat, false)); + EXPECT_FALSE(compare_enums(SOVGroup::Invalid, sovGroup, false)); + + AttachMeters(*state, + Constant::Units::J, + Constant::eResource::Electricity, + sovEndUseCat, + meter[3], + sovGroup, + (meter.size() == 6) ? meter[5] : "", + "", + -1); } - ASSERT_EQ(103, state->dataOutputProcessor->NumEnergyMeters); - ASSERT_EQ(103ul, state->dataOutputProcessor->EnergyMeters.size()); + ASSERT_EQ(103ul, op->meters.size()); - for (int i = 0; i < state->dataOutputProcessor->NumEnergyMeters; ++i) { - EXPECT_EQ(result_map[i], state->dataOutputProcessor->EnergyMeters(i + 1).Name); + for (int i = 0; i < (int)op->meters.size(); ++i) { + EXPECT_EQ(result_map[i], op->meters[i]->Name); } - state->dataSQLiteProcedures->sqlite->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time"); - - OutputProcessor::Unit units = OutputProcessor::Unit::J; - std::string resourceType = "ELECTRICITY"; - std::string endUse = "INTERIOR LIGHTS"; - std::string endUseSub = "endUseSub"; - std::string group = "BAD INPUT"; - errorFound = false; - - ValidateNStandardizeMeterTitles(*state, units, resourceType, endUse, endUseSub, group, errorFound, "", ""); - EXPECT_TRUE(errorFound); - - units = OutputProcessor::Unit::J; - resourceType = "ELECTRICITY"; - endUse = "BAD INPUT"; - endUseSub = "endUseSub"; - group = "HVAC"; - errorFound = false; - - ValidateNStandardizeMeterTitles(*state, units, resourceType, endUse, endUseSub, group, errorFound, "", ""); - EXPECT_TRUE(errorFound); - - auto errorData = queryResult("SELECT * FROM Errors;", "Errors"); - - ASSERT_EQ(2ul, errorData.size()); - std::vector errorData0{"1", "1", "1", "Illegal Group (for Meters) Entered=BAD INPUT", "1"}; - std::vector errorData1{"2", "1", "1", "Illegal EndUse (for Meters) Entered=BAD INPUT", "1"}; - EXPECT_EQ(errorData0, errorData[0]); - EXPECT_EQ(errorData1, errorData[1]); + sql->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time"); } TEST_F(SQLiteFixture, OutputProcessor_setupTimePointers) { - // OutputProcessor::TimeValue.allocate(2); + // TimeValue.allocate(2); + auto &op = state->dataOutputProcessor; + Real64 timeStep = 1.0; - auto timeStep = 1.0; + SetupTimePointers(*state, SOVTimeStepType::Zone, timeStep); - SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::Zone, timeStep); - - EXPECT_DOUBLE_EQ(timeStep, *state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).TimeStep); - EXPECT_DOUBLE_EQ(0.0, state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute); + EXPECT_DOUBLE_EQ(timeStep, *op->TimeValue[(int)TimeStepType::Zone].TimeStep); + EXPECT_DOUBLE_EQ(0.0, op->TimeValue[(int)TimeStepType::Zone].CurMinute); timeStep = 2.0; - SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::HVAC, timeStep); + SetupTimePointers(*state, SOVTimeStepType::HVAC, timeStep); - EXPECT_DOUBLE_EQ(timeStep, *state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep); - EXPECT_DOUBLE_EQ(0.0, state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute); + EXPECT_DOUBLE_EQ(timeStep, *op->TimeValue[(int)TimeStepType::System].TimeStep); + EXPECT_DOUBLE_EQ(0.0, op->TimeValue[(int)TimeStepType::System].CurMinute); } TEST_F(SQLiteFixture, OutputProcessor_getReportVariableInput) { + auto &op = state->dataOutputProcessor; std::string const idf_objects = delimited_string({ "Output:Variable,*,Site Outdoor Air Drybulb Temperature,timestep;", "Output:Variable,*,Site Outdoor Air Drybulb Temperature,hourly;", @@ -3048,46 +2612,47 @@ namespace OutputProcessor { GetReportVariableInput(*state); EXPECT_EQ(5, state->dataInputProcessing->inputProcessor->getNumObjectsFound(*state, "Output:Variable")); - EXPECT_EQ(5, state->dataOutputProcessor->NumOfReqVariables); - - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(1).Key); - EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", state->dataOutputProcessor->ReqRepVars(1).VarName); - EXPECT_TRUE(compare_enums(ReportingFrequency::TimeStep, state->dataOutputProcessor->ReqRepVars(1).frequency)); - EXPECT_EQ(0, state->dataOutputProcessor->ReqRepVars(1).SchedPtr); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(1).SchedName); - EXPECT_FALSE(state->dataOutputProcessor->ReqRepVars(1).Used); - - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(2).Key); - EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", state->dataOutputProcessor->ReqRepVars(2).VarName); - EXPECT_TRUE(compare_enums(ReportingFrequency::Hourly, state->dataOutputProcessor->ReqRepVars(2).frequency)); - EXPECT_EQ(0, state->dataOutputProcessor->ReqRepVars(2).SchedPtr); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(2).SchedName); - EXPECT_FALSE(state->dataOutputProcessor->ReqRepVars(2).Used); - - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(3).Key); - EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", state->dataOutputProcessor->ReqRepVars(3).VarName); - EXPECT_TRUE(compare_enums(ReportingFrequency::Daily, state->dataOutputProcessor->ReqRepVars(3).frequency)); - EXPECT_EQ(0, state->dataOutputProcessor->ReqRepVars(3).SchedPtr); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(3).SchedName); - EXPECT_FALSE(state->dataOutputProcessor->ReqRepVars(3).Used); - - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(4).Key); - EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", state->dataOutputProcessor->ReqRepVars(4).VarName); - EXPECT_TRUE(compare_enums(ReportingFrequency::Monthly, state->dataOutputProcessor->ReqRepVars(4).frequency)); - EXPECT_EQ(0, state->dataOutputProcessor->ReqRepVars(4).SchedPtr); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(4).SchedName); - EXPECT_FALSE(state->dataOutputProcessor->ReqRepVars(4).Used); - - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(5).Key); - EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", state->dataOutputProcessor->ReqRepVars(5).VarName); - EXPECT_TRUE(compare_enums(ReportingFrequency::Simulation, state->dataOutputProcessor->ReqRepVars(5).frequency)); - EXPECT_EQ(0, state->dataOutputProcessor->ReqRepVars(5).SchedPtr); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(5).SchedName); - EXPECT_FALSE(state->dataOutputProcessor->ReqRepVars(5).Used); + EXPECT_EQ(5, op->reqVars.size()); + + EXPECT_EQ("", op->reqVars[0]->key); + EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", op->reqVars[0]->name); + EXPECT_EQ((int)ReportFreq::TimeStep, (int)op->reqVars[0]->freq); + EXPECT_EQ(0, op->reqVars[0]->SchedPtr); + EXPECT_EQ("", op->reqVars[0]->SchedName); + EXPECT_FALSE(op->reqVars[0]->Used); + + EXPECT_EQ("", op->reqVars[1]->key); + EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", op->reqVars[1]->name); + EXPECT_EQ((int)ReportFreq::Hour, (int)op->reqVars[1]->freq); + EXPECT_EQ(0, op->reqVars[1]->SchedPtr); + EXPECT_EQ("", op->reqVars[1]->SchedName); + EXPECT_FALSE(op->reqVars[1]->Used); + + EXPECT_EQ("", op->reqVars[2]->key); + EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", op->reqVars[2]->name); + EXPECT_EQ((int)ReportFreq::Day, (int)op->reqVars[2]->freq); + EXPECT_EQ(0, op->reqVars[2]->SchedPtr); + EXPECT_EQ("", op->reqVars[2]->SchedName); + EXPECT_FALSE(op->reqVars[2]->Used); + + EXPECT_EQ("", op->reqVars[3]->key); + EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", op->reqVars[3]->name); + EXPECT_EQ((int)ReportFreq::Month, (int)op->reqVars[3]->freq); + EXPECT_EQ(0, op->reqVars[3]->SchedPtr); + EXPECT_EQ("", op->reqVars[3]->SchedName); + EXPECT_FALSE(op->reqVars[3]->Used); + + EXPECT_EQ("", op->reqVars[4]->key); + EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", op->reqVars[4]->name); + EXPECT_EQ((int)ReportFreq::Simulation, (int)op->reqVars[4]->freq); + EXPECT_EQ(0, op->reqVars[4]->SchedPtr); + EXPECT_EQ("", op->reqVars[4]->SchedName); + EXPECT_FALSE(op->reqVars[4]->Used); } TEST_F(SQLiteFixture, OutputProcessor_buildKeyVarList) { + auto &op = state->dataOutputProcessor; std::string const idf_objects = delimited_string({ "Output:Variable,*,Site Outdoor Air Drybulb Temperature,timestep;", "Output:Variable,*,Site Outdoor Air Drybulb Temperature,hourly;", @@ -3103,58 +2668,53 @@ namespace OutputProcessor { Real64 faketmp = 0; - SetupOutputVariable(*state, - "Site Outdoor Air Drybulb Temperature", - OutputProcessor::Unit::C, - faketmp, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Average, - "Environment"); - - EXPECT_EQ(5, state->dataOutputProcessor->NumExtraVars); - EXPECT_EQ(6, state->dataOutputProcessor->NumOfReqVariables); - - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(1).Key); - EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", state->dataOutputProcessor->ReqRepVars(1).VarName); - EXPECT_TRUE(compare_enums(ReportingFrequency::TimeStep, state->dataOutputProcessor->ReqRepVars(1).frequency)); - EXPECT_EQ(0, state->dataOutputProcessor->ReqRepVars(1).SchedPtr); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(1).SchedName); - EXPECT_TRUE(state->dataOutputProcessor->ReqRepVars(1).Used); - - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(2).Key); - EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", state->dataOutputProcessor->ReqRepVars(2).VarName); - EXPECT_TRUE(compare_enums(ReportingFrequency::Hourly, state->dataOutputProcessor->ReqRepVars(2).frequency)); - EXPECT_EQ(0, state->dataOutputProcessor->ReqRepVars(2).SchedPtr); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(2).SchedName); - EXPECT_TRUE(state->dataOutputProcessor->ReqRepVars(2).Used); - - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(3).Key); - EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", state->dataOutputProcessor->ReqRepVars(3).VarName); - EXPECT_TRUE(compare_enums(ReportingFrequency::Daily, state->dataOutputProcessor->ReqRepVars(3).frequency)); - EXPECT_EQ(0, state->dataOutputProcessor->ReqRepVars(3).SchedPtr); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(3).SchedName); - EXPECT_TRUE(state->dataOutputProcessor->ReqRepVars(3).Used); - - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(4).Key); - EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", state->dataOutputProcessor->ReqRepVars(4).VarName); - EXPECT_TRUE(compare_enums(ReportingFrequency::Monthly, state->dataOutputProcessor->ReqRepVars(4).frequency)); - EXPECT_EQ(0, state->dataOutputProcessor->ReqRepVars(4).SchedPtr); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(4).SchedName); - EXPECT_TRUE(state->dataOutputProcessor->ReqRepVars(4).Used); - - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(5).Key); - EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", state->dataOutputProcessor->ReqRepVars(5).VarName); - EXPECT_TRUE(compare_enums(ReportingFrequency::Simulation, state->dataOutputProcessor->ReqRepVars(5).frequency)); - EXPECT_EQ(0, state->dataOutputProcessor->ReqRepVars(5).SchedPtr); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(5).SchedName); - EXPECT_TRUE(state->dataOutputProcessor->ReqRepVars(5).Used); - - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(5).Key); - EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", state->dataOutputProcessor->ReqRepVars(5).VarName); - EXPECT_TRUE(compare_enums(ReportingFrequency::Simulation, state->dataOutputProcessor->ReqRepVars(5).frequency)); - EXPECT_EQ(0, state->dataOutputProcessor->ReqRepVars(5).SchedPtr); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(5).SchedName); - EXPECT_TRUE(state->dataOutputProcessor->ReqRepVars(5).Used); + SetupOutputVariable( + *state, "Site Outdoor Air Drybulb Temperature", Constant::Units::C, faketmp, SOVTimeStepType::Zone, SOVStoreType::Average, "Environment"); + + // EXPECT_EQ(5, op->NumExtraVars); + EXPECT_EQ(6, op->reqVars.size()); + + EXPECT_EQ("", op->reqVars[0]->key); + EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", op->reqVars[0]->name); + EXPECT_EQ((int)ReportFreq::TimeStep, (int)op->reqVars[0]->freq); + EXPECT_EQ(0, op->reqVars[0]->SchedPtr); + EXPECT_EQ("", op->reqVars[0]->SchedName); + EXPECT_TRUE(op->reqVars[0]->Used); + + EXPECT_EQ("", op->reqVars[1]->key); + EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", op->reqVars[1]->name); + EXPECT_EQ((int)ReportFreq::Hour, (int)op->reqVars[1]->freq); + EXPECT_EQ(0, op->reqVars[1]->SchedPtr); + EXPECT_EQ("", op->reqVars[1]->SchedName); + EXPECT_TRUE(op->reqVars[1]->Used); + + EXPECT_EQ("", op->reqVars[2]->key); + EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", op->reqVars[2]->name); + EXPECT_EQ((int)ReportFreq::Day, (int)op->reqVars[2]->freq); + EXPECT_EQ(0, op->reqVars[2]->SchedPtr); + EXPECT_EQ("", op->reqVars[2]->SchedName); + EXPECT_TRUE(op->reqVars[2]->Used); + + EXPECT_EQ("", op->reqVars[3]->key); + EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", op->reqVars[3]->name); + EXPECT_EQ((int)ReportFreq::Month, (int)op->reqVars[3]->freq); + EXPECT_EQ(0, op->reqVars[3]->SchedPtr); + EXPECT_EQ("", op->reqVars[3]->SchedName); + EXPECT_TRUE(op->reqVars[3]->Used); + + EXPECT_EQ("", op->reqVars[4]->key); + EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", op->reqVars[4]->name); + EXPECT_EQ((int)ReportFreq::Simulation, (int)op->reqVars[4]->freq); + EXPECT_EQ(0, op->reqVars[4]->SchedPtr); + EXPECT_EQ("", op->reqVars[4]->SchedName); + EXPECT_TRUE(op->reqVars[4]->Used); + + EXPECT_EQ("", op->reqVars[4]->key); + EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", op->reqVars[4]->name); + EXPECT_EQ((int)ReportFreq::Simulation, (int)op->reqVars[4]->freq); + EXPECT_EQ(0, op->reqVars[4]->SchedPtr); + EXPECT_EQ("", op->reqVars[4]->SchedName); + EXPECT_TRUE(op->reqVars[4]->Used); } TEST_F(SQLiteFixture, OutputProcessor_buildKeyVarListWithKey) @@ -3181,53 +2741,23 @@ namespace OutputProcessor { Real64 ilgrLiving = 0.0; Real64 ilgrAttic = 0.0; - SetupOutputVariable(*state, - "Zone Total Internal Latent Gain Rate", - OutputProcessor::Unit::J, - ilgrGarage, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, - "Garage"); - SetupOutputVariable(*state, - "Zone Total Internal Latent Gain Rate", - OutputProcessor::Unit::J, - ilgrLiving, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, - "Living"); - SetupOutputVariable(*state, - "Zone Total Internal Latent Gain Rate", - OutputProcessor::Unit::J, - ilgrAttic, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, - "Attic"); + SetupOutputVariable( + *state, "Zone Total Internal Latent Gain Rate", Constant::Units::J, ilgrGarage, SOVTimeStepType::Zone, SOVStoreType::Summed, "Garage"); + SetupOutputVariable( + *state, "Zone Total Internal Latent Gain Rate", Constant::Units::J, ilgrLiving, SOVTimeStepType::Zone, SOVStoreType::Summed, "Living"); + SetupOutputVariable( + *state, "Zone Total Internal Latent Gain Rate", Constant::Units::J, ilgrAttic, SOVTimeStepType::Zone, SOVStoreType::Summed, "Attic"); Real64 isgrGarage = 0.0; Real64 isgrLiving = 0.0; Real64 isgrAttic = 0.0; - SetupOutputVariable(*state, - "Zone Total Internal Sensible Gain Rate", - OutputProcessor::Unit::J, - isgrGarage, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, - "Garage"); - SetupOutputVariable(*state, - "Zone Total Internal Sensible Gain Rate", - OutputProcessor::Unit::J, - isgrLiving, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, - "Living"); - SetupOutputVariable(*state, - "Zone Total Internal Sensible Gain Rate", - OutputProcessor::Unit::J, - isgrAttic, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, - "Attic"); + SetupOutputVariable( + *state, "Zone Total Internal Sensible Gain Rate", Constant::Units::J, isgrGarage, SOVTimeStepType::Zone, SOVStoreType::Summed, "Garage"); + SetupOutputVariable( + *state, "Zone Total Internal Sensible Gain Rate", Constant::Units::J, isgrLiving, SOVTimeStepType::Zone, SOVStoreType::Summed, "Living"); + SetupOutputVariable( + *state, "Zone Total Internal Sensible Gain Rate", Constant::Units::J, isgrAttic, SOVTimeStepType::Zone, SOVStoreType::Summed, "Attic"); state->dataGlobal->DoWeathSim = true; state->dataGlobal->TimeStepZone = 0.25; @@ -3240,16 +2770,16 @@ namespace OutputProcessor { Real64 fakeVar = 0.0; auto resetReqRepVarsUsed = [this]() { - auto &op(state->dataOutputProcessor); - for (int i = 1; i <= op->NumOfReqVariables; ++i) { - op->ReqRepVars(i).Used = false; + auto &op = state->dataOutputProcessor; + for (auto *reqVar : op->reqVars) { + reqVar->Used = false; } }; auto countReqRepVarsUsed = [this]() { - auto &op(state->dataOutputProcessor); + auto &op = state->dataOutputProcessor; int count = 0; - for (int i = 1; i <= op->NumOfReqVariables; ++i) { - if (op->ReqRepVars(i).Used) { + for (auto const *reqVar : op->reqVars) { + if (reqVar->Used) { ++count; } } @@ -3257,39 +2787,24 @@ namespace OutputProcessor { }; resetReqRepVarsUsed(); - SetupOutputVariable(*state, - "Zone Total Internal Latent Gain Rate", - OutputProcessor::Unit::W, - fakeVar, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Average, - "LIVING"); + SetupOutputVariable( + *state, "Zone Total Internal Latent Gain Rate", Constant::Units::W, fakeVar, SOVTimeStepType::Zone, SOVStoreType::Average, "LIVING"); EXPECT_EQ(1, countReqRepVarsUsed()); - EXPECT_EQ(1, state->dataOutputProcessor->NumExtraVars); + // EXPECT_EQ(1, op->NumExtraVars); resetReqRepVarsUsed(); - SetupOutputVariable(*state, - "Zone Total Internal Latent Gain Rate", - OutputProcessor::Unit::W, - fakeVar, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Average, - "GARAGE"); + SetupOutputVariable( + *state, "Zone Total Internal Latent Gain Rate", Constant::Units::W, fakeVar, SOVTimeStepType::Zone, SOVStoreType::Average, "GARAGE"); EXPECT_EQ(0, countReqRepVarsUsed()); // Garage not part of the list - EXPECT_EQ(1, state->dataOutputProcessor->NumExtraVars); + // EXPECT_EQ(1, op->NumExtraVars); resetReqRepVarsUsed(); - SetupOutputVariable(*state, - "Zone Total Internal Latent Gain Rate", - OutputProcessor::Unit::W, - fakeVar, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Average, - "ATTIC"); + SetupOutputVariable( + *state, "Zone Total Internal Latent Gain Rate", Constant::Units::W, fakeVar, SOVTimeStepType::Zone, SOVStoreType::Average, "ATTIC"); EXPECT_EQ(1, countReqRepVarsUsed()); - EXPECT_EQ(1, state->dataOutputProcessor->NumExtraVars); + // EXPECT_EQ(1, op->NumExtraVars); } TEST_F(SQLiteFixture, OutputProcessor_buildKeyVarListWithRegexKey) @@ -3315,53 +2830,23 @@ namespace OutputProcessor { Real64 ilgrLiving1; Real64 ilgrLiving2; - SetupOutputVariable(*state, - "Zone Total Internal Latent Gain Rate", - OutputProcessor::Unit::J, - ilgrGarage, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, - "Garage"); - SetupOutputVariable(*state, - "Zone Total Internal Latent Gain Rate", - OutputProcessor::Unit::J, - ilgrLiving1, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, - "Living1"); - SetupOutputVariable(*state, - "Zone Total Internal Latent Gain Rate", - OutputProcessor::Unit::J, - ilgrLiving2, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, - "Living2"); + SetupOutputVariable( + *state, "Zone Total Internal Latent Gain Rate", Constant::Units::J, ilgrGarage, SOVTimeStepType::Zone, SOVStoreType::Summed, "Garage"); + SetupOutputVariable( + *state, "Zone Total Internal Latent Gain Rate", Constant::Units::J, ilgrLiving1, SOVTimeStepType::Zone, SOVStoreType::Summed, "Living1"); + SetupOutputVariable( + *state, "Zone Total Internal Latent Gain Rate", Constant::Units::J, ilgrLiving2, SOVTimeStepType::Zone, SOVStoreType::Summed, "Living2"); Real64 isgrGarage; Real64 isgrLiving; Real64 isgrAttic; - SetupOutputVariable(*state, - "Zone Total Internal Sensible Gain Rate", - OutputProcessor::Unit::J, - isgrGarage, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, - "Garage"); - SetupOutputVariable(*state, - "Zone Total Internal Sensible Gain Rate", - OutputProcessor::Unit::J, - isgrLiving, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, - "Living1"); - SetupOutputVariable(*state, - "Zone Total Internal Sensible Gain Rate", - OutputProcessor::Unit::J, - isgrAttic, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, - "Living2"); + SetupOutputVariable( + *state, "Zone Total Internal Sensible Gain Rate", Constant::Units::J, isgrGarage, SOVTimeStepType::Zone, SOVStoreType::Summed, "Garage"); + SetupOutputVariable( + *state, "Zone Total Internal Sensible Gain Rate", Constant::Units::J, isgrLiving, SOVTimeStepType::Zone, SOVStoreType::Summed, "Living1"); + SetupOutputVariable( + *state, "Zone Total Internal Sensible Gain Rate", Constant::Units::J, isgrAttic, SOVTimeStepType::Zone, SOVStoreType::Summed, "Living2"); state->dataGlobal->DoWeathSim = true; state->dataGlobal->TimeStepZone = 0.25; @@ -3370,35 +2855,34 @@ namespace OutputProcessor { EXPECT_EQ(state->dataOutRptTab->MonthlyInputCount, 1); OutputReportTabular::InitializeTabularMonthly(*state); - auto &op(state->dataOutputProcessor); + auto &op = state->dataOutputProcessor; // This has already been called by SetupOutputVariable so it'll do nothing // GetReportVariableInput(*state); - EXPECT_EQ(2, op->ReqRepVars.size()); - EXPECT_EQ(2, op->NumOfReqVariables); - auto &varLatentRegex = op->ReqRepVars(1); - EXPECT_EQ("Liv.*", varLatentRegex.Key); - EXPECT_FALSE(varLatentRegex.is_simple_string); - EXPECT_NE(nullptr, varLatentRegex.case_insensitive_pattern); + EXPECT_EQ(2, op->reqVars.size()); + auto *varLatentRegex = op->reqVars[0]; + EXPECT_EQ("Liv.*", varLatentRegex->key); + EXPECT_FALSE(varLatentRegex->is_simple_string); + EXPECT_NE(nullptr, varLatentRegex->case_insensitive_pattern); - auto &varSensibleNormal = op->ReqRepVars(2); - EXPECT_EQ("Living", varSensibleNormal.Key); - EXPECT_TRUE(varSensibleNormal.is_simple_string); - EXPECT_EQ(nullptr, varSensibleNormal.case_insensitive_pattern); + auto *varSensibleNormal = op->reqVars[1]; + EXPECT_EQ("Living", varSensibleNormal->key); + EXPECT_TRUE(varSensibleNormal->is_simple_string); + EXPECT_EQ(nullptr, varSensibleNormal->case_insensitive_pattern); auto resetReqRepVarsUsed = [this]() { - auto &op(state->dataOutputProcessor); - for (int i = 1; i <= op->NumOfReqVariables; ++i) { - op->ReqRepVars(i).Used = false; + auto &op = state->dataOutputProcessor; + for (auto *reqVar : op->reqVars) { + reqVar->Used = false; } - op->NumExtraVars = 0; + // op->NumExtraVars = 0; }; auto countReqRepVarsUsed = [this]() { - auto &op(state->dataOutputProcessor); + auto &op = state->dataOutputProcessor; int count = 0; - for (int i = 1; i <= op->NumOfReqVariables; ++i) { - if (op->ReqRepVars(i).Used) { + for (auto const *reqVar : op->reqVars) { + if (reqVar->Used) { ++count; } } @@ -3406,53 +2890,39 @@ namespace OutputProcessor { }; EXPECT_EQ(1, countReqRepVarsUsed()); - EXPECT_EQ(1, state->dataOutputProcessor->NumExtraVars); + // EXPECT_EQ(1, op->NumExtraVars); resetReqRepVarsUsed(); - SetupOutputVariable(*state, - "Zone Total Internal Latent Gain Rate", - OutputProcessor::Unit::J, - ilgrGarage, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, - "LIVING1"); + SetupOutputVariable( + *state, "Zone Total Internal Latent Gain Rate", Constant::Units::J, ilgrGarage, SOVTimeStepType::Zone, SOVStoreType::Summed, "LIVING1"); EXPECT_EQ(1, countReqRepVarsUsed()); - EXPECT_EQ(1, state->dataOutputProcessor->NumExtraVars); - EXPECT_TRUE(varLatentRegex.Used); - EXPECT_FALSE(varSensibleNormal.Used); + // EXPECT_EQ(1, op->NumExtraVars); + EXPECT_TRUE(varLatentRegex->Used); + EXPECT_FALSE(varSensibleNormal->Used); resetReqRepVarsUsed(); resetReqRepVarsUsed(); - SetupOutputVariable(*state, - "Zone Total Internal Latent Gain Rate", - OutputProcessor::Unit::J, - ilgrGarage, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, - "LIVING"); + SetupOutputVariable( + *state, "Zone Total Internal Latent Gain Rate", Constant::Units::J, ilgrGarage, SOVTimeStepType::Zone, SOVStoreType::Summed, "LIVING"); EXPECT_EQ(1, countReqRepVarsUsed()); - EXPECT_EQ(1, state->dataOutputProcessor->NumExtraVars); - EXPECT_TRUE(varLatentRegex.Used); - EXPECT_FALSE(varSensibleNormal.Used); + // EXPECT_EQ(1, op->NumExtraVars); + EXPECT_TRUE(varLatentRegex->Used); + EXPECT_FALSE(varSensibleNormal->Used); resetReqRepVarsUsed(); - SetupOutputVariable(*state, - "Zone Total Internal Latent Gain Rate", - OutputProcessor::Unit::J, - ilgrGarage, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, - "GARAGE"); + SetupOutputVariable( + *state, "Zone Total Internal Latent Gain Rate", Constant::Units::J, ilgrGarage, SOVTimeStepType::Zone, SOVStoreType::Summed, "GARAGE"); EXPECT_EQ(0, countReqRepVarsUsed()); // When NumExtraVars is 0 after CheckReportVariable, it resets to 1... - EXPECT_EQ(1, state->dataOutputProcessor->NumExtraVars); - EXPECT_FALSE(varLatentRegex.Used); - EXPECT_FALSE(varSensibleNormal.Used); + // EXPECT_EQ(1, op->NumExtraVars); + EXPECT_FALSE(varLatentRegex->Used); + EXPECT_FALSE(varSensibleNormal->Used); } TEST_F(SQLiteFixture, OutputProcessor_addBlankKeys) { + auto &op = state->dataOutputProcessor; std::string const idf_objects = delimited_string({ "Output:Variable,*,Site Outdoor Air Drybulb Temperature,timestep;", "Output:Variable,*,Site Outdoor Air Drybulb Temperature,hourly;", @@ -3468,80 +2938,76 @@ namespace OutputProcessor { GetReportVariableInput(*state); Real64 fakeVar = 0.0; - SetupOutputVariable(*state, - "Site Outdoor Air Drybulb Temperature", - OutputProcessor::Unit::C, - fakeVar, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Average, - "Environment"); - - EXPECT_EQ(5, state->dataOutputProcessor->NumExtraVars); - EXPECT_EQ(1, state->dataOutputProcessor->ReportList(1)); - EXPECT_EQ(2, state->dataOutputProcessor->ReportList(2)); - EXPECT_EQ(3, state->dataOutputProcessor->ReportList(3)); - EXPECT_EQ(4, state->dataOutputProcessor->ReportList(4)); - EXPECT_EQ(5, state->dataOutputProcessor->ReportList(5)); - EXPECT_EQ(5, state->dataOutputProcessor->NumOfReqVariables); - - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(1).Key); - EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", state->dataOutputProcessor->ReqRepVars(1).VarName); - EXPECT_TRUE(compare_enums(ReportingFrequency::TimeStep, state->dataOutputProcessor->ReqRepVars(1).frequency)); - EXPECT_EQ(0, state->dataOutputProcessor->ReqRepVars(1).SchedPtr); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(1).SchedName); - EXPECT_TRUE(state->dataOutputProcessor->ReqRepVars(1).Used); - - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(2).Key); - EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", state->dataOutputProcessor->ReqRepVars(2).VarName); - EXPECT_TRUE(compare_enums(ReportingFrequency::Hourly, state->dataOutputProcessor->ReqRepVars(2).frequency)); - EXPECT_EQ(0, state->dataOutputProcessor->ReqRepVars(2).SchedPtr); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(2).SchedName); - EXPECT_TRUE(state->dataOutputProcessor->ReqRepVars(2).Used); - - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(3).Key); - EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", state->dataOutputProcessor->ReqRepVars(3).VarName); - EXPECT_TRUE(compare_enums(ReportingFrequency::Daily, state->dataOutputProcessor->ReqRepVars(3).frequency)); - EXPECT_EQ(0, state->dataOutputProcessor->ReqRepVars(3).SchedPtr); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(3).SchedName); - EXPECT_TRUE(state->dataOutputProcessor->ReqRepVars(3).Used); - - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(4).Key); - EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", state->dataOutputProcessor->ReqRepVars(4).VarName); - EXPECT_TRUE(compare_enums(ReportingFrequency::Monthly, state->dataOutputProcessor->ReqRepVars(4).frequency)); - EXPECT_EQ(0, state->dataOutputProcessor->ReqRepVars(4).SchedPtr); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(4).SchedName); - EXPECT_TRUE(state->dataOutputProcessor->ReqRepVars(4).Used); - - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(5).Key); - EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", state->dataOutputProcessor->ReqRepVars(5).VarName); - EXPECT_TRUE(compare_enums(ReportingFrequency::Simulation, state->dataOutputProcessor->ReqRepVars(5).frequency)); - EXPECT_EQ(0, state->dataOutputProcessor->ReqRepVars(5).SchedPtr); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(5).SchedName); - EXPECT_TRUE(state->dataOutputProcessor->ReqRepVars(5).Used); + SetupOutputVariable( + *state, "Site Outdoor Air Drybulb Temperature", Constant::Units::C, fakeVar, SOVTimeStepType::Zone, SOVStoreType::Average, "Environment"); + + // EXPECT_EQ(5, op->NumExtraVars); + // EXPECT_EQ(1, op->ReportList(1)); + // EXPECT_EQ(2, op->ReportList(2)); + // EXPECT_EQ(3, op->ReportList(3)); + // EXPECT_EQ(4, op->ReportList(4)); + // EXPECT_EQ(5, op->ReportList(5)); + EXPECT_EQ(5, op->reqVars.size()); + + EXPECT_EQ("", op->reqVars[0]->key); + EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", op->reqVars[0]->name); + EXPECT_EQ((int)ReportFreq::TimeStep, (int)op->reqVars[0]->freq); + EXPECT_EQ(0, op->reqVars[0]->SchedPtr); + EXPECT_EQ("", op->reqVars[0]->SchedName); + EXPECT_TRUE(op->reqVars[0]->Used); + + EXPECT_EQ("", op->reqVars[1]->key); + EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", op->reqVars[1]->name); + EXPECT_EQ((int)ReportFreq::Hour, (int)op->reqVars[1]->freq); + EXPECT_EQ(0, op->reqVars[1]->SchedPtr); + EXPECT_EQ("", op->reqVars[1]->SchedName); + EXPECT_TRUE(op->reqVars[1]->Used); + + EXPECT_EQ("", op->reqVars[2]->key); + EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", op->reqVars[2]->name); + EXPECT_EQ((int)ReportFreq::Day, (int)op->reqVars[2]->freq); + EXPECT_EQ(0, op->reqVars[2]->SchedPtr); + EXPECT_EQ("", op->reqVars[2]->SchedName); + EXPECT_TRUE(op->reqVars[2]->Used); + + EXPECT_EQ("", op->reqVars[3]->key); + EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", op->reqVars[3]->name); + EXPECT_EQ((int)ReportFreq::Month, (int)op->reqVars[3]->freq); + EXPECT_EQ(0, op->reqVars[3]->SchedPtr); + EXPECT_EQ("", op->reqVars[3]->SchedName); + EXPECT_TRUE(op->reqVars[3]->Used); + + EXPECT_EQ("", op->reqVars[4]->key); + EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", op->reqVars[4]->name); + EXPECT_EQ((int)ReportFreq::Simulation, (int)op->reqVars[4]->freq); + EXPECT_EQ(0, op->reqVars[4]->SchedPtr); + EXPECT_EQ("", op->reqVars[4]->SchedName); + EXPECT_TRUE(op->reqVars[4]->Used); } TEST_F(SQLiteFixture, OutputProcessor_determineFrequency) { - auto const valid_options = std::map({{"Detailed", ReportingFrequency::EachCall}, - {"Timestep", ReportingFrequency::TimeStep}, - {"Hourly", ReportingFrequency::Hourly}, - {"Daily", ReportingFrequency::Daily}, - {"Monthly", ReportingFrequency::Monthly}, - {"RunPeriod", ReportingFrequency::Simulation}, - {"Environment", ReportingFrequency::Simulation}, - {"Annual", ReportingFrequency::Yearly}, - {"Bad Input", ReportingFrequency::Hourly}}); - - ReportingFrequency report_freq = ReportingFrequency::EachCall; + auto const valid_options = std::map({{"Detailed", ReportFreq::EachCall}, + {"Timestep", ReportFreq::TimeStep}, + {"Hourly", ReportFreq::Hour}, + {"Daily", ReportFreq::Day}, + {"Monthly", ReportFreq::Month}, + {"RunPeriod", ReportFreq::Simulation}, + {"Environment", ReportFreq::Simulation}, + {"Annual", ReportFreq::Year}, + {"Bad Input", ReportFreq::Hour}}); + + ReportFreq report_freq = ReportFreq::EachCall; for (auto const &option : valid_options) { report_freq = determineFrequency(*state, option.first); - EXPECT_TRUE(compare_enums(option.second, report_freq)); + EXPECT_EQ((int)option.second, (int)report_freq); } } TEST_F(SQLiteFixture, OutputProcessor_addToOutputVariableList) { + auto &op = state->dataOutputProcessor; std::string const idf_objects = delimited_string({ "Output:Variable,*,Site Outdoor Air Drybulb Temperature,timestep;", "Output:Variable,*,Site Outdoor Air Drybulb Temperature,hourly;", @@ -3556,66 +3022,52 @@ namespace OutputProcessor { ASSERT_TRUE(process_idf(idf_objects)); - AddToOutputVariableList(*state, - "Site Outdoor Air Drybulb Temperature", - OutputProcessor::TimeStepType::Zone, - StoreType::Averaged, - VariableType::Real, - OutputProcessor::Unit::C); - AddToOutputVariableList(*state, - "Site Outdoor Air Wetbulb Temperature", - OutputProcessor::TimeStepType::Zone, - StoreType::Averaged, - VariableType::Real, - OutputProcessor::Unit::C); - AddToOutputVariableList(*state, - "Site Outdoor Air Humidity Ratio", - OutputProcessor::TimeStepType::Zone, - StoreType::Averaged, - VariableType::Real, - OutputProcessor::Unit::kgWater_kgDryAir); - AddToOutputVariableList(*state, - "Site Outdoor Air Relative Humidity", - OutputProcessor::TimeStepType::Zone, - StoreType::Averaged, - VariableType::Real, - OutputProcessor::Unit::Perc); - - EXPECT_TRUE(compare_enums(OutputProcessor::TimeStepType::Zone, state->dataOutputProcessor->DDVariableTypes(1).timeStepType)); - EXPECT_TRUE(compare_enums(StoreType::Averaged, state->dataOutputProcessor->DDVariableTypes(1).storeType)); - EXPECT_TRUE(compare_enums(VariableType::Real, state->dataOutputProcessor->DDVariableTypes(1).variableType)); - EXPECT_EQ(0, state->dataOutputProcessor->DDVariableTypes(1).Next); - EXPECT_FALSE(state->dataOutputProcessor->DDVariableTypes(1).ReportedOnDDFile); - EXPECT_EQ("Site Outdoor Air Drybulb Temperature", state->dataOutputProcessor->DDVariableTypes(1).VarNameOnly); - EXPECT_TRUE(compare_enums(OutputProcessor::Unit::C, state->dataOutputProcessor->DDVariableTypes(1).units)); - - EXPECT_TRUE(compare_enums(OutputProcessor::TimeStepType::Zone, state->dataOutputProcessor->DDVariableTypes(2).timeStepType)); - EXPECT_TRUE(compare_enums(StoreType::Averaged, state->dataOutputProcessor->DDVariableTypes(2).storeType)); - EXPECT_TRUE(compare_enums(VariableType::Real, state->dataOutputProcessor->DDVariableTypes(2).variableType)); - EXPECT_EQ(0, state->dataOutputProcessor->DDVariableTypes(2).Next); - EXPECT_FALSE(state->dataOutputProcessor->DDVariableTypes(2).ReportedOnDDFile); - EXPECT_EQ("Site Outdoor Air Wetbulb Temperature", state->dataOutputProcessor->DDVariableTypes(2).VarNameOnly); - EXPECT_TRUE(compare_enums(OutputProcessor::Unit::C, state->dataOutputProcessor->DDVariableTypes(2).units)); - - EXPECT_TRUE(compare_enums(OutputProcessor::TimeStepType::Zone, state->dataOutputProcessor->DDVariableTypes(3).timeStepType)); - EXPECT_TRUE(compare_enums(StoreType::Averaged, state->dataOutputProcessor->DDVariableTypes(3).storeType)); - EXPECT_TRUE(compare_enums(VariableType::Real, state->dataOutputProcessor->DDVariableTypes(3).variableType)); - EXPECT_EQ(0, state->dataOutputProcessor->DDVariableTypes(3).Next); - EXPECT_FALSE(state->dataOutputProcessor->DDVariableTypes(3).ReportedOnDDFile); - EXPECT_EQ("Site Outdoor Air Humidity Ratio", state->dataOutputProcessor->DDVariableTypes(3).VarNameOnly); - EXPECT_TRUE(compare_enums(OutputProcessor::Unit::kgWater_kgDryAir, state->dataOutputProcessor->DDVariableTypes(3).units)); - - EXPECT_TRUE(compare_enums(OutputProcessor::TimeStepType::Zone, state->dataOutputProcessor->DDVariableTypes(4).timeStepType)); - EXPECT_TRUE(compare_enums(StoreType::Averaged, state->dataOutputProcessor->DDVariableTypes(4).storeType)); - EXPECT_TRUE(compare_enums(VariableType::Real, state->dataOutputProcessor->DDVariableTypes(4).variableType)); - EXPECT_EQ(0, state->dataOutputProcessor->DDVariableTypes(4).Next); - EXPECT_FALSE(state->dataOutputProcessor->DDVariableTypes(4).ReportedOnDDFile); - EXPECT_EQ("Site Outdoor Air Relative Humidity", state->dataOutputProcessor->DDVariableTypes(4).VarNameOnly); - EXPECT_TRUE(compare_enums(OutputProcessor::Unit::Perc, state->dataOutputProcessor->DDVariableTypes(4).units)); + AddDDOutVar(*state, "Site Outdoor Air Drybulb Temperature", TimeStepType::Zone, StoreType::Averaged, VariableType::Real, Constant::Units::C); + AddDDOutVar(*state, "Site Outdoor Air Wetbulb Temperature", TimeStepType::Zone, StoreType::Averaged, VariableType::Real, Constant::Units::C); + AddDDOutVar(*state, + "Site Outdoor Air Humidity Ratio", + TimeStepType::Zone, + StoreType::Averaged, + VariableType::Real, + Constant::Units::kgWater_kgDryAir); + AddDDOutVar(*state, "Site Outdoor Air Relative Humidity", TimeStepType::Zone, StoreType::Averaged, VariableType::Real, Constant::Units::Perc); + + EXPECT_EQ((int)TimeStepType::Zone, (int)op->ddOutVars[0]->timeStepType); + EXPECT_EQ((int)StoreType::Averaged, (int)op->ddOutVars[0]->storeType); + EXPECT_EQ((int)VariableType::Real, (int)op->ddOutVars[0]->variableType); + EXPECT_EQ(-1, op->ddOutVars[0]->Next); + EXPECT_FALSE(op->ddOutVars[0]->ReportedOnDDFile); + EXPECT_EQ("Site Outdoor Air Drybulb Temperature", op->ddOutVars[0]->name); + EXPECT_EQ((int)Constant::Units::C, (int)op->ddOutVars[0]->units); + + EXPECT_EQ((int)TimeStepType::Zone, (int)op->ddOutVars[1]->timeStepType); + EXPECT_EQ((int)StoreType::Averaged, (int)op->ddOutVars[1]->storeType); + EXPECT_EQ((int)VariableType::Real, (int)op->ddOutVars[1]->variableType); + EXPECT_EQ(-1, op->ddOutVars[1]->Next); + EXPECT_FALSE(op->ddOutVars[1]->ReportedOnDDFile); + EXPECT_EQ("Site Outdoor Air Wetbulb Temperature", op->ddOutVars[1]->name); + EXPECT_EQ((int)Constant::Units::C, (int)op->ddOutVars[1]->units); + + EXPECT_EQ((int)TimeStepType::Zone, (int)op->ddOutVars[2]->timeStepType); + EXPECT_EQ((int)StoreType::Averaged, (int)op->ddOutVars[2]->storeType); + EXPECT_EQ((int)VariableType::Real, (int)op->ddOutVars[2]->variableType); + EXPECT_EQ(-1, op->ddOutVars[2]->Next); + EXPECT_FALSE(op->ddOutVars[2]->ReportedOnDDFile); + EXPECT_EQ("Site Outdoor Air Humidity Ratio", op->ddOutVars[2]->name); + EXPECT_EQ((int)Constant::Units::kgWater_kgDryAir, (int)op->ddOutVars[2]->units); + + EXPECT_EQ((int)TimeStepType::Zone, (int)op->ddOutVars[3]->timeStepType); + EXPECT_EQ((int)StoreType::Averaged, (int)op->ddOutVars[3]->storeType); + EXPECT_EQ((int)VariableType::Real, (int)op->ddOutVars[3]->variableType); + EXPECT_EQ(-1, op->ddOutVars[3]->Next); + EXPECT_FALSE(op->ddOutVars[3]->ReportedOnDDFile); + EXPECT_EQ("Site Outdoor Air Relative Humidity", op->ddOutVars[3]->name); + EXPECT_EQ((int)Constant::Units::Perc, (int)op->ddOutVars[3]->units); } TEST_F(SQLiteFixture, OutputProcessor_setupOutputVariable) { + auto &op = state->dataOutputProcessor; std::string const idf_objects = delimited_string({ "Output:Variable,*,Site Outdoor Air Drybulb Temperature,runperiod;", }); @@ -3625,10 +3077,10 @@ namespace OutputProcessor { GetReportVariableInput(*state); SetupOutputVariable(*state, "Site Outdoor Air Drybulb Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state->dataEnvrn->OutDryBulbTemp, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Average, + SOVTimeStepType::Zone, + SOVStoreType::Average, "Environment"); auto reportDataDictionaryResults = queryResult("SELECT * FROM ReportDataDictionary;", "ReportDataDictionary"); @@ -3637,25 +3089,27 @@ namespace OutputProcessor { {{"1", "0", "Avg", "Zone", "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", "Run Period", "", "C"}}); EXPECT_EQ(reportDataDictionary, reportDataDictionaryResults); - EXPECT_EQ(1, state->dataOutputProcessor->NumExtraVars); - - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(1).Key); - EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", state->dataOutputProcessor->ReqRepVars(1).VarName); - EXPECT_TRUE(compare_enums(ReportingFrequency::Simulation, state->dataOutputProcessor->ReqRepVars(1).frequency)); - EXPECT_EQ(0, state->dataOutputProcessor->ReqRepVars(1).SchedPtr); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(1).SchedName); - EXPECT_EQ(true, state->dataOutputProcessor->ReqRepVars(1).Used); - - EXPECT_TRUE(compare_enums(OutputProcessor::TimeStepType::Zone, state->dataOutputProcessor->DDVariableTypes(1).timeStepType)); - EXPECT_TRUE(compare_enums(StoreType::Averaged, state->dataOutputProcessor->DDVariableTypes(1).storeType)); - EXPECT_TRUE(compare_enums(VariableType::Real, state->dataOutputProcessor->DDVariableTypes(1).variableType)); - EXPECT_EQ(0, state->dataOutputProcessor->DDVariableTypes(1).Next); - EXPECT_FALSE(state->dataOutputProcessor->DDVariableTypes(1).ReportedOnDDFile); - EXPECT_EQ("Site Outdoor Air Drybulb Temperature", state->dataOutputProcessor->DDVariableTypes(1).VarNameOnly); + // EXPECT_EQ(1, op->NumExtraVars); + + EXPECT_EQ("", op->reqVars[0]->key); + EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", op->reqVars[0]->name); + EXPECT_EQ((int)ReportFreq::Simulation, (int)op->reqVars[0]->freq); + EXPECT_EQ(0, op->reqVars[0]->SchedPtr); + EXPECT_EQ("", op->reqVars[0]->SchedName); + EXPECT_EQ(true, op->reqVars[0]->Used); + + EXPECT_EQ((int)TimeStepType::Zone, (int)op->ddOutVars[0]->timeStepType); + EXPECT_EQ((int)StoreType::Averaged, (int)op->ddOutVars[0]->storeType); + EXPECT_EQ((int)VariableType::Real, (int)op->ddOutVars[0]->variableType); + EXPECT_EQ(-1, op->ddOutVars[0]->Next); + EXPECT_FALSE(op->ddOutVars[0]->ReportedOnDDFile); + EXPECT_EQ("Site Outdoor Air Drybulb Temperature", op->ddOutVars[0]->name); } TEST_F(EnergyPlusFixture, OutputProcessor_setupOutputVariable_endUseSubKey) { + auto &op = state->dataOutputProcessor; + std::string const idf_objects = delimited_string({ "Output:Variable,*,Chiller Electricity Energy,runperiod;", "Output:Variable,*,Lights Electricity Energy,runperiod;", @@ -3669,30 +3123,28 @@ namespace OutputProcessor { Real64 cooling_consumption = 0.; SetupOutputVariable(*state, "Chiller Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, cooling_consumption, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "Cool-1", - {}, - "ELECTRICITY", - "Cooling", + Constant::eResource::Electricity, + SOVEndUseCat::Cooling, {}, // EndUseSubKey - "Plant"); + SOVGroup::Plant); Real64 light_consumption = 0.; SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "RailroadCrossing", // EndUseSubKey - "Building", + SOVGroup::Building, "SPACE1-1", 1, 1); @@ -3700,63 +3152,60 @@ namespace OutputProcessor { Real64 fuel_oil_co2 = 0.; SetupOutputVariable(*state, "Environmental Impact Fuel Oil No 2 CO2 Emissions Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, fuel_oil_co2, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "Site", - {}, - "CO2", - "FuelOilNo2Emissions", + Constant::eResource::CO2, + SOVEndUseCat::FuelOilNo2Emissions, {}, // EndUseSubKey - ""); - - int found; + SOVGroup::Invalid); // Cooling // testing an ABUPS end use with no sub end use specified - EXPECT_EQ(1, state->dataOutputProcessor->EndUseCategory(2).NumSubcategories); - EXPECT_EQ("General", state->dataOutputProcessor->EndUseCategory(2).SubcategoryName(1)); + EXPECT_EQ(1, op->EndUseCategory(2).NumSubcategories); + EXPECT_EQ("General", op->EndUseCategory(2).SubcategoryName(1)); - found = Util::FindItem("Cooling:Electricity", state->dataOutputProcessor->EnergyMeters); - EXPECT_NE(0, found); - EXPECT_EQ("Electricity", state->dataOutputProcessor->EnergyMeters(found).ResourceType); - EXPECT_EQ("Cooling", state->dataOutputProcessor->EnergyMeters(found).EndUse); - EXPECT_EQ("", state->dataOutputProcessor->EnergyMeters(found).EndUseSub); + auto found = op->meterMap.find(Util::makeUPPER("Cooling:Electricity")); + EXPECT_NE(found, op->meterMap.end()); + EXPECT_EQ((int)Constant::eResource::Electricity, (int)op->meters[found->second]->resource); + EXPECT_EQ((int)SOVEndUseCat::Cooling, (int)op->meters[found->second]->sovEndUseCat); + EXPECT_EQ("", op->meters[found->second]->EndUseSub); - found = Util::FindItem("General:Cooling:Electricity", state->dataOutputProcessor->EnergyMeters); - EXPECT_NE(0, found); - EXPECT_EQ("Electricity", state->dataOutputProcessor->EnergyMeters(found).ResourceType); - EXPECT_EQ("Cooling", state->dataOutputProcessor->EnergyMeters(found).EndUse); - EXPECT_EQ("General", state->dataOutputProcessor->EnergyMeters(found).EndUseSub); + found = op->meterMap.find(Util::makeUPPER("General:Cooling:Electricity")); + EXPECT_NE(found, op->meterMap.end()); + EXPECT_EQ((int)Constant::eResource::Electricity, (int)op->meters[found->second]->resource); + EXPECT_EQ((int)SOVEndUseCat::Cooling, (int)op->meters[found->second]->sovEndUseCat); + EXPECT_EQ("General", op->meters[found->second]->EndUseSub); // lighting // testing an ABUPS end use with a sub end use specified - EXPECT_EQ(1, state->dataOutputProcessor->EndUseCategory(3).NumSubcategories); // lighting end use - EXPECT_EQ("RailroadCrossing", state->dataOutputProcessor->EndUseCategory(3).SubcategoryName(1)); + EXPECT_EQ(1, op->EndUseCategory(3).NumSubcategories); // lighting end use + EXPECT_EQ("RailroadCrossing", op->EndUseCategory(3).SubcategoryName(1)); - found = Util::FindItem("InteriorLights:Electricity", state->dataOutputProcessor->EnergyMeters); - EXPECT_NE(0, found); - EXPECT_EQ("Electricity", state->dataOutputProcessor->EnergyMeters(found).ResourceType); - EXPECT_EQ("InteriorLights", state->dataOutputProcessor->EnergyMeters(found).EndUse); - EXPECT_EQ("", state->dataOutputProcessor->EnergyMeters(found).EndUseSub); + found = op->meterMap.find(Util::makeUPPER("InteriorLights:Electricity")); + EXPECT_NE(found, op->meterMap.end()); + EXPECT_EQ((int)Constant::eResource::Electricity, (int)op->meters[found->second]->resource); + EXPECT_EQ((int)SOVEndUseCat::InteriorLights, (int)op->meters[found->second]->sovEndUseCat); + EXPECT_EQ("", op->meters[found->second]->EndUseSub); - found = Util::FindItem("General:InteriorLights:Electricity", state->dataOutputProcessor->EnergyMeters); - EXPECT_EQ(0, found); // should not find this + found = op->meterMap.find(Util::makeUPPER("General:InteriorLights:Electricity")); + EXPECT_EQ(found, op->meterMap.end()); // should not find this - found = Util::FindItem("RailroadCrossing:InteriorLights:Electricity", state->dataOutputProcessor->EnergyMeters); - EXPECT_NE(0, found); - EXPECT_EQ("Electricity", state->dataOutputProcessor->EnergyMeters(found).ResourceType); - EXPECT_EQ("InteriorLights", state->dataOutputProcessor->EnergyMeters(found).EndUse); - EXPECT_EQ("RailroadCrossing", state->dataOutputProcessor->EnergyMeters(found).EndUseSub); + found = op->meterMap.find(Util::makeUPPER("RailroadCrossing:InteriorLights:Electricity")); + EXPECT_NE(found, op->meterMap.end()); + EXPECT_EQ((int)Constant::eResource::Electricity, (int)op->meters[found->second]->resource); + EXPECT_EQ((int)SOVEndUseCat::InteriorLights, (int)op->meters[found->second]->sovEndUseCat); + EXPECT_EQ("RailroadCrossing", op->meters[found->second]->EndUseSub); // fuel oil CO2 emissions // testing a non-ABUPS end use with no sub end use specified - found = Util::FindItem("FuelOilNo2Emissions:CO2", state->dataOutputProcessor->EnergyMeters); - EXPECT_NE(0, found); - EXPECT_EQ("CO2", state->dataOutputProcessor->EnergyMeters(found).ResourceType); - EXPECT_EQ("FuelOilNo2Emissions", state->dataOutputProcessor->EnergyMeters(found).EndUse); - EXPECT_EQ("", state->dataOutputProcessor->EnergyMeters(found).EndUseSub); + found = op->meterMap.find(Util::makeUPPER("FuelOilNo2Emissions:CO2")); + EXPECT_NE(found, op->meterMap.end()); + EXPECT_EQ((int)Constant::eResource::CO2, (int)op->meters[found->second]->resource); + EXPECT_EQ((int)SOVEndUseCat::FuelOilNo2Emissions, (int)op->meters[found->second]->sovEndUseCat); + EXPECT_EQ("", op->meters[found->second]->EndUseSub); } TEST_F(SQLiteFixture, OutputProcessor_setupOutputVariable_star) @@ -3767,27 +3216,12 @@ namespace OutputProcessor { GetReportVariableInput(*state); Real64 fuel_used = 999; - SetupOutputVariable(*state, - "Boiler NaturalGas Rate", - OutputProcessor::Unit::W, - fuel_used, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Average, - "Boiler1"); - SetupOutputVariable(*state, - "Boiler NaturalGas Rate", - OutputProcessor::Unit::W, - fuel_used, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Average, - "Boiler2"); - SetupOutputVariable(*state, - "Boiler NaturalGas Rate", - OutputProcessor::Unit::W, - fuel_used, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Average, - "Boiler3"); + SetupOutputVariable( + *state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, SOVTimeStepType::System, SOVStoreType::Average, "Boiler1"); + SetupOutputVariable( + *state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, SOVTimeStepType::System, SOVStoreType::Average, "Boiler2"); + SetupOutputVariable( + *state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, SOVTimeStepType::System, SOVStoreType::Average, "Boiler3"); auto reportDataDictionaryResults = queryResult("SELECT * FROM ReportDataDictionary;", "ReportDataDictionary"); @@ -3817,27 +3251,12 @@ namespace OutputProcessor { GetReportVariableInput(*state); Real64 fuel_used = 999; - SetupOutputVariable(*state, - "Boiler NaturalGas Rate", - OutputProcessor::Unit::W, - fuel_used, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Average, - "Boiler1"); - SetupOutputVariable(*state, - "Boiler NaturalGas Rate", - OutputProcessor::Unit::W, - fuel_used, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Average, - "Boiler2"); - SetupOutputVariable(*state, - "Boiler NaturalGas Rate", - OutputProcessor::Unit::W, - fuel_used, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Average, - "Boiler3"); + SetupOutputVariable( + *state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, SOVTimeStepType::System, SOVStoreType::Average, "Boiler1"); + SetupOutputVariable( + *state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, SOVTimeStepType::System, SOVStoreType::Average, "Boiler2"); + SetupOutputVariable( + *state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, SOVTimeStepType::System, SOVStoreType::Average, "Boiler3"); auto reportDataDictionaryResults = queryResult("SELECT * FROM ReportDataDictionary;", "ReportDataDictionary"); @@ -3865,27 +3284,12 @@ namespace OutputProcessor { GetReportVariableInput(*state); Real64 fuel_used = 999; - SetupOutputVariable(*state, - "Boiler NaturalGas Rate", - OutputProcessor::Unit::W, - fuel_used, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Average, - "Boiler1"); - SetupOutputVariable(*state, - "Boiler NaturalGas Rate", - OutputProcessor::Unit::W, - fuel_used, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Average, - "Boiler2"); - SetupOutputVariable(*state, - "Boiler NaturalGas Rate", - OutputProcessor::Unit::W, - fuel_used, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Average, - "Boiler3"); + SetupOutputVariable( + *state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, SOVTimeStepType::System, SOVStoreType::Average, "Boiler1"); + SetupOutputVariable( + *state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, SOVTimeStepType::System, SOVStoreType::Average, "Boiler2"); + SetupOutputVariable( + *state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, SOVTimeStepType::System, SOVStoreType::Average, "Boiler3"); auto reportDataDictionaryResults = queryResult("SELECT * FROM ReportDataDictionary;", "ReportDataDictionary"); @@ -3917,31 +3321,31 @@ namespace OutputProcessor { Real64 vol_flow = 999; SetupOutputVariable(*state, "AFN Linkage Node 1 to Node 2 Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, vol_flow, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Average, + SOVTimeStepType::System, + SOVStoreType::Average, "Zn003:Wall001"); SetupOutputVariable(*state, "AFN Linkage Node 1 to Node 2 Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, vol_flow, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Average, + SOVTimeStepType::System, + SOVStoreType::Average, "Zn003:Wall002"); SetupOutputVariable(*state, "AFN Linkage Node 1 to Node 2 Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, vol_flow, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Average, + SOVTimeStepType::System, + SOVStoreType::Average, "Zn003:Wall002:Win001"); SetupOutputVariable(*state, "AFN Linkage Node 1 to Node 2 Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, vol_flow, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Average, + SOVTimeStepType::System, + SOVStoreType::Average, "Zn003:Wall003"); auto reportDataDictionaryResults = queryResult("SELECT * FROM ReportDataDictionary;", "ReportDataDictionary"); @@ -3989,31 +3393,31 @@ namespace OutputProcessor { Real64 vol_flow = 999; SetupOutputVariable(*state, "AFN Linkage Node 1 to Node 2 Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, vol_flow, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Average, + SOVTimeStepType::System, + SOVStoreType::Average, "ZN003:WALL001"); SetupOutputVariable(*state, "AFN Linkage Node 1 to Node 2 Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, vol_flow, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Average, + SOVTimeStepType::System, + SOVStoreType::Average, "ZN003:WALL002"); SetupOutputVariable(*state, "AFN Linkage Node 1 to Node 2 Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, vol_flow, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Average, + SOVTimeStepType::System, + SOVStoreType::Average, "ZN003:WALL002:WIN001"); SetupOutputVariable(*state, "AFN Linkage Node 1 to Node 2 Volume Flow Rate", - OutputProcessor::Unit::m3_s, + Constant::Units::m3_s, vol_flow, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Average, + SOVTimeStepType::System, + SOVStoreType::Average, "ZN003:WALL003"); auto reportDataDictionaryResults = queryResult("SELECT * FROM ReportDataDictionary;", "ReportDataDictionary"); @@ -4051,6 +3455,7 @@ namespace OutputProcessor { TEST_F(SQLiteFixture, OutputProcessor_checkReportVariable) { + auto &op = state->dataOutputProcessor; std::string const idf_objects = delimited_string({ "Output:Variable,*,Site Outdoor Air Drybulb Temperature,timestep;", "Output:Variable,*,Site Outdoor Air Drybulb Temperature,hourly;", @@ -4067,44 +3472,46 @@ namespace OutputProcessor { InitializeOutput(*state); GetReportVariableInput(*state); - CheckReportVariable(*state, keyed_value, var_name); - - EXPECT_EQ(5, state->dataOutputProcessor->NumOfReqVariables); - - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(1).Key); - EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", state->dataOutputProcessor->ReqRepVars(1).VarName); - EXPECT_TRUE(compare_enums(ReportingFrequency::TimeStep, state->dataOutputProcessor->ReqRepVars(1).frequency)); - EXPECT_EQ(0, state->dataOutputProcessor->ReqRepVars(1).SchedPtr); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(1).SchedName); - EXPECT_EQ(true, state->dataOutputProcessor->ReqRepVars(1).Used); - - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(2).Key); - EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", state->dataOutputProcessor->ReqRepVars(2).VarName); - EXPECT_TRUE(compare_enums(ReportingFrequency::Hourly, state->dataOutputProcessor->ReqRepVars(2).frequency)); - EXPECT_EQ(0, state->dataOutputProcessor->ReqRepVars(2).SchedPtr); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(2).SchedName); - EXPECT_EQ(true, state->dataOutputProcessor->ReqRepVars(2).Used); - - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(3).Key); - EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", state->dataOutputProcessor->ReqRepVars(3).VarName); - EXPECT_TRUE(compare_enums(ReportingFrequency::Daily, state->dataOutputProcessor->ReqRepVars(3).frequency)); - EXPECT_EQ(0, state->dataOutputProcessor->ReqRepVars(3).SchedPtr); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(3).SchedName); - EXPECT_EQ(true, state->dataOutputProcessor->ReqRepVars(3).Used); - - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(4).Key); - EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", state->dataOutputProcessor->ReqRepVars(4).VarName); - EXPECT_TRUE(compare_enums(ReportingFrequency::Monthly, state->dataOutputProcessor->ReqRepVars(4).frequency)); - EXPECT_EQ(0, state->dataOutputProcessor->ReqRepVars(4).SchedPtr); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(4).SchedName); - EXPECT_EQ(true, state->dataOutputProcessor->ReqRepVars(4).Used); - - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(5).Key); - EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", state->dataOutputProcessor->ReqRepVars(5).VarName); - EXPECT_TRUE(compare_enums(ReportingFrequency::Simulation, state->dataOutputProcessor->ReqRepVars(5).frequency)); - EXPECT_EQ(0, state->dataOutputProcessor->ReqRepVars(5).SchedPtr); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(5).SchedName); - EXPECT_EQ(true, state->dataOutputProcessor->ReqRepVars(5).Used); + + std::vector reqVarList; + CheckReportVariable(*state, var_name, keyed_value, reqVarList); + + EXPECT_EQ(5, op->reqVars.size()); + + EXPECT_EQ("", op->reqVars[0]->key); + EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", op->reqVars[0]->name); + EXPECT_EQ((int)ReportFreq::TimeStep, (int)op->reqVars[0]->freq); + EXPECT_EQ(0, op->reqVars[0]->SchedPtr); + EXPECT_EQ("", op->reqVars[0]->SchedName); + EXPECT_EQ(true, op->reqVars[0]->Used); + + EXPECT_EQ("", op->reqVars[1]->key); + EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", op->reqVars[1]->name); + EXPECT_EQ((int)ReportFreq::Hour, (int)op->reqVars[1]->freq); + EXPECT_EQ(0, op->reqVars[1]->SchedPtr); + EXPECT_EQ("", op->reqVars[1]->SchedName); + EXPECT_EQ(true, op->reqVars[1]->Used); + + EXPECT_EQ("", op->reqVars[2]->key); + EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", op->reqVars[2]->name); + EXPECT_EQ((int)ReportFreq::Day, (int)op->reqVars[2]->freq); + EXPECT_EQ(0, op->reqVars[2]->SchedPtr); + EXPECT_EQ("", op->reqVars[2]->SchedName); + EXPECT_EQ(true, op->reqVars[2]->Used); + + EXPECT_EQ("", op->reqVars[3]->key); + EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", op->reqVars[3]->name); + EXPECT_EQ((int)ReportFreq::Month, (int)op->reqVars[3]->freq); + EXPECT_EQ(0, op->reqVars[3]->SchedPtr); + EXPECT_EQ("", op->reqVars[3]->SchedName); + EXPECT_EQ(true, op->reqVars[3]->Used); + + EXPECT_EQ("", op->reqVars[4]->key); + EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", op->reqVars[4]->name); + EXPECT_EQ((int)ReportFreq::Simulation, (int)op->reqVars[4]->freq); + EXPECT_EQ(0, op->reqVars[4]->SchedPtr); + EXPECT_EQ("", op->reqVars[4]->SchedName); + EXPECT_EQ(true, op->reqVars[4]->Used); } TEST_F(SQLiteFixture, OutputProcessor_getMeters_WildCard) @@ -4118,16 +3525,15 @@ namespace OutputProcessor { for (int i = 1; i <= 5; ++i) { SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, - "SPACE" + std::to_string(i) + "LIGHTS", - {}, - "Electricity", - "InteriorLights", + SOVTimeStepType::Zone, + SOVStoreType::Summed, + format("SPACE {} LIGHTS", i), + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE" + std::to_string(i), 1, 1); @@ -4146,6 +3552,7 @@ namespace OutputProcessor { TEST_F(SQLiteFixture, OutputProcessor_getCustomMeterInput) { + auto &op = state->dataOutputProcessor; std::string const idf_objects = delimited_string({ " Output:Meter:MeterFileOnly,MyGeneralLights,monthly;", " Output:Meter:MeterFileOnly,MyGeneralLights,runperiod;", @@ -4183,114 +3590,109 @@ namespace OutputProcessor { Real64 light_consumption = 0; SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "SPACE1-1 LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE1-1", 1, 1); SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "SPACE2-1 LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE2-1", 1, 1); SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "SPACE3-1 LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE3-1", 1, 1); SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "SPACE4-1 LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE4-1", 1, 1); SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "SPACE5-1 LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE5-1", 1, 1); Real64 zone_infil_total_loss = 0; SetupOutputVariable(*state, "Zone Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, zone_infil_total_loss, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "SPACE1-1"); SetupOutputVariable(*state, "Zone Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, zone_infil_total_loss, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "SPACE2-1"); SetupOutputVariable(*state, "Zone Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, zone_infil_total_loss, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "SPACE3-1"); SetupOutputVariable(*state, "Zone Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, zone_infil_total_loss, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "SPACE4-1"); SetupOutputVariable(*state, "Zone Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, zone_infil_total_loss, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "SPACE5-1"); bool errors_found = false; @@ -4299,58 +3701,179 @@ namespace OutputProcessor { ASSERT_FALSE(errors_found); - ASSERT_EQ(22, state->dataOutputProcessor->NumEnergyMeters); - - auto const meters_result = - std::map>({ - {1, std::make_tuple(0, "Electricity:Facility", "Electricity", "", "", "", "J")}, - {2, std::make_tuple(0, "Electricity:Building", "Electricity", "", "", "Building", "J")}, - {3, std::make_tuple(0, "Electricity:Zone:SPACE1-1", "Electricity", "", "", "Zone", "J")}, - {4, std::make_tuple(0, "InteriorLights:Electricity", "Electricity", "InteriorLights", "", "", "J")}, - {5, std::make_tuple(0, "InteriorLights:Electricity:Zone:SPACE1-1", "Electricity", "InteriorLights", "", "Zone", "J")}, - {6, std::make_tuple(0, "GeneralLights:InteriorLights:Electricity", "Electricity", "InteriorLights", "GeneralLights", "", "J")}, - {7, - std::make_tuple( - 0, "GeneralLights:InteriorLights:Electricity:Zone:SPACE1-1", "Electricity", "InteriorLights", "GeneralLights", "Zone", "J")}, - {8, std::make_tuple(0, "Electricity:Zone:SPACE2-1", "Electricity", "", "", "Zone", "J")}, - {9, std::make_tuple(0, "InteriorLights:Electricity:Zone:SPACE2-1", "Electricity", "InteriorLights", "", "Zone", "J")}, - {10, - std::make_tuple( - 0, "GeneralLights:InteriorLights:Electricity:Zone:SPACE2-1", "Electricity", "InteriorLights", "GeneralLights", "Zone", "J")}, - {11, std::make_tuple(0, "Electricity:Zone:SPACE3-1", "Electricity", "", "", "Zone", "J")}, - {12, std::make_tuple(0, "InteriorLights:Electricity:Zone:SPACE3-1", "Electricity", "InteriorLights", "", "Zone", "J")}, - {13, - std::make_tuple( - 0, "GeneralLights:InteriorLights:Electricity:Zone:SPACE3-1", "Electricity", "InteriorLights", "GeneralLights", "Zone", "J")}, - {14, std::make_tuple(0, "Electricity:Zone:SPACE4-1", "Electricity", "", "", "Zone", "J")}, - {15, std::make_tuple(0, "InteriorLights:Electricity:Zone:SPACE4-1", "Electricity", "InteriorLights", "", "Zone", "J")}, - {16, - std::make_tuple( - 0, "GeneralLights:InteriorLights:Electricity:Zone:SPACE4-1", "Electricity", "InteriorLights", "GeneralLights", "Zone", "J")}, - {17, std::make_tuple(0, "Electricity:Zone:SPACE5-1", "Electricity", "", "", "Zone", "J")}, - {18, std::make_tuple(0, "InteriorLights:Electricity:Zone:SPACE5-1", "Electricity", "InteriorLights", "", "Zone", "J")}, - {19, - std::make_tuple( - 0, "GeneralLights:InteriorLights:Electricity:Zone:SPACE5-1", "Electricity", "InteriorLights", "GeneralLights", "Zone", "J")}, - {20, std::make_tuple(1, "MYGENERALLIGHTS", "Electricity", "", "", "", "J")}, - {21, std::make_tuple(1, "BUILDING INFILTRATION HEAT LOSS", "Generic", "", "", "", "J")}, - {22, std::make_tuple(2, "MYBUILDINGOTHER", "Electricity", "", "", "", "J")}, - }); - - for (auto const &result : meters_result) { - EXPECT_EQ(std::get<0>(result.second), static_cast(state->dataOutputProcessor->EnergyMeters(result.first).TypeOfMeter)); - EXPECT_EQ(std::get<1>(result.second), state->dataOutputProcessor->EnergyMeters(result.first).Name); - EXPECT_EQ(std::get<2>(result.second), state->dataOutputProcessor->EnergyMeters(result.first).ResourceType); - EXPECT_EQ(std::get<3>(result.second), state->dataOutputProcessor->EnergyMeters(result.first).EndUse); - EXPECT_EQ(std::get<4>(result.second), state->dataOutputProcessor->EnergyMeters(result.first).EndUseSub); - EXPECT_EQ(std::get<5>(result.second), state->dataOutputProcessor->EnergyMeters(result.first).Group); - EXPECT_EQ(std::get<6>(result.second), unitEnumToString(state->dataOutputProcessor->EnergyMeters(result.first).Units)); + ASSERT_EQ(22, op->meters.size()); + + std::vector> + meter_result = {std::make_tuple(MeterType::Normal, + "Electricity:Facility", + Constant::eResource::Electricity, + SOVEndUseCat::Invalid, + "", + SOVGroup::Invalid, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "Electricity:Building", + Constant::eResource::Electricity, + SOVEndUseCat::Invalid, + "", + SOVGroup::Building, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "Electricity:Zone:SPACE1-1", + Constant::eResource::Electricity, + SOVEndUseCat::Invalid, + "", + SOVGroup::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "InteriorLights:Electricity", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, + "", + SOVGroup::Invalid, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "InteriorLights:Electricity:Zone:SPACE1-1", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, + "", + SOVGroup::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "GeneralLights:InteriorLights:Electricity", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, + "GeneralLights", + SOVGroup::Invalid, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "GeneralLights:InteriorLights:Electricity:Zone:SPACE1-1", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, + "GeneralLights", + SOVGroup::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "Electricity:Zone:SPACE2-1", + Constant::eResource::Electricity, + SOVEndUseCat::Invalid, + "", + SOVGroup::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "InteriorLights:Electricity:Zone:SPACE2-1", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, + "", + SOVGroup::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "GeneralLights:InteriorLights:Electricity:Zone:SPACE2-1", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, + "GeneralLights", + SOVGroup::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "Electricity:Zone:SPACE3-1", + Constant::eResource::Electricity, + SOVEndUseCat::Invalid, + "", + SOVGroup::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "InteriorLights:Electricity:Zone:SPACE3-1", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, + "", + SOVGroup::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "GeneralLights:InteriorLights:Electricity:Zone:SPACE3-1", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, + "GeneralLights", + SOVGroup::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "Electricity:Zone:SPACE4-1", + Constant::eResource::Electricity, + SOVEndUseCat::Invalid, + "", + SOVGroup::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "InteriorLights:Electricity:Zone:SPACE4-1", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, + "", + SOVGroup::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "GeneralLights:InteriorLights:Electricity:Zone:SPACE4-1", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, + "GeneralLights", + SOVGroup::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "Electricity:Zone:SPACE5-1", + Constant::eResource::Electricity, + SOVEndUseCat::Invalid, + "", + SOVGroup::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "InteriorLights:Electricity:Zone:SPACE5-1", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, + "", + SOVGroup::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "GeneralLights:InteriorLights:Electricity:Zone:SPACE5-1", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, + "GeneralLights", + SOVGroup::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Custom, + "MYGENERALLIGHTS", + Constant::eResource::Electricity, + SOVEndUseCat::Invalid, + "", + SOVGroup::Invalid, + Constant::Units::J), + std::make_tuple(MeterType::Custom, + "BUILDING INFILTRATION HEAT LOSS", + Constant::eResource::Generic, + SOVEndUseCat::Invalid, + "", + SOVGroup::Invalid, + Constant::Units::J), + std::make_tuple(MeterType::CustomDec, + "MYBUILDINGOTHER", + Constant::eResource::Electricity, + SOVEndUseCat::Invalid, + "", + SOVGroup::Invalid, + Constant::Units::J)}; + + for (int i = 0; i < (int)meter_result.size(); ++i) { + + EXPECT_EQ((int)std::get<0>(meter_result[i]), (int)op->meters[i]->type); + EXPECT_EQ(std::get<1>(meter_result[i]), op->meters[i]->Name); + EXPECT_EQ((int)std::get<2>(meter_result[i]), (int)op->meters[i]->resource); + EXPECT_EQ((int)std::get<3>(meter_result[i]), (int)op->meters[i]->sovEndUseCat); + EXPECT_EQ(std::get<4>(meter_result[i]), op->meters[i]->EndUseSub); + EXPECT_EQ((int)std::get<5>(meter_result[i]), (int)op->meters[i]->sovGroup); + EXPECT_EQ((int)std::get<6>(meter_result[i]), (int)op->meters[i]->units); } } TEST_F(SQLiteFixture, OutputProcessor_attachMeters) { + auto &op = state->dataOutputProcessor; std::string const idf_objects = delimited_string({ "Output:Meter,Electricity:Facility,timestep;", "Output:Meter,Electricity:Facility,hourly;", @@ -4363,55 +3886,103 @@ namespace OutputProcessor { InitializeOutput(*state); - int meter_array_ptr = -1; - bool errors_found = false; - - std::string resourceType("Electricity"); - std::string endUse("InteriorLights"); + Constant::eResource resource = Constant::eResource::Electricity; + SOVEndUseCat sovEndUseCat = SOVEndUseCat::InteriorLights; std::string endUseSub("GeneralLights"); - std::string group("Building"); + SOVGroup sovGroup = SOVGroup::Building; std::string const zoneName("SPACE1-1"); std::string const spaceType("OFFICE"); - AttachMeters(*state, OutputProcessor::Unit::J, resourceType, endUse, endUseSub, group, zoneName, spaceType, 1, meter_array_ptr, errors_found); - - EXPECT_FALSE(errors_found); - EXPECT_EQ(1, meter_array_ptr); - - ASSERT_EQ(10, state->dataOutputProcessor->NumEnergyMeters); - - auto const meters_result = std::map< - int, - std::tuple>({ - {1, std::make_tuple(0, "Electricity:Facility", "Electricity", "", "", "", "J")}, - {2, std::make_tuple(0, "Electricity:Building", "Electricity", "", "", "Building", "J")}, - {3, std::make_tuple(0, "Electricity:Zone:SPACE1-1", "Electricity", "", "", "Zone", "J")}, - {4, std::make_tuple(0, "Electricity:SpaceType:OFFICE", "Electricity", "", "", "SpaceType", "J")}, - {5, std::make_tuple(0, "InteriorLights:Electricity", "Electricity", "InteriorLights", "", "", "J")}, - {6, std::make_tuple(0, "InteriorLights:Electricity:Zone:SPACE1-1", "Electricity", "InteriorLights", "", "Zone", "J")}, - {7, std::make_tuple(0, "InteriorLights:Electricity:SpaceType:OFFICE", "Electricity", "InteriorLights", "", "SpaceType", "J")}, - {8, std::make_tuple(0, "GeneralLights:InteriorLights:Electricity", "Electricity", "InteriorLights", "GeneralLights", "", "J")}, - {9, - std::make_tuple( - 0, "GeneralLights:InteriorLights:Electricity:Zone:SPACE1-1", "Electricity", "InteriorLights", "GeneralLights", "Zone", "J")}, - {10, - std::make_tuple( - 0, "GeneralLights:InteriorLights:Electricity:SpaceType:OFFICE", "Electricity", "InteriorLights", "GeneralLights", "SpaceType", "J")}, - }); - - for (auto const &result : meters_result) { - EXPECT_EQ(std::get<0>(result.second), static_cast(state->dataOutputProcessor->EnergyMeters(result.first).TypeOfMeter)); - EXPECT_EQ(std::get<1>(result.second), state->dataOutputProcessor->EnergyMeters(result.first).Name); - EXPECT_EQ(std::get<2>(result.second), state->dataOutputProcessor->EnergyMeters(result.first).ResourceType); - EXPECT_EQ(std::get<3>(result.second), state->dataOutputProcessor->EnergyMeters(result.first).EndUse); - EXPECT_EQ(std::get<4>(result.second), state->dataOutputProcessor->EnergyMeters(result.first).EndUseSub); - EXPECT_EQ(std::get<5>(result.second), state->dataOutputProcessor->EnergyMeters(result.first).Group); - EXPECT_EQ(std::get<6>(result.second), unitEnumToString(state->dataOutputProcessor->EnergyMeters(result.first).Units)); + AttachMeters(*state, Constant::Units::J, resource, sovEndUseCat, endUseSub, sovGroup, zoneName, spaceType, -1); + + ASSERT_EQ(10, op->meters.size()); + + std::vector> + meter_result = {std::make_tuple(MeterType::Normal, + "Electricity:Facility", + Constant::eResource::Electricity, + SOVEndUseCat::Invalid, + "", + SOVGroup::Invalid, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "Electricity:Building", + Constant::eResource::Electricity, + SOVEndUseCat::Invalid, + "", + SOVGroup::Building, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "Electricity:Zone:SPACE1-1", + Constant::eResource::Electricity, + SOVEndUseCat::Invalid, + "", + SOVGroup::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "Electricity:SpaceType:OFFICE", + Constant::eResource::Electricity, + SOVEndUseCat::Invalid, + "", + SOVGroup::SpaceType, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "InteriorLights:Electricity", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, + "", + SOVGroup::Invalid, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "InteriorLights:Electricity:Zone:SPACE1-1", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, + "", + SOVGroup::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "InteriorLights:Electricity:SpaceType:OFFICE", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, + "", + SOVGroup::SpaceType, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "GeneralLights:InteriorLights:Electricity", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, + "GeneralLights", + SOVGroup::Invalid, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "GeneralLights:InteriorLights:Electricity:Zone:SPACE1-1", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, + "GeneralLights", + SOVGroup::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "GeneralLights:InteriorLights:Electricity:SpaceType:OFFICE", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, + "GeneralLights", + SOVGroup::SpaceType, + Constant::Units::J)}; + + for (int i = 0; i < (int)meter_result.size(); ++i) { + EXPECT_EQ((int)std::get<0>(meter_result[i]), (int)op->meters[i]->type); + EXPECT_EQ(std::get<1>(meter_result[i]), op->meters[i]->Name); + EXPECT_EQ((int)std::get<2>(meter_result[i]), (int)op->meters[i]->resource); + EXPECT_EQ((int)std::get<3>(meter_result[i]), (int)op->meters[i]->sovEndUseCat); + EXPECT_EQ(std::get<4>(meter_result[i]), op->meters[i]->EndUseSub); + EXPECT_EQ((int)std::get<5>(meter_result[i]), (int)op->meters[i]->sovGroup); + EXPECT_EQ((int)std::get<6>(meter_result[i]), (int)op->meters[i]->units); } } TEST_F(SQLiteFixture, OutputProcessor_updateDataandReport_ZoneTSReporting) { + auto &op = state->dataOutputProcessor; std::string const idf_objects = delimited_string({ "Output:Variable,*,Site Outdoor Air Drybulb Temperature,timestep;", "Output:Variable,*,Site Outdoor Air Drybulb Temperature,hourly;", @@ -4452,140 +4023,135 @@ namespace OutputProcessor { state->dataEnvrn->EndMonthFlag = true; } - // OutputProcessor::TimeValue.allocate(2); + // TimeValue.allocate(2); - auto timeStep = 1.0 / 6; + Real64 timeStep = 1.0 / 6; - SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::Zone, timeStep); - SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::HVAC, timeStep); + SetupTimePointers(*state, SOVTimeStepType::Zone, timeStep); + SetupTimePointers(*state, SOVTimeStepType::HVAC, timeStep); - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute = 50; - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute = 50; + op->TimeValue[(int)TimeStepType::Zone].CurMinute = 50; + op->TimeValue[(int)TimeStepType::System].CurMinute = 50; GetReportVariableInput(*state); SetupOutputVariable(*state, "Site Outdoor Air Drybulb Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state->dataEnvrn->OutDryBulbTemp, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Average, + SOVTimeStepType::Zone, + SOVStoreType::Average, "Environment"); Real64 light_consumption = 999; SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "SPACE1-1 LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE1-1", 1, 1); SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "SPACE2-1 LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE2-1", 1, 1); SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "SPACE3-1 LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE3-1", 1, 1); SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "SPACE4-1 LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE4-1", 1, 1); SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "SPACE5-1 LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE5-1", 1, 1); Real64 zone_infil_total_loss = 999; SetupOutputVariable(*state, "Zone Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, zone_infil_total_loss, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "SPACE1-1"); SetupOutputVariable(*state, "Zone Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, zone_infil_total_loss, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "SPACE2-1"); SetupOutputVariable(*state, "Zone Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, zone_infil_total_loss, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "SPACE3-1"); SetupOutputVariable(*state, "Zone Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, zone_infil_total_loss, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "SPACE4-1"); SetupOutputVariable(*state, "Zone Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, zone_infil_total_loss, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "SPACE5-1"); UpdateMeterReporting(*state); - UpdateDataandReport(*state, OutputProcessor::TimeStepType::Zone); + UpdateDataandReport(*state, TimeStepType::Zone); auto timeResults = queryResult("SELECT * FROM Time;", "Time"); @@ -4597,7 +4163,8 @@ namespace OutputProcessor { {"5", "", "", "", "", "", "", "525600", "4", "365", "", "0", "0"}, }); - EXPECT_EQ(timeData, timeResults); + for (int i = 0; i < (int)timeData.size(); ++i) + EXPECT_EQ(timeData[i], timeResults[i]); auto reportDataDictionaryResults = queryResult("SELECT * FROM ReportDataDictionary;", "ReportDataDictionary"); @@ -4614,7 +4181,8 @@ namespace OutputProcessor { {"12", "1", "Sum", "Facility:Electricity", "Zone", "", "Electricity:Facility", "Run Period", "", "J"}, }); - EXPECT_EQ(reportDataDictionary, reportDataDictionaryResults); + for (int i = 0; i < (int)reportDataDictionary.size(); ++i) + EXPECT_EQ(reportDataDictionary[i], reportDataDictionaryResults[i]); auto reportDataResults = queryResult("SELECT * FROM ReportData;", "ReportData"); auto reportExtendedDataResults = queryResult("SELECT * FROM ReportExtendedData;", "ReportExtendedData"); @@ -4640,8 +4208,11 @@ namespace OutputProcessor { {"5", "9", "0.0", "12", "31", "24", "", "0", "0.0", "12", "31", "24", "", "0"}, {"6", "10", "4995.0", "12", "31", "24", "-9", "0", "4995.0", "12", "31", "24", "-9", "0"}}); - EXPECT_EQ(reportData, reportDataResults); - EXPECT_EQ(reportExtendedData, reportExtendedDataResults); + for (int i = 0; i < (int)reportData.size(); ++i) + EXPECT_EQ(reportData[i], reportDataResults[i]); + + for (int i = 0; i < (int)reportExtendedData.size(); ++i) + EXPECT_EQ(reportExtendedData[i], reportExtendedDataResults[i]); compare_eso_stream(delimited_string( { @@ -4696,6 +4267,7 @@ namespace OutputProcessor { TEST_F(SQLiteFixture, OutputProcessor_updateDataandReport_ZoneTSReporting_with_detailed) { + auto &op = state->dataOutputProcessor; std::string const idf_objects = delimited_string({ "Output:Variable,*,Site Outdoor Air Drybulb Temperature,detailed;", "Output:Variable,*,Site Outdoor Air Drybulb Temperature,timestep;", @@ -4740,156 +4312,141 @@ namespace OutputProcessor { state->dataEnvrn->EndMonthFlag = true; } - // OutputProcessor::TimeValue.allocate(2); + // TimeValue.allocate(2); auto timeStep = 1.0 / 6; - SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::Zone, timeStep); - SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::HVAC, timeStep); + SetupTimePointers(*state, SOVTimeStepType::Zone, timeStep); + SetupTimePointers(*state, SOVTimeStepType::HVAC, timeStep); - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute = 50; - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute = 50; + op->TimeValue[(int)TimeStepType::Zone].CurMinute = 50; + op->TimeValue[(int)TimeStepType::System].CurMinute = 50; GetReportVariableInput(*state); SetupOutputVariable(*state, "Site Outdoor Air Drybulb Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state->dataEnvrn->OutDryBulbTemp, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Average, + SOVTimeStepType::Zone, + SOVStoreType::Average, "Environment"); Real64 light_consumption = 999; SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "SPACE1-1 LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE1-1", 1, 1); SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "SPACE2-1 LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE2-1", 1, 1); SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "SPACE3-1 LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE3-1", 1, 1); SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "SPACE4-1 LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE4-1", 1, 1); SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "SPACE5-1 LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE5-1", 1, 1); Real64 zone_infil_total_loss = 999; SetupOutputVariable(*state, "Zone Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, zone_infil_total_loss, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "SPACE1-1"); SetupOutputVariable(*state, "Zone Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, zone_infil_total_loss, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "SPACE2-1"); SetupOutputVariable(*state, "Zone Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, zone_infil_total_loss, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "SPACE3-1"); SetupOutputVariable(*state, "Zone Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, zone_infil_total_loss, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "SPACE4-1"); SetupOutputVariable(*state, "Zone Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, zone_infil_total_loss, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "SPACE5-1"); Real64 fuel_used = 999; Real64 boiler_load = 999; - SetupOutputVariable(*state, - "Boiler Heating Rate", - OutputProcessor::Unit::W, - boiler_load, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Average, - "Boiler1"); - SetupOutputVariable(*state, - "Boiler NaturalGas Rate", - OutputProcessor::Unit::W, - fuel_used, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Average, - "Boiler1"); + SetupOutputVariable( + *state, "Boiler Heating Rate", Constant::Units::W, boiler_load, SOVTimeStepType::System, SOVStoreType::Average, "Boiler1"); + SetupOutputVariable( + *state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, SOVTimeStepType::System, SOVStoreType::Average, "Boiler1"); UpdateMeterReporting(*state); - UpdateDataandReport(*state, OutputProcessor::TimeStepType::Zone); + UpdateDataandReport(*state, TimeStepType::Zone); auto timeResults = queryResult("SELECT * FROM Time;", "Time"); @@ -4921,7 +4478,8 @@ namespace OutputProcessor { {"241", "0", "Avg", "System", "HVAC System", "Boiler1", "Boiler NaturalGas Rate", "HVAC System Timestep", "", "W"}, }); - EXPECT_EQ(reportDataDictionary, reportDataDictionaryResults); + for (int i = 0; i < (int)reportDataDictionary.size(); ++i) + EXPECT_EQ(reportDataDictionary[i], reportDataDictionaryResults[i]); auto reportDataResults = queryResult("SELECT * FROM ReportData;", "ReportData"); auto reportExtendedDataResults = queryResult("SELECT * FROM ReportExtendedData;", "ReportExtendedData"); @@ -4949,8 +4507,11 @@ namespace OutputProcessor { {"6", "11", "4995.0", "12", "31", "24", "-9", "0", "4995.0", "12", "31", "24", "-9", "0"}, }); - EXPECT_EQ(reportData, reportDataResults); - EXPECT_EQ(reportExtendedData, reportExtendedDataResults); + for (int i = 0; i < (int)reportData.size(); ++i) + EXPECT_EQ(reportData[i], reportDataResults[i]); + + for (int i = 0; i < (int)reportExtendedData.size(); ++i) + EXPECT_EQ(reportExtendedData[i], reportExtendedDataResults[i]); compare_eso_stream(delimited_string( { @@ -5009,6 +4570,7 @@ namespace OutputProcessor { TEST_F(SQLiteFixture, OutputProcessor_updateDataandReport_HVACTSReporting) { + auto &op = state->dataOutputProcessor; std::string const idf_objects = delimited_string({ "Output:Variable,*,Site Outdoor Air Drybulb Temperature,detailed;", "Output:Variable,*,Site Outdoor Air Drybulb Temperature,timestep;", @@ -5053,156 +4615,141 @@ namespace OutputProcessor { state->dataEnvrn->EndMonthFlag = true; } - // OutputProcessor::TimeValue.allocate(2); + // TimeValue.allocate(2); - auto timeStep = 1.0 / 6; + Real64 timeStep = 1.0 / 6; - SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::Zone, timeStep); - SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::HVAC, timeStep); + SetupTimePointers(*state, SOVTimeStepType::Zone, timeStep); + SetupTimePointers(*state, SOVTimeStepType::HVAC, timeStep); - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute = 50; - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute = 50; + op->TimeValue[(int)TimeStepType::Zone].CurMinute = 50; + op->TimeValue[(int)TimeStepType::System].CurMinute = 50; GetReportVariableInput(*state); SetupOutputVariable(*state, "Site Outdoor Air Drybulb Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state->dataEnvrn->OutDryBulbTemp, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Average, + SOVTimeStepType::Zone, + SOVStoreType::Average, "Environment"); Real64 light_consumption = 999; SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "SPACE1-1 LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE1-1", 1, 1); SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "SPACE2-1 LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE2-1", 1, 1); SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "SPACE3-1 LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE3-1", 1, 1); SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "SPACE4-1 LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE4-1", 1, 1); SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "SPACE5-1 LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE5-1", 1, 1); Real64 zone_infil_total_loss = 999; SetupOutputVariable(*state, "Zone Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, zone_infil_total_loss, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "SPACE1-1"); SetupOutputVariable(*state, "Zone Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, zone_infil_total_loss, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "SPACE2-1"); SetupOutputVariable(*state, "Zone Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, zone_infil_total_loss, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "SPACE3-1"); SetupOutputVariable(*state, "Zone Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, zone_infil_total_loss, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "SPACE4-1"); SetupOutputVariable(*state, "Zone Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, zone_infil_total_loss, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "SPACE5-1"); Real64 fuel_used = 999; Real64 boiler_load = 999; - SetupOutputVariable(*state, - "Boiler Heating Rate", - OutputProcessor::Unit::W, - boiler_load, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Average, - "Boiler1"); - SetupOutputVariable(*state, - "Boiler NaturalGas Rate", - OutputProcessor::Unit::W, - fuel_used, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Average, - "Boiler1"); + SetupOutputVariable( + *state, "Boiler Heating Rate", Constant::Units::W, boiler_load, SOVTimeStepType::System, SOVStoreType::Average, "Boiler1"); + SetupOutputVariable( + *state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, SOVTimeStepType::System, SOVStoreType::Average, "Boiler1"); UpdateMeterReporting(*state); - UpdateDataandReport(*state, OutputProcessor::TimeStepType::System); + UpdateDataandReport(*state, TimeStepType::System); auto timeResults = queryResult("SELECT * FROM Time;", "Time"); @@ -5279,6 +4826,7 @@ namespace OutputProcessor { TEST_F(EnergyPlusFixture, OutputProcessor_UpdateMeters) { + auto &op = state->dataOutputProcessor; std::string const idf_objects = delimited_string({ "Output:Meter,Electricity:Facility,timestep;", }); @@ -5310,36 +4858,35 @@ namespace OutputProcessor { state->dataEnvrn->EndMonthFlag = true; } - // OutputProcessor::TimeValue.allocate(2); + // TimeValue.allocate(2); - auto timeStep = 1.0 / 6; + Real64 timeStep = 1.0 / 6; - SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::Zone, timeStep); - SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::HVAC, timeStep); + SetupTimePointers(*state, SOVTimeStepType::Zone, timeStep); + SetupTimePointers(*state, SOVTimeStepType::HVAC, timeStep); - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute = 50; - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute = 50; + op->TimeValue[(int)TimeStepType::Zone].CurMinute = 50; + op->TimeValue[(int)TimeStepType::System].CurMinute = 50; GetReportVariableInput(*state); Real64 light_consumption = 999; SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "SPACE1-1 LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE1-1", 1, 1); state->dataGlobal->WarmupFlag = true; UpdateMeterReporting(*state); - UpdateDataandReport(*state, OutputProcessor::TimeStepType::Zone); + UpdateDataandReport(*state, TimeStepType::Zone); compare_eso_stream(delimited_string( { @@ -5351,7 +4898,7 @@ namespace OutputProcessor { state->dataGlobal->WarmupFlag = false; UpdateMeterReporting(*state); - UpdateDataandReport(*state, OutputProcessor::TimeStepType::Zone); + UpdateDataandReport(*state, TimeStepType::Zone); compare_eso_stream(delimited_string( { @@ -5363,6 +4910,7 @@ namespace OutputProcessor { TEST_F(EnergyPlusFixture, OutputProcessor_GenOutputVariablesAuditReport) { + auto &op = state->dataOutputProcessor; std::string const idf_objects = delimited_string({ "Output:Variable,*,Site Outdoor Air Drybulb Temperature,timestep;", "Output:Variable,*,Boiler NaturalGas Rate,detailed;", @@ -5397,42 +4945,41 @@ namespace OutputProcessor { state->dataEnvrn->EndMonthFlag = true; } - // OutputProcessor::TimeValue.allocate(2); + // TimeValue.allocate(2); - auto timeStep = 1.0 / 6; + Real64 timeStep = 1.0 / 6; - SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::Zone, timeStep); - SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::HVAC, timeStep); + SetupTimePointers(*state, SOVTimeStepType::Zone, timeStep); + SetupTimePointers(*state, SOVTimeStepType::HVAC, timeStep); - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute = 50; - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute = 50; + op->TimeValue[(int)TimeStepType::Zone].CurMinute = 50; + op->TimeValue[(int)TimeStepType::System].CurMinute = 50; GetReportVariableInput(*state); SetupOutputVariable(*state, "Site Outdoor Air Drybulb Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state->dataEnvrn->OutDryBulbTemp, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Average, + SOVTimeStepType::Zone, + SOVStoreType::Average, "Environment"); Real64 light_consumption = 999; SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "SPACE1-1 LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE1-1", 1, 1); UpdateMeterReporting(*state); - UpdateDataandReport(*state, OutputProcessor::TimeStepType::Zone); + UpdateDataandReport(*state, TimeStepType::Zone); GenOutputVariablesAuditReport(*state); @@ -5449,6 +4996,7 @@ namespace OutputProcessor { TEST_F(EnergyPlusFixture, OutputProcessor_fullOutputVariableKeyComparisonWithRegex) { + auto &op = state->dataOutputProcessor; std::string const idf_objects = delimited_string({ "Output:Variable,(Air Loop 1|Air Supply) InletNode,System Node Setpoint Temperature,Hourly;", "Output:Variable,(Air Loop 1|Air Supply) InletNode,System Node Temperature,Hourly;", @@ -5481,92 +5029,85 @@ namespace OutputProcessor { state->dataEnvrn->EndMonthFlag = true; } - // OutputProcessor::TimeValue.allocate(2); + // TimeValue.allocate(2); - auto timeStep = 1.0 / 6; + Real64 timeStep = 1.0 / 6; - SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::Zone, timeStep); - SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::HVAC, timeStep); + SetupTimePointers(*state, SOVTimeStepType::Zone, timeStep); + SetupTimePointers(*state, SOVTimeStepType::HVAC, timeStep); - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).CurMinute = 50; - state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).CurMinute = 50; + op->TimeValue[(int)TimeStepType::Zone].CurMinute = 50; + op->TimeValue[(int)TimeStepType::System].CurMinute = 50; OutputReportTabular::GetInputTabularMonthly(*state); OutputReportTabular::InitializeTabularMonthly(*state); GetReportVariableInput(*state); - auto &op(state->dataOutputProcessor); - EXPECT_EQ(2, op->ReqRepVars.size()); - EXPECT_EQ(2, op->NumOfReqVariables); - auto &varSetpTempRegex = op->ReqRepVars(1); - EXPECT_EQ("(Air Loop 1|Air Supply) InletNode", varSetpTempRegex.Key); - EXPECT_EQ("SYSTEM NODE SETPOINT TEMPERATURE", varSetpTempRegex.VarName); - EXPECT_FALSE(varSetpTempRegex.is_simple_string); - EXPECT_NE(nullptr, varSetpTempRegex.case_insensitive_pattern); - - auto &varTempRegex = op->ReqRepVars(2); - EXPECT_EQ("(Air Loop 1|Air Supply) InletNode", varTempRegex.Key); - EXPECT_EQ("SYSTEM NODE TEMPERATURE", varTempRegex.VarName); - EXPECT_FALSE(varTempRegex.is_simple_string); - EXPECT_NE(nullptr, varTempRegex.case_insensitive_pattern); + EXPECT_EQ(2, op->reqVars.size()); + auto const *varSetpTempRegex = op->reqVars[0]; + EXPECT_EQ("(Air Loop 1|Air Supply) InletNode", varSetpTempRegex->key); + EXPECT_EQ("SYSTEM NODE SETPOINT TEMPERATURE", varSetpTempRegex->name); + EXPECT_FALSE(varSetpTempRegex->is_simple_string); + EXPECT_NE(nullptr, varSetpTempRegex->case_insensitive_pattern); + + auto const *varTempRegex = op->reqVars[1]; + EXPECT_EQ("(Air Loop 1|Air Supply) InletNode", varTempRegex->key); + EXPECT_EQ("SYSTEM NODE TEMPERATURE", varTempRegex->name); + EXPECT_FALSE(varTempRegex->is_simple_string); + EXPECT_NE(nullptr, varTempRegex->case_insensitive_pattern); SetupOutputVariable(*state, "Site Outdoor Air Drybulb Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state->dataEnvrn->OutDryBulbTemp, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Average, + SOVTimeStepType::Zone, + SOVStoreType::Average, "Environment"); Real64 light_consumption = 999; SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "SPACE1-1 LIGHTS 1", - {}, - "Electricity", - "InteriorLights", + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "GeneralLights", - "Building", + SOVGroup::Building, "SPACE1-1", 1, 1); UpdateMeterReporting(*state); - UpdateDataandReport(*state, OutputProcessor::TimeStepType::Zone); + UpdateDataandReport(*state, TimeStepType::Zone); - state->dataOutputProcessor->NumExtraVars = 0; Real64 fakeVar = 0.0; SetupOutputVariable(*state, "System Node Setpoint Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, fakeVar, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Average, + SOVTimeStepType::System, + SOVStoreType::Average, // TODO: is that supposed to look like a regex?! // SetupOutputVariable is the only one that used to call BuildKeyVarList // So it should pass actual NodeID(NodeNum) "Air Loop 1 InletNode"); // BuildKeyVarList(*state, "Air Loop 1|AirSupply InletNode", "SYSTEM NODE SETPOINT TEMPERATURE", 1, 2); // TODO: WHAT? - EXPECT_EQ(1, state->dataOutputProcessor->NumExtraVars); - EXPECT_TRUE(varSetpTempRegex.Used); - EXPECT_FALSE(varTempRegex.Used); + EXPECT_TRUE(varSetpTempRegex->Used); + EXPECT_FALSE(varTempRegex->Used); - state->dataOutputProcessor->NumExtraVars = 0; SetupOutputVariable(*state, "System Node Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, fakeVar, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Average, + SOVTimeStepType::System, + SOVStoreType::Average, // TODO: is that supposed to look like a regex?! "Air Loop 1 InletNode"); // BuildKeyVarList(*state, "Air Loop 1|AirSupply InletNode", "SYSTEM NODE TEMPERATURE", 1, 2); - EXPECT_EQ(1, state->dataOutputProcessor->NumExtraVars); - EXPECT_TRUE(varSetpTempRegex.Used); - EXPECT_TRUE(varTempRegex.Used); + EXPECT_TRUE(varSetpTempRegex->Used); + EXPECT_TRUE(varTempRegex->Used); GenOutputVariablesAuditReport(*state); @@ -5575,6 +5116,7 @@ namespace OutputProcessor { TEST_F(EnergyPlusFixture, OutputProcessor_MeterCustomSystemEnergy) { + auto &op = state->dataOutputProcessor; std::string const idf_objects = delimited_string({"Meter:Custom,", "Meter Surface Average Face Conduction Heat Transfer Energy, !- Name", @@ -5711,88 +5253,63 @@ namespace OutputProcessor { state->dataZoneEquip->ZoneEquipConfig(state->dataGlobal->NumOfZones).IsControlled = true; SetupOutputVariable(*state, "Surface Average Face Conduction Heat Transfer Energy", - OutputProcessor::Unit::J, - transferredenergy, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, - "*"); - SetupOutputVariable(*state, - "Surface Window Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, transferredenergy, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, - "*"); - SetupOutputVariable(*state, - "Zone Windows Total Heat Gain Energy", - OutputProcessor::Unit::J, - transferredenergy, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, - "*"); - SetupOutputVariable(*state, - "Surface Window Heat Gain Energy", - OutputProcessor::Unit::J, - transferredenergy, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "*"); + SetupOutputVariable( + *state, "Surface Window Heat Loss Energy", Constant::Units::J, transferredenergy, SOVTimeStepType::Zone, SOVStoreType::Summed, "*"); + SetupOutputVariable( + *state, "Zone Windows Total Heat Gain Energy", Constant::Units::J, transferredenergy, SOVTimeStepType::Zone, SOVStoreType::Summed, "*"); + SetupOutputVariable( + *state, "Surface Window Heat Gain Energy", Constant::Units::J, transferredenergy, SOVTimeStepType::Zone, SOVStoreType::Summed, "*"); SetupOutputVariable(*state, "Zone Ventilation Total Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, transferredenergy, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "*"); SetupOutputVariable(*state, "Zone Ventilation Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, transferredenergy, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "*"); SetupOutputVariable(*state, "Zone Infiltration Total Heat Gain Energy", - OutputProcessor::Unit::J, + Constant::Units::J, transferredenergy, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "*"); SetupOutputVariable(*state, "Zone Infiltration Total Heat Loss Energy", - OutputProcessor::Unit::J, + Constant::Units::J, transferredenergy, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "*"); SetupOutputVariable(*state, "Zone Electric Equipment Total Heating Energy", - OutputProcessor::Unit::J, - transferredenergy, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, - "*"); - SetupOutputVariable(*state, - "Zone Lights Total Heating Energy", - OutputProcessor::Unit::J, - transferredenergy, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, - "*"); - SetupOutputVariable(*state, - "People Total Heating Energy", - OutputProcessor::Unit::J, + Constant::Units::J, transferredenergy, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "*"); + SetupOutputVariable( + *state, "Zone Lights Total Heating Energy", Constant::Units::J, transferredenergy, SOVTimeStepType::Zone, SOVStoreType::Summed, "*"); + SetupOutputVariable( + *state, "People Total Heating Energy", Constant::Units::J, transferredenergy, SOVTimeStepType::Zone, SOVStoreType::Summed, "*"); SystemReports::AllocateAndSetUpVentReports(*state); GetCustomMeterInput(*state, errors_found); EXPECT_FALSE(errors_found); - EXPECT_EQ(15, state->dataOutputProcessor->NumEnergyMeters); - EXPECT_EQ(state->dataOutputProcessor->EnergyMeters(1).Name, "METER SURFACE AVERAGE FACE CONDUCTION HEAT TRANSFER ENERGY"); - EXPECT_EQ(state->dataOutputProcessor->EnergyMeters(12).Name, "METER ZONE MECHANICAL VENTILATION 123"); - EXPECT_EQ(state->dataOutputProcessor->EnergyMeters(15).Name, "METER AIR SYSTEM HOT WATER ENERGY"); + EXPECT_EQ(15, op->meters.size()); + EXPECT_EQ(op->meters[0]->Name, "METER SURFACE AVERAGE FACE CONDUCTION HEAT TRANSFER ENERGY"); + EXPECT_EQ(op->meters[11]->Name, "METER ZONE MECHANICAL VENTILATION 123"); + EXPECT_EQ(op->meters[14]->Name, "METER AIR SYSTEM HOT WATER ENERGY"); } TEST_F(EnergyPlusFixture, OutputProcessor_DuplicateMeterCustom) @@ -5825,104 +5342,72 @@ namespace OutputProcessor { " ** ~~~ ** ...will not be shown with the Meter results. This may be caused by a Meter:Custom be assigned to another " "Meter:Custom.", " ** Warning ** Meter:Custom=\"CUSTOMMETER2\", contains a reference to another Meter:Custom in field: Output Variable or Meter " - "Name=\"CUSTOMMETER1\"."}); + "Name=\"CUSTOMMETER1\".", + " ** Warning ** Meter:Custom=\"CUSTOMMETER2\", no items assigned ", + " ** ~~~ ** ...will not be shown with the Meter results. This may be caused by a Meter:Custom be assigned to another " + "Meter:Custom."}); compare_err_stream(errMsg); } TEST_F(EnergyPlusFixture, OutputProcessor_unitStringToEnum) { - EXPECT_TRUE(compare_enums(OutputProcessor::Unit::J, unitStringToEnum("J"))); - EXPECT_TRUE(compare_enums(OutputProcessor::Unit::J, unitStringToEnum("j"))); + EXPECT_EQ((int)Constant::Units::J, (int)getEnumValue(Constant::unitNamesUC, "J")); + EXPECT_EQ((int)Constant::Units::J, (int)getEnumValue(Constant::unitNamesUC, Util::makeUPPER("j"))); - EXPECT_TRUE(compare_enums(OutputProcessor::Unit::kgWater_kgDryAir, unitStringToEnum("kgWater/kgDryAir"))); - EXPECT_TRUE(compare_enums(OutputProcessor::Unit::kgWater_s, unitStringToEnum("kgWater/s"))); + EXPECT_EQ((int)Constant::Units::kgWater_kgDryAir, (int)getEnumValue(Constant::unitNamesUC, Util::makeUPPER("kgWater/kgDryAir"))); + EXPECT_EQ((int)Constant::Units::kgWater_s, (int)getEnumValue(Constant::unitNamesUC, Util::makeUPPER("kgWater/s"))); - EXPECT_TRUE(compare_enums(OutputProcessor::Unit::unknown, unitStringToEnum("junk"))); + EXPECT_EQ((int)Constant::Units::Invalid, (int)getEnumValue(Constant::unitNamesUC, Util::makeUPPER("junk"))); } TEST_F(EnergyPlusFixture, OutputProcessor_unitEnumToString) { - EXPECT_EQ("J", unitEnumToString(OutputProcessor::Unit::J)); - - EXPECT_EQ("kgWater/kgDryAir", unitEnumToString(OutputProcessor::Unit::kgWater_kgDryAir)); - EXPECT_EQ("kgWater/s", unitEnumToString(OutputProcessor::Unit::kgWater_s)); - - EXPECT_EQ("unknown", unitEnumToString(OutputProcessor::Unit::unknown)); + EXPECT_EQ("J", Constant::unitNames[(int)Constant::Units::J]); + EXPECT_EQ("kgWater/kgDryAir", Constant::unitNames[(int)Constant::Units::kgWater_kgDryAir]); + EXPECT_EQ("kgWater/s", Constant::unitNames[(int)Constant::Units::kgWater_s]); } - TEST_F(EnergyPlusFixture, OutputProcessor_unitEnumToStringBrackets) + TEST_F(EnergyPlusFixture, OutputProcessor_unitStringFromDDitem) { - EXPECT_EQ(" [J]", unitEnumToStringBrackets(OutputProcessor::Unit::J)); + AddDDOutVar(*state, "energy variable 1", TimeStepType::Zone, StoreType::Averaged, VariableType::Integer, Constant::Units::J); + AddDDOutVar(*state, "energy variable 2", TimeStepType::Zone, StoreType::Averaged, VariableType::Integer, Constant::Units::J); + AddDDOutVar(*state, "energy variable 3", TimeStepType::Zone, StoreType::Averaged, VariableType::Integer, Constant::Units::J); - EXPECT_EQ(" [kgWater/kgDryAir]", unitEnumToStringBrackets(OutputProcessor::Unit::kgWater_kgDryAir)); - EXPECT_EQ(" [kgWater/s]", unitEnumToStringBrackets(OutputProcessor::Unit::kgWater_s)); + AddDDOutVar( + *state, "humidity ratio variable 1", TimeStepType::Zone, StoreType::Averaged, VariableType::Integer, Constant::Units::kgWater_kgDryAir); + AddDDOutVar( + *state, "humidity ratio variable 2", TimeStepType::Zone, StoreType::Averaged, VariableType::Integer, Constant::Units::kgWater_kgDryAir); - EXPECT_EQ(" [unknown]", unitEnumToStringBrackets(OutputProcessor::Unit::unknown)); - } + AddDDOutVar(*state, "flow variable 1", TimeStepType::Zone, StoreType::Averaged, VariableType::Integer, Constant::Units::kgWater_s); + AddDDOutVar(*state, "flow variable 2", TimeStepType::Zone, StoreType::Averaged, VariableType::Integer, Constant::Units::kgWater_s); - TEST_F(EnergyPlusFixture, OutputProcessor_unitStringFromDDitem) - { + AddDDOutVar(*state, + "user defined EMS variable 1", + TimeStepType::Zone, + StoreType::Averaged, + VariableType::Integer, + Constant::Units::customEMS, + "ergs/century"); + AddDDOutVar(*state, + "user defined EMS variable 2", + TimeStepType::Zone, + StoreType::Averaged, + VariableType::Integer, + Constant::Units::customEMS, + "swamps/county"); - AddToOutputVariableList( - *state, "energy variable 1", OutputProcessor::TimeStepType::Zone, StoreType::Averaged, VariableType::Integer, OutputProcessor::Unit::J); - AddToOutputVariableList( - *state, "energy variable 2", OutputProcessor::TimeStepType::Zone, StoreType::Averaged, VariableType::Integer, OutputProcessor::Unit::J); - AddToOutputVariableList( - *state, "energy variable 3", OutputProcessor::TimeStepType::Zone, StoreType::Averaged, VariableType::Integer, OutputProcessor::Unit::J); - - AddToOutputVariableList(*state, - "humidity ratio variable 1", - OutputProcessor::TimeStepType::Zone, - StoreType::Averaged, - VariableType::Integer, - OutputProcessor::Unit::kgWater_kgDryAir); - AddToOutputVariableList(*state, - "humidity ratio variable 2", - OutputProcessor::TimeStepType::Zone, - StoreType::Averaged, - VariableType::Integer, - OutputProcessor::Unit::kgWater_kgDryAir); - - AddToOutputVariableList(*state, - "flow variable 1", - OutputProcessor::TimeStepType::Zone, - StoreType::Averaged, - VariableType::Integer, - OutputProcessor::Unit::kgWater_s); - AddToOutputVariableList(*state, - "flow variable 2", - OutputProcessor::TimeStepType::Zone, - StoreType::Averaged, - VariableType::Integer, - OutputProcessor::Unit::kgWater_s); - - AddToOutputVariableList(*state, - "user defined EMS variable 1", - OutputProcessor::TimeStepType::Zone, - StoreType::Averaged, - VariableType::Integer, - OutputProcessor::Unit::customEMS, - "ergs/century"); - AddToOutputVariableList(*state, - "user defined EMS variable 2", - OutputProcessor::TimeStepType::Zone, - StoreType::Averaged, - VariableType::Integer, - OutputProcessor::Unit::customEMS, - "swamps/county"); - - EXPECT_EQ(" [J]", unitStringFromDDitem(*state, 3)); - - EXPECT_EQ(" [kgWater/kgDryAir]", unitStringFromDDitem(*state, 4)); - - EXPECT_EQ(" [kgWater/s]", unitStringFromDDitem(*state, 6)); - - EXPECT_EQ(" [ergs/century]", unitStringFromDDitem(*state, 8)); - - EXPECT_EQ(" [swamps/county]", unitStringFromDDitem(*state, 9)); + EXPECT_EQ(" [J]", unitStringFromDDitem(*state, 2)); + + EXPECT_EQ(" [kgWater/kgDryAir]", unitStringFromDDitem(*state, 3)); + + EXPECT_EQ(" [kgWater/s]", unitStringFromDDitem(*state, 5)); + + EXPECT_EQ(" [ergs/century]", unitStringFromDDitem(*state, 7)); + + EXPECT_EQ(" [swamps/county]", unitStringFromDDitem(*state, 8)); } TEST_F(EnergyPlusFixture, OutputProcessor_GetCustomMeterInput) @@ -5958,21 +5443,22 @@ namespace OutputProcessor { TEST_F(EnergyPlusFixture, OutputProcessor_FilePathInSetInitialMeterReportingAndOutputNames) { - state->dataOutputProcessor->EnergyMeters.allocate(1); - state->dataOutputProcessor->EnergyMeters(1).Name = "Foo"; - state->dataOutputProcessor->EnergyMeters(1).RptTS = true; - state->dataOutputProcessor->EnergyMeters(1).RptAccTS = true; + auto &op = state->dataOutputProcessor; + Meter *meter = new Meter("Foo"); + op->meters.push_back(meter); + meter->periods[(int)ReportFreq::TimeStep].Rpt = true; + meter->periods[(int)ReportFreq::TimeStep].accRpt = true; // by default, the eso fs::path instance will just be a filename, so this will definitely pass // first call it as a non-cumulative variable - SetInitialMeterReportingAndOutputNames(*state, 1, true, ReportingFrequency::EachCall, false); + SetInitialMeterReportingAndOutputNames(*state, 0, true, ReportFreq::EachCall, false); std::string errMsg = delimited_string({" ** Warning ** Output:Meter:MeterFileOnly requested for \"Foo\" (TimeStep), already on " "\"Output:Meter\". Will report to both eplusout.eso and eplusout.mtr"}); compare_err_stream(errMsg); // then with a cumulative variable - SetInitialMeterReportingAndOutputNames(*state, 1, true, ReportingFrequency::EachCall, true); + SetInitialMeterReportingAndOutputNames(*state, 0, true, ReportFreq::EachCall, true); errMsg = delimited_string({" ** Warning ** Output:Meter:MeterFileOnly requested for \"Cumulative Foo\" (TimeStep), already on " "\"Output:Meter\". Will report to both eplusout.eso and eplusout.mtr"}); compare_err_stream(errMsg); @@ -5983,13 +5469,13 @@ namespace OutputProcessor { state->files.mtr.filePath = fs::path("foo") / "bar.mtr"; // first call it as a non-cumulative variable - SetInitialMeterReportingAndOutputNames(*state, 1, true, ReportingFrequency::EachCall, false); + SetInitialMeterReportingAndOutputNames(*state, 0, true, ReportFreq::EachCall, false); errMsg = delimited_string({" ** Warning ** Output:Meter:MeterFileOnly requested for \"Foo\" (TimeStep), already on \"Output:Meter\". Will " "report to both bar.eso and bar.mtr"}); compare_err_stream(errMsg); // then with a cumulative variable - SetInitialMeterReportingAndOutputNames(*state, 1, true, ReportingFrequency::EachCall, true); + SetInitialMeterReportingAndOutputNames(*state, 0, true, ReportFreq::EachCall, true); errMsg = delimited_string({" ** Warning ** Output:Meter:MeterFileOnly requested for \"Cumulative Foo\" (TimeStep), already on " "\"Output:Meter\". Will report to both bar.eso and bar.mtr"}); compare_err_stream(errMsg); @@ -6013,6 +5499,7 @@ namespace OutputProcessor { TEST_F(SQLiteFixture, OutputProcessor_SetupOutputVariable_enum) { + auto &op = state->dataOutputProcessor; // Test SOV calls for PR 10231 for extended tests on Calling SOV using new enum parameter drivers, upon different varieties such as: // 1). SOV calls for average, summed variables (regular and meters etc.) // 2). SOV handling on Output:variable processed results @@ -6034,39 +5521,37 @@ namespace OutputProcessor { SetupOutputVariable(*state, "Site Outdoor Air Drybulb Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, state->dataEnvrn->OutDryBulbTemp, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Average, + SOVTimeStepType::Zone, + SOVStoreType::Average, "Environment"); Real64 cooling_consumption = 0.; SetupOutputVariable(*state, "Chiller Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, cooling_consumption, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "Cool-1", - {}, - eResourceSOV::Electricity, - EndUseCatSOV::Cooling, + Constant::eResource::Electricity, + SOVEndUseCat::Cooling, {}, // EndUseSubKey - GroupSOV::Plant); + SOVGroup::Plant); Real64 light_consumption = 0.; SetupOutputVariable(*state, "Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, light_consumption, - OutputProcessor::SOVTimeStepType::Zone, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::Zone, + SOVStoreType::Summed, "LIGHTS 1", - {}, - eResourceSOV::Electricity, - EndUseCatSOV::InteriorLights, + Constant::eResource::Electricity, + SOVEndUseCat::InteriorLights, "RailroadCrossing", // EndUseSubKey - GroupSOV::Building, + SOVGroup::Building, "SPACE1-1", 1, 1); @@ -6074,81 +5559,77 @@ namespace OutputProcessor { Real64 fuel_oil_co2 = 0.; SetupOutputVariable(*state, "Environmental Impact Fuel Oil No 2 CO2 Emissions Mass", - OutputProcessor::Unit::kg, + Constant::Units::kg, fuel_oil_co2, - OutputProcessor::SOVTimeStepType::System, - OutputProcessor::SOVStoreType::Summed, + SOVTimeStepType::System, + SOVStoreType::Summed, "Site", - {}, - eResourceSOV::CO2, - EndUseCatSOV::FuelOilNo2Emissions, + Constant::eResource::CO2, + SOVEndUseCat::FuelOilNo2Emissions, {}, // EndUseSubKey - GroupSOV::Empty); + SOVGroup::Invalid); auto reportDataDictionaryResults = queryResult("SELECT * FROM ReportDataDictionary;", "ReportDataDictionary"); - EXPECT_EQ(1, state->dataOutputProcessor->NumExtraVars); + // EXPECT_EQ(1, op->NumExtraVars); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(1).Key); - EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", state->dataOutputProcessor->ReqRepVars(1).VarName); - EXPECT_TRUE(compare_enums(ReportingFrequency::Simulation, state->dataOutputProcessor->ReqRepVars(1).frequency)); - EXPECT_EQ(0, state->dataOutputProcessor->ReqRepVars(1).SchedPtr); - EXPECT_EQ("", state->dataOutputProcessor->ReqRepVars(1).SchedName); - EXPECT_EQ(true, state->dataOutputProcessor->ReqRepVars(1).Used); + EXPECT_EQ("", op->reqVars[0]->key); + EXPECT_EQ("SITE OUTDOOR AIR DRYBULB TEMPERATURE", op->reqVars[0]->name); + EXPECT_EQ((int)ReportFreq::Simulation, (int)op->reqVars[0]->freq); + EXPECT_EQ(0, op->reqVars[0]->SchedPtr); + EXPECT_EQ("", op->reqVars[0]->SchedName); + EXPECT_EQ(true, op->reqVars[0]->Used); - EXPECT_TRUE(compare_enums(OutputProcessor::TimeStepType::Zone, state->dataOutputProcessor->DDVariableTypes(1).timeStepType)); - EXPECT_TRUE(compare_enums(StoreType::Averaged, state->dataOutputProcessor->DDVariableTypes(1).storeType)); - EXPECT_TRUE(compare_enums(VariableType::Real, state->dataOutputProcessor->DDVariableTypes(1).variableType)); - EXPECT_EQ(0, state->dataOutputProcessor->DDVariableTypes(1).Next); - EXPECT_FALSE(state->dataOutputProcessor->DDVariableTypes(1).ReportedOnDDFile); - EXPECT_EQ("Site Outdoor Air Drybulb Temperature", state->dataOutputProcessor->DDVariableTypes(1).VarNameOnly); - - int found; + EXPECT_EQ((int)TimeStepType::Zone, (int)op->ddOutVars[0]->timeStepType); + EXPECT_EQ((int)StoreType::Averaged, (int)op->ddOutVars[0]->storeType); + EXPECT_EQ((int)VariableType::Real, (int)op->ddOutVars[0]->variableType); + EXPECT_EQ(-1, op->ddOutVars[0]->Next); + EXPECT_FALSE(op->ddOutVars[0]->ReportedOnDDFile); // Cooling // testing an ABUPS end use with no sub end use specified - EXPECT_EQ(1, state->dataOutputProcessor->EndUseCategory(2).NumSubcategories); - EXPECT_EQ("General", state->dataOutputProcessor->EndUseCategory(2).SubcategoryName(1)); + EXPECT_EQ(1, op->EndUseCategory(2).NumSubcategories); + EXPECT_EQ("General", op->EndUseCategory(2).SubcategoryName(1)); - found = Util::FindItem("Cooling:Electricity", state->dataOutputProcessor->EnergyMeters); - EXPECT_NE(0, found); - EXPECT_EQ("Electricity", state->dataOutputProcessor->EnergyMeters(found).ResourceType); - EXPECT_EQ("Cooling", state->dataOutputProcessor->EnergyMeters(found).EndUse); - EXPECT_EQ("", state->dataOutputProcessor->EnergyMeters(found).EndUseSub); + int found = GetMeterIndex(*state, "COOLING:ELECTRICITY"); + EXPECT_NE(-1, found); + EXPECT_EQ((int)Constant::eResource::Electricity, (int)op->meters[found]->resource); + EXPECT_EQ((int)SOVEndUseCat::Cooling, (int)op->meters[found]->sovEndUseCat); + EXPECT_EQ("", op->meters[found]->EndUseSub); - found = Util::FindItem("General:Cooling:Electricity", state->dataOutputProcessor->EnergyMeters); - EXPECT_NE(0, found); - EXPECT_EQ("Electricity", state->dataOutputProcessor->EnergyMeters(found).ResourceType); - EXPECT_EQ("Cooling", state->dataOutputProcessor->EnergyMeters(found).EndUse); - EXPECT_EQ("General", state->dataOutputProcessor->EnergyMeters(found).EndUseSub); + found = GetMeterIndex(*state, "GENERAL:COOLING:ELECTRICITY"); + EXPECT_NE(-1, found); + EXPECT_EQ((int)Constant::eResource::Electricity, (int)op->meters[found]->resource); + EXPECT_EQ((int)SOVEndUseCat::Cooling, (int)op->meters[found]->sovEndUseCat); + EXPECT_EQ("General", op->meters[found]->EndUseSub); // lighting // testing an ABUPS end use with a sub end use specified - EXPECT_EQ(1, state->dataOutputProcessor->EndUseCategory(3).NumSubcategories); // lighting end use - EXPECT_EQ("RailroadCrossing", state->dataOutputProcessor->EndUseCategory(3).SubcategoryName(1)); + EXPECT_EQ(1, op->EndUseCategory(3).NumSubcategories); // lighting end use + EXPECT_EQ("RailroadCrossing", op->EndUseCategory(3).SubcategoryName(1)); - found = Util::FindItem("InteriorLights:Electricity", state->dataOutputProcessor->EnergyMeters); - EXPECT_NE(0, found); - EXPECT_EQ("Electricity", state->dataOutputProcessor->EnergyMeters(found).ResourceType); - EXPECT_EQ("InteriorLights", state->dataOutputProcessor->EnergyMeters(found).EndUse); - EXPECT_EQ("", state->dataOutputProcessor->EnergyMeters(found).EndUseSub); + found = GetMeterIndex(*state, "INTERIORLIGHTS:ELECTRICITY"); + EXPECT_NE(-1, found); + EXPECT_EQ((int)Constant::eResource::Electricity, (int)op->meters[found]->resource); + EXPECT_EQ((int)SOVEndUseCat::InteriorLights, (int)op->meters[found]->sovEndUseCat); + EXPECT_EQ("", op->meters[found]->EndUseSub); - found = Util::FindItem("General:InteriorLights:Electricity", state->dataOutputProcessor->EnergyMeters); - EXPECT_EQ(0, found); // should not find this + found = GetMeterIndex(*state, "GENERAL:INTERIORLIGHTS:ELECTRICITY"); + EXPECT_EQ(-1, found); // should not find this - found = Util::FindItem("RailroadCrossing:InteriorLights:Electricity", state->dataOutputProcessor->EnergyMeters); - EXPECT_NE(0, found); - EXPECT_EQ("Electricity", state->dataOutputProcessor->EnergyMeters(found).ResourceType); - EXPECT_EQ("InteriorLights", state->dataOutputProcessor->EnergyMeters(found).EndUse); - EXPECT_EQ("RailroadCrossing", state->dataOutputProcessor->EnergyMeters(found).EndUseSub); + found = GetMeterIndex(*state, "RAILROADCROSSING:INTERIORLIGHTS:ELECTRICITY"); + EXPECT_NE(-1, found); + EXPECT_EQ((int)Constant::eResource::Electricity, (int)op->meters[found]->resource); + EXPECT_EQ((int)SOVEndUseCat::InteriorLights, (int)op->meters[found]->sovEndUseCat); + EXPECT_EQ("RailroadCrossing", op->meters[found]->EndUseSub); // fuel oil CO2 emissions // testing a non-ABUPS end use with no sub end use specified - found = Util::FindItem("FuelOilNo2Emissions:CO2", state->dataOutputProcessor->EnergyMeters); - EXPECT_NE(0, found); - EXPECT_EQ("CO2", state->dataOutputProcessor->EnergyMeters(found).ResourceType); - EXPECT_EQ("FuelOilNo2Emissions", state->dataOutputProcessor->EnergyMeters(found).EndUse); - EXPECT_EQ("", state->dataOutputProcessor->EnergyMeters(found).EndUseSub); + found = GetMeterIndex(*state, "FUELOILNO2EMISSIONS:CO2"); + EXPECT_NE(-1, found); + EXPECT_EQ((int)Constant::eResource::CO2, (int)op->meters[found]->resource); + EXPECT_EQ((int)SOVEndUseCat::FuelOilNo2Emissions, (int)op->meters[found]->sovEndUseCat); + EXPECT_EQ("", op->meters[found]->EndUseSub); std::vector> reportDataDictionary( {{"1", "0", "Avg", "Zone", "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", "Run Period", "", "C"}, @@ -6157,7 +5638,9 @@ namespace OutputProcessor { {"52", "0", "Sum", "Zone", "Zone", "LIGHTS 1", "Lights Electricity Energy", "Run Period", "", "J"}, {"125", "0", "Sum", "Zone", "Zone", "LIGHTS 1", "Lights Electricity Energy", "Zone Timestep", "", "J"}, {"126", "0", "Sum", "System", "HVAC System", "Site", "Environmental Impact Fuel Oil No 2 CO2 Emissions Mass", "Run Period", "", "kg"}}); - EXPECT_EQ(reportDataDictionary, reportDataDictionaryResults); + + for (int i = 0; i < (int)reportDataDictionary.size(); ++i) + EXPECT_EQ(reportDataDictionary[i], reportDataDictionaryResults[i]); } } // namespace OutputProcessor diff --git a/tst/EnergyPlus/unit/OutputReportData.unit.cc b/tst/EnergyPlus/unit/OutputReportData.unit.cc index d659c0c53e7..6b6819cb57d 100644 --- a/tst/EnergyPlus/unit/OutputReportData.unit.cc +++ b/tst/EnergyPlus/unit/OutputReportData.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -87,64 +87,61 @@ TEST_F(EnergyPlusFixture, OutputReportData_getVariableKeys) SetupOutputVariable(*state, "Exterior Lights Electric Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite1", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); SetupOutputVariable(*state, "Exterior Lights Electric Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite2", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); SetupOutputVariable(*state, "Exterior Lights Electric Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite3", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); SetupOutputVariable(*state, "Exterior Lights Electric Power", - OutputProcessor::Unit::W, + Constant::Units::W, extLitPow, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Lite1"); SetupOutputVariable(*state, "Exterior Lights Electric Power", - OutputProcessor::Unit::W, + Constant::Units::W, extLitPow, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Lite2"); SetupOutputVariable(*state, "Exterior Lights Electric Power", - OutputProcessor::Unit::W, + Constant::Units::W, extLitPow, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Lite3"); int keyCount = 0; - OutputProcessor::VariableType typeVar = OutputProcessor::VariableType::NotFound; + OutputProcessor::VariableType typeVar = OutputProcessor::VariableType::Invalid; OutputProcessor::StoreType avgSumVar; OutputProcessor::TimeStepType stepTypeVar; - OutputProcessor::Unit unitsVar = OutputProcessor::Unit::None; + Constant::Units unitsVar = Constant::Units::None; fldStTest.m_variMeter = "EXTERIOR LIGHTS ELECTRIC ENERGY"; keyCount = fldStTest.getVariableKeyCountandTypeFromFldSt(*state, typeVar, avgSumVar, stepTypeVar, unitsVar); diff --git a/tst/EnergyPlus/unit/OutputReportTabular.unit.cc b/tst/EnergyPlus/unit/OutputReportTabular.unit.cc index 02079680f88..8b2cce531cb 100644 --- a/tst/EnergyPlus/unit/OutputReportTabular.unit.cc +++ b/tst/EnergyPlus/unit/OutputReportTabular.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -644,27 +644,48 @@ TEST_F(EnergyPlusFixture, OutputReportTabularTest_AllocateLoadComponentArraysTes TEST_F(EnergyPlusFixture, OutputReportTabularTest_ConfirmConvertToEscaped) { - EXPECT_EQ("", ConvertToEscaped("")); - EXPECT_EQ(" ", ConvertToEscaped(" ")); - EXPECT_EQ("String with > in it", ConvertToEscaped("String with > in it")); - EXPECT_EQ("String with < in it", ConvertToEscaped("String with < in it")); - EXPECT_EQ("String with & in it", ConvertToEscaped("String with & in it")); - EXPECT_EQ("String with " in it", ConvertToEscaped("String with \" in it")); - EXPECT_EQ("String with ' in it", ConvertToEscaped("String with \' in it")); - EXPECT_EQ("String with " in it", ConvertToEscaped(R"(String with \" in it)")); - EXPECT_EQ("String with ' in it", ConvertToEscaped(R"(String with \' in it)")); - EXPECT_EQ("String with ° in it", ConvertToEscaped(std::string("String with ") + char(176) + std::string(" in it"))); - EXPECT_EQ("String with ° in it", ConvertToEscaped("String with \u00B0 in it")); - EXPECT_EQ("String with ° in it", ConvertToEscaped("String with \xB0 in it")); - EXPECT_EQ("String with ° in it", ConvertToEscaped("String with \xC2\xB0 in it")); - EXPECT_EQ("String with \xC2 in it", ConvertToEscaped("String with \xC2 in it")); - EXPECT_EQ("String with \xC2\xB1 in it", ConvertToEscaped("String with \xC2\xB1 in it")); - EXPECT_EQ("String with ° in it", ConvertToEscaped(R"(String with \u00B0 in it)")); - EXPECT_EQ("String with ° in it", ConvertToEscaped(R"(String with \xB0 in it)")); - EXPECT_EQ("String with ≤ in it", ConvertToEscaped("String with ≤ in it")); - EXPECT_EQ("String with ≥ in it", ConvertToEscaped("String with ≥ in it")); - EXPECT_ANY_THROW(ConvertToEscaped(R"(String with \u in it)")); - EXPECT_ANY_THROW(ConvertToEscaped(R"(String with \x in it)")); + // check xml + EXPECT_EQ("", ConvertToEscaped("", true)); + EXPECT_EQ(" ", ConvertToEscaped(" ", true)); + EXPECT_EQ("Xml string with > in it", ConvertToEscaped("Xml string with > in it", true)); + EXPECT_EQ("Xml string with < in it", ConvertToEscaped("Xml string with < in it", true)); + EXPECT_EQ("Xml string with & in it", ConvertToEscaped("Xml string with & in it", true)); + EXPECT_EQ("Xml string with " in it", ConvertToEscaped("Xml string with \" in it", true)); + EXPECT_EQ("Xml string with ' in it", ConvertToEscaped("Xml string with \' in it", true)); + EXPECT_EQ("Xml string with " in it", ConvertToEscaped(R"(Xml string with \" in it)", true)); + EXPECT_EQ("Xml string with ' in it", ConvertToEscaped(R"(Xml string with \' in it)", true)); + EXPECT_EQ("気", ConvertToEscaped("気", true)); // Don't mangle the Japanese character for air in unicode. + EXPECT_EQ(std::string("Xml string with ") + char(176) + std::string(" in it"), + ConvertToEscaped(std::string("Xml string with ") + char(176) + std::string(" in it"), true)); + // Don't escape degree symbol with ° in xml since it is not a valid escape. + + EXPECT_EQ("Xml string with \xC2 in it", ConvertToEscaped("Xml string with \xC2 in it", true)); + EXPECT_EQ("Xml string with \xC2\xB1 in it", ConvertToEscaped("Xml string with \xC2\xB1 in it", true)); + EXPECT_EQ("Xml string with ≤ in it", ConvertToEscaped("Xml string with ≤ in it", true)); + // Don't escape less than or equal symbol with ≤ in xml since it is not a valid escape. + + EXPECT_EQ("Xml string with ≥; in it", ConvertToEscaped("Xml string with ≥; in it", true)); + EXPECT_ANY_THROW(ConvertToEscaped(R"(Xml string with \u in it)", true)); + EXPECT_ANY_THROW(ConvertToEscaped(R"(Xml string with \x in it)", true)); + + // check html + EXPECT_EQ("", ConvertToEscaped("", false)); + EXPECT_EQ(" ", ConvertToEscaped(" ", false)); + EXPECT_EQ("Html string with > in it", ConvertToEscaped("Html string with > in it", false)); + EXPECT_EQ("Html string with < in it", ConvertToEscaped("Html string with < in it", false)); + EXPECT_EQ("Html string with & in it", ConvertToEscaped("Html string with & in it", false)); + EXPECT_EQ("Html string with ° in it", ConvertToEscaped(std::string("Html string with ") + char(176) + std::string(" in it"), false)); + EXPECT_EQ("Html string with ° in it", ConvertToEscaped("Html string with \u00B0 in it", false)); + EXPECT_EQ("Html string with ° in it", ConvertToEscaped("Html string with \xB0 in it", false)); + EXPECT_EQ("Html string with ° in it", ConvertToEscaped("Html string with \xC2\xB0 in it", false)); + EXPECT_EQ("Html string with \xC2 in it", ConvertToEscaped("Html string with \xC2 in it", false)); + EXPECT_EQ("Html string with \xC2\xB1 in it", ConvertToEscaped("Html string with \xC2\xB1 in it", false)); + EXPECT_EQ("Html string with ° in it", ConvertToEscaped(R"(Html string with \u00B0 in it)", false)); + EXPECT_EQ("Html string with ° in it", ConvertToEscaped(R"(Html string with \xB0 in it)", false)); + EXPECT_EQ("Html string with ≤ in it", ConvertToEscaped("Html string with ≤ in it", false)); + EXPECT_EQ("Html string with ≥ in it", ConvertToEscaped("Html string with ≥ in it", false)); + EXPECT_ANY_THROW(ConvertToEscaped(R"(Html string with \u in it)", false)); + EXPECT_ANY_THROW(ConvertToEscaped(R"(Html string with \x in it)", false)); } TEST_F(EnergyPlusFixture, OutputReportTabularTest_ConvertUnicodeToUTF8) @@ -3517,36 +3538,33 @@ TEST_F(EnergyPlusFixture, OutputReportTabularMonthly_ResetMonthlyGathering) SetupOutputVariable(*state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite1", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); SetupOutputVariable(*state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite2", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); SetupOutputVariable(*state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite3", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); state->dataGlobal->DoWeathSim = true; @@ -3585,36 +3603,33 @@ TEST_F(EnergyPlusFixture, OutputReportTabular_ConfirmResetBEPSGathering) SetupOutputVariable(*state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite1", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); SetupOutputVariable(*state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite2", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); SetupOutputVariable(*state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite3", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); state->dataGlobal->DoWeathSim = true; @@ -3629,8 +3644,8 @@ TEST_F(EnergyPlusFixture, OutputReportTabular_ConfirmResetBEPSGathering) SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::Zone, timeStep); SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::HVAC, timeStep); - *state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).TimeStep = 60; - *state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep = 60; + *state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].TimeStep = 60; + *state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep = 60; GetInputOutputTableSummaryReports(*state); @@ -3666,15 +3681,24 @@ TEST_F(EnergyPlusFixture, OutputReportTabular_ConfirmResetBEPSGathering) TEST_F(EnergyPlusFixture, OutputReportTabular_GatherPeakDemandForTimestep) { // Glazer - Sep 2017 + auto &op = state->dataOutputProcessor; state->dataOutRptTab->displayDemandEndUse = true; state->dataOutRptTab->displayLEEDSummary = true; state->dataGlobal->TimeStepZoneSec = 900.0; int resourceNum = 1; - int totalMeterNum = 2; - int endUseMeterNum = 3; - int subEndUseMeterNum = 4; + + Meter *meterTotal = new Meter("Total"); + Meter *meterEndUse = new Meter("EndUse"); + Meter *meterSubEndUse = new Meter("SubEndUse"); + + op->meters.push_back(meterTotal); + int totalMeterNum = (int)op->meters.size() - 1; + state->dataOutputProcessor->meters.push_back(meterEndUse); + int endUseMeterNum = (int)op->meters.size() - 1; + state->dataOutputProcessor->meters.push_back(meterSubEndUse); + int subEndUseMeterNum = (int)op->meters.size() - 1; int endUseNum = 1; int subEndUseNum = 1; @@ -3682,7 +3706,6 @@ TEST_F(EnergyPlusFixture, OutputReportTabular_GatherPeakDemandForTimestep) state->dataOutRptTab->meterNumEndUseSubBEPS.allocate(10, 10, 10); state->dataOutRptTab->gatherDemandEndUseSub.allocate(10, 10, 10); state->dataOutRptTab->gatherDemandIndEndUseSub.allocate(10, 10, 10); - state->dataOutputProcessor->EnergyMeters.allocate(100); state->dataOutputProcessor->EndUseCategory.allocate(endUseNum); state->dataOutputProcessor->EndUseCategory(endUseNum).NumSubcategories = 1; @@ -3700,12 +3723,9 @@ TEST_F(EnergyPlusFixture, OutputReportTabular_GatherPeakDemandForTimestep) // first "timestep" - state->dataOutputProcessor->EnergyMeters(totalMeterNum).CurTSValue = - 123.0 * state->dataGlobal->TimeStepZoneSec; // create the current value for the total meter - state->dataOutputProcessor->EnergyMeters(endUseMeterNum).CurTSValue = - 47.0 * state->dataGlobal->TimeStepZoneSec; // create the current value for the end use meter - state->dataOutputProcessor->EnergyMeters(subEndUseMeterNum).CurTSValue = - 28.0 * state->dataGlobal->TimeStepZoneSec; // create the current value for the sub end use meter + op->meters[totalMeterNum]->CurTSValue = 123.0 * state->dataGlobal->TimeStepZoneSec; // create the current value for the total meter + op->meters[endUseMeterNum]->CurTSValue = 47.0 * state->dataGlobal->TimeStepZoneSec; // create the current value for the end use meter + op->meters[subEndUseMeterNum]->CurTSValue = 28.0 * state->dataGlobal->TimeStepZoneSec; // create the current value for the sub end use meter GatherPeakDemandForTimestep(*state, OutputProcessor::TimeStepType::Zone); @@ -3719,11 +3739,11 @@ TEST_F(EnergyPlusFixture, OutputReportTabular_GatherPeakDemandForTimestep) // next "timestep" total higher - state->dataOutputProcessor->EnergyMeters(totalMeterNum).CurTSValue = + state->dataOutputProcessor->meters[totalMeterNum]->CurTSValue = 133.0 * state->dataGlobal->TimeStepZoneSec; // create the current value for the total meter - state->dataOutputProcessor->EnergyMeters(endUseMeterNum).CurTSValue = + state->dataOutputProcessor->meters[endUseMeterNum]->CurTSValue = 57.0 * state->dataGlobal->TimeStepZoneSec; // create the current value for the end use meter - state->dataOutputProcessor->EnergyMeters(subEndUseMeterNum).CurTSValue = + state->dataOutputProcessor->meters[subEndUseMeterNum]->CurTSValue = 38.0 * state->dataGlobal->TimeStepZoneSec; // create the current value for the sub end use meter GatherPeakDemandForTimestep(*state, OutputProcessor::TimeStepType::Zone); @@ -3738,11 +3758,11 @@ TEST_F(EnergyPlusFixture, OutputReportTabular_GatherPeakDemandForTimestep) // next "timestep" total lower but end use higher and sub end use higher - state->dataOutputProcessor->EnergyMeters(totalMeterNum).CurTSValue = + state->dataOutputProcessor->meters[totalMeterNum]->CurTSValue = 103.0 * state->dataGlobal->TimeStepZoneSec; // create the current value for the total meter - state->dataOutputProcessor->EnergyMeters(endUseMeterNum).CurTSValue = + state->dataOutputProcessor->meters[endUseMeterNum]->CurTSValue = 61.0 * state->dataGlobal->TimeStepZoneSec; // create the current value for the end use meter - state->dataOutputProcessor->EnergyMeters(subEndUseMeterNum).CurTSValue = + state->dataOutputProcessor->meters[subEndUseMeterNum]->CurTSValue = 42.0 * state->dataGlobal->TimeStepZoneSec; // create the current value for the sub end use meter GatherPeakDemandForTimestep(*state, OutputProcessor::TimeStepType::Zone); @@ -3757,11 +3777,11 @@ TEST_F(EnergyPlusFixture, OutputReportTabular_GatherPeakDemandForTimestep) // next "timestep" total higher but end use lower and sub end use lower - state->dataOutputProcessor->EnergyMeters(totalMeterNum).CurTSValue = + state->dataOutputProcessor->meters[totalMeterNum]->CurTSValue = 143.0 * state->dataGlobal->TimeStepZoneSec; // create the current value for the total meter - state->dataOutputProcessor->EnergyMeters(endUseMeterNum).CurTSValue = + state->dataOutputProcessor->meters[endUseMeterNum]->CurTSValue = 59.0 * state->dataGlobal->TimeStepZoneSec; // create the current value for the end use meter - state->dataOutputProcessor->EnergyMeters(subEndUseMeterNum).CurTSValue = + state->dataOutputProcessor->meters[subEndUseMeterNum]->CurTSValue = 39.0 * state->dataGlobal->TimeStepZoneSec; // create the current value for the sub end use meter GatherPeakDemandForTimestep(*state, OutputProcessor::TimeStepType::Zone); @@ -6560,36 +6580,33 @@ TEST_F(EnergyPlusFixture, OutputReportTabularMonthly_invalidAggregationOrder) SetupOutputVariable(*state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite1", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); SetupOutputVariable(*state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite2", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); SetupOutputVariable(*state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite3", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); state->dataGlobal->DoWeathSim = true; @@ -7409,7 +7426,7 @@ TEST_F(EnergyPlusFixture, OutputReportTabularMonthlyPredefined_FindNeededOutputV for (int i = 0; i < 2; ++i) { SetupOutputVariable(*state, "Zone Mean Air Temperature", - OutputProcessor::Unit::C, + Constant::Units::C, zoneTemp, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -7417,28 +7434,28 @@ TEST_F(EnergyPlusFixture, OutputReportTabularMonthlyPredefined_FindNeededOutputV SetupOutputVariable(*state, "Zone Heating Setpoint Not Met Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, timeNotMet, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, ZoneNames[i]); SetupOutputVariable(*state, "Zone Heating Setpoint Not Met While Occupied Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, timeNotMet, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, ZoneNames[i]); SetupOutputVariable(*state, "Zone Cooling Setpoint Not Met Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, timeNotMet, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, ZoneNames[i]); SetupOutputVariable(*state, "Zone Cooling Setpoint Not Met While Occupied Time", - OutputProcessor::Unit::hr, + Constant::Units::hr, timeNotMet, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, @@ -7464,7 +7481,7 @@ TEST_F(EnergyPlusFixture, OutputReportTabularMonthlyPredefined_FindNeededOutputV } // Variables aren't going to be output to SQL/ESO anyways - EXPECT_EQ(state->dataOutputProcessor->NumOfReqVariables, 0); + EXPECT_EQ(state->dataOutputProcessor->reqVars.size(), 0); EXPECT_EQ(state->dataOutRptTab->MonthlyInputCount, 1); // If everything worked, we should have 2 tables, one for each zone. @@ -8046,69 +8063,63 @@ TEST_F(SQLiteFixture, OutputReportTabular_EndUseBySubcategorySQL) SetupOutputVariable(*state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite1", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); SetupOutputVariable(*state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite2", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "AnotherEndUseSubCat"); SetupOutputVariable(*state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite3", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); SetupOutputVariable(*state, "Heating Coal Energy", - OutputProcessor::Unit::J, + Constant::Units::J, CoalHeating, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite4", - {}, - "Coal", - "Heating", + Constant::eResource::Coal, + OutputProcessor::SOVEndUseCat::Heating, "General"); SetupOutputVariable(*state, "Heating Gasoline Energy", - OutputProcessor::Unit::J, + Constant::Units::J, GasolineHeating, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite5", - {}, - "Gasoline", - "Heating", + Constant::eResource::Gasoline, + OutputProcessor::SOVEndUseCat::Heating, "General"); SetupOutputVariable(*state, "Heating Propane Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PropaneHeating, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite6", - {}, - "Propane", - "Heating", + Constant::eResource::Propane, + OutputProcessor::SOVEndUseCat::Heating, "General"); state->dataGlobal->DoWeathSim = true; state->dataGlobal->TimeStepZone = 1.0; @@ -8122,8 +8133,8 @@ TEST_F(SQLiteFixture, OutputReportTabular_EndUseBySubcategorySQL) SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::Zone, timeStep); SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::HVAC, timeStep); - *state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).TimeStep = 60; - *state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep = 60; + *state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].TimeStep = 60; + *state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep = 60; GetInputOutputTableSummaryReports(*state); @@ -8604,25 +8615,23 @@ TEST_F(EnergyPlusFixture, OutputReportTabularMonthly_8317_ValidateOutputTableMon SetupOutputVariable(*state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite1", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); SetupOutputVariable(*state, "Exterior Lights Electricity Rate", - OutputProcessor::Unit::W, + Constant::Units::W, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite2", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); state->dataGlobal->DoWeathSim = true; @@ -8632,20 +8641,22 @@ TEST_F(EnergyPlusFixture, OutputReportTabularMonthly_8317_ValidateOutputTableMon InitializeOutput(*state); - int meter_array_ptr = -1; - bool errors_found = false; - - std::string resourceType("NaturalGas"); - std::string endUse("Heating"); std::string endUseSub(""); - std::string group(""); std::string const zoneName(""); std::string const spaceType(""); - AttachMeters(*state, OutputProcessor::Unit::J, resourceType, endUse, endUseSub, group, zoneName, spaceType, 1, meter_array_ptr, errors_found); + // AttachMeters(*state, Constant::Units::J, resource, sovEndUseCat, endUseSub, sovGroup, zoneName, spaceType, -1); + Meter *meter1 = new Meter("NATURALGAS:FACILITY"); + meter1->resource = Constant::eResource::NaturalGas; + meter1->sovEndUseCat = OutputProcessor::SOVEndUseCat::Invalid; + state->dataOutputProcessor->meters.push_back(meter1); + state->dataOutputProcessor->meterMap.insert_or_assign("NATURALGAS:FACILITY", state->dataOutputProcessor->meters.size() - 1); - EXPECT_FALSE(errors_found); - EXPECT_EQ(3, meter_array_ptr); // 2 meters were setup via SetupOutputVariable already + Meter *meter2 = new Meter("HEATING:NATURALGAS"); + meter2->resource = Constant::eResource::NaturalGas; + meter2->sovEndUseCat = OutputProcessor::SOVEndUseCat::Heating; + state->dataOutputProcessor->meters.push_back(meter2); + state->dataOutputProcessor->meterMap.insert_or_assign("HEATING:NATURALGAS", state->dataOutputProcessor->meters.size() - 1); OutputReportTabular::GetInputTabularMonthly(*state); OutputReportTabular::InitializeTabularMonthly(*state); @@ -9577,69 +9588,63 @@ TEST_F(SQLiteFixture, ORT_EndUseBySubcategorySQL_DualUnits) SetupOutputVariable(*state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite1", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); SetupOutputVariable(*state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite2", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "AnotherEndUseSubCat"); SetupOutputVariable(*state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite3", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); SetupOutputVariable(*state, "Heating Coal Energy", - OutputProcessor::Unit::J, + Constant::Units::J, CoalHeating, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite4", - {}, - "Coal", - "Heating", + Constant::eResource::Coal, + OutputProcessor::SOVEndUseCat::Heating, "General"); SetupOutputVariable(*state, "Heating Gasoline Energy", - OutputProcessor::Unit::J, + Constant::Units::J, GasolineHeating, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite5", - {}, - "Gasoline", - "Heating", + Constant::eResource::Gasoline, + OutputProcessor::SOVEndUseCat::Heating, "General"); SetupOutputVariable(*state, "Heating Propane Energy", - OutputProcessor::Unit::J, + Constant::Units::J, PropaneHeating, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite6", - {}, - "Propane", - "Heating", + Constant::eResource::Propane, + OutputProcessor::SOVEndUseCat::Heating, "General"); state->dataGlobal->DoWeathSim = true; state->dataGlobal->TimeStepZone = 1.0; @@ -9653,8 +9658,8 @@ TEST_F(SQLiteFixture, ORT_EndUseBySubcategorySQL_DualUnits) SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::Zone, timeStep); SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::HVAC, timeStep); - *state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).TimeStep = 60; - *state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep = 60; + *state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].TimeStep = 60; + *state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep = 60; GetInputOutputTableSummaryReports(*state); @@ -10076,10 +10081,10 @@ TEST_F(SQLiteFixture, OutputReportTabularMonthly_CurlyBraces) ASSERT_TRUE(process_idf(idf_objects)); - state->dataOutputProcessor->NumEnergyMeters = 1; - state->dataOutputProcessor->EnergyMeters.allocate(state->dataOutputProcessor->NumEnergyMeters); - state->dataOutputProcessor->EnergyMeters(1).Name = "Electricity:Facility"; - + Meter *meter = new Meter("Electricity:Facility"); + meter->units = Constant::Units::J; + state->dataOutputProcessor->meters.push_back(meter); + state->dataOutputProcessor->meterMap.insert_or_assign("ELECTRICITY:FACILITY", (int)state->dataOutputProcessor->meters.size() - 1); // We do need to trick it into thinking it's a weather simulation, otherwise the monthly reports aren't reported state->dataGlobal->DoWeathSim = true; // flag to trick tabular reports to scan meters state->dataGlobal->TimeStepZone = 0.25; @@ -12618,7 +12623,7 @@ TEST_F(EnergyPlusFixture, OutputReportTabularMonthly_WarnMonthly) " 2, !- Digits After Decimal", " Exterior Lights Electricity Energy, !- Variable or Meter 1 Name", " SumOrAverage, !- Aggregation Type for Variable or Meter 1", - " NON EXISTANT VARIABLE, !- Variable or Meter 2 Name", + " NON EXISTANT VARIABLE, !- Variable or Meter 2 Name", // That's not how you spell EXISTENT " Maximum; !- Aggregation Type for Variable or Meter 2", "Output:Table:SummaryReports,", @@ -12631,14 +12636,13 @@ TEST_F(EnergyPlusFixture, OutputReportTabularMonthly_WarnMonthly) SetupOutputVariable(*state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite1", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); state->dataGlobal->DoWeathSim = true; @@ -12696,14 +12700,13 @@ TEST_F(EnergyPlusFixture, OutputReportTabularMonthly_WarnMonthly_AlwaysIfWeather SetupOutputVariable(*state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite1", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); // In a regular simulation with the above SimulationControl, when InitializeTabularMonthly is called it's DesignDay @@ -12748,26 +12751,24 @@ TEST_F(EnergyPlusFixture, OutputReportTabularMonthly_WarnMonthlyDisplayExtraWarn SetupOutputVariable(*state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite1", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); SetupOutputVariable(*state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite2", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); state->dataGlobal->DoWeathSim = true; @@ -12792,6 +12793,64 @@ TEST_F(EnergyPlusFixture, OutputReportTabularMonthly_WarnMonthlyDisplayExtraWarn compare_err_stream(expected_error); } +TEST_F(EnergyPlusFixture, OutputReportTabularMonthly_WarnMonthlyBlankVariable) +{ + // #6919 - Warn instead of fatal on blank monthly table + std::string const idf_objects = delimited_string({ + "Output:Table:Monthly,", + " Space Gains Annual Report, !- Name", + " 2, !- Digits After Decimal", + " , !- Variable or Meter 1 Name", + " SumOrAverage; !- Aggregation Type for Variable or Meter 1", + + "Output:Table:SummaryReports,", + " AllSummaryAndMonthly; !- Report 1 Name", + }); + + ASSERT_TRUE(process_idf(idf_objects)); + + Real64 extLitUse; + + SetupOutputVariable(*state, + "Exterior Lights Electricity Energy", + Constant::Units::J, + extLitUse, + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Summed, + "Lite1", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, + "General"); + + SetupOutputVariable(*state, + "Exterior Lights Electricity Energy", + Constant::Units::J, + extLitUse, + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Summed, + "Lite2", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, + "General"); + + state->dataGlobal->DoWeathSim = true; + state->dataGlobal->KindOfSim = Constant::KindOfSim::RunPeriodWeather; // Trigger the extra warning + state->dataGlobal->TimeStepZone = 0.25; + state->dataGlobal->TimeStepZoneSec = state->dataGlobal->TimeStepZone * 60.0; + state->dataGlobal->DisplayExtraWarnings = true; + + GetInputTabularMonthly(*state); + EXPECT_EQ(state->dataOutRptTab->MonthlyInputCount, 1); + GetInputOutputTableSummaryReports(*state); + EXPECT_EQ(state->dataOutRptTab->MonthlyInputCount, numNamedMonthly + 1); + + InitializeTabularMonthly(*state); + + std::string const expected_error = delimited_string( + {" ** Warning ** Output:Table:Monthly: Blank column specified in 'SPACE GAINS ANNUAL REPORT', need to provide a variable or meter name "}); + compare_err_stream(expected_error); +} + TEST_F(EnergyPlusFixture, OutputReportTabularMonthly_NoWarnMonthlIfNoWeatherFileRun) { // #9621 - Only warn if a bad variable is defined in a Monthly table user requested, not on the AllSummaryAndMonthly ones @@ -12814,26 +12873,24 @@ TEST_F(EnergyPlusFixture, OutputReportTabularMonthly_NoWarnMonthlIfNoWeatherFile SetupOutputVariable(*state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite1", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); SetupOutputVariable(*state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite2", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); state->dataGlobal->DoWeathSim = false; // <- here @@ -12870,14 +12927,13 @@ TEST_F(EnergyPlusFixture, OutputReportTabularMonthly_DontWarnMonthlyIfOnlyNamedR SetupOutputVariable(*state, "Exterior Lights Electricity Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite1", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); state->dataGlobal->DoWeathSim = true; @@ -12919,27 +12975,25 @@ TEST_F(SQLiteFixture, OutputReportTabular_DistrictHeating) Real64 DistrictHeatingWater = 4e8; SetupOutputVariable(*state, "Exterior Equipment DistrictHeatingWater Energy", - OutputProcessor::Unit::J, + Constant::Units::J, DistrictHeatingWater, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "DHWaterExtEq", - {}, - "DistrictHeatingWater", - "ExteriorEquipment", + Constant::eResource::DistrictHeatingWater, + OutputProcessor::SOVEndUseCat::ExteriorEquipment, "General"); Real64 DistrictHeatingSteam = 5e8; SetupOutputVariable(*state, "Exterior Equipment DistrictHeatingSteam Energy", - OutputProcessor::Unit::J, + Constant::Units::J, DistrictHeatingSteam, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "DHSteamExtEq", - {}, - "DistrictHeatingSteam", - "ExteriorEquipment", + Constant::eResource::DistrictHeatingSteam, + OutputProcessor::SOVEndUseCat::ExteriorEquipment, "General"); state->dataGlobal->DoWeathSim = true; @@ -12954,8 +13008,8 @@ TEST_F(SQLiteFixture, OutputReportTabular_DistrictHeating) SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::Zone, timeStep); SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::HVAC, timeStep); - *state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::Zone).TimeStep = 60; - *state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep = 60; + *state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].TimeStep = 60; + *state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep = 60; GetInputOutputTableSummaryReports(*state); @@ -13111,3 +13165,474 @@ TEST_F(EnergyPlusFixture, OutputReportTabular_Test_SetupUnitConversion_Fix) unitConvFactor = state->dataOutRptTab->UnitConv(unitConvNum).mult; EXPECT_NEAR(unitConvFactor, 1.0, 1e-5); } + +TEST_F(SQLiteFixture, WriteSourceEnergyEndUseSummaryperArea_IPExceptElec) +{ + state->dataSQLiteProcedures->sqlite->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time"); + + state->dataOutRptTab->displaySourceEnergyEndUseSummary = true; + + // DetermineBuildingFloorArea + + state->dataEnvrn->Latitude = 12.3; + state->dataEnvrn->Longitude = 45.6; + + state->dataSurface->TotSurfaces = 4; + state->dataSurface->Surface.allocate(state->dataSurface->TotSurfaces); + + // walls + state->dataSurface->Surface(1).Class = SurfaceClass::Wall; + state->dataSurface->Surface(1).HeatTransSurf = true; + state->dataSurface->Surface(1).ExtBoundCond = ExternalEnvironment; + state->dataSurface->Surface(1).Azimuth = 0.; + state->dataSurface->Surface(1).GrossArea = 200.; // 20 x 10 + state->dataSurface->Surface(1).Tilt = 90.; + state->dataSurface->Surface(1).Zone = 1; + + state->dataSurface->Surface(2).Class = SurfaceClass::Wall; + state->dataSurface->Surface(2).HeatTransSurf = true; + state->dataSurface->Surface(2).ExtBoundCond = ExternalEnvironment; + state->dataSurface->Surface(2).Azimuth = 90.; + state->dataSurface->Surface(2).GrossArea = 300.; // 30 x 10 + state->dataSurface->Surface(2).Tilt = 90.; + state->dataSurface->Surface(2).Zone = 2; + + // windows + state->dataSurface->Surface(3).Class = SurfaceClass::Window; + state->dataSurface->Surface(3).HeatTransSurf = true; + state->dataSurface->Surface(3).ExtBoundCond = ExternalEnvironment; + state->dataSurface->Surface(3).Azimuth = 0.; + state->dataSurface->Surface(3).GrossArea = 40.; + state->dataSurface->Surface(3).Height = 5; + state->dataSurface->Surface(3).Width = 8; + state->dataSurface->Surface(3).Tilt = 90.; + state->dataSurface->Surface(3).Zone = 1; + + state->dataSurface->Surface(4).Class = SurfaceClass::Window; + state->dataSurface->Surface(4).HeatTransSurf = true; + state->dataSurface->Surface(4).ExtBoundCond = ExternalEnvironment; + state->dataSurface->Surface(4).Azimuth = 90.; + state->dataSurface->Surface(4).GrossArea = 60.; + state->dataSurface->Surface(4).Height = 6; + state->dataSurface->Surface(4).Width = 10; + state->dataSurface->Surface(4).Tilt = 90.; + state->dataSurface->Surface(4).Zone = 2; + + // Loads + state->dataHeatBal->TotLights = 3; + state->dataHeatBal->Lights.allocate(state->dataHeatBal->TotLights); + + state->dataHeatBal->TotPeople = 3; + state->dataHeatBal->People.allocate(state->dataHeatBal->TotPeople); + + state->dataHeatBal->TotElecEquip = 3; + state->dataHeatBal->ZoneElectric.allocate(state->dataHeatBal->TotElecEquip); + + state->dataHeatBal->Lights(1).ZonePtr = 1; + state->dataHeatBal->Lights(1).DesignLevel = 1000.0; + state->dataHeatBal->Lights(2).ZonePtr = 2; + state->dataHeatBal->Lights(2).DesignLevel = 100.0; + state->dataHeatBal->Lights(3).ZonePtr = 3; + state->dataHeatBal->Lights(3).DesignLevel = 10.0; + + state->dataHeatBal->People(1).ZonePtr = 1; + state->dataHeatBal->People(1).NumberOfPeople = 10.0; + state->dataHeatBal->People(2).ZonePtr = 2; + state->dataHeatBal->People(2).NumberOfPeople = 5.0; + state->dataHeatBal->People(3).ZonePtr = 3; + state->dataHeatBal->People(3).NumberOfPeople = 1.0; + + state->dataHeatBal->ZoneElectric(1).ZonePtr = 1; + state->dataHeatBal->ZoneElectric(1).DesignLevel = 500.0; + state->dataHeatBal->ZoneElectric(2).ZonePtr = 2; + state->dataHeatBal->ZoneElectric(2).DesignLevel = 50.0; + state->dataHeatBal->ZoneElectric(3).ZonePtr = 3; + state->dataHeatBal->ZoneElectric(3).DesignLevel = 5.0; + + // zone + state->dataGlobal->NumOfZones = 3; + state->dataHeatBal->Zone.allocate(state->dataGlobal->NumOfZones); + state->dataHeatBal->Zone(1).Name = "PartofTot Conditioned Zone"; + state->dataHeatBal->Zone(1).SystemZoneNodeNumber = 1; // Conditioned + state->dataHeatBal->Zone(1).isPartOfTotalArea = true; + state->dataHeatBal->Zone(1).Multiplier = 1.; + state->dataHeatBal->Zone(1).ListMultiplier = 1.; + state->dataHeatBal->Zone(1).FloorArea = 1000.; + state->dataHeatBal->Zone(1).Volume = 2000.; + state->dataHeatBal->Zone(1).ExtGrossWallArea = 800.; + state->dataHeatBal->Zone(1).ExteriorTotalGroundSurfArea = 0; + state->dataHeatBal->Zone(1).ExtWindowArea = state->dataSurface->Surface(3).GrossArea + state->dataSurface->Surface(4).GrossArea; + + state->dataHeatBal->Zone(2).Name = "PartofTot Unconditioned Zone"; + state->dataHeatBal->Zone(2).SystemZoneNodeNumber = 0; // Unconditioned + state->dataHeatBal->Zone(2).isPartOfTotalArea = true; + state->dataHeatBal->Zone(2).Multiplier = 1.; + state->dataHeatBal->Zone(2).ListMultiplier = 1.; + state->dataHeatBal->Zone(2).FloorArea = 100.; + state->dataHeatBal->Zone(2).Volume = 200.; + state->dataHeatBal->Zone(2).ExtGrossWallArea = 80.; + state->dataHeatBal->Zone(2).ExteriorTotalGroundSurfArea = 0; + state->dataHeatBal->Zone(2).ExtWindowArea = 0.0; + + state->dataHeatBal->Zone(3).Name = "NOT PartofTot Conditioned Zone"; + state->dataHeatBal->Zone(3).SystemZoneNodeNumber = 1; // Conditioned + state->dataHeatBal->Zone(3).isPartOfTotalArea = false; + state->dataHeatBal->Zone(3).Multiplier = 1.; + state->dataHeatBal->Zone(3).ListMultiplier = 1.; + state->dataHeatBal->Zone(3).FloorArea = 10.; + state->dataHeatBal->Zone(3).Volume = 20.; + state->dataHeatBal->Zone(3).ExtGrossWallArea = 8.; + state->dataHeatBal->Zone(3).ExteriorTotalGroundSurfArea = 0; + state->dataHeatBal->Zone(3).ExtWindowArea = 0.0; + + // 2023-10-13: Need a set up unit conversion first: + OutputReportTabular::SetupUnitConversions(*state); + + // Gross areas + Real64 expectedBuildingGrossFloorArea = (state->dataHeatBal->Zone(1).FloorArea + state->dataHeatBal->Zone(2).FloorArea); + // Conditioned areas + Real64 expectedBuildingConditionedFloorArea = state->dataHeatBal->Zone(1).FloorArea; + + // Assume heating electricity usage with a value of 3.6e6 * 1e4 J =10000 kWh that comes for a single end use + // state->dataGlobalConst->iEndUse.at(Constant::EndUse::Heating)=1 + state->dataOutRptTab->gatherEndUseBySourceBEPS(1, static_cast(Constant::EndUse::Heating) + 1) = 3.6e10; // J + state->dataOutRptTab->gatherTotalsBySourceBEPS(1) = 3.6e10; // J + Real64 eleckWh = 1e4; // kWh + + state->dataOutRptTab->unitsStyle = OutputReportTabular::UnitsStyle::InchPoundExceptElectricity; + + state->dataOutRptTab->unitsStyle_SQLite = OutputReportTabular::UnitsStyle::InchPoundExceptElectricity; + + // Call Source Energy End Use Summary writing function + OutputReportTabular::WriteSourceEnergyEndUseSummary(*state); + + // Check that DetermineBuildingFloorArea is converted correctly (called from WriteSourceEnergyEndUseSummary) + EXPECT_EQ(expectedBuildingGrossFloorArea, state->dataOutRptTab->buildingGrossFloorArea); + EXPECT_EQ(expectedBuildingConditionedFloorArea, state->dataOutRptTab->buildingConditionedFloorArea); + + // Now test the reporting text: + // We consistently test in the same report (three different tables) and at the same column for fuel = Elec + const std::string reportName = "SourceEnergyEndUseComponentsSummary"; + const std::string columnName = "Source Electricity"; + + // Test for Heating and Total, and they should be the same for this case + std::vector testRowNames = {"Heating", "Total Source Energy End Use Components"}; + + // TableName, value + std::vector> results({ + {"Source Energy End Use Components Summary", eleckWh}, + {"Source Energy End Use Components Per Conditioned Floor Area", 10000.0 / (expectedBuildingConditionedFloorArea / (0.3048 * 0.3048))}, + {"Source Energy End Use Components Per Total Floor Area", 10000.0 / (expectedBuildingGrossFloorArea / (0.3048 * 0.3048))}, + }); + + // Test that the reported values are successfully matching kWh/ft2 values (kWh Electricity with InchPound others) + for (auto &v : results) { + + std::string tableName = std::get<0>(v); + Real64 expectedValue = std::get<1>(v); + + for (auto &rowName : testRowNames) { + std::string query("SELECT Value From TabularDataWithStrings" + " WHERE ReportName = '" + + reportName + + "'" + " AND TableName = '" + + tableName + + "'" + " AND RowName = '" + + rowName + "'" + " AND ColumnName = '" + columnName + "'"); + + Real64 return_val = execAndReturnFirstDouble(query); + + // Add informative message if failed + EXPECT_NEAR(expectedValue, return_val, 0.01) << "Failed for TableName=" << tableName << "; RowName=" << rowName; + } + } +} + +TEST_F(SQLiteFixture, ORT_EndUseBySubcategorySQL_IPUnitExceptElec) +{ + state->dataSQLiteProcedures->sqlite->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time"); + + state->dataOutRptTab->displayTabularBEPS = true; + state->dataOutRptTab->displayDemandEndUse = true; + state->dataOutRptTab->displayLEEDSummary = true; + + state->dataOutRptTab->WriteTabularFiles = true; + + SetupUnitConversions(*state); + state->dataOutRptTab->unitsStyle = OutputReportTabular::UnitsStyle::JtoKWH; + // state->dataOutRptTab->unitsStyle_SQLite = OutputReportTabular::UnitsStyle::InchPound; + state->dataOutRptTab->unitsStyle_SQLite = OutputReportTabular::UnitsStyle::InchPoundExceptElectricity; + Real64 enerConv = getSpecificUnitDivider(*state, "GJ", "kBtu"); // 948.45 + EXPECT_NEAR(1.0 / enerConv, 948.0, 0.5); + + // Needed to avoid crash (from ElectricPowerServiceManager.hh) + createFacilityElectricPowerServiceObject(*state); + + SetPredefinedTables(*state); + + Real64 extLitUse = 1e8; + Real64 CoalHeating = 2e8; + Real64 GasolineHeating = 3e8; + Real64 PropaneHeating = 4e8; + + SetupOutputVariable(*state, + "Exterior Lights Electricity Energy", + Constant::Units::J, + extLitUse, + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Summed, + "Lite1", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, + "General"); + SetupOutputVariable(*state, + "Exterior Lights Electricity Energy", + Constant::Units::J, + extLitUse, + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Summed, + "Lite2", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, + "AnotherEndUseSubCat"); + SetupOutputVariable(*state, + "Exterior Lights Electricity Energy", + Constant::Units::J, + extLitUse, + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Summed, + "Lite3", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, + "General"); + SetupOutputVariable(*state, + "Heating Coal Energy", + Constant::Units::J, + CoalHeating, + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Summed, + "Lite4", + Constant::eResource::Coal, + OutputProcessor::SOVEndUseCat::Heating, + "General"); + SetupOutputVariable(*state, + "Heating Gasoline Energy", + Constant::Units::J, + GasolineHeating, + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Summed, + "Lite5", + Constant::eResource::Gasoline, + OutputProcessor::SOVEndUseCat::Heating, + "General"); + SetupOutputVariable(*state, + "Heating Propane Energy", + Constant::Units::J, + PropaneHeating, + OutputProcessor::SOVTimeStepType::Zone, + OutputProcessor::SOVStoreType::Summed, + "Lite6", + Constant::eResource::Propane, + OutputProcessor::SOVEndUseCat::Heating, + "General"); + state->dataGlobal->DoWeathSim = true; + state->dataGlobal->TimeStepZone = 1.0; + state->dataGlobal->TimeStepZoneSec = state->dataGlobal->TimeStepZone * 3600.0; + state->dataGlobal->MinutesPerTimeStep = 60; + state->dataOutRptTab->displayTabularBEPS = true; + // OutputProcessor::TimeValue.allocate(2); + + auto timeStep = 1.0; + + SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::Zone, timeStep); + SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::HVAC, timeStep); + + *state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::Zone].TimeStep = 60; + *state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep = 60; + + GetInputOutputTableSummaryReports(*state); + + state->dataEnvrn->Month = 12; + + UpdateMeterReporting(*state); + UpdateDataandReport(*state, OutputProcessor::TimeStepType::Zone); + GatherBEPSResultsForTimestep(*state, OutputProcessor::TimeStepType::Zone); + GatherPeakDemandForTimestep(*state, OutputProcessor::TimeStepType::Zone); + EXPECT_NEAR(extLitUse * 3, state->dataOutRptTab->gatherEndUseBEPS(1, static_cast(Constant::EndUse::ExteriorLights) + 1), 1.); + // General + EXPECT_NEAR(extLitUse * 2, state->dataOutRptTab->gatherEndUseSubBEPS(1, static_cast(Constant::EndUse::ExteriorLights) + 1, 1), 1.); + // AnotherEndUseSubCat + EXPECT_NEAR(extLitUse * 1, state->dataOutRptTab->gatherEndUseSubBEPS(2, static_cast(Constant::EndUse::ExteriorLights) + 1, 1), 1.); + + UpdateMeterReporting(*state); + UpdateDataandReport(*state, OutputProcessor::TimeStepType::Zone); + GatherBEPSResultsForTimestep(*state, OutputProcessor::TimeStepType::Zone); + GatherPeakDemandForTimestep(*state, OutputProcessor::TimeStepType::Zone); + EXPECT_NEAR(extLitUse * 6, state->dataOutRptTab->gatherEndUseBEPS(1, static_cast(Constant::EndUse::ExteriorLights) + 1), 1.); + // General + EXPECT_NEAR(extLitUse * 4, state->dataOutRptTab->gatherEndUseSubBEPS(1, static_cast(Constant::EndUse::ExteriorLights) + 1, 1), 1.); + // AnotherEndUseSubCat + EXPECT_NEAR(extLitUse * 2, state->dataOutRptTab->gatherEndUseSubBEPS(2, static_cast(Constant::EndUse::ExteriorLights) + 1, 1), 1.); + + UpdateMeterReporting(*state); + UpdateDataandReport(*state, OutputProcessor::TimeStepType::Zone); + GatherBEPSResultsForTimestep(*state, OutputProcessor::TimeStepType::Zone); + GatherPeakDemandForTimestep(*state, OutputProcessor::TimeStepType::Zone); + EXPECT_NEAR(extLitUse * 9, state->dataOutRptTab->gatherEndUseBEPS(1, static_cast(Constant::EndUse::ExteriorLights) + 1), 1.); + // General + EXPECT_NEAR(extLitUse * 6, state->dataOutRptTab->gatherEndUseSubBEPS(1, static_cast(Constant::EndUse::ExteriorLights) + 1, 1), 1.); + // AnotherEndUseSubCat + EXPECT_NEAR(extLitUse * 3, state->dataOutRptTab->gatherEndUseSubBEPS(2, static_cast(Constant::EndUse::ExteriorLights) + 1, 1), 1.); + + OutputReportTabular::WriteBEPSTable(*state); + OutputReportTabular::WriteDemandEndUseSummary(*state); + + // We test for Heating and Total, since they should be the same + std::vector testReportNames = {"AnnualBuildingUtilityPerformanceSummary", "DemandEndUseComponentsSummary"}; + std::vector endUseSubCategoryNames = {"General", "AnotherEndUseSubCat"}; + + std::string endUseName = "Exterior Lighting"; + std::string endUseSubCategoryName = "AnotherEndUseSubCat"; + std::string rowName = endUseName + ":" + endUseSubCategoryName; + std::string columnName = "Electricity"; + + for (auto &endUseSubCategoryName : endUseSubCategoryNames) { + for (auto &reportName : testReportNames) { + + std::string query("SELECT Value From TabularDataWithStrings" + " WHERE TableName = 'End Uses By Subcategory'" + " AND ColumnName = 'Electricity'" + " AND ReportName = '" + + reportName + + "'" + " AND RowName = '" + + endUseName + ":" + endUseSubCategoryName + "'"); // Now Like 'Exterior Lighting:General' + + auto result = queryResult(query, "TabularDataWithStrings"); + + ASSERT_EQ(1ul, result.size()) << "Query crashed for reportName=" << reportName; + } + } + + for (auto &reportName : testReportNames) { + + std::string query("SELECT Value From TabularDataWithStrings" + " WHERE TableName = 'End Uses'" + " AND ColumnName = 'Electricity'" + " AND ReportName = '" + + reportName + + "'" + " AND RowName = '" + + endUseName + "'"); + + auto result = queryResult(query, "TabularDataWithStrings"); + + ASSERT_EQ(1ul, result.size()) << "Query crashed for reportName=" << reportName; + } + + // Specifically get the electricity usage for End Use = Exterior Lighting, and End Use Subcat = AnotherEndUseSubCat, + // and make sure it's the right number that's returned + std::string query("SELECT Value From TabularDataWithStrings" + " WHERE TableName = 'End Uses By Subcategory'" + " AND ReportName = 'AnnualBuildingUtilityPerformanceSummary'" + " AND ColumnName = 'Electricity'" + " AND RowName = 'Exterior Lighting:AnotherEndUseSubCat'"); + Real64 return_val = execAndReturnFirstDouble(query); + + // EXPECT_NEAR(extLitUse * 3 / 3.6e6, return_val, 0.01) << "Failed for query: " << query; + Real64 expected_value = extLitUse * 3.0 / 3.6e6; // 1.0e9 / enerConv; + EXPECT_NEAR(expected_value, return_val, 0.01) << "Failed for query: " << query; + + // Get all Interior Lighting End Uses (all subcats) for Electricity + { + std::string query("SELECT Value From TabularDataWithStrings" + " WHERE TableName = 'End Uses By Subcategory'" + " AND ReportName = 'AnnualBuildingUtilityPerformanceSummary'" + " AND ColumnName = 'Electricity'" + " AND RowName LIKE 'Exterior Lighting:%'"); + auto result = queryResult(query, "TabularDataWithStrings"); + + ASSERT_EQ(2u, result.size()) << "Failed for query: " << query; + } + + // Get all subcat usage for all fuels (13) + { + std::string query("SELECT Value From TabularDataWithStrings" + " WHERE TableName = 'End Uses By Subcategory'" + " AND ReportName = 'AnnualBuildingUtilityPerformanceSummary'" + " AND RowName = 'Exterior Lighting:AnotherEndUseSubCat'"); + auto result = queryResult(query, "TabularDataWithStrings"); + + ASSERT_EQ(14u, result.size()) << "Failed for query: " << query; + } + + // Specifically get the each fuel (Coal, Gasoline, and Propane) usage for End Use = Heating, + // and make sure it's the right number that's returned + + { + std::string query("SELECT Value From TabularDataWithStrings" + " WHERE TableName = 'End Uses'" + " AND ReportName = 'AnnualBuildingUtilityPerformanceSummary'" + " AND ColumnName = 'Coal'" + " AND RowName = 'Heating'"); + auto result = queryResult(query, "TabularDataWithStrings"); + Real64 return_val1 = execAndReturnFirstDouble(query); + + ASSERT_EQ(1u, result.size()) << "Failed for query: " << query; + // EXPECT_NEAR(CoalHeating * 3 / 3.6e6, return_val1, 0.01) << "Failed for query: " << query; + Real64 expected_coalHt = CoalHeating * 3 / 1.0e9 / enerConv; + EXPECT_NEAR(expected_coalHt, return_val1, 0.01) << "Failed for query: " << query; + } + + { + std::string query("SELECT Value From TabularDataWithStrings" + " WHERE TableName = 'End Uses'" + " AND ReportName = 'AnnualBuildingUtilityPerformanceSummary'" + " AND ColumnName = 'Gasoline'" + " AND RowName = 'Heating'"); + auto result = queryResult(query, "TabularDataWithStrings"); + Real64 return_val2 = execAndReturnFirstDouble(query); + + ASSERT_EQ(1u, result.size()) << "Failed for query: " << query; + // EXPECT_NEAR(GasolineHeating * 3 / 3.6e6, return_val2, 0.01) << "Failed for query: " << query; + EXPECT_NEAR(GasolineHeating * 3 / 1.0e9 / enerConv, return_val2, 0.01) << "Failed for query: " << query; + } + + { + std::string query("SELECT Value From TabularDataWithStrings" + " WHERE TableName = 'End Uses'" + " AND ReportName = 'AnnualBuildingUtilityPerformanceSummary'" + " AND ColumnName = 'Propane'" + " AND RowName = 'Heating'"); + auto result = queryResult(query, "TabularDataWithStrings"); + Real64 return_val3 = execAndReturnFirstDouble(query); + + ASSERT_EQ(1u, result.size()) << "Failed for query: " << query; + // EXPECT_NEAR(PropaneHeating * 3 / 3.6e6, return_val3, 0.01) << "Failed for query: " << query; + EXPECT_NEAR(PropaneHeating * 3 / 1.0e9 / enerConv, return_val3, 0.01) << "Failed for query: " << query; + } + + // Check the heating category has the result size of 13 (including all disaggregated additional fuels) in both reports) + + { + std::string query("SELECT Value From TabularDataWithStrings" + " WHERE TableName = 'End Uses'" + " AND ReportName = 'AnnualBuildingUtilityPerformanceSummary'" + " AND RowName = 'Heating'"); + auto result = queryResult(query, "TabularDataWithStrings"); + + ASSERT_EQ(14u, result.size()) << "Failed for query: " << query; + } + + { + std::string query("SELECT Value From TabularDataWithStrings" + " WHERE TableName = 'End Uses'" + " AND ReportName = 'DemandEndUseComponentsSummary'" + " AND RowName = 'Heating'"); + auto result = queryResult(query, "TabularDataWithStrings"); + + ASSERT_EQ(14u, result.size()) << "Failed for query: " << query; + } +} diff --git a/tst/EnergyPlus/unit/OutputReportTabularAnnual.unit.cc b/tst/EnergyPlus/unit/OutputReportTabularAnnual.unit.cc index 9b6ac093ff5..11e2ad7b60f 100644 --- a/tst/EnergyPlus/unit/OutputReportTabularAnnual.unit.cc +++ b/tst/EnergyPlus/unit/OutputReportTabularAnnual.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -135,54 +135,51 @@ TEST_F(EnergyPlusFixture, OutputReportTabularAnnual_SetupGathering) SetupOutputVariable(*state, "Exterior Lights Electric Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite1", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); SetupOutputVariable(*state, "Exterior Lights Electric Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite2", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); SetupOutputVariable(*state, "Exterior Lights Electric Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite3", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); SetupOutputVariable(*state, "Exterior Lights Electric Power", - OutputProcessor::Unit::W, + Constant::Units::W, extLitPow, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Lite1"); SetupOutputVariable(*state, "Exterior Lights Electric Power", - OutputProcessor::Unit::W, + Constant::Units::W, extLitPow, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Lite2"); SetupOutputVariable(*state, "Exterior Lights Electric Power", - OutputProcessor::Unit::W, + Constant::Units::W, extLitPow, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -227,54 +224,51 @@ TEST_F(EnergyPlusFixture, OutputReportTabularAnnual_GatherResults) SetupOutputVariable(*state, "Exterior Lights Electric Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite1", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); SetupOutputVariable(*state, "Exterior Lights Electric Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite2", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); SetupOutputVariable(*state, "Exterior Lights Electric Energy", - OutputProcessor::Unit::J, + Constant::Units::J, extLitUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite3", - {}, - "Electricity", - "Exterior Lights", + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::ExteriorLights, "General"); SetupOutputVariable(*state, "Exterior Lights Electric Power", - OutputProcessor::Unit::W, + Constant::Units::W, extLitPow, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Lite1"); SetupOutputVariable(*state, "Exterior Lights Electric Power", - OutputProcessor::Unit::W, + Constant::Units::W, extLitPow, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, "Lite2"); SetupOutputVariable(*state, "Exterior Lights Electric Power", - OutputProcessor::Unit::W, + Constant::Units::W, extLitPow, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Average, @@ -300,14 +294,19 @@ TEST_F(EnergyPlusFixture, OutputReportTabularAnnual_GatherResults) TEST_F(EnergyPlusFixture, OutputReportTabularAnnual_GatherResults_MinMaxHrsShown) { + using namespace OutputProcessor; state->dataGlobal->TimeStepZone = 1.0; state->dataHVACGlobal->TimeStepSys = 1.0; state->dataHVACGlobal->TimeStepSysSec = state->dataHVACGlobal->TimeStepSys * Constant::SecInHour; - state->dataOutputProcessor->NumEnergyMeters = 2; - state->dataOutputProcessor->EnergyMeters.allocate(state->dataOutputProcessor->NumEnergyMeters); - state->dataOutputProcessor->EnergyMeters(1).Name = "HEATING:MYTH:VARIABLE"; - state->dataOutputProcessor->EnergyMeters(2).Name = "ELECTRICITY:MYTH"; + Meter *meter1 = new Meter("HEATING:MYTH:VARIABLE"); + meter1->units = Constant::Units::None; + state->dataOutputProcessor->meters.push_back(meter1); + state->dataOutputProcessor->meterMap.insert_or_assign("HEATING:MYTH:VARIABLE", state->dataOutputProcessor->meters.size() - 1); + Meter *meter2 = new Meter("ELECTRICITY:MYTH"); + meter2->units = Constant::Units::None; + state->dataOutputProcessor->meters.push_back(meter2); + state->dataOutputProcessor->meterMap.insert_or_assign("ELECTRICITY:MYTH", state->dataOutputProcessor->meters.size() - 1); std::vector annualTables; annualTables.push_back(AnnualTable(*state, "PEAK ELECTRICTY ANNUAL MYTH REPORT", "", "")); @@ -315,8 +314,8 @@ TEST_F(EnergyPlusFixture, OutputReportTabularAnnual_GatherResults_MinMaxHrsShown annualTables.back().addFieldSet("ELECTRICITY:MYTH", AnnualFieldSet::AggregationKind::maximumDuringHoursShown, 2); annualTables.back().setupGathering(*state); - state->dataOutputProcessor->EnergyMeters(1).CurTSValue = -10.; - state->dataOutputProcessor->EnergyMeters(2).CurTSValue = 50.; + meter1->CurTSValue = -10.; + meter2->CurTSValue = 50.; annualTables.back().gatherForTimestep(*state, OutputProcessor::TimeStepType::Zone); std::vector fieldSetParams = annualTables.back().inspectTableFieldSets(0); @@ -327,8 +326,8 @@ TEST_F(EnergyPlusFixture, OutputReportTabularAnnual_GatherResults_MinMaxHrsShown EXPECT_EQ(fieldSetParams[0], "ELECTRICITY:MYTH"); // m_colHead EXPECT_EQ(fieldSetParams[13].std::string::substr(0, 6), "-99000"); // m_cell[0].result - state->dataOutputProcessor->EnergyMeters(1).CurTSValue = 15.; - state->dataOutputProcessor->EnergyMeters(2).CurTSValue = 55.; + meter1->CurTSValue = 15.; + meter2->CurTSValue = 55.; annualTables.back().gatherForTimestep(*state, OutputProcessor::TimeStepType::Zone); fieldSetParams = annualTables.back().inspectTableFieldSets(0); @@ -342,6 +341,8 @@ TEST_F(EnergyPlusFixture, OutputReportTabularAnnual_GatherResults_MinMaxHrsShown TEST_F(EnergyPlusFixture, OutputReportTabularAnnual_columnHeadersToTitleCase) { + using namespace OutputProcessor; + std::string const idf_objects = delimited_string({ "Output:Table:Annual,", "Test Report, !- Name", @@ -374,20 +375,23 @@ TEST_F(EnergyPlusFixture, OutputReportTabularAnnual_columnHeadersToTitleCase) Real64 facilUse; SetupOutputVariable(*state, "Misc Facility Electric Energy", - OutputProcessor::Unit::J, + Constant::Units::J, facilUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite1", - {}, - "Electricity", - "Facility", - "General"); // create an electric meter - - state->dataOutputProcessor->NumEnergyMeters = 2; - state->dataOutputProcessor->EnergyMeters.allocate(state->dataOutputProcessor->NumEnergyMeters); - state->dataOutputProcessor->EnergyMeters(1).Name = "Electricity:Facility"; //"ELECTRICITY:FACILITY"; - state->dataOutputProcessor->EnergyMeters(2).Name = "ELECTRICITY:LIGHTING"; + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::InteriorLights, // Was "Facility" + "General"); // create an electric meter + + Meter *meter1 = new Meter("Electricity:Facility"); + meter1->units = Constant::Units::None; + state->dataOutputProcessor->meters.push_back(meter1); + state->dataOutputProcessor->meterMap.insert_or_assign("ELECTRICITY:FACILITY", state->dataOutputProcessor->meters.size() - 1); + Meter *meter2 = new Meter("ELECTRICITY:LIGHTING"); + meter2->units = Constant::Units::None; + state->dataOutputProcessor->meters.push_back(meter2); + state->dataOutputProcessor->meterMap.insert_or_assign("ELECTRICITY:LIGHTING", state->dataOutputProcessor->meters.size() - 1); state->dataGlobal->DoWeathSim = true; @@ -414,6 +418,8 @@ TEST_F(EnergyPlusFixture, OutputReportTabularAnnual_columnHeadersToTitleCase) TEST_F(EnergyPlusFixture, OutputReportTabularAnnual_invalidAggregationOrder) { + using namespace OutputProcessor; + std::string const idf_objects = delimited_string({ "Output:Table:Annual,", "Test Report, !- Name", @@ -432,20 +438,23 @@ TEST_F(EnergyPlusFixture, OutputReportTabularAnnual_invalidAggregationOrder) Real64 facilUse; SetupOutputVariable(*state, "Misc Facility Electric Energy", - OutputProcessor::Unit::J, + Constant::Units::J, facilUse, OutputProcessor::SOVTimeStepType::Zone, OutputProcessor::SOVStoreType::Summed, "Lite1", - {}, - "Electricity", - "Facility", - "General"); // create an electric meter - - state->dataOutputProcessor->NumEnergyMeters = 2; - state->dataOutputProcessor->EnergyMeters.allocate(state->dataOutputProcessor->NumEnergyMeters); - state->dataOutputProcessor->EnergyMeters(1).Name = "Electricity:Facility"; //"ELECTRICITY:FACILITY"; - state->dataOutputProcessor->EnergyMeters(2).Name = "ELECTRICITY:LIGHTING"; + Constant::eResource::Electricity, + OutputProcessor::SOVEndUseCat::InteriorLights, // Was "Facility" + "General"); // create an electric meter + + Meter *meter1 = new Meter("ELECTRICITY:FACILITY"); + meter1->units = Constant::Units::None; + state->dataOutputProcessor->meters.push_back(meter1); + state->dataOutputProcessor->meterMap.insert_or_assign("ELECTRICITY:FACILITY", state->dataOutputProcessor->meters.size() - 1); + Meter *meter2 = new Meter("ELECTRICITY:LIGHTING"); + meter2->units = Constant::Units::None; + state->dataOutputProcessor->meters.push_back(meter2); + state->dataOutputProcessor->meterMap.insert_or_assign("ELECTRICITY:LIGHTING", state->dataOutputProcessor->meters.size() - 1); state->dataGlobal->DoWeathSim = true; @@ -461,6 +470,7 @@ TEST_F(EnergyPlusFixture, OutputReportTabularAnnual_invalidAggregationOrder) TEST_F(SQLiteFixture, OutputReportTabularAnnual_CurlyBraces) { // Test for #8921 + using namespace OutputProcessor; state->dataSQLiteProcedures->sqlite->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time"); @@ -521,9 +531,10 @@ TEST_F(SQLiteFixture, OutputReportTabularAnnual_CurlyBraces) ASSERT_TRUE(process_idf(idf_objects)); - state->dataOutputProcessor->NumEnergyMeters = 1; - state->dataOutputProcessor->EnergyMeters.allocate(state->dataOutputProcessor->NumEnergyMeters); - state->dataOutputProcessor->EnergyMeters(1).Name = "Electricity:Facility"; + Meter *meter1 = new Meter("ELECTRICITY:FACILITY"); + meter1->units = Constant::Units::None; + state->dataOutputProcessor->meters.push_back(meter1); + state->dataOutputProcessor->meterMap.insert_or_assign("ELECTRICITY:FACILITY", state->dataOutputProcessor->meters.size() - 1); state->dataGlobal->DoWeathSim = true; state->dataGlobal->TimeStepZone = 0.25; @@ -555,3 +566,40 @@ TEST_F(SQLiteFixture, OutputReportTabularAnnual_CurlyBraces) EXPECT_TRUE(false) << "Missing braces in monthly table for : " << colHeader; } } + +TEST_F(EnergyPlusFixture, OutputReportTabularAnnual_WarnBlankVariable) +{ + std::string const idf_objects = delimited_string({ + "Output:Table:Annual,", + "Space Gains Annual Report, !- Name", + "Filter1, !- Filter", + "Schedule2, !- Schedule Name", + "Zone People Total Heating Energy, !- Variable or Meter 1 Name", + "SumOrAverage, !- Aggregation Type for Variable or Meter 1", + "4, !- field Digits After Decimal 1", + ", !- Variable or Meter 2 Name", + "hoursNonZero, !- Aggregation Type for Variable or Meter 2", + ", !- field Digits After Decimal 2", + "Zone Electric Equipment Total Heating Energy; !- Variable or Meter 3 Name", + }); + + ASSERT_TRUE(process_idf(idf_objects)); + + state->dataGlobal->DoWeathSim = true; + + EXPECT_FALSE(state->dataOutRptTab->WriteTabularFiles); + GetInputTabularAnnual(*state); + EXPECT_TRUE(state->dataOutRptTab->WriteTabularFiles); + + EXPECT_EQ(state->dataOutputReportTabularAnnual->annualTables.size(), 1u); + + std::vector::iterator firstTable = state->dataOutputReportTabularAnnual->annualTables.begin(); + + std::vector tableParams = firstTable->inspectTable(); + + std::string const expected_error = delimited_string({" ** Warning ** Output:Table:Annual: Blank column specified in 'SPACE GAINS ANNUAL " + "REPORT', need to provide a variable or meter or EMS variable name ", + " ** Warning ** Invalid aggregation type=\"\" Defaulting to SumOrAverage."}); + + compare_err_stream(expected_error); +} diff --git a/tst/EnergyPlus/unit/OutputReports.unit.cc b/tst/EnergyPlus/unit/OutputReports.unit.cc index d9808b29e3b..519d8c86360 100644 --- a/tst/EnergyPlus/unit/OutputReports.unit.cc +++ b/tst/EnergyPlus/unit/OutputReports.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/OutsideEnergySources.unit.cc b/tst/EnergyPlus/unit/OutsideEnergySources.unit.cc index aad4719a6be..dbb8ff27be5 100644 --- a/tst/EnergyPlus/unit/OutsideEnergySources.unit.cc +++ b/tst/EnergyPlus/unit/OutsideEnergySources.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PVWatts.unit.cc b/tst/EnergyPlus/unit/PVWatts.unit.cc index 13ecf320fcd..df5fdd66370 100644 --- a/tst/EnergyPlus/unit/PVWatts.unit.cc +++ b/tst/EnergyPlus/unit/PVWatts.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PackagedTerminalHeatPump.unit.cc b/tst/EnergyPlus/unit/PackagedTerminalHeatPump.unit.cc index 728f88256ce..9b1c1ce4c77 100644 --- a/tst/EnergyPlus/unit/PackagedTerminalHeatPump.unit.cc +++ b/tst/EnergyPlus/unit/PackagedTerminalHeatPump.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -663,6 +663,7 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_SimPTAC_HeatingCoilTest) " 0.500, !- Supply Air Flow Rate During Cooling Operation {m3/s}", " 0.500, !- Supply Air Flow Rate During Heating Operation {m3/s}", " , !- Supply Air Flow Rate When No Cooling or Heating is Needed {m3/s}", + " , !- No Load Supply Air Flow Rate Control Set To Low Speed", " 0.200, !- Outdoor Air Flow Rate During Cooling Operation {m3/s}", " 0.200, !- Outdoor Air Flow Rate During Heating Operation {m3/s}", " 0.200, !- Outdoor Air Flow Rate When No Cooling or Heating is Needed {m3/s}", @@ -1010,6 +1011,7 @@ TEST_F(EnergyPlusFixture, SimPTAC_SZVAVTest) " 0.500, !- Supply Air Flow Rate During Cooling Operation {m3/s}", " 0.500, !- Supply Air Flow Rate During Heating Operation {m3/s}", " 0.335, !- Supply Air Flow Rate When No Cooling or Heating is Needed {m3/s}", + " , !- No Load Supply Air Flow Rate Control Set To Low Speed", " 0.200, !- Outdoor Air Flow Rate During Cooling Operation {m3/s}", " 0.200, !- Outdoor Air Flow Rate During Heating Operation {m3/s}", " 0.200, !- Outdoor Air Flow Rate When No Cooling or Heating is Needed {m3/s}", @@ -1305,6 +1307,7 @@ TEST_F(EnergyPlusFixture, SimPTAC_SZVAVTest) EXPECT_NEAR(QUnitOut, 1000.0, 0.01); ASSERT_NEAR(state->dataLoopNodes->Node(thisSys.AirInNode).MassFlowRate, thisSys.MaxNoCoolHeatAirMassFlow, 0.001); ASSERT_GT(thisSys.DesignMaxOutletTemp, state->dataHeatingCoils->HeatingCoil(1).OutletAirTemp); + EXPECT_TRUE(thisSys.m_useNoLoadLowSpeedAirFlow); // because input is blank, doesn't affect no load flow rate because coils are single sped state->dataZoneEnergyDemand->ZoneSysEnergyDemand(1).RemainingOutputRequired = 2000.0; // set heating load to just below lower boundary load state->dataZoneEnergyDemand->ZoneSysEnergyDemand(1).RemainingOutputReqToHeatSP = 2000.0; @@ -3088,9 +3091,10 @@ TEST_F(EnergyPlusFixture, PTACDrawAirfromReturnNodeAndPlenum_Test) " SPACE1-1 Supply Inlet, !- Air Outlet Node Name", " , !- Outdoor Air Mixer Object Type", " , !- Outdoor Air Mixer Name", - " 0.27003, !- Cooling Supply Air Flow Rate {m3/s}", - " 0.27003, !- Heating Supply Air Flow Rate {m3/s}", + " 0.27003, !- Cooling Supply Air Flow Rate {m3/s}", + " 0.27003, !- Heating Supply Air Flow Rate {m3/s}", " , !- No Load Supply Air Flow Rate {m3/s}", + " , !- No Load Supply Air Flow Rate Control Set To Low Speed", " 0, !- Cooling Outdoor Air Flow Rate {m3/s}", " 0, !- Heating Outdoor Air Flow Rate {m3/s}", " 0, !- No Load Outdoor Air Flow Rate {m3/s}", @@ -3198,9 +3202,10 @@ TEST_F(EnergyPlusFixture, PTACDrawAirfromReturnNodeAndPlenum_Test) " SPACE2-1 Supply Inlet, !- Air Outlet Node Name", " , !- Outdoor Air Mixer Object Type", " , !- Outdoor Air Mixer Name", - " 0.20772, !- Cooling Supply Air Flow Rate {m3/s}", - " 0.20772, !- Heating Supply Air Flow Rate {m3/s}", + " 0.20772, !- Cooling Supply Air Flow Rate {m3/s}", + " 0.20772, !- Heating Supply Air Flow Rate {m3/s}", " , !- No Load Supply Air Flow Rate {m3/s}", + " , !- No Load Supply Air Flow Rate Control Set To Low Speed", " 0, !- Cooling Outdoor Air Flow Rate {m3/s}", " 0, !- Heating Outdoor Air Flow Rate {m3/s}", " 0, !- No Load Outdoor Air Flow Rate {m3/s}", @@ -3237,9 +3242,10 @@ TEST_F(EnergyPlusFixture, PTACDrawAirfromReturnNodeAndPlenum_Test) " SPACE3-1 Supply Inlet, !- Air Outlet Node Name", " , !- Outdoor Air Mixer Object Type", " , !- Outdoor Air Mixer Name", - " 0.25034, !- Cooling Supply Air Flow Rate {m3/s}", - " 0.25034, !- Heating Supply Air Flow Rate {m3/s}", + " 0.25034, !- Cooling Supply Air Flow Rate {m3/s}", + " 0.25034, !- Heating Supply Air Flow Rate {m3/s}", " , !- No Load Supply Air Flow Rate {m3/s}", + " , !- No Load Supply Air Flow Rate Control Set To Low Speed", " 0, !- Cooling Outdoor Air Flow Rate {m3/s}", " 0, !- Heating Outdoor Air Flow Rate {m3/s}", " 0, !- No Load Outdoor Air Flow Rate {m3/s}", @@ -3276,9 +3282,10 @@ TEST_F(EnergyPlusFixture, PTACDrawAirfromReturnNodeAndPlenum_Test) " SPACE4-1 PTAC Outlet, !- Air Outlet Node Name", " , !- Outdoor Air Mixer Object Type", " , !- Outdoor Air Mixer Name", - " 0.22037, !- Cooling Supply Air Flow Rate {m3/s}", - " 0.22037, !- Heating Supply Air Flow Rate {m3/s}", + " 0.22037, !- Cooling Supply Air Flow Rate {m3/s}", + " 0.22037, !- Heating Supply Air Flow Rate {m3/s}", " , !- No Load Supply Air Flow Rate {m3/s}", + " , !- No Load Supply Air Flow Rate Control Set To Low Speed", " 0, !- Cooling Outdoor Air Flow Rate {m3/s}", " 0, !- Heating Outdoor Air Flow Rate {m3/s}", " 0, !- No Load Outdoor Air Flow Rate {m3/s}", @@ -3315,9 +3322,10 @@ TEST_F(EnergyPlusFixture, PTACDrawAirfromReturnNodeAndPlenum_Test) " SPACE5-1 PTAC Outlet, !- Air Outlet Node Name", " , !- Outdoor Air Mixer Object Type", " , !- Outdoor Air Mixer Name", - " 0.26423, !- Cooling Supply Air Flow Rate {m3/s}", - " 0.26423, !- Heating Supply Air Flow Rate {m3/s}", + " 0.26423, !- Cooling Supply Air Flow Rate {m3/s}", + " 0.26423, !- Heating Supply Air Flow Rate {m3/s}", " , !- No Load Supply Air Flow Rate {m3/s}", + " , !- No Load Supply Air Flow Rate Control Set To Low Speed", " 0, !- Cooling Outdoor Air Flow Rate {m3/s}", " 0, !- Heating Outdoor Air Flow Rate {m3/s}", " 0, !- No Load Outdoor Air Flow Rate {m3/s}", @@ -4104,6 +4112,7 @@ TEST_F(EnergyPlusFixture, PTAC_ZoneEquipment_NodeInputTest) " 0.500, !- Supply Air Flow Rate During Cooling Operation {m3/s}", " 0.500, !- Supply Air Flow Rate During Heating Operation {m3/s}", " , !- Supply Air Flow Rate When No Cooling or Heating is Needed {m3/s}", + " , !- No Load Supply Air Flow Rate Control Set To Low Speed", " 0.200, !- Outdoor Air Flow Rate During Cooling Operation {m3/s}", " 0.200, !- Outdoor Air Flow Rate During Heating Operation {m3/s}", " 0.200, !- Outdoor Air Flow Rate When No Cooling or Heating is Needed {m3/s}", @@ -4373,6 +4382,7 @@ TEST_F(EnergyPlusFixture, ZonePTHP_ElectricityRateTest) " 1.00, !- Cooling Supply Air Flow Rate {m3/s}", " 1.00, !- Heating Supply Air Flow Rate {m3/s}", " 1.00, !- No Load Supply Air Flow Rate {m3/s}", + " , !- No Load Supply Air Flow Rate Control Set To Low Speed", " 0.50, !- Cooling Outdoor Air Flow Rate {m3/s}", " 0.50, !- Heating Outdoor Air Flow Rate {m3/s}", " 0.50, !- No Load Outdoor Air Flow Rate {m3/s}", @@ -4727,6 +4737,7 @@ TEST_F(EnergyPlusFixture, PTAC_AvailabilityManagerTest) 0.500, !- Supply Air Flow Rate During Cooling Operation {m3/s} 0.500, !- Supply Air Flow Rate During Heating Operation {m3/s} , !- Supply Air Flow Rate When No Cooling or Heating is Needed {m3/s} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed", 0.200, !- Outdoor Air Flow Rate During Cooling Operation {m3/s} 0.200, !- Outdoor Air Flow Rate During Heating Operation {m3/s} 0.200, !- Outdoor Air Flow Rate When No Cooling or Heating is Needed {m3/s} @@ -4897,6 +4908,7 @@ TEST_F(EnergyPlusFixture, PTAC_AvailabilityManagerTest) EXPECT_EQ("ZoneHVAC:PackagedTerminalAirConditioner", thisSys.UnitType); EXPECT_EQ("COIL:HEATING:FUEL", thisSys.m_HeatingCoilTypeName); EXPECT_EQ(state->dataHeatingCoils->HeatingCoil(1).HCoilType_Num, Coil_HeatingGasOrOtherFuel); + EXPECT_FALSE(thisSys.m_useNoLoadLowSpeedAirFlow); // set input variables state->dataEnvrn->OutBaroPress = 101325.0; state->dataEnvrn->OutDryBulbTemp = 10.0; diff --git a/tst/EnergyPlus/unit/PhaseChangeModeling/HysteresisModel.unit.cc b/tst/EnergyPlus/unit/PhaseChangeModeling/HysteresisModel.unit.cc index d11745d9e33..3a98db87353 100644 --- a/tst/EnergyPlus/unit/PhaseChangeModeling/HysteresisModel.unit.cc +++ b/tst/EnergyPlus/unit/PhaseChangeModeling/HysteresisModel.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PhotovoltaicThermalCollectors.unit.cc b/tst/EnergyPlus/unit/PhotovoltaicThermalCollectors.unit.cc index c512c3f389e..b4fe3bb4e60 100644 --- a/tst/EnergyPlus/unit/PhotovoltaicThermalCollectors.unit.cc +++ b/tst/EnergyPlus/unit/PhotovoltaicThermalCollectors.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Photovoltaics.unit.cc b/tst/EnergyPlus/unit/Photovoltaics.unit.cc index c182ed9323d..380228789a6 100644 --- a/tst/EnergyPlus/unit/Photovoltaics.unit.cc +++ b/tst/EnergyPlus/unit/Photovoltaics.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PierceSurface.unit.cc b/tst/EnergyPlus/unit/PierceSurface.unit.cc index 3e8585904f5..a5f72e56656 100644 --- a/tst/EnergyPlus/unit/PierceSurface.unit.cc +++ b/tst/EnergyPlus/unit/PierceSurface.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -84,18 +84,18 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_Rectangular) Vector const rayDir(0.0, 0.0, -1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(floor, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(floor, rayOri, rayDir, hitPt); EXPECT_TRUE(hit); EXPECT_DOUBLE_EQ(0.5, hitPt.x); EXPECT_DOUBLE_EQ(0.5, hitPt.y); EXPECT_DOUBLE_EQ(0.0, hitPt.z); - PierceSurface(floor, rayOri, rayDir, 1.1, hitPt, hit); // Distance limit > 1.0 => Still hits + hit = PierceSurface(floor, rayOri, rayDir, 1.1, hitPt); // Distance limit > 1.0 => Still hits EXPECT_TRUE(hit); EXPECT_DOUBLE_EQ(0.5, hitPt.x); EXPECT_DOUBLE_EQ(0.5, hitPt.y); EXPECT_DOUBLE_EQ(0.0, hitPt.z); hitPt = 0.0; - PierceSurface(floor, rayOri, rayDir, 0.9, hitPt, hit); // Distance limit < 1.0 => Doesn't hit + hit = PierceSurface(floor, rayOri, rayDir, 0.9, hitPt); // Distance limit < 1.0 => Doesn't hit EXPECT_FALSE(hit); EXPECT_DOUBLE_EQ(0.0, hitPt.x); EXPECT_DOUBLE_EQ(0.0, hitPt.y); @@ -107,7 +107,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_Rectangular) Vector const rayDir(0.0, 0.0, 1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(floor, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(floor, rayOri, rayDir, hitPt); EXPECT_FALSE(hit); // No plane intersection so hitPt is undefined } @@ -116,7 +116,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_Rectangular) Vector const rayDir(Vector(0.25, 0.0, -1.0)); bool hit(false); Vector hitPt(0.0); - PierceSurface(floor, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(floor, rayOri, rayDir, hitPt); EXPECT_TRUE(hit); EXPECT_DOUBLE_EQ(0.75, hitPt.x); EXPECT_DOUBLE_EQ(0.5, hitPt.y); @@ -128,7 +128,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_Rectangular) Vector const rayDir(Vector(2.0, 0.0, -1.0)); bool hit(false); Vector hitPt(0.0); - PierceSurface(floor, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(floor, rayOri, rayDir, hitPt); EXPECT_FALSE(hit); // Misses surface but intersects plane EXPECT_DOUBLE_EQ(2.5, hitPt.x); EXPECT_DOUBLE_EQ(0.5, hitPt.y); @@ -154,7 +154,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_Triangular) Vector const rayDir(0.0, 0.0, -1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(floor, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(floor, rayOri, rayDir, hitPt); EXPECT_TRUE(hit); EXPECT_DOUBLE_EQ(0.9, hitPt.x); EXPECT_DOUBLE_EQ(0.1, hitPt.y); @@ -166,7 +166,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_Triangular) Vector const rayDir(0.0, 0.0, 1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(floor, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(floor, rayOri, rayDir, hitPt); EXPECT_FALSE(hit); // No plane intersection so hitPt is undefined } @@ -175,7 +175,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_Triangular) Vector const rayDir(Vector(-0.25, 0.0, -1.0)); bool hit(false); Vector hitPt(0.0); - PierceSurface(floor, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(floor, rayOri, rayDir, hitPt); EXPECT_TRUE(hit); EXPECT_DOUBLE_EQ(0.65, hitPt.x); EXPECT_DOUBLE_EQ(0.1, hitPt.y); @@ -187,7 +187,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_Triangular) Vector const rayDir(Vector(2.0, 0.0, -1.0)); bool hit(false); Vector hitPt(0.0); - PierceSurface(floor, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(floor, rayOri, rayDir, hitPt); EXPECT_FALSE(hit); // Misses surface but intersects plane EXPECT_DOUBLE_EQ(2.9, hitPt.x); EXPECT_DOUBLE_EQ(0.1, hitPt.y); @@ -217,7 +217,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_ConvexOctagonal) Vector const rayDir(0.0, 0.0, -1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(floor, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(floor, rayOri, rayDir, hitPt); EXPECT_TRUE(hit); } @@ -226,7 +226,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_ConvexOctagonal) Vector const rayDir(0.0, 0.0, 1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(floor, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(floor, rayOri, rayDir, hitPt); EXPECT_FALSE(hit); // No plane intersection so hitPt is undefined } @@ -235,7 +235,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_ConvexOctagonal) Vector const rayDir(Vector(0.25, 0.0, -1.0)); bool hit(false); Vector hitPt(0.0); - PierceSurface(floor, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(floor, rayOri, rayDir, hitPt); EXPECT_TRUE(hit); } @@ -244,7 +244,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_ConvexOctagonal) Vector const rayDir(Vector(2.0, 0.0, -1.0)); bool hit(false); Vector hitPt(0.0); - PierceSurface(floor, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(floor, rayOri, rayDir, hitPt); EXPECT_FALSE(hit); // Misses surface but intersects plane } @@ -253,7 +253,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_ConvexOctagonal) Vector const rayDir(0.0, 0.0, -1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(floor, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(floor, rayOri, rayDir, hitPt); EXPECT_TRUE(hit); } } @@ -283,7 +283,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_Convex8Sides) Vector const rayDir(0.0, 0.0, -1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(floor, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(floor, rayOri, rayDir, hitPt); EXPECT_TRUE(hit); EXPECT_DOUBLE_EQ(0.5, hitPt.x); EXPECT_DOUBLE_EQ(0.5, hitPt.y); @@ -295,7 +295,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_Convex8Sides) Vector const rayDir(0.0, 0.0, 1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(floor, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(floor, rayOri, rayDir, hitPt); EXPECT_FALSE(hit); // No plane intersection so hitPt is undefined } @@ -304,7 +304,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_Convex8Sides) Vector const rayDir(Vector(0.25, 0.0, -1.0)); bool hit(false); Vector hitPt(0.0); - PierceSurface(floor, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(floor, rayOri, rayDir, hitPt); EXPECT_TRUE(hit); EXPECT_DOUBLE_EQ(0.75, hitPt.x); EXPECT_DOUBLE_EQ(0.5, hitPt.y); @@ -316,7 +316,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_Convex8Sides) Vector const rayDir(Vector(2.0, 0.0, -1.0)); bool hit(false); Vector hitPt(0.0); - PierceSurface(floor, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(floor, rayOri, rayDir, hitPt); EXPECT_FALSE(hit); // Misses surface but intersects plane EXPECT_DOUBLE_EQ(2.5, hitPt.x); EXPECT_DOUBLE_EQ(0.5, hitPt.y); @@ -348,7 +348,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_ConvexNGon) Vector const rayDir(0.0, 0.0, -1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(floor, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(floor, rayOri, rayDir, hitPt); EXPECT_TRUE(hit); EXPECT_DOUBLE_EQ(0.0, hitPt.x); EXPECT_DOUBLE_EQ(0.0, hitPt.y); @@ -360,7 +360,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_ConvexNGon) Vector const rayDir(0.0, 0.0, 1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(floor, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(floor, rayOri, rayDir, hitPt); EXPECT_FALSE(hit); // No plane intersection so hitPt is undefined } @@ -369,7 +369,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_ConvexNGon) Vector const rayDir(Vector(0.25, 0.0, -1.0)); bool hit(false); Vector hitPt(0.0); - PierceSurface(floor, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(floor, rayOri, rayDir, hitPt); EXPECT_TRUE(hit); EXPECT_DOUBLE_EQ(0.25, hitPt.x); EXPECT_DOUBLE_EQ(0.0, hitPt.y); @@ -381,7 +381,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_ConvexNGon) Vector const rayDir(Vector(2.0, 0.0, -1.0)); bool hit(false); Vector hitPt(0.0); - PierceSurface(floor, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(floor, rayOri, rayDir, hitPt); EXPECT_FALSE(hit); // Misses surface but intersects plane EXPECT_DOUBLE_EQ(2.0, hitPt.x); EXPECT_DOUBLE_EQ(0.0, hitPt.y); @@ -405,7 +405,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_NonconvexBoomerang) Vector const rayDir(0.0, 0.0, -1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(boomerang, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(boomerang, rayOri, rayDir, hitPt); EXPECT_TRUE(hit); EXPECT_DOUBLE_EQ(0.3, hitPt.x); EXPECT_DOUBLE_EQ(0.1, hitPt.y); @@ -417,7 +417,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_NonconvexBoomerang) Vector const rayDir(0.0, 0.0, -1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(boomerang, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(boomerang, rayOri, rayDir, hitPt); EXPECT_FALSE(hit); EXPECT_DOUBLE_EQ(0.21, hitPt.x); EXPECT_DOUBLE_EQ(0.21, hitPt.y); @@ -442,7 +442,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_NonconvexUShape) Vector const rayDir(0.0, 0.0, -1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(ushape, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(ushape, rayOri, rayDir, hitPt); EXPECT_TRUE(hit); EXPECT_DOUBLE_EQ(1.5, hitPt.x); EXPECT_DOUBLE_EQ(0.5, hitPt.y); @@ -454,7 +454,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_NonconvexUShape) Vector const rayDir(0.0, 0.0, -1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(ushape, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(ushape, rayOri, rayDir, hitPt); EXPECT_FALSE(hit); EXPECT_DOUBLE_EQ(1.5, hitPt.x); EXPECT_DOUBLE_EQ(-0.5, hitPt.y); @@ -466,7 +466,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_NonconvexUShape) Vector const rayDir(0.0, 0.0, -1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(ushape, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(ushape, rayOri, rayDir, hitPt); EXPECT_TRUE(hit); EXPECT_DOUBLE_EQ(0.5, hitPt.x); EXPECT_DOUBLE_EQ(1.5, hitPt.y); @@ -478,7 +478,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_NonconvexUShape) Vector const rayDir(0.0, 0.0, -1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(ushape, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(ushape, rayOri, rayDir, hitPt); EXPECT_TRUE(hit); EXPECT_DOUBLE_EQ(2.5, hitPt.x); EXPECT_DOUBLE_EQ(1.5, hitPt.y); @@ -490,7 +490,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_NonconvexUShape) Vector const rayDir(0.0, 0.0, -1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(ushape, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(ushape, rayOri, rayDir, hitPt); EXPECT_FALSE(hit); EXPECT_DOUBLE_EQ(1.5, hitPt.x); EXPECT_DOUBLE_EQ(1.5, hitPt.y); @@ -521,7 +521,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_NonconvexStar4) Vector const rayDir(0.0, 0.0, -1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(star, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(star, rayOri, rayDir, hitPt); EXPECT_TRUE(hit); EXPECT_DOUBLE_EQ(2.0, hitPt.x); EXPECT_DOUBLE_EQ(2.0, hitPt.y); @@ -533,7 +533,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_NonconvexStar4) Vector const rayDir(0.0, 0.0, -1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(star, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(star, rayOri, rayDir, hitPt); EXPECT_FALSE(hit); EXPECT_DOUBLE_EQ(2.0, hitPt.x); EXPECT_DOUBLE_EQ(0.5, hitPt.y); @@ -545,7 +545,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_NonconvexStar4) Vector const rayDir(0.0, 0.0, -1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(star, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(star, rayOri, rayDir, hitPt); EXPECT_FALSE(hit); EXPECT_DOUBLE_EQ(2.0, hitPt.x); EXPECT_DOUBLE_EQ(3.5, hitPt.y); @@ -557,7 +557,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_NonconvexStar4) Vector const rayDir(0.0, 0.0, -1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(star, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(star, rayOri, rayDir, hitPt); EXPECT_FALSE(hit); EXPECT_DOUBLE_EQ(0.5, hitPt.x); EXPECT_DOUBLE_EQ(2.0, hitPt.y); @@ -569,7 +569,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_NonconvexStar4) Vector const rayDir(0.0, 0.0, -1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(star, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(star, rayOri, rayDir, hitPt); EXPECT_FALSE(hit); EXPECT_DOUBLE_EQ(3.5, hitPt.x); EXPECT_DOUBLE_EQ(2.0, hitPt.y); @@ -581,7 +581,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_NonconvexStar4) Vector const rayDir(0.0, 0.0, -1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(star, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(star, rayOri, rayDir, hitPt); EXPECT_TRUE(hit); EXPECT_DOUBLE_EQ(0.5, hitPt.x); EXPECT_DOUBLE_EQ(0.5, hitPt.y); @@ -593,7 +593,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_NonconvexStar4) Vector const rayDir(0.0, 0.0, -1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(star, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(star, rayOri, rayDir, hitPt); EXPECT_TRUE(hit); EXPECT_DOUBLE_EQ(3.5, hitPt.x); EXPECT_DOUBLE_EQ(0.5, hitPt.y); @@ -605,7 +605,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_NonconvexStar4) Vector const rayDir(0.0, 0.0, -1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(star, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(star, rayOri, rayDir, hitPt); EXPECT_TRUE(hit); EXPECT_DOUBLE_EQ(0.5, hitPt.x); EXPECT_DOUBLE_EQ(3.5, hitPt.y); @@ -617,7 +617,7 @@ TEST_F(EnergyPlusFixture, PierceSurfaceTest_NonconvexStar4) Vector const rayDir(0.0, 0.0, -1.0); bool hit(false); Vector hitPt(0.0); - PierceSurface(star, rayOri, rayDir, hitPt, hit); + hit = PierceSurface(star, rayOri, rayDir, hitPt); EXPECT_TRUE(hit); EXPECT_DOUBLE_EQ(3.5, hitPt.x); EXPECT_DOUBLE_EQ(3.5, hitPt.y); diff --git a/tst/EnergyPlus/unit/Pipes.unit.cc b/tst/EnergyPlus/unit/Pipes.unit.cc index e77725c2ec9..7d1d92d7ce1 100644 --- a/tst/EnergyPlus/unit/Pipes.unit.cc +++ b/tst/EnergyPlus/unit/Pipes.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Plant/Branch.unit.cc b/tst/EnergyPlus/unit/Plant/Branch.unit.cc index 65a7537a1a2..b7185e44b87 100644 --- a/tst/EnergyPlus/unit/Plant/Branch.unit.cc +++ b/tst/EnergyPlus/unit/Plant/Branch.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Plant/Subcomponent.unit.cc b/tst/EnergyPlus/unit/Plant/Subcomponent.unit.cc index 83e41764860..931a22e6601 100644 --- a/tst/EnergyPlus/unit/Plant/Subcomponent.unit.cc +++ b/tst/EnergyPlus/unit/Plant/Subcomponent.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PlantCentralGSHP.unit.cc b/tst/EnergyPlus/unit/PlantCentralGSHP.unit.cc index 05c96c00602..913657fa1d0 100644 --- a/tst/EnergyPlus/unit/PlantCentralGSHP.unit.cc +++ b/tst/EnergyPlus/unit/PlantCentralGSHP.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PlantChillers.unit.cc b/tst/EnergyPlus/unit/PlantChillers.unit.cc index fcb24d4c622..862796a332a 100644 --- a/tst/EnergyPlus/unit/PlantChillers.unit.cc +++ b/tst/EnergyPlus/unit/PlantChillers.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PlantComponentTemperatureSources.unit.cc b/tst/EnergyPlus/unit/PlantComponentTemperatureSources.unit.cc index b5679cc93fa..ebe70ed4ad9 100644 --- a/tst/EnergyPlus/unit/PlantComponentTemperatureSources.unit.cc +++ b/tst/EnergyPlus/unit/PlantComponentTemperatureSources.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PlantCondLoopOperation.unit.cc b/tst/EnergyPlus/unit/PlantCondLoopOperation.unit.cc index d184f08c4a1..85e66f86a29 100644 --- a/tst/EnergyPlus/unit/PlantCondLoopOperation.unit.cc +++ b/tst/EnergyPlus/unit/PlantCondLoopOperation.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc b/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc index 3bf16823afe..3e0b066e14c 100644 --- a/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc +++ b/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PlantLoadProfile.unit.cc b/tst/EnergyPlus/unit/PlantLoadProfile.unit.cc index 8f5e6345d5a..3733b6315b4 100644 --- a/tst/EnergyPlus/unit/PlantLoadProfile.unit.cc +++ b/tst/EnergyPlus/unit/PlantLoadProfile.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PlantLoopHeatPumpEIR.unit.cc b/tst/EnergyPlus/unit/PlantLoopHeatPumpEIR.unit.cc index 03f85c50b8c..f34d04b786c 100644 --- a/tst/EnergyPlus/unit/PlantLoopHeatPumpEIR.unit.cc +++ b/tst/EnergyPlus/unit/PlantLoopHeatPumpEIR.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -59,6 +59,7 @@ #include "Fixtures/EnergyPlusFixture.hh" #include #include +#include #include #include #include @@ -66,6 +67,7 @@ #include #include #include +#include #include using namespace EnergyPlus; @@ -868,7 +870,7 @@ TEST_F(EnergyPlusFixture, TestSizing_FullyAutosizedCoolingWithCompanion_WaterSou thisCoolingPLHP->loadSideDesignVolFlowRate = expectedLoadFlow; thisCoolingPLHP->sourceSideDesignVolFlowRate = expectedSourceFlow; thisCoolingPLHP->referenceCapacity = expectedCapacity; - Real64 const designSourceSideHeatTransfer = expectedCapacity * (1 + 1 / thisHeatingPLHP->referenceCOP); + Real64 const designSourceSideHeatTransfer = expectedCapacity * (1 - 1 / thisHeatingPLHP->referenceCOP); expectedSourceFlow = designSourceSideHeatTransfer / (state->dataSize->PlantSizData(2).DeltaT * expectedSourceCp * expectedSourceRho); expectedCapacity = expectedLoadRho * expectedLoadFlow * expectedLoadCp * plantSizingLoadDeltaT; thisHeatingPLHP->sizeLoadSide(*state); @@ -2564,7 +2566,7 @@ TEST_F(EnergyPlusFixture, TestSizing_FullyAutosizedCoolingWithCompanion_AirSourc " Autosize,", " Autosize,", " Autosize,", - " 1.0,", + " 2.0,", " 1,", " dummyCurve,", " dummyCurve,", @@ -2609,8 +2611,6 @@ TEST_F(EnergyPlusFixture, TestSizing_FullyAutosizedCoolingWithCompanion_AirSourc Real64 constexpr plantSizingSrcDeltaT = 10.0; - Real64 constexpr COP = 1; - state->dataSize->PlantSizData.allocate(2); state->dataSize->PlantSizData(1).DesVolFlowRate = 0.01; state->dataSize->PlantSizData(1).DeltaT = 1.0; @@ -2647,13 +2647,16 @@ TEST_F(EnergyPlusFixture, TestSizing_FullyAutosizedCoolingWithCompanion_AirSourc // assign the plant sizing data state->dataPlnt->PlantLoop(1).PlantSizNum = 1; + Real64 constexpr sourceSideInitTemp = 20.0; + Real64 constexpr sourceSideHumRat = 0.0; Real64 expectedLoadCp = 4197.93; Real64 expectedLoadRho = 999.898; - Real64 expectedSourceCp = 1004.0; - Real64 expectedSourceRho = 1.2; + Real64 expectedSourceCp = Psychrometrics::PsyCpAirFnW(sourceSideHumRat); + Real64 expectedSourceRho = Psychrometrics::PsyRhoAirFnPbTdbW(*state, state->dataEnvrn->StdBaroPress, sourceSideInitTemp, sourceSideHumRat); Real64 expectedLoadFlow = plantSizingLoadVolFlow; Real64 expectedCapacity = expectedLoadRho * expectedLoadFlow * expectedLoadCp * plantSizingLoadDeltaT; - Real64 expectedSourceLoad = expectedCapacity * (1 + 1 / COP); + Real64 expectedSourceLoad = 0.0; + expectedSourceLoad = expectedCapacity * (1 + 1 / thisCoolingPLHP->referenceCOP); Real64 expectedSourceFlow = expectedSourceLoad / (expectedSourceCp * expectedSourceRho * plantSizingSrcDeltaT); thisCoolingPLHP->sizeLoadSide(*state); thisCoolingPLHP->sizeSrcSideASHP(*state); @@ -2688,7 +2691,7 @@ TEST_F(EnergyPlusFixture, TestSizing_FullyAutosizedCoolingWithCompanion_AirSourc thisCoolingPLHP->sourceSideDesignVolFlowRate = expectedSourceFlow; thisCoolingPLHP->referenceCapacity = expectedCapacity; expectedCapacity = expectedLoadRho * expectedLoadFlow * expectedLoadCp * plantSizingLoadDeltaT; - expectedSourceLoad = expectedCapacity * (1 + 1 / COP); + expectedSourceLoad = expectedCapacity * (1 - 1 / thisHeatingPLHP->referenceCOP); expectedSourceFlow = expectedSourceLoad / (expectedSourceCp * expectedSourceRho * plantSizingSrcDeltaT); thisHeatingPLHP->sizeLoadSide(*state); thisHeatingPLHP->sizeSrcSideASHP(*state); @@ -2854,7 +2857,7 @@ TEST_F(EnergyPlusFixture, TestSizing_AutosizedFlowWithCompanion_AirSource) " 0.005,", " Autosize,", " Autosize,", - " 1.0,", + " 2.0,", " 1,", " dummyCurve,", " dummyCurve,", @@ -2925,7 +2928,7 @@ TEST_F(EnergyPlusFixture, TestSizing_AutosizedFlowWithCompanion_AirSource) thisHeatingPLHP->onInitLoopEquip(*state, myHeatingLoadLocation); Real64 expectedClgSourceFlow = 86.71; - Real64 expectedHtgSourceFlow = 86.71; + Real64 expectedHtgSourceFlow = 21.68; // changed from 86.71 due to issue#10381; EXPECT_NEAR(expectedClgSourceFlow, thisCoolingPLHP->sourceSideDesignVolFlowRate, 0.1); EXPECT_NEAR(expectedHtgSourceFlow, thisHeatingPLHP->sourceSideDesignVolFlowRate, 0.1); } @@ -3154,29 +3157,20 @@ TEST_F(EnergyPlusFixture, CoolingMetering) thisCoolingPLHP->onInitLoopEquip(*state, myLoadLocation); int NumFound; - std::string TypeOfComp = "HeatPump:PlantLoop:EIR:Cooling"; std::string NameOfComp = thisCoolingPLHP->name; int NumVariables = GetNumMeteredVariables(*state, TypeOfComp, NameOfComp); - Array1D_int VarIndexes(NumVariables); // Variable Numbers - Array1D VarTypes(NumVariables); // Variable Types (1=integer, 2=real, 3=meter) - Array1D IndexTypes(NumVariables); // Variable Index Types (1=Zone,2=HVAC) - Array1D unitsForVar(NumVariables); // units from enum for each variable - Array1D ResourceTypes(NumVariables); // ResourceTypes for each variable - Array1D_string EndUses(NumVariables); // EndUses for each variable - Array1D_string Groups(NumVariables); // Groups for each variable - Array1D_string Names(NumVariables); // Variable Names for each variable - - GetMeteredVariables( - *state, TypeOfComp, NameOfComp, VarIndexes, VarTypes, IndexTypes, unitsForVar, ResourceTypes, EndUses, Groups, Names, NumFound); + Array1D meteredVars(NumVariables); // Variable Types (1=integer, 2=real, 3=meter) + + NumFound = GetMeteredVariables(*state, NameOfComp, meteredVars); EXPECT_EQ(2, NumFound); - EXPECT_TRUE(compare_enums(ResourceTypes(1), Constant::eResource::EnergyTransfer)); // ENERGYTRANSFER - EXPECT_EQ(EndUses(1), ""); - EXPECT_EQ(Groups(1), "PLANT"); - EXPECT_TRUE(compare_enums(ResourceTypes(2), Constant::eResource::Electricity)); // Electric - EXPECT_EQ(EndUses(2), "COOLING"); - EXPECT_EQ(Groups(2), "PLANT"); + EXPECT_TRUE(compare_enums(meteredVars(1).resource, Constant::eResource::EnergyTransfer)); // ENERGYTRANSFER + EXPECT_TRUE(compare_enums(meteredVars(1).sovEndUseCat, OutputProcessor::SOVEndUseCat::Invalid)); + EXPECT_TRUE(compare_enums(meteredVars(1).sovGroup, OutputProcessor::SOVGroup::Plant)); + EXPECT_TRUE(compare_enums(meteredVars(2).resource, Constant::eResource::Electricity)); // Electric + EXPECT_TRUE(compare_enums(meteredVars(2).sovEndUseCat, OutputProcessor::SOVEndUseCat::Cooling)); + EXPECT_TRUE(compare_enums(meteredVars(2).sovGroup, OutputProcessor::SOVGroup::Plant)); } TEST_F(EnergyPlusFixture, HeatingMetering) @@ -3255,25 +3249,19 @@ TEST_F(EnergyPlusFixture, HeatingMetering) std::string TypeOfComp = "HeatPump:PlantLoop:EIR:Heating"; std::string NameOfComp = thisHeatingPLHP->name; int NumVariables = GetNumMeteredVariables(*state, TypeOfComp, NameOfComp); - Array1D_int VarIndexes(NumVariables); // Variable Numbers - Array1D VarTypes(NumVariables); // Variable Types (1=integer, 2=real, 3=meter) - Array1D IndexTypes(NumVariables); // Variable Index Types (1=Zone,2=HVAC) - Array1D unitsForVar(NumVariables); // units from enum for each variable - Array1D ResourceTypes(NumVariables); // ResourceTypes for each variable - Array1D_string EndUses(NumVariables); // EndUses for each variable - Array1D_string Groups(NumVariables); // Groups for each variable - Array1D_string Names(NumVariables); // Variable Names for each variable - - GetMeteredVariables( - *state, TypeOfComp, NameOfComp, VarIndexes, VarTypes, IndexTypes, unitsForVar, ResourceTypes, EndUses, Groups, Names, NumFound); + + Array1D_int VarIndexes(NumVariables); // Variable Numbers + Array1D meteredVars(NumVariables); // Variable Types (1=integer, 2=real, 3=meter) + + NumFound = GetMeteredVariables(*state, NameOfComp, meteredVars); EXPECT_EQ(2, NumFound); - EXPECT_TRUE(compare_enums(ResourceTypes(1), Constant::eResource::EnergyTransfer)); // ENERGYTRANSFER - EXPECT_EQ(EndUses(1), ""); - EXPECT_EQ(Groups(1), "PLANT"); - EXPECT_TRUE(compare_enums(ResourceTypes(2), Constant::eResource::Electricity)); // Electric - EXPECT_EQ(EndUses(2), "HEATING"); - EXPECT_EQ(Groups(2), "PLANT"); + EXPECT_TRUE(compare_enums(meteredVars(1).resource, Constant::eResource::EnergyTransfer)); // ENERGYTRANSFER + EXPECT_TRUE(compare_enums(meteredVars(1).sovEndUseCat, OutputProcessor::SOVEndUseCat::Invalid)); + EXPECT_TRUE(compare_enums(meteredVars(1).sovGroup, OutputProcessor::SOVGroup::Plant)); + EXPECT_TRUE(compare_enums(meteredVars(2).resource, Constant::eResource::Electricity)); // Electric + EXPECT_TRUE(compare_enums(meteredVars(2).sovEndUseCat, OutputProcessor::SOVEndUseCat::Heating)); + EXPECT_TRUE(compare_enums(meteredVars(2).sovGroup, OutputProcessor::SOVGroup::Plant)); } TEST_F(EnergyPlusFixture, TestOperatingFlowRates_FullyAutosized_AirSource) diff --git a/tst/EnergyPlus/unit/PlantManager.unit.cc b/tst/EnergyPlus/unit/PlantManager.unit.cc index 34884847ba5..a86237f76c8 100644 --- a/tst/EnergyPlus/unit/PlantManager.unit.cc +++ b/tst/EnergyPlus/unit/PlantManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PlantPipingSystemsManager.unit.cc b/tst/EnergyPlus/unit/PlantPipingSystemsManager.unit.cc index 05883ccbfba..585f60d3cdb 100644 --- a/tst/EnergyPlus/unit/PlantPipingSystemsManager.unit.cc +++ b/tst/EnergyPlus/unit/PlantPipingSystemsManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PlantUtilities.unit.cc b/tst/EnergyPlus/unit/PlantUtilities.unit.cc index 9210604128d..6466e9bb14a 100644 --- a/tst/EnergyPlus/unit/PlantUtilities.unit.cc +++ b/tst/EnergyPlus/unit/PlantUtilities.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PluginManager.unit.cc b/tst/EnergyPlus/unit/PluginManager.unit.cc index 445e152cd52..c91a62120cf 100644 --- a/tst/EnergyPlus/unit/PluginManager.unit.cc +++ b/tst/EnergyPlus/unit/PluginManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PollutionModule.unit.cc b/tst/EnergyPlus/unit/PollutionModule.unit.cc index b473cc596ca..77411d5421b 100644 --- a/tst/EnergyPlus/unit/PollutionModule.unit.cc +++ b/tst/EnergyPlus/unit/PollutionModule.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -472,56 +472,57 @@ TEST_F(EnergyPlusFixture, PollutionModule_TestOutputVariables) Pollution::SetupPollutionMeterReporting(*state); // Test get output variables for Total Sky Cover and Opaque Sky Cover - for (int i = 0; i < (int)state->dataPollution->pollFuelFactorList.size(); ++i) { - PollFuel pollFuel = state->dataPollution->pollFuelFactorList[i]; - std::string_view fuelName = Constant::eFuelNames[(int)pollFuel2fuel[(int)pollFuel]]; - - EXPECT_EQ(format("Site:Environmental Impact {} Source Energy", fuelName), state->dataOutputProcessor->RVariableTypes(i * 17 + 1).VarName); - EXPECT_EQ(format("Site:Environmental Impact {} CO2 Emissions Mass", fuelName), - state->dataOutputProcessor->RVariableTypes(i * 17 + 2).VarName); - EXPECT_EQ(format("Site:Environmental Impact {} CO Emissions Mass", fuelName), state->dataOutputProcessor->RVariableTypes(i * 17 + 3).VarName); - EXPECT_EQ(format("Site:Environmental Impact {} CH4 Emissions Mass", fuelName), - state->dataOutputProcessor->RVariableTypes(i * 17 + 4).VarName); - EXPECT_EQ(format("Site:Environmental Impact {} NOx Emissions Mass", fuelName), - state->dataOutputProcessor->RVariableTypes(i * 17 + 5).VarName); - EXPECT_EQ(format("Site:Environmental Impact {} N2O Emissions Mass", fuelName), - state->dataOutputProcessor->RVariableTypes(i * 17 + 6).VarName); - EXPECT_EQ(format("Site:Environmental Impact {} SO2 Emissions Mass", fuelName), - state->dataOutputProcessor->RVariableTypes(i * 17 + 7).VarName); - EXPECT_EQ(format("Site:Environmental Impact {} PM Emissions Mass", fuelName), state->dataOutputProcessor->RVariableTypes(i * 17 + 8).VarName); - EXPECT_EQ(format("Site:Environmental Impact {} PM10 Emissions Mass", fuelName), - state->dataOutputProcessor->RVariableTypes(i * 17 + 9).VarName); - EXPECT_EQ(format("Site:Environmental Impact {} PM2.5 Emissions Mass", fuelName), - state->dataOutputProcessor->RVariableTypes(i * 17 + 10).VarName); - EXPECT_EQ(format("Site:Environmental Impact {} NH3 Emissions Mass", fuelName), - state->dataOutputProcessor->RVariableTypes(i * 17 + 11).VarName); - EXPECT_EQ(format("Site:Environmental Impact {} NMVOC Emissions Mass", fuelName), - state->dataOutputProcessor->RVariableTypes(i * 17 + 12).VarName); - EXPECT_EQ(format("Site:Environmental Impact {} Hg Emissions Mass", fuelName), - state->dataOutputProcessor->RVariableTypes(i * 17 + 13).VarName); - EXPECT_EQ(format("Site:Environmental Impact {} Pb Emissions Mass", fuelName), - state->dataOutputProcessor->RVariableTypes(i * 17 + 14).VarName); - EXPECT_EQ(format("Site:Environmental Impact {} Water Consumption Volume", fuelName), - state->dataOutputProcessor->RVariableTypes(i * 17 + 15).VarName); - EXPECT_EQ(format("Site:Environmental Impact {} Nuclear High Level Waste Mass", fuelName), - state->dataOutputProcessor->RVariableTypes(i * 17 + 16).VarName); - EXPECT_EQ(format("Site:Environmental Impact {} Nuclear Low Level Waste Volume", fuelName), - state->dataOutputProcessor->RVariableTypes(i * 17 + 17).VarName); + std::string fuelTypeNames[9] = {"NaturalGas", "Diesel", "Gasoline", "Propane", "FuelOilNo1", "FuelOilNo2", "OtherFuel1", "Coal", "Electricity"}; + for (unsigned long i = 0; i < size(fuelTypeNames); i++) { + EXPECT_EQ(format("Site:Environmental Impact {} Source Energy", fuelTypeNames[i]), + state->dataOutputProcessor->outVars[i * 17 + 0]->keyColonName); + EXPECT_EQ(format("Site:Environmental Impact {} CO2 Emissions Mass", fuelTypeNames[i]), + state->dataOutputProcessor->outVars[i * 17 + 1]->keyColonName); + EXPECT_EQ(format("Site:Environmental Impact {} CO Emissions Mass", fuelTypeNames[i]), + state->dataOutputProcessor->outVars[i * 17 + 2]->keyColonName); + EXPECT_EQ(format("Site:Environmental Impact {} CH4 Emissions Mass", fuelTypeNames[i]), + state->dataOutputProcessor->outVars[i * 17 + 3]->keyColonName); + EXPECT_EQ(format("Site:Environmental Impact {} NOx Emissions Mass", fuelTypeNames[i]), + state->dataOutputProcessor->outVars[i * 17 + 4]->keyColonName); + EXPECT_EQ(format("Site:Environmental Impact {} N2O Emissions Mass", fuelTypeNames[i]), + state->dataOutputProcessor->outVars[i * 17 + 5]->keyColonName); + EXPECT_EQ(format("Site:Environmental Impact {} SO2 Emissions Mass", fuelTypeNames[i]), + state->dataOutputProcessor->outVars[i * 17 + 6]->keyColonName); + EXPECT_EQ(format("Site:Environmental Impact {} PM Emissions Mass", fuelTypeNames[i]), + state->dataOutputProcessor->outVars[i * 17 + 7]->keyColonName); + EXPECT_EQ(format("Site:Environmental Impact {} PM10 Emissions Mass", fuelTypeNames[i]), + state->dataOutputProcessor->outVars[i * 17 + 8]->keyColonName); + EXPECT_EQ(format("Site:Environmental Impact {} PM2.5 Emissions Mass", fuelTypeNames[i]), + state->dataOutputProcessor->outVars[i * 17 + 9]->keyColonName); + EXPECT_EQ(format("Site:Environmental Impact {} NH3 Emissions Mass", fuelTypeNames[i]), + state->dataOutputProcessor->outVars[i * 17 + 10]->keyColonName); + EXPECT_EQ(format("Site:Environmental Impact {} NMVOC Emissions Mass", fuelTypeNames[i]), + state->dataOutputProcessor->outVars[i * 17 + 11]->keyColonName); + EXPECT_EQ(format("Site:Environmental Impact {} Hg Emissions Mass", fuelTypeNames[i]), + state->dataOutputProcessor->outVars[i * 17 + 12]->keyColonName); + EXPECT_EQ(format("Site:Environmental Impact {} Pb Emissions Mass", fuelTypeNames[i]), + state->dataOutputProcessor->outVars[i * 17 + 13]->keyColonName); + EXPECT_EQ(format("Site:Environmental Impact {} Water Consumption Volume", fuelTypeNames[i]), + state->dataOutputProcessor->outVars[i * 17 + 14]->keyColonName); + EXPECT_EQ(format("Site:Environmental Impact {} Nuclear High Level Waste Mass", fuelTypeNames[i]), + state->dataOutputProcessor->outVars[i * 17 + 15]->keyColonName); + EXPECT_EQ(format("Site:Environmental Impact {} Nuclear Low Level Waste Volume", fuelTypeNames[i]), + state->dataOutputProcessor->outVars[i * 17 + 16]->keyColonName); } // Variables specific to the Electricity fuel type EXPECT_EQ("Site:Environmental Impact Purchased Electricity Source Energy", - state->dataOutputProcessor->RVariableTypes((int)state->dataPollution->pollFuelFactorList.size() * 17 + 1).VarName); + state->dataOutputProcessor->outVars[size(fuelTypeNames) * 17 + 0]->keyColonName); EXPECT_EQ("Site:Environmental Impact Surplus Sold Electricity Source", - state->dataOutputProcessor->RVariableTypes((int)state->dataPollution->pollFuelFactorList.size() * 17 + 2).VarName); + state->dataOutputProcessor->outVars[size(fuelTypeNames) * 17 + 1]->keyColonName); // Variables always setup for total carbon equivalent EXPECT_EQ("Site:Environmental Impact Total N2O Emissions Carbon Equivalent Mass", - state->dataOutputProcessor->RVariableTypes((int)state->dataPollution->pollFuelFactorList.size() * 17 + 3).VarName); + state->dataOutputProcessor->outVars[size(fuelTypeNames) * 17 + 2]->keyColonName); EXPECT_EQ("Site:Environmental Impact Total CH4 Emissions Carbon Equivalent Mass", - state->dataOutputProcessor->RVariableTypes((int)state->dataPollution->pollFuelFactorList.size() * 17 + 4).VarName); + state->dataOutputProcessor->outVars[size(fuelTypeNames) * 17 + 3]->keyColonName); EXPECT_EQ("Site:Environmental Impact Total CO2 Emissions Carbon Equivalent Mass", - state->dataOutputProcessor->RVariableTypes((int)state->dataPollution->pollFuelFactorList.size() * 17 + 5).VarName); + state->dataOutputProcessor->outVars[size(fuelTypeNames) * 17 + 4]->keyColonName); } TEST_F(EnergyPlusFixture, PollutionModule_TestEnvironmentalImpactFactors) diff --git a/tst/EnergyPlus/unit/PoweredInductionUnits.unit.cc b/tst/EnergyPlus/unit/PoweredInductionUnits.unit.cc index 628ff315988..116de366ef5 100644 --- a/tst/EnergyPlus/unit/PoweredInductionUnits.unit.cc +++ b/tst/EnergyPlus/unit/PoweredInductionUnits.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Psychrometrics.unit.cc b/tst/EnergyPlus/unit/Psychrometrics.unit.cc index 16e09c8fd0d..a0a2cd9d70f 100644 --- a/tst/EnergyPlus/unit/Psychrometrics.unit.cc +++ b/tst/EnergyPlus/unit/Psychrometrics.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Pumps.unit.cc b/tst/EnergyPlus/unit/Pumps.unit.cc index 983aca7fcdd..f4263332eb9 100644 --- a/tst/EnergyPlus/unit/Pumps.unit.cc +++ b/tst/EnergyPlus/unit/Pumps.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PurchasedAirManager.unit.cc b/tst/EnergyPlus/unit/PurchasedAirManager.unit.cc index c65354826f1..4d682a03a39 100644 --- a/tst/EnergyPlus/unit/PurchasedAirManager.unit.cc +++ b/tst/EnergyPlus/unit/PurchasedAirManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ReportCoilSelection.unit.cc b/tst/EnergyPlus/unit/ReportCoilSelection.unit.cc index 34294b0a4e8..c310efe55df 100644 --- a/tst/EnergyPlus/unit/ReportCoilSelection.unit.cc +++ b/tst/EnergyPlus/unit/ReportCoilSelection.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ResultsFramework.unit.cc b/tst/EnergyPlus/unit/ResultsFramework.unit.cc index 8c62705a50d..24f871ab160 100644 --- a/tst/EnergyPlus/unit/ResultsFramework.unit.cc +++ b/tst/EnergyPlus/unit/ResultsFramework.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -175,7 +175,7 @@ TEST_F(ResultsFrameworkFixture, ResultsFramework_VariableInfo) OutputProcessor::TimeStepType indexType = OutputProcessor::TimeStepType::Zone; int repordId = 1; - Variable var("SALESFLOOR INLET NODE:System Node Temperature", ReportingFrequency::TimeStep, indexType, repordId, Unit::C); + Variable var("SALESFLOOR INLET NODE:System Node Temperature", ReportFreq::TimeStep, indexType, repordId, Constant::Units::C); std::string expected_result = "{\n \"Frequency\": \"TimeStep\",\n \"Name\": \"SALESFLOOR INLET NODE:System Node Temperature\",\n " " \"Units\": \"C\"\n}"; @@ -192,19 +192,20 @@ TEST_F(ResultsFrameworkFixture, ResultsFramework_VariableInfo) TEST_F(ResultsFrameworkFixture, ResultsFramework_DataFrameInfo1) { - + auto &rf = state->dataResultsFramework->resultsFramework; json OutputVars; OutputProcessor::TimeStepType indexType = OutputProcessor::TimeStepType::Zone; int reportId = 1; - Variable var0("SALESFLOOR INLET NODE:System Node Temperature", ReportingFrequency::TimeStep, indexType, reportId, Unit::C); + Variable var0("SALESFLOOR INLET NODE:System Node Temperature", ReportFreq::TimeStep, indexType, reportId, Constant::Units::C); reportId++; - Variable var1("SALESFLOOR INLET NODE:System Node Humidity Ratio", ReportingFrequency::TimeStep, indexType, reportId, Unit::kgWater_kgDryAir); + Variable var1("SALESFLOOR INLET NODE:System Node Humidity Ratio", ReportFreq::TimeStep, indexType, reportId, Constant::Units::kgWater_kgDryAir); - state->dataResultsFramework->resultsFramework->RITimestepTSData.addVariable(var0); - state->dataResultsFramework->resultsFramework->RITimestepTSData.addVariable(var1); + auto &dataTS = rf->freqTSData[(int)ReportFreq::TimeStep]; + dataTS.addVariable(var0); + dataTS.addVariable(var1); - OutputVars["TimeStep"] = state->dataResultsFramework->resultsFramework->RITimestepTSData.getVariablesJSON(); + OutputVars["TimeStep"] = dataTS.getVariablesJSON(); json expectedObject = R"( { "TimeStep": [ @@ -226,32 +227,34 @@ TEST_F(ResultsFrameworkFixture, ResultsFramework_DataFrameInfo1) TEST_F(ResultsFrameworkFixture, ResultsFramework_DataFrameInfo2) { - + auto &rf = state->dataResultsFramework->resultsFramework; json OutputData; OutputProcessor::TimeStepType indexType = OutputProcessor::TimeStepType::Zone; int reportId = 1; - Variable var0("SALESFLOOR INLET NODE:System Node Temperature", ReportingFrequency::TimeStep, indexType, reportId, Unit::C); - state->dataResultsFramework->resultsFramework->RITimestepTSData.addVariable(var0); - state->dataResultsFramework->resultsFramework->RITimestepTSData.newRow(2, 25, 1, 45, 2017); // month,day,hour,minute - state->dataResultsFramework->resultsFramework->RITimestepTSData.newRow(2, 25, 1, 60, 2017); // month,day,hour,minute - state->dataResultsFramework->resultsFramework->RITimestepTSData.newRow(2, 25, 24, 45, 2017); // month,day,hour,minute - state->dataResultsFramework->resultsFramework->RITimestepTSData.newRow(2, 25, 24, 60, 2017); // month,day,hour,minute + Variable var0("SALESFLOOR INLET NODE:System Node Temperature", ReportFreq::TimeStep, indexType, reportId, Constant::Units::C); + auto &dataTS = rf->freqTSData[(int)ReportFreq::TimeStep]; - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 1.0); - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 2.0); - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 3.0); - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 4.0); + dataTS.addVariable(var0); + dataTS.newRow(2, 25, 1, 45, 2017); // month,day,hour,minute + dataTS.newRow(2, 25, 1, 60, 2017); // month,day,hour,minute + dataTS.newRow(2, 25, 24, 45, 2017); // month,day,hour,minute + dataTS.newRow(2, 25, 24, 60, 2017); // month,day,hour,minute + + dataTS.pushVariableValue(reportId, 1.0); + dataTS.pushVariableValue(reportId, 2.0); + dataTS.pushVariableValue(reportId, 3.0); + dataTS.pushVariableValue(reportId, 4.0); reportId++; - Variable var1("SALESFLOOR INLET NODE:System Node Humidity Ratio", ReportingFrequency::TimeStep, indexType, reportId, Unit::kgWater_kgDryAir); - state->dataResultsFramework->resultsFramework->RITimestepTSData.addVariable(var1); - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 5.0); - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 6.0); - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 7.0); - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 8.0); + Variable var1("SALESFLOOR INLET NODE:System Node Humidity Ratio", ReportFreq::TimeStep, indexType, reportId, Constant::Units::kgWater_kgDryAir); + dataTS.addVariable(var1); + dataTS.pushVariableValue(reportId, 5.0); + dataTS.pushVariableValue(reportId, 6.0); + dataTS.pushVariableValue(reportId, 7.0); + dataTS.pushVariableValue(reportId, 8.0); - OutputData["TimeStep"] = state->dataResultsFramework->resultsFramework->RITimestepTSData.getJSON(); + OutputData["TimeStep"] = dataTS.getJSON(); json expectedObject = R"( { "TimeStep": { @@ -279,13 +282,13 @@ TEST_F(ResultsFrameworkFixture, ResultsFramework_DataFrameInfo2) // If add one more, it also should go to the top of json cols array reportId++; - Variable var2("SALESFLOOR OUTLET NODE:System Node Temperature", ReportingFrequency::TimeStep, indexType, reportId, Unit::C); - state->dataResultsFramework->resultsFramework->RITimestepTSData.addVariable(var2); - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 9.0); - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 10.0); - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 11.0); - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 12.0); - OutputData["TimeStep"] = state->dataResultsFramework->resultsFramework->RITimestepTSData.getJSON(); + Variable var2("SALESFLOOR OUTLET NODE:System Node Temperature", ReportFreq::TimeStep, indexType, reportId, Constant::Units::C); + dataTS.addVariable(var2); + dataTS.pushVariableValue(reportId, 9.0); + dataTS.pushVariableValue(reportId, 10.0); + dataTS.pushVariableValue(reportId, 11.0); + dataTS.pushVariableValue(reportId, 12.0); + OutputData["TimeStep"] = dataTS.getJSON(); expectedObject = R"( { "TimeStep": { @@ -498,30 +501,27 @@ TEST_F(ResultsFrameworkFixture, ResultsFramework_convertToMonth) TEST_F(ResultsFrameworkFixture, ResultsFramework_CSV_Timestamp_Beginning) { - + auto &rf = state->dataResultsFramework->resultsFramework; + auto &dataTS = rf->freqTSData[(int)ReportFreq::TimeStep]; json OutputData; OutputProcessor::TimeStepType indexType = OutputProcessor::TimeStepType::Zone; int reportId = 1; - Variable var0("SALESFLOOR INLET NODE:System Node Temperature", ReportingFrequency::TimeStep, indexType, reportId, Unit::C); - state->dataResultsFramework->resultsFramework->RITimestepTSData.addVariable(var0); - state->dataResultsFramework->resultsFramework->addReportVariable( - "SALESFLOOR INLET NODE", "System Node Temperature", "C", ReportingFrequency::TimeStep); - state->dataResultsFramework->resultsFramework->setBeginningOfInterval(true); - state->dataResultsFramework->resultsFramework->RITimestepTSData.newRow(2, 25, 1, 45, 2017); // month,day,hour,minute,year - state->dataResultsFramework->resultsFramework->RITimestepTSData.newRow(2, 25, 1, 60, 2017); // month,day,hour,minute,year - state->dataResultsFramework->resultsFramework->RITimestepTSData.newRow(2, 25, 24, 45, 2017); // month,day,hour,minute,year - state->dataResultsFramework->resultsFramework->RITimestepTSData.newRow(2, 25, 24, 60, 2017); // month,day,hour,minute,year - - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 1.0); - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 2.0); - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 3.0); - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 4.0); - - auto outputs = getCSVOutputs(*state, - state->dataResultsFramework->resultsFramework->RITimestepTSData.getJSON(), - *state->dataResultsFramework->resultsFramework, - OutputProcessor::ReportingFrequency::TimeStep); + Variable var0("SALESFLOOR INLET NODE:System Node Temperature", ReportFreq::TimeStep, indexType, reportId, Constant::Units::C); + dataTS.addVariable(var0); + rf->addReportVariable("SALESFLOOR INLET NODE", "System Node Temperature", "C", ReportFreq::TimeStep); + rf->setBeginningOfInterval(true); + dataTS.newRow(2, 25, 1, 45, 2017); // month,day,hour,minute,year + dataTS.newRow(2, 25, 1, 60, 2017); // month,day,hour,minute,year + dataTS.newRow(2, 25, 24, 45, 2017); // month,day,hour,minute,year + dataTS.newRow(2, 25, 24, 60, 2017); // month,day,hour,minute,year + + dataTS.pushVariableValue(reportId, 1.0); + dataTS.pushVariableValue(reportId, 2.0); + dataTS.pushVariableValue(reportId, 3.0); + dataTS.pushVariableValue(reportId, 4.0); + + auto outputs = getCSVOutputs(*state, dataTS.getJSON(), *state->dataResultsFramework->resultsFramework, OutputProcessor::ReportFreq::TimeStep); std::map> expected_output = { {"02/25 00:00:00", {"1.0"}}, {"02/25 00:45:00", {"2.0"}}, {"02/25 01:00:00", {"3.0"}}, {"02/25 23:45:00", {"4.0"}}}; @@ -531,29 +531,26 @@ TEST_F(ResultsFrameworkFixture, ResultsFramework_CSV_Timestamp_Beginning) TEST_F(ResultsFrameworkFixture, ResultsFramework_CSV_Timestamp) { - + auto &rf = state->dataResultsFramework->resultsFramework; + auto &dataTS = rf->freqTSData[(int)ReportFreq::TimeStep]; json OutputData; OutputProcessor::TimeStepType indexType = OutputProcessor::TimeStepType::Zone; int reportId = 1; - Variable var0("SALESFLOOR INLET NODE:System Node Temperature", ReportingFrequency::TimeStep, indexType, reportId, Unit::C); - state->dataResultsFramework->resultsFramework->RITimestepTSData.addVariable(var0); - state->dataResultsFramework->resultsFramework->addReportVariable( - "SALESFLOOR INLET NODE", "System Node Temperature", "C", ReportingFrequency::TimeStep); - state->dataResultsFramework->resultsFramework->RITimestepTSData.newRow(2, 25, 1, 45, 2017); // month,day,hour,minute,year - state->dataResultsFramework->resultsFramework->RITimestepTSData.newRow(2, 25, 1, 60, 2017); // month,day,hour,minute,year - state->dataResultsFramework->resultsFramework->RITimestepTSData.newRow(2, 25, 24, 45, 2017); // month,day,hour,minute,year - state->dataResultsFramework->resultsFramework->RITimestepTSData.newRow(2, 25, 24, 60, 2017); // month,day,hour,minute,year - - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 1.0); - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 2.0); - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 3.0); - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 4.0); - - auto outputs = getCSVOutputs(*state, - state->dataResultsFramework->resultsFramework->RITimestepTSData.getJSON(), - *state->dataResultsFramework->resultsFramework, - OutputProcessor::ReportingFrequency::TimeStep); + Variable var0("SALESFLOOR INLET NODE:System Node Temperature", ReportFreq::TimeStep, indexType, reportId, Constant::Units::C); + dataTS.addVariable(var0); + rf->addReportVariable("SALESFLOOR INLET NODE", "System Node Temperature", "C", ReportFreq::TimeStep); + dataTS.newRow(2, 25, 1, 45, 2017); // month,day,hour,minute,year + dataTS.newRow(2, 25, 1, 60, 2017); // month,day,hour,minute,year + dataTS.newRow(2, 25, 24, 45, 2017); // month,day,hour,minute,year + dataTS.newRow(2, 25, 24, 60, 2017); // month,day,hour,minute,year + + dataTS.pushVariableValue(reportId, 1.0); + dataTS.pushVariableValue(reportId, 2.0); + dataTS.pushVariableValue(reportId, 3.0); + dataTS.pushVariableValue(reportId, 4.0); + + auto outputs = getCSVOutputs(*state, dataTS.getJSON(), *state->dataResultsFramework->resultsFramework, OutputProcessor::ReportFreq::TimeStep); std::map> expected_output = { {"02/25 00:45:00", {"1.0"}}, {"02/25 01:00:00", {"2.0"}}, {"02/25 23:45:00", {"3.0"}}, {"02/25 24:00:00", {"4.0"}}}; @@ -563,30 +560,27 @@ TEST_F(ResultsFrameworkFixture, ResultsFramework_CSV_Timestamp) TEST_F(ResultsFrameworkFixture, ResultsFramework_CSV_Timestamp_8601_End) { - + auto &rf = state->dataResultsFramework->resultsFramework; + auto &dataTS = rf->freqTSData[(int)ReportFreq::TimeStep]; json OutputData; OutputProcessor::TimeStepType indexType = OutputProcessor::TimeStepType::Zone; int reportId = 1; - Variable var0("SALESFLOOR INLET NODE:System Node Temperature", ReportingFrequency::TimeStep, indexType, reportId, Unit::C); - state->dataResultsFramework->resultsFramework->RITimestepTSData.addVariable(var0); - state->dataResultsFramework->resultsFramework->addReportVariable( - "SALESFLOOR INLET NODE", "System Node Temperature", "C", ReportingFrequency::TimeStep); - state->dataResultsFramework->resultsFramework->setISO8601(true); - state->dataResultsFramework->resultsFramework->RITimestepTSData.newRow(2, 25, 1, 45, 2017); // month,day,hour,minute,year - state->dataResultsFramework->resultsFramework->RITimestepTSData.newRow(2, 25, 1, 60, 2017); // month,day,hour,minute,year - state->dataResultsFramework->resultsFramework->RITimestepTSData.newRow(2, 25, 24, 45, 2017); // month,day,hour,minute,year - state->dataResultsFramework->resultsFramework->RITimestepTSData.newRow(2, 25, 24, 60, 2017); // month,day,hour,minute,year - - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 1.0); - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 2.0); - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 3.0); - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 4.0); - - auto outputs = getCSVOutputs(*state, - state->dataResultsFramework->resultsFramework->RITimestepTSData.getJSON(), - *state->dataResultsFramework->resultsFramework, - OutputProcessor::ReportingFrequency::TimeStep); + Variable var0("SALESFLOOR INLET NODE:System Node Temperature", ReportFreq::TimeStep, indexType, reportId, Constant::Units::C); + dataTS.addVariable(var0); + rf->addReportVariable("SALESFLOOR INLET NODE", "System Node Temperature", "C", ReportFreq::TimeStep); + rf->setISO8601(true); + dataTS.newRow(2, 25, 1, 45, 2017); // month,day,hour,minute,year + dataTS.newRow(2, 25, 1, 60, 2017); // month,day,hour,minute,year + dataTS.newRow(2, 25, 24, 45, 2017); // month,day,hour,minute,year + dataTS.newRow(2, 25, 24, 60, 2017); // month,day,hour,minute,year + + dataTS.pushVariableValue(reportId, 1.0); + dataTS.pushVariableValue(reportId, 2.0); + dataTS.pushVariableValue(reportId, 3.0); + dataTS.pushVariableValue(reportId, 4.0); + + auto outputs = getCSVOutputs(*state, dataTS.getJSON(), *rf, OutputProcessor::ReportFreq::TimeStep); std::map> expected_output = { {"2017-02-25T00:45:00", {"1.0"}}, {"2017-02-25T01:00:00", {"2.0"}}, {"2017-02-25T23:45:00", {"3.0"}}, {"2017-02-25T24:00:00", {"4.0"}}}; @@ -596,31 +590,28 @@ TEST_F(ResultsFrameworkFixture, ResultsFramework_CSV_Timestamp_8601_End) TEST_F(ResultsFrameworkFixture, ResultsFramework_CSV_Timestamp_8601_Beginning) { - + auto &rf = state->dataResultsFramework->resultsFramework; + auto &dataTS = rf->freqTSData[(int)ReportFreq::TimeStep]; json OutputData; OutputProcessor::TimeStepType indexType = OutputProcessor::TimeStepType::Zone; int reportId = 1; - Variable var0("SALESFLOOR INLET NODE:System Node Temperature", ReportingFrequency::TimeStep, indexType, reportId, Unit::C); - state->dataResultsFramework->resultsFramework->RITimestepTSData.addVariable(var0); - state->dataResultsFramework->resultsFramework->addReportVariable( - "SALESFLOOR INLET NODE", "System Node Temperature", "C", ReportingFrequency::TimeStep); - state->dataResultsFramework->resultsFramework->setISO8601(true); - state->dataResultsFramework->resultsFramework->setBeginningOfInterval(true); - state->dataResultsFramework->resultsFramework->RITimestepTSData.newRow(2, 25, 1, 45, 2017); // month,day,hour,minute,year - state->dataResultsFramework->resultsFramework->RITimestepTSData.newRow(2, 25, 1, 60, 2017); // month,day,hour,minute,year - state->dataResultsFramework->resultsFramework->RITimestepTSData.newRow(2, 25, 24, 45, 2017); // month,day,hour,minute,year - state->dataResultsFramework->resultsFramework->RITimestepTSData.newRow(2, 25, 24, 60, 2017); // month,day,hour,minute,year - - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 1.0); - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 2.0); - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 3.0); - state->dataResultsFramework->resultsFramework->RITimestepTSData.pushVariableValue(reportId, 4.0); - - auto outputs = getCSVOutputs(*state, - state->dataResultsFramework->resultsFramework->RITimestepTSData.getJSON(), - *state->dataResultsFramework->resultsFramework, - OutputProcessor::ReportingFrequency::TimeStep); + Variable var0("SALESFLOOR INLET NODE:System Node Temperature", ReportFreq::TimeStep, indexType, reportId, Constant::Units::C); + dataTS.addVariable(var0); + rf->addReportVariable("SALESFLOOR INLET NODE", "System Node Temperature", "C", ReportFreq::TimeStep); + rf->setISO8601(true); + rf->setBeginningOfInterval(true); + dataTS.newRow(2, 25, 1, 45, 2017); // month,day,hour,minute,year + dataTS.newRow(2, 25, 1, 60, 2017); // month,day,hour,minute,year + dataTS.newRow(2, 25, 24, 45, 2017); // month,day,hour,minute,year + dataTS.newRow(2, 25, 24, 60, 2017); // month,day,hour,minute,year + + dataTS.pushVariableValue(reportId, 1.0); + dataTS.pushVariableValue(reportId, 2.0); + dataTS.pushVariableValue(reportId, 3.0); + dataTS.pushVariableValue(reportId, 4.0); + + auto outputs = getCSVOutputs(*state, dataTS.getJSON(), *rf, OutputProcessor::ReportFreq::TimeStep); std::map> expected_output = { {"2017-02-25T00:00:00", {"1.0"}}, {"2017-02-25T00:45:00", {"2.0"}}, {"2017-02-25T01:00:00", {"3.0"}}, {"2017-02-25T23:45:00", {"4.0"}}}; diff --git a/tst/EnergyPlus/unit/RoomAirModelUserTempPattern.unit.cc b/tst/EnergyPlus/unit/RoomAirModelUserTempPattern.unit.cc index 6e103cce479..1c78fb317de 100644 --- a/tst/EnergyPlus/unit/RoomAirModelUserTempPattern.unit.cc +++ b/tst/EnergyPlus/unit/RoomAirModelUserTempPattern.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/RoomAirflowNetwork.unit.cc b/tst/EnergyPlus/unit/RoomAirflowNetwork.unit.cc index d8630d03e6c..17e86e9a5c0 100644 --- a/tst/EnergyPlus/unit/RoomAirflowNetwork.unit.cc +++ b/tst/EnergyPlus/unit/RoomAirflowNetwork.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/RootFinder.unit.cc b/tst/EnergyPlus/unit/RootFinder.unit.cc index 9f698ddb697..76690c0d633 100644 --- a/tst/EnergyPlus/unit/RootFinder.unit.cc +++ b/tst/EnergyPlus/unit/RootFinder.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/RunPeriod.unit.cc b/tst/EnergyPlus/unit/RunPeriod.unit.cc index 765a916f467..e3324da35e1 100644 --- a/tst/EnergyPlus/unit/RunPeriod.unit.cc +++ b/tst/EnergyPlus/unit/RunPeriod.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/RuntimeLanguageProcessor.unit.cc b/tst/EnergyPlus/unit/RuntimeLanguageProcessor.unit.cc index 06bd187b5e7..df04cd5fd5b 100644 --- a/tst/EnergyPlus/unit/RuntimeLanguageProcessor.unit.cc +++ b/tst/EnergyPlus/unit/RuntimeLanguageProcessor.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SQLite.unit.cc b/tst/EnergyPlus/unit/SQLite.unit.cc index 372e314cae2..8475f589c10 100644 --- a/tst/EnergyPlus/unit/SQLite.unit.cc +++ b/tst/EnergyPlus/unit/SQLite.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -60,21 +60,25 @@ namespace EnergyPlus { +using namespace OutputProcessor; + TEST_F(SQLiteFixture, SQLiteProcedures_sqliteWriteMessage) { - state->dataSQLiteProcedures->sqlite->sqliteWriteMessage(""); + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->sqliteWriteMessage(""); EXPECT_EQ("SQLite3 message, \n", ss->str()); ss->str(std::string()); - state->dataSQLiteProcedures->sqlite->sqliteWriteMessage("test message"); + sql->sqliteWriteMessage("test message"); EXPECT_EQ("SQLite3 message, test message\n", ss->str()); ss->str(std::string()); } TEST_F(SQLiteFixture, SQLiteProcedures_initializeIndexes) { - state->dataSQLiteProcedures->sqlite->sqliteBegin(); - state->dataSQLiteProcedures->sqlite->initializeIndexes(); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->sqliteBegin(); + sql->initializeIndexes(); + sql->sqliteCommit(); EXPECT_TRUE(indexExists("rddMTR")); EXPECT_TRUE(indexExists("redRD")); @@ -85,16 +89,17 @@ TEST_F(SQLiteFixture, SQLiteProcedures_initializeIndexes) TEST_F(SQLiteFixture, SQLiteProcedures_simulationRecords) { - state->dataSQLiteProcedures->sqlite->sqliteBegin(); + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->sqliteBegin(); // There needs to be a simulation record otherwise updateSQLiteSimulationRecord will fail - state->dataSQLiteProcedures->sqlite->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time"); - state->dataSQLiteProcedures->sqlite->createSQLiteSimulationsRecord(2, "EnergyPlus Version", "Current Time"); - state->dataSQLiteProcedures->sqlite->createSQLiteSimulationsRecord(3, "EnergyPlus Version", "Current Time"); - state->dataSQLiteProcedures->sqlite->updateSQLiteSimulationRecord(1, 6); - state->dataSQLiteProcedures->sqlite->updateSQLiteSimulationRecord(true, false, 2); - state->dataSQLiteProcedures->sqlite->updateSQLiteSimulationRecord(true, true, 3); + sql->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time"); + sql->createSQLiteSimulationsRecord(2, "EnergyPlus Version", "Current Time"); + sql->createSQLiteSimulationsRecord(3, "EnergyPlus Version", "Current Time"); + sql->updateSQLiteSimulationRecord(1, 6); + sql->updateSQLiteSimulationRecord(true, false, 2); + sql->updateSQLiteSimulationRecord(true, true, 3); auto result = queryResult("SELECT * FROM Simulations;", "Simulations"); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteCommit(); ASSERT_EQ(3ul, result.size()); std::vector testResult0{"1", "EnergyPlus Version", "Current Time", "6", "FALSE", "FALSE"}; @@ -104,10 +109,10 @@ TEST_F(SQLiteFixture, SQLiteProcedures_simulationRecords) EXPECT_EQ(testResult1, result[1]); EXPECT_EQ(testResult2, result[2]); - state->dataSQLiteProcedures->sqlite->sqliteBegin(); - state->dataSQLiteProcedures->sqlite->updateSQLiteSimulationRecord(true, true); + sql->sqliteBegin(); + sql->updateSQLiteSimulationRecord(true, true); result = queryResult("SELECT * FROM Simulations;", "Simulations"); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteCommit(); ASSERT_EQ(3ul, result.size()); std::vector testResult3{"1", "EnergyPlus Version", "Current Time", "6", "1", "1"}; @@ -116,18 +121,16 @@ TEST_F(SQLiteFixture, SQLiteProcedures_simulationRecords) TEST_F(SQLiteFixture, SQLiteProcedures_createSQLiteEnvironmentPeriodRecord) { - state->dataSQLiteProcedures->sqlite->sqliteBegin(); + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->sqliteBegin(); // There needs to be a simulation record otherwise the foreign key constraint will fail - state->dataSQLiteProcedures->sqlite->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time"); - state->dataSQLiteProcedures->sqlite->createSQLiteEnvironmentPeriodRecord(1, "CHICAGO ANN HTG 99.6% CONDNS DB", Constant::KindOfSim::DesignDay); - state->dataSQLiteProcedures->sqlite->createSQLiteEnvironmentPeriodRecord( - 2, "CHICAGO ANN CLG .4% CONDNS WB=>MDB", Constant::KindOfSim::DesignDay, 1); - state->dataSQLiteProcedures->sqlite->createSQLiteEnvironmentPeriodRecord( - 3, "CHICAGO ANN HTG 99.6% CONDNS DB", Constant::KindOfSim::RunPeriodDesign); - state->dataSQLiteProcedures->sqlite->createSQLiteEnvironmentPeriodRecord( - 4, "CHICAGO ANN CLG .4% CONDNS WB=>MDB", Constant::KindOfSim::RunPeriodWeather, 1); + sql->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time"); + sql->createSQLiteEnvironmentPeriodRecord(1, "CHICAGO ANN HTG 99.6% CONDNS DB", Constant::KindOfSim::DesignDay); + sql->createSQLiteEnvironmentPeriodRecord(2, "CHICAGO ANN CLG .4% CONDNS WB=>MDB", Constant::KindOfSim::DesignDay, 1); + sql->createSQLiteEnvironmentPeriodRecord(3, "CHICAGO ANN HTG 99.6% CONDNS DB", Constant::KindOfSim::RunPeriodDesign); + sql->createSQLiteEnvironmentPeriodRecord(4, "CHICAGO ANN CLG .4% CONDNS WB=>MDB", Constant::KindOfSim::RunPeriodWeather, 1); auto result = queryResult("SELECT * FROM EnvironmentPeriods;", "EnvironmentPeriods"); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteCommit(); ASSERT_EQ(4ul, result.size()); std::vector testResult0{"1", "1", "CHICAGO ANN HTG 99.6% CONDNS DB", "1"}; @@ -139,51 +142,48 @@ TEST_F(SQLiteFixture, SQLiteProcedures_createSQLiteEnvironmentPeriodRecord) EXPECT_EQ(testResult2, result[2]); EXPECT_EQ(testResult3, result[3]); - state->dataSQLiteProcedures->sqlite->sqliteBegin(); + sql->sqliteBegin(); // This should fail to insert due to foreign key constraint - state->dataSQLiteProcedures->sqlite->createSQLiteEnvironmentPeriodRecord( - 5, "CHICAGO ANN HTG 99.6% CONDNS DB", Constant::KindOfSim::DesignDay, 100); + sql->createSQLiteEnvironmentPeriodRecord(5, "CHICAGO ANN HTG 99.6% CONDNS DB", Constant::KindOfSim::DesignDay, 100); // This should fail to insert due to duplicate primary key - state->dataSQLiteProcedures->sqlite->createSQLiteEnvironmentPeriodRecord( - 4, "CHICAGO ANN CLG .4% CONDNS WB=>MDB", Constant::KindOfSim::DesignDay, 1); + sql->createSQLiteEnvironmentPeriodRecord(4, "CHICAGO ANN CLG .4% CONDNS WB=>MDB", Constant::KindOfSim::DesignDay, 1); result = queryResult("SELECT * FROM EnvironmentPeriods;", "EnvironmentPeriods"); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteCommit(); EXPECT_EQ(4ul, result.size()); } TEST_F(SQLiteFixture, SQLiteProcedures_errorRecords) { - state->dataSQLiteProcedures->sqlite->sqliteBegin(); + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->sqliteBegin(); // There needs to be a simulation record otherwise the foreign key constraint will fail - state->dataSQLiteProcedures->sqlite->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time"); - state->dataSQLiteProcedures->sqlite->createSQLiteErrorRecord( - 1, 0, "CheckUsedConstructions: There are 2 nominally unused constructions in input.", 1); + sql->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time"); + sql->createSQLiteErrorRecord(1, 0, "CheckUsedConstructions: There are 2 nominally unused constructions in input.", 1); auto result = queryResult("SELECT * FROM Errors;", "Errors"); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteCommit(); ASSERT_EQ(1ul, result.size()); std::vector testResult0{"1", "1", "0", "CheckUsedConstructions: There are 2 nominally unused constructions in input.", "1"}; EXPECT_EQ(testResult0, result[0]); - state->dataSQLiteProcedures->sqlite->sqliteBegin(); + sql->sqliteBegin(); // updateSQLiteErrorRecord appends the message to the current error message of the last error in the table - state->dataSQLiteProcedures->sqlite->updateSQLiteErrorRecord("New error message"); + sql->updateSQLiteErrorRecord("New error message"); result = queryResult("SELECT * FROM Errors;", "Errors"); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteCommit(); ASSERT_EQ(1ul, result.size()); std::vector testResult1{ "1", "1", "0", "CheckUsedConstructions: There are 2 nominally unused constructions in input. New error message", "1"}; EXPECT_EQ(testResult1, result[0]); - state->dataSQLiteProcedures->sqlite->sqliteBegin(); - state->dataSQLiteProcedures->sqlite->createSQLiteErrorRecord( - 1, 0, "CheckUsedConstructions: There are 2 nominally unused constructions in input.", 1); - state->dataSQLiteProcedures->sqlite->createSQLiteErrorRecord(1, 0, "This should be changed.", 1); - state->dataSQLiteProcedures->sqlite->updateSQLiteErrorRecord("Changed error message."); + sql->sqliteBegin(); + sql->createSQLiteErrorRecord(1, 0, "CheckUsedConstructions: There are 2 nominally unused constructions in input.", 1); + sql->createSQLiteErrorRecord(1, 0, "This should be changed.", 1); + sql->updateSQLiteErrorRecord("Changed error message."); result = queryResult("SELECT * FROM Errors;", "Errors"); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteCommit(); ASSERT_EQ(3ul, result.size()); std::vector testResult2{ @@ -194,35 +194,36 @@ TEST_F(SQLiteFixture, SQLiteProcedures_errorRecords) EXPECT_EQ(testResult3, result[1]); EXPECT_EQ(testResult4, result[2]); - state->dataSQLiteProcedures->sqlite->sqliteBegin(); + sql->sqliteBegin(); // This should fail to insert due to foreign key constraint - state->dataSQLiteProcedures->sqlite->createSQLiteErrorRecord( - 100, 0, "CheckUsedConstructions: There are 2 nominally unused constructions in input.", 1); + sql->createSQLiteErrorRecord(100, 0, "CheckUsedConstructions: There are 2 nominally unused constructions in input.", 1); result = queryResult("SELECT * FROM Errors;", "Errors"); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteCommit(); EXPECT_EQ(3ul, result.size()); } TEST_F(SQLiteFixture, SQLiteProcedures_sqliteWithinTransaction) { - EXPECT_FALSE(state->dataSQLiteProcedures->sqlite->sqliteWithinTransaction()); - state->dataSQLiteProcedures->sqlite->sqliteBegin(); - EXPECT_TRUE(state->dataSQLiteProcedures->sqlite->sqliteWithinTransaction()); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); - EXPECT_FALSE(state->dataSQLiteProcedures->sqlite->sqliteWithinTransaction()); + auto &sql = state->dataSQLiteProcedures->sqlite; + EXPECT_FALSE(sql->sqliteWithinTransaction()); + sql->sqliteBegin(); + EXPECT_TRUE(sql->sqliteWithinTransaction()); + sql->sqliteCommit(); + EXPECT_FALSE(sql->sqliteWithinTransaction()); } TEST_F(SQLiteFixture, SQLiteProcedures_informationalErrorRecords) { - state->dataSQLiteProcedures->sqlite->sqliteBegin(); + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->sqliteBegin(); // There needs to be a simulation record otherwise the foreign key constraint will fail - state->dataSQLiteProcedures->sqlite->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time"); + sql->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time"); ShowMessage(*state, "This is an informational message"); auto result = queryResult("SELECT * FROM Errors;", "Errors"); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteCommit(); ASSERT_EQ(1ul, result.size()); std::vector testResult0{"1", "1", "-1", "This is an informational message", "0"}; @@ -235,17 +236,19 @@ TEST_F(SQLiteFixture, SQLiteProcedures_informationalErrorRecords) TEST_F(SQLiteFixture, SQLiteProcedures_createSQLiteReportDictionaryRecord) { - state->dataSQLiteProcedures->sqlite->sqliteBegin(); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 1, 1, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", 1, "C", 1, false); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 2, 2, "Facility:Electricity", "", "Facility:Electricity", 1, "J", 1, true); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 3, 2, "Facility:Electricity", "", "Facility:Electricity", 1, "J", 3, true); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord(4, 1, "HVAC", "", "AHU-1", 2, "", 1, false); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord(5, 1, "HVAC", "", "AHU-1", 2, "", 1, false, "test schedule"); + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->sqliteBegin(); + sql->createSQLiteReportDictionaryRecord( + 1, StoreType::Averaged, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", TimeStepType::Zone, "C", ReportFreq::Hour, false); + sql->createSQLiteReportDictionaryRecord( + 2, StoreType::Summed, "Facility:Electricity", "", "Facility:Electricity", TimeStepType::Zone, "J", ReportFreq::Hour, true); + sql->createSQLiteReportDictionaryRecord( + 3, StoreType::Summed, "Facility:Electricity", "", "Facility:Electricity", TimeStepType::Zone, "J", ReportFreq::Month, true); + sql->createSQLiteReportDictionaryRecord(4, StoreType::Averaged, "HVAC", "", "AHU-1", TimeStepType::System, "", ReportFreq::Hour, false); + sql->createSQLiteReportDictionaryRecord( + 5, StoreType::Averaged, "HVAC", "", "AHU-1", TimeStepType::System, "", ReportFreq::Hour, false, "test schedule"); auto result = queryResult("SELECT * FROM ReportDataDictionary;", "ReportDataDictionary"); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteCommit(); ASSERT_EQ(5ul, result.size()); std::vector testResult0{"1", "0", "Avg", "Zone", "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", "Hourly", "", "C"}; @@ -259,16 +262,17 @@ TEST_F(SQLiteFixture, SQLiteProcedures_createSQLiteReportDictionaryRecord) EXPECT_EQ(testResult3, result[3]); EXPECT_EQ(testResult4, result[4]); - state->dataSQLiteProcedures->sqlite->sqliteBegin(); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 6, 3, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", 1, "C", 1, false); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 7, 2, "Facility:Electricity", "", "Facility:Electricity", 3, "J", 1, true); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 8, 2, "Facility:Electricity", "", "Facility:Electricity", 1, "J", 7, true); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord(9, 1, "HVAC", "", "AHU-1", 2, "", -2, false); + // Do we still need to do these tests now that ReportFreq, StoreType, and TimeStep type are enums? + sql->sqliteBegin(); + sql->createSQLiteReportDictionaryRecord( + 6, StoreType::Invalid, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", TimeStepType::Zone, "C", ReportFreq::Hour, false); + sql->createSQLiteReportDictionaryRecord( + 7, StoreType::Summed, "Facility:Electricity", "", "Facility:Electricity", TimeStepType::Invalid, "J", ReportFreq::Hour, true); + sql->createSQLiteReportDictionaryRecord( + 8, StoreType::Summed, "Facility:Electricity", "", "Facility:Electricity", TimeStepType::Zone, "J", ReportFreq::Invalid, true); + sql->createSQLiteReportDictionaryRecord(9, StoreType::Averaged, "HVAC", "", "AHU-1", TimeStepType::System, "", ReportFreq::Invalid, false); result = queryResult("SELECT * FROM ReportDataDictionary;", "ReportDataDictionary"); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteCommit(); ASSERT_EQ(9ul, result.size()); std::vector testResult5{ @@ -281,27 +285,28 @@ TEST_F(SQLiteFixture, SQLiteProcedures_createSQLiteReportDictionaryRecord) EXPECT_EQ(testResult7, result[7]); EXPECT_EQ(testResult8, result[8]); - state->dataSQLiteProcedures->sqlite->sqliteBegin(); + sql->sqliteBegin(); // This should fail to insert due to duplicate primary key - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 9, 3, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", 1, "C", 1, false); + sql->createSQLiteReportDictionaryRecord( + 9, StoreType::Invalid, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", TimeStepType::Zone, "C", ReportFreq::Hour, false); result = queryResult("SELECT * FROM ReportDataDictionary;", "ReportDataDictionary"); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteCommit(); EXPECT_EQ(9ul, result.size()); } TEST_F(SQLiteFixture, SQLiteProcedures_createSQLiteTimeIndexRecord) { - state->dataSQLiteProcedures->sqlite->sqliteBegin(); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(4, 1, 1, 0, 2017, false); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(3, 1, 1, 0, 2017, false, 1); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(2, 1, 1, 0, 2017, false, 1, 1, 1, _, _, 0, "WinterDesignDay"); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(1, 1, 1, 0, 2017, false, 1, 2, 2, _, _, 0, "SummerDesignDay"); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(0, 1, 1, 0, 2017, false, 1, 1, 1, 60, 0, 0, "WinterDesignDay"); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(-1, 1, 1, 0, 2017, false, 1, 2, 2, 60, 0, 0, "SummerDesignDay"); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(-1, 1, 1, 1, 2017, false, 1, 3, 3, 60, 0, 0, "SummerDesignDay", true); + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->sqliteBegin(); + sql->createSQLiteTimeIndexRecord(ReportFreq::Simulation, 1, 1, 0, 2017, false); + sql->createSQLiteTimeIndexRecord(ReportFreq::Month, 1, 1, 0, 2017, false, 1); + sql->createSQLiteTimeIndexRecord(ReportFreq::Day, 1, 1, 0, 2017, false, 1, 1, 1, -1, -1, 0, "WinterDesignDay"); + sql->createSQLiteTimeIndexRecord(ReportFreq::Hour, 1, 1, 0, 2017, false, 1, 2, 2, -1, -1, 0, "SummerDesignDay"); + sql->createSQLiteTimeIndexRecord(ReportFreq::TimeStep, 1, 1, 0, 2017, false, 1, 1, 1, 60, 0, 0, "WinterDesignDay"); + sql->createSQLiteTimeIndexRecord(ReportFreq::EachCall, 1, 1, 0, 2017, false, 1, 2, 2, 60, 0, 0, "SummerDesignDay"); + sql->createSQLiteTimeIndexRecord(ReportFreq::EachCall, 1, 1, 1, 2017, false, 1, 3, 3, 60, 0, 0, "SummerDesignDay", true); auto result = queryResult("SELECT * FROM Time;", "Time"); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteCommit(); ASSERT_EQ(7ul, result.size()); // some of these are odd......... @@ -320,47 +325,48 @@ TEST_F(SQLiteFixture, SQLiteProcedures_createSQLiteTimeIndexRecord) EXPECT_EQ(testResult5, result[5]); EXPECT_EQ(testResult6, result[6]); - state->dataSQLiteProcedures->sqlite->sqliteBegin(); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(-999, 1, 1, 0, 2017, false); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); - EXPECT_EQ("SQLite3 message, Illegal reportingInterval passed to CreateSQLiteTimeIndexRecord: -999\n", ss->str()); + sql->sqliteBegin(); + sql->createSQLiteTimeIndexRecord(ReportFreq::Invalid, 1, 1, 0, 2017, false); + sql->sqliteCommit(); + EXPECT_EQ("SQLite3 message, Illegal reportingInterval passed to CreateSQLiteTimeIndexRecord: -1\n", ss->str()); ss->str(std::string()); EXPECT_EQ(7ul, result.size()); - state->dataSQLiteProcedures->sqlite->sqliteBegin(); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(0, 1, 1, 1, 2017, false, 1, 3, 3, 60, 0, 0, _, true); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(0, 1, 1, 1, 2017, false, 1, 3, 3, 60, 0, _, "SummerDesignDay", true); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(0, 1, 1, 1, 2017, false, 1, 3, 3, 60, _, 0, "SummerDesignDay", true); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(0, 1, 1, 1, 2017, false, 1, 3, 3, _, 0, 0, "SummerDesignDay", true); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(0, 1, 1, 1, 2017, false, 1, 3, _, 60, 0, 0, "SummerDesignDay", true); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(0, 1, 1, 1, 2017, false, 1, _, 3, 60, 0, 0, "SummerDesignDay", true); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(0, 1, 1, 1, 2017, false, _, 3, 3, 60, 0, 0, "SummerDesignDay", true); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(1, 1, 1, 1, 2017, false, 1, 3, 3, 60, 0, 0, _, true); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(1, 1, 1, 1, 2017, false, 1, 3, 3, 60, 0, _, "SummerDesignDay", true); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(1, 1, 1, 1, 2017, false, 1, 3, _, 60, 0, 0, "SummerDesignDay", true); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(1, 1, 1, 1, 2017, false, 1, _, 3, 60, 0, 0, "SummerDesignDay", true); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(1, 1, 1, 1, 2017, false, _, 3, 3, 60, 0, 0, "SummerDesignDay", true); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(2, 1, 1, 1, 2017, false, 1, 3, 3, 60, 0, 0, _, true); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(2, 1, 1, 1, 2017, false, 1, 3, 3, 60, 0, _, "SummerDesignDay", true); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(2, 1, 1, 1, 2017, false, 1, 3, _, 60, 0, 0, "SummerDesignDay", true); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(2, 1, 1, 1, 2017, false, 1, _, 3, 60, 0, 0, "SummerDesignDay", true); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(2, 1, 1, 1, 2017, false, _, 3, 3, 60, 0, 0, "SummerDesignDay", true); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(3, 1, 1, 1, 2017, false, _, 3, 3, 60, 0, 0, "SummerDesignDay", true); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteBegin(); + sql->createSQLiteTimeIndexRecord(ReportFreq::TimeStep, 1, 1, 1, 2017, false, 1, 3, 3, 60, 0, 0, "", true); + sql->createSQLiteTimeIndexRecord(ReportFreq::TimeStep, 1, 1, 1, 2017, false, 1, 3, 3, 60, 0, -1, "SummerDesignDay", true); + sql->createSQLiteTimeIndexRecord(ReportFreq::TimeStep, 1, 1, 1, 2017, false, 1, 3, 3, 60, -1, 0, "SummerDesignDay", true); + sql->createSQLiteTimeIndexRecord(ReportFreq::TimeStep, 1, 1, 1, 2017, false, 1, 3, 3, -1, 0, 0, "SummerDesignDay", true); + sql->createSQLiteTimeIndexRecord(ReportFreq::TimeStep, 1, 1, 1, 2017, false, 1, 3, -1, 60, 0, 0, "SummerDesignDay", true); + sql->createSQLiteTimeIndexRecord(ReportFreq::TimeStep, 1, 1, 1, 2017, false, 1, -1, 3, 60, 0, 0, "SummerDesignDay", true); + sql->createSQLiteTimeIndexRecord(ReportFreq::TimeStep, 1, 1, 1, 2017, false, -1, 3, 3, 60, 0, 0, "SummerDesignDay", true); + sql->createSQLiteTimeIndexRecord(ReportFreq::Hour, 1, 1, 1, 2017, false, 1, 3, 3, 60, 0, 0, "", true); + sql->createSQLiteTimeIndexRecord(ReportFreq::Hour, 1, 1, 1, 2017, false, 1, 3, 3, 60, 0, -1, "SummerDesignDay", true); + sql->createSQLiteTimeIndexRecord(ReportFreq::Hour, 1, 1, 1, 2017, false, 1, 3, -1, 60, 0, 0, "SummerDesignDay", true); + sql->createSQLiteTimeIndexRecord(ReportFreq::Hour, 1, 1, 1, 2017, false, 1, -1, 3, 60, 0, 0, "SummerDesignDay", true); + sql->createSQLiteTimeIndexRecord(ReportFreq::Hour, 1, 1, 1, 2017, false, -1, 3, 3, 60, 0, 0, "SummerDesignDay", true); + sql->createSQLiteTimeIndexRecord(ReportFreq::Day, 1, 1, 1, 2017, false, 1, 3, 3, 60, 0, 0, "", true); + sql->createSQLiteTimeIndexRecord(ReportFreq::Day, 1, 1, 1, 2017, false, 1, 3, 3, 60, 0, -1, "SummerDesignDay", true); + sql->createSQLiteTimeIndexRecord(ReportFreq::Day, 1, 1, 1, 2017, false, 1, 3, -1, 60, 0, 0, "SummerDesignDay", true); + sql->createSQLiteTimeIndexRecord(ReportFreq::Day, 1, 1, 1, 2017, false, 1, -1, 3, 60, 0, 0, "SummerDesignDay", true); + sql->createSQLiteTimeIndexRecord(ReportFreq::Day, 1, 1, 1, 2017, false, -1, 3, 3, 60, 0, 0, "SummerDesignDay", true); + sql->createSQLiteTimeIndexRecord(ReportFreq::Month, 1, 1, 1, 2017, false, -1, 3, 3, 60, 0, 0, "SummerDesignDay", true); + sql->sqliteCommit(); } TEST_F(SQLiteFixture, SQLiteProcedures_createSQLiteTimeIndexRecord_NonLeapDay) { + auto &sql = state->dataSQLiteProcedures->sqlite; // set the leap year flag to false (6th argument) and expect the last day of february to be the 28th - state->dataSQLiteProcedures->sqlite->sqliteBegin(); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(4, 1, 1, 0, 2012, false); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(3, 1, 1, 0, 2012, false, 1); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(3, 1, 1, 0, 2012, false, 2); // February - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(3, 1, 1, 0, 2012, false, 3); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(3, 1, 1, 0, 2012, false, 4); + sql->sqliteBegin(); + sql->createSQLiteTimeIndexRecord(ReportFreq::Simulation, 1, 1, 0, 2012, false); + sql->createSQLiteTimeIndexRecord(ReportFreq::Month, 1, 1, 0, 2012, false, 1); + sql->createSQLiteTimeIndexRecord(ReportFreq::Month, 1, 1, 0, 2012, false, 2); // February + sql->createSQLiteTimeIndexRecord(ReportFreq::Month, 1, 1, 0, 2012, false, 3); + sql->createSQLiteTimeIndexRecord(ReportFreq::Month, 1, 1, 0, 2012, false, 4); auto result = queryResult("SELECT * FROM Time;", "Time"); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteCommit(); ASSERT_EQ(5ul, result.size()); std::vector testResult0{"1", "", "", "", "", "", "", "1440", "4", "1", "", "0", ""}; @@ -377,15 +383,16 @@ TEST_F(SQLiteFixture, SQLiteProcedures_createSQLiteTimeIndexRecord_NonLeapDay) TEST_F(SQLiteFixture, SQLiteProcedures_createSQLiteTimeIndexRecord_LeapDay) { + auto &sql = state->dataSQLiteProcedures->sqlite; // set the leap year flag to true (6th argument) and expect the last day of february to be the 29th - state->dataSQLiteProcedures->sqlite->sqliteBegin(); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(4, 1, 1, 0, 2012, true); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(3, 1, 1, 0, 2012, true, 1); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(3, 1, 1, 0, 2012, true, 2); // February - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(3, 1, 1, 0, 2012, true, 3); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(3, 1, 1, 0, 2012, true, 4); + sql->sqliteBegin(); + sql->createSQLiteTimeIndexRecord(ReportFreq::Simulation, 1, 1, 0, 2012, true); + sql->createSQLiteTimeIndexRecord(ReportFreq::Month, 1, 1, 0, 2012, true, 1); + sql->createSQLiteTimeIndexRecord(ReportFreq::Month, 1, 1, 0, 2012, true, 2); // February + sql->createSQLiteTimeIndexRecord(ReportFreq::Month, 1, 1, 0, 2012, true, 3); + sql->createSQLiteTimeIndexRecord(ReportFreq::Month, 1, 1, 0, 2012, true, 4); auto result = queryResult("SELECT * FROM Time;", "Time"); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteCommit(); ASSERT_EQ(5ul, result.size()); std::vector testResult0{"1", "", "", "", "", "", "", "1440", "4", "1", "", "0", ""}; @@ -402,17 +409,18 @@ TEST_F(SQLiteFixture, SQLiteProcedures_createSQLiteTimeIndexRecord_LeapDay) TEST_F(SQLiteFixture, SQLiteProcedures_createSQLiteReportDataRecord) { - state->dataSQLiteProcedures->sqlite->sqliteBegin(); - state->dataSQLiteProcedures->sqlite->createSQLiteTimeIndexRecord(4, 1, 1, 0, 2017, false); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDictionaryRecord( - 1, 1, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", 1, "C", 1, false); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDataRecord(1, 999.9); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDataRecord(1, 999.9, 2, 0, 1310459, 100, 7031530, 15); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDataRecord(1, 999.9, 0, 0, 1310459, 100, 7031530, 15); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDataRecord(1, 999.9, 2, 100, 1310459, 999, 7031530, _); + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->sqliteBegin(); + sql->createSQLiteTimeIndexRecord(ReportFreq::Simulation, 1, 1, 0, 2017, false); + sql->createSQLiteReportDictionaryRecord( + 1, StoreType::Averaged, "Zone", "Environment", "Site Outdoor Air Drybulb Temperature", TimeStepType::Zone, "C", ReportFreq::Hour, false); + sql->createSQLiteReportDataRecord(1, 999.9); + sql->createSQLiteReportDataRecord(1, 999.9, ReportFreq::Day, 0, 1310459, 100, 7031530, 15); + sql->createSQLiteReportDataRecord(1, 999.9, ReportFreq::TimeStep, 0, 1310459, 100, 7031530, 15); + sql->createSQLiteReportDataRecord(1, 999.9, ReportFreq::Day, 100, 1310459, 999, 7031530, -1); auto reportData = queryResult("SELECT * FROM ReportData;", "ReportData"); auto reportExtendedData = queryResult("SELECT * FROM ReportExtendedData;", "ReportExtendedData"); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteCommit(); ASSERT_EQ(4ul, reportData.size()); std::vector reportData0{"1", "1", "1", "999.9"}; @@ -430,16 +438,16 @@ TEST_F(SQLiteFixture, SQLiteProcedures_createSQLiteReportDataRecord) EXPECT_EQ(reportExtendedData0, reportExtendedData[0]); EXPECT_EQ(reportExtendedData1, reportExtendedData[1]); - state->dataSQLiteProcedures->sqlite->sqliteBegin(); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDataRecord(1, 999.9, -999, 0, 1310459, 100, 7031530, 15); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); - EXPECT_EQ("SQLite3 message, Illegal reportingInterval passed to CreateSQLiteMeterRecord: -999\n", ss->str()); + sql->sqliteBegin(); + sql->createSQLiteReportDataRecord(1, 999.9, ReportFreq::Invalid, 0, 1310459, 100, 7031530, 15); + sql->sqliteCommit(); + EXPECT_EQ("SQLite3 message, Illegal reportingInterval passed to CreateSQLiteMeterRecord: -1\n", ss->str()); ss->str(std::string()); - state->dataSQLiteProcedures->sqlite->sqliteBegin(); - state->dataSQLiteProcedures->sqlite->createSQLiteReportDataRecord(1, 999.9, -100, 0, 1310459, 100, 7031530, _); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); - EXPECT_EQ("SQLite3 message, Illegal reportingInterval passed to CreateSQLiteMeterRecord: -100\n", ss->str()); + sql->sqliteBegin(); + sql->createSQLiteReportDataRecord(1, 999.9, ReportFreq::Invalid, 0, 1310459, 100, 7031530, -1); + sql->sqliteCommit(); + EXPECT_EQ("SQLite3 message, Illegal reportingInterval passed to CreateSQLiteMeterRecord: -1\n", ss->str()); ss->str(std::string()); EXPECT_EQ(4ul, reportData.size()); @@ -448,11 +456,12 @@ TEST_F(SQLiteFixture, SQLiteProcedures_createSQLiteReportDataRecord) TEST_F(SQLiteFixture, SQLiteProcedures_addSQLiteZoneSizingRecord) { - state->dataSQLiteProcedures->sqlite->sqliteBegin(); - state->dataSQLiteProcedures->sqlite->addSQLiteZoneSizingRecord( + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->sqliteBegin(); + sql->addSQLiteZoneSizingRecord( "FLOOR 1 IT HALL", "Cooling", 175, 262, 0.013, 0.019, "CHICAGO ANN CLG .4% CONDNS WB=>MDB", "7/21 06:00:00", 20.7, 0.0157, 0.0033, 416.7); auto result = queryResult("SELECT * FROM ZoneSizes;", "ZoneSizes"); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteCommit(); ASSERT_EQ(1ul, result.size()); std::vector testResult0{"1", @@ -473,11 +482,11 @@ TEST_F(SQLiteFixture, SQLiteProcedures_addSQLiteZoneSizingRecord) TEST_F(SQLiteFixture, SQLiteProcedures_addSQLiteSystemSizingRecord) { - state->dataSQLiteProcedures->sqlite->sqliteBegin(); - state->dataSQLiteProcedures->sqlite->addSQLiteSystemSizingRecord( - "VAV_1", "Cooling", "Sensible", 23.3, 6.3, 6.03, "CHICAGO ANN CLG .4% CONDNS WB=>MDB", "7/21 06:00:00"); + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->sqliteBegin(); + sql->addSQLiteSystemSizingRecord("VAV_1", "Cooling", "Sensible", 23.3, 6.3, 6.03, "CHICAGO ANN CLG .4% CONDNS WB=>MDB", "7/21 06:00:00"); auto result = queryResult("SELECT * FROM SystemSizes;", "SystemSizes"); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteCommit(); ASSERT_EQ(1ul, result.size()); std::vector testResult0{ @@ -487,13 +496,13 @@ TEST_F(SQLiteFixture, SQLiteProcedures_addSQLiteSystemSizingRecord) TEST_F(SQLiteFixture, SQLiteProcedures_addSQLiteComponentSizingRecord) { - state->dataSQLiteProcedures->sqlite->sqliteBegin(); - state->dataSQLiteProcedures->sqlite->addSQLiteComponentSizingRecord( + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->sqliteBegin(); + sql->addSQLiteComponentSizingRecord( "AirTerminal:SingleDuct:VAV:Reheat", "CORE_BOTTOM VAV BOX COMPONENT", "Design Size Maximum Air Flow Rate [m3/s]", 3.23); - state->dataSQLiteProcedures->sqlite->addSQLiteComponentSizingRecord( - "Coil:Heating:Electric", "CORE_BOTTOM VAV BOX REHEAT COIL", "Design Size Nominal Capacity", 38689.18); + sql->addSQLiteComponentSizingRecord("Coil:Heating:Electric", "CORE_BOTTOM VAV BOX REHEAT COIL", "Design Size Nominal Capacity", 38689.18); auto result = queryResult("SELECT * FROM ComponentSizes;", "ComponentSizes"); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteCommit(); ASSERT_EQ(2ul, result.size()); std::vector testResult0{ @@ -506,6 +515,8 @@ TEST_F(SQLiteFixture, SQLiteProcedures_addSQLiteComponentSizingRecord) TEST_F(SQLiteFixture, SQLiteProcedures_privateMethods) { +#ifdef GET_OUT + // Don't need this test anymore we are using Enums // test storageType EXPECT_EQ("Avg", storageType(1)); EXPECT_EQ("Sum", storageType(2)); @@ -531,6 +542,7 @@ TEST_F(SQLiteFixture, SQLiteProcedures_privateMethods) EXPECT_EQ("Annual", reportingFreqName(5)); EXPECT_EQ("Unknown!!!", reportingFreqName(6)); EXPECT_EQ("Unknown!!!", reportingFreqName(-2)); +#endif // GET_OUT EXPECT_EQ(1, logicalToInteger(true)); EXPECT_EQ(0, logicalToInteger(false)); @@ -560,18 +572,18 @@ TEST_F(SQLiteFixture, SQLiteProcedures_DaylightMaping) Array1D YValue({50.1, 52.1}); Array2D IllumValue(2, 2, {1, 3, 2, 4}); - state->dataSQLiteProcedures->sqlite->sqliteBegin(); - state->dataSQLiteProcedures->sqlite->addZoneData(1, *zone); - state->dataSQLiteProcedures->sqlite->createZoneExtendedOutput(); - state->dataSQLiteProcedures->sqlite->createSQLiteDaylightMapTitle( - 1, "DAYLIT ZONE:CHICAGO", "CHICAGO ANN CLG", 1, " RefPt1=(2.50:2.00:0.80), RefPt2=(2.50:18.00:0.80)", 0.8); - state->dataSQLiteProcedures->sqlite->createSQLiteDaylightMap(1, 2005, 7, 21, 5, XValue.size(), XValue, YValue.size(), YValue, IllumValue); + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->sqliteBegin(); + sql->addZoneData(1, *zone); + sql->createZoneExtendedOutput(); + sql->createSQLiteDaylightMapTitle(1, "DAYLIT ZONE:CHICAGO", "CHICAGO ANN CLG", 1, " RefPt1=(2.50:2.00:0.80), RefPt2=(2.50:18.00:0.80)", 0.8); + sql->createSQLiteDaylightMap(1, 2005, 7, 21, 5, XValue.size(), XValue, YValue.size(), YValue, IllumValue); auto zones = queryResult("SELECT * FROM Zones;", "Zones"); auto daylightMaps = queryResult("SELECT * FROM DaylightMaps;", "DaylightMaps"); auto daylightMapHourlyData = queryResult("SELECT * FROM DaylightMapHourlyData;", "DaylightMapHourlyData"); auto daylightMapHourlyReports = queryResult("SELECT * FROM DaylightMapHourlyReports;", "DaylightMapHourlyReports"); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteCommit(); ASSERT_EQ(1ul, zones.size()); std::vector zone0{"1", "DAYLIT ZONE", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "1", "1.0", "1.0", "0.0", "0.0", @@ -597,17 +609,17 @@ TEST_F(SQLiteFixture, SQLiteProcedures_DaylightMaping) EXPECT_EQ(daylightMapHourlyData2, daylightMapHourlyData[2]); EXPECT_EQ(daylightMapHourlyData3, daylightMapHourlyData[3]); - state->dataSQLiteProcedures->sqlite->sqliteBegin(); + sql->sqliteBegin(); // this should fail due to missing foreign key - state->dataSQLiteProcedures->sqlite->createSQLiteDaylightMapTitle(2, "test", "test", 2, "test,test", 0.8); + sql->createSQLiteDaylightMapTitle(2, "test", "test", 2, "test,test", 0.8); // this should fail due to duplicate primary key - state->dataSQLiteProcedures->sqlite->createSQLiteDaylightMapTitle(1, "test", "test", 1, "test,test", 0.8); + sql->createSQLiteDaylightMapTitle(1, "test", "test", 1, "test,test", 0.8); // this should fail due to missing foreign key - state->dataSQLiteProcedures->sqlite->createSQLiteDaylightMap(2, 2005, 7, 21, 5, XValue.size(), XValue, YValue.size(), YValue, IllumValue); + sql->createSQLiteDaylightMap(2, 2005, 7, 21, 5, XValue.size(), XValue, YValue.size(), YValue, IllumValue); daylightMaps = queryResult("SELECT * FROM DaylightMaps;", "DaylightMaps"); daylightMapHourlyData = queryResult("SELECT * FROM DaylightMapHourlyData;", "DaylightMapHourlyData"); daylightMapHourlyReports = queryResult("SELECT * FROM DaylightMapHourlyReports;", "DaylightMapHourlyReports"); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteCommit(); ASSERT_EQ(1ul, daylightMaps.size()); ASSERT_EQ(1ul, daylightMapHourlyReports.size()); @@ -873,45 +885,46 @@ TEST_F(SQLiteFixture, SQLiteProcedures_createZoneExtendedOutput) double constexpr zero = 0.0; double constexpr two = 2.0; - state->dataSQLiteProcedures->sqlite->addScheduleData(1, alwaysOn, onOff, one, one); - state->dataSQLiteProcedures->sqlite->addScheduleData(2, alwaysOff, onOff, zero, zero); - state->dataSQLiteProcedures->sqlite->addZoneData(1, *zoneData0); - state->dataSQLiteProcedures->sqlite->addZoneData(2, *zoneData1); - state->dataSQLiteProcedures->sqlite->addZoneListData(1, *zoneListData0); - state->dataSQLiteProcedures->sqlite->addZoneListData(2, *zoneListData1); - state->dataSQLiteProcedures->sqlite->addZoneGroupData(1, *zoneGroupData0); - state->dataSQLiteProcedures->sqlite->addZoneGroupData(2, *zoneGroupData1); - state->dataSQLiteProcedures->sqlite->addMaterialData(1, &*materialData0); - state->dataSQLiteProcedures->sqlite->addMaterialData(2, &*materialData1); - state->dataSQLiteProcedures->sqlite->addConstructionData(1, *constructData0, zero); - state->dataSQLiteProcedures->sqlite->addConstructionData(2, *constructData1, two); - state->dataSQLiteProcedures->sqlite->addSurfaceData(1, *surfaceData0, window); - state->dataSQLiteProcedures->sqlite->addSurfaceData(2, *surfaceData1, wall); - state->dataSQLiteProcedures->sqlite->addNominalLightingData(1, *lightingData0); - state->dataSQLiteProcedures->sqlite->addNominalLightingData(2, *lightingData1); - state->dataSQLiteProcedures->sqlite->addNominalPeopleData(1, *peopleData0); - state->dataSQLiteProcedures->sqlite->addNominalPeopleData(2, *peopleData1); - state->dataSQLiteProcedures->sqlite->addNominalElectricEquipmentData(1, *elecEquipData0); - state->dataSQLiteProcedures->sqlite->addNominalElectricEquipmentData(2, *elecEquipData1); - state->dataSQLiteProcedures->sqlite->addNominalGasEquipmentData(1, *gasEquipData0); - state->dataSQLiteProcedures->sqlite->addNominalGasEquipmentData(2, *gasEquipData1); - state->dataSQLiteProcedures->sqlite->addNominalSteamEquipmentData(1, *steamEquipData0); - state->dataSQLiteProcedures->sqlite->addNominalSteamEquipmentData(2, *steamEquipData1); - state->dataSQLiteProcedures->sqlite->addNominalHotWaterEquipmentData(1, *hwEquipData0); - state->dataSQLiteProcedures->sqlite->addNominalHotWaterEquipmentData(2, *hwEquipData1); - state->dataSQLiteProcedures->sqlite->addNominalOtherEquipmentData(1, *otherEquipData0); - state->dataSQLiteProcedures->sqlite->addNominalOtherEquipmentData(2, *otherEquipData1); - state->dataSQLiteProcedures->sqlite->addNominalBaseboardData(1, *baseboardData0); - state->dataSQLiteProcedures->sqlite->addNominalBaseboardData(2, *baseboardData1); - state->dataSQLiteProcedures->sqlite->addInfiltrationData(1, *infiltrationData0); - state->dataSQLiteProcedures->sqlite->addInfiltrationData(2, *infiltrationData1); - state->dataSQLiteProcedures->sqlite->addVentilationData(1, *ventilationData0); - state->dataSQLiteProcedures->sqlite->addVentilationData(2, *ventilationData1); - state->dataSQLiteProcedures->sqlite->addRoomAirModelData(1, *roomAirModelData0); - state->dataSQLiteProcedures->sqlite->addRoomAirModelData(2, *roomAirModelData1); - - state->dataSQLiteProcedures->sqlite->sqliteBegin(); - state->dataSQLiteProcedures->sqlite->createZoneExtendedOutput(); + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->addScheduleData(1, alwaysOn, onOff, one, one); + sql->addScheduleData(2, alwaysOff, onOff, zero, zero); + sql->addZoneData(1, *zoneData0); + sql->addZoneData(2, *zoneData1); + sql->addZoneListData(1, *zoneListData0); + sql->addZoneListData(2, *zoneListData1); + sql->addZoneGroupData(1, *zoneGroupData0); + sql->addZoneGroupData(2, *zoneGroupData1); + sql->addMaterialData(1, &*materialData0); + sql->addMaterialData(2, &*materialData1); + sql->addConstructionData(1, *constructData0, zero); + sql->addConstructionData(2, *constructData1, two); + sql->addSurfaceData(1, *surfaceData0, window); + sql->addSurfaceData(2, *surfaceData1, wall); + sql->addNominalLightingData(1, *lightingData0); + sql->addNominalLightingData(2, *lightingData1); + sql->addNominalPeopleData(1, *peopleData0); + sql->addNominalPeopleData(2, *peopleData1); + sql->addNominalElectricEquipmentData(1, *elecEquipData0); + sql->addNominalElectricEquipmentData(2, *elecEquipData1); + sql->addNominalGasEquipmentData(1, *gasEquipData0); + sql->addNominalGasEquipmentData(2, *gasEquipData1); + sql->addNominalSteamEquipmentData(1, *steamEquipData0); + sql->addNominalSteamEquipmentData(2, *steamEquipData1); + sql->addNominalHotWaterEquipmentData(1, *hwEquipData0); + sql->addNominalHotWaterEquipmentData(2, *hwEquipData1); + sql->addNominalOtherEquipmentData(1, *otherEquipData0); + sql->addNominalOtherEquipmentData(2, *otherEquipData1); + sql->addNominalBaseboardData(1, *baseboardData0); + sql->addNominalBaseboardData(2, *baseboardData1); + sql->addInfiltrationData(1, *infiltrationData0); + sql->addInfiltrationData(2, *infiltrationData1); + sql->addVentilationData(1, *ventilationData0); + sql->addVentilationData(2, *ventilationData1); + sql->addRoomAirModelData(1, *roomAirModelData0); + sql->addRoomAirModelData(2, *roomAirModelData1); + + sql->sqliteBegin(); + sql->createZoneExtendedOutput(); auto zones = queryResult("SELECT * FROM Zones;", "Zones"); auto zoneLists = queryResult("SELECT * FROM ZoneLists;", "ZoneLists"); auto zoneGroups = queryResult("SELECT * FROM ZoneGroups;", "ZoneGroups"); @@ -932,7 +945,7 @@ TEST_F(SQLiteFixture, SQLiteProcedures_createZoneExtendedOutput) auto infiltrations = queryResult("SELECT * FROM NominalInfiltration;", "NominalInfiltration"); auto ventilations = queryResult("SELECT * FROM NominalVentilation;", "NominalVentilation"); auto roomAirModels = queryResult("SELECT * FROM RoomAirModels;", "RoomAirModels"); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteCommit(); ASSERT_EQ(2ul, zones.size()); std::vector zone0{"1", "test zone 1", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "1", "1.0", "1.0", "0.0", "0.0", @@ -1071,17 +1084,17 @@ TEST_F(SQLiteFixture, SQLiteProcedures_createSQLiteTabularDataRecords) Array1D_string const columnLabels2({"Electricity", "Natural Gas"}); Array2D_string const body2(1, 2, {"815.19", "256.72"}); - state->dataSQLiteProcedures->sqlite->sqliteBegin(); + auto &sql = state->dataSQLiteProcedures->sqlite; + sql->sqliteBegin(); // tabular data references simulation record... always checks for first simulation record only. - state->dataSQLiteProcedures->sqlite->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time"); - state->dataSQLiteProcedures->sqlite->createSQLiteTabularDataRecords( - body, rowLabels, columnLabels, "AnnualBuildingUtilityPerformanceSummary", "Entire Facility", "End Uses"); - state->dataSQLiteProcedures->sqlite->createSQLiteTabularDataRecords( + sql->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time"); + sql->createSQLiteTabularDataRecords(body, rowLabels, columnLabels, "AnnualBuildingUtilityPerformanceSummary", "Entire Facility", "End Uses"); + sql->createSQLiteTabularDataRecords( body2, rowLabels2, columnLabels2, "AnnualBuildingUtilityPerformanceSummary", "Entire Facility", "End Uses By Subcategory"); auto tabularData = queryResult("SELECT * FROM TabularData;", "TabularData"); auto strings = queryResult("SELECT * FROM Strings;", "Strings"); auto stringTypes = queryResult("SELECT * FROM StringTypes;", "StringTypes"); - state->dataSQLiteProcedures->sqlite->sqliteCommit(); + sql->sqliteCommit(); ASSERT_EQ(6ul, tabularData.size()); // tabularDataIndex, reportNameIndex, reportForStringIndex, tableNameIndex, rowLabelIndex, columnLabelIndex, unitsIndex, simulationIndex, rowId, diff --git a/tst/EnergyPlus/unit/SZVAVModel.unit.cc b/tst/EnergyPlus/unit/SZVAVModel.unit.cc index 9d8e35f0f71..ee2edb5a4d6 100644 --- a/tst/EnergyPlus/unit/SZVAVModel.unit.cc +++ b/tst/EnergyPlus/unit/SZVAVModel.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ScheduleManager.unit.cc b/tst/EnergyPlus/unit/ScheduleManager.unit.cc index 87a34bfc37c..ca623a18d3d 100644 --- a/tst/EnergyPlus/unit/ScheduleManager.unit.cc +++ b/tst/EnergyPlus/unit/ScheduleManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SecondaryDXCoils.unit.cc b/tst/EnergyPlus/unit/SecondaryDXCoils.unit.cc index be3a005a437..da1f03e4872 100644 --- a/tst/EnergyPlus/unit/SecondaryDXCoils.unit.cc +++ b/tst/EnergyPlus/unit/SecondaryDXCoils.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SetPointManager.unit.cc b/tst/EnergyPlus/unit/SetPointManager.unit.cc index 8a23c1700c9..d5cb00e74f6 100644 --- a/tst/EnergyPlus/unit/SetPointManager.unit.cc +++ b/tst/EnergyPlus/unit/SetPointManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SimAirServingZones.unit.cc b/tst/EnergyPlus/unit/SimAirServingZones.unit.cc index 220ffe9a957..cf5ec7c6e2e 100644 --- a/tst/EnergyPlus/unit/SimAirServingZones.unit.cc +++ b/tst/EnergyPlus/unit/SimAirServingZones.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SimulationManager.unit.cc b/tst/EnergyPlus/unit/SimulationManager.unit.cc index afc395145bb..67d2357667c 100644 --- a/tst/EnergyPlus/unit/SimulationManager.unit.cc +++ b/tst/EnergyPlus/unit/SimulationManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SingleDuct.unit.cc b/tst/EnergyPlus/unit/SingleDuct.unit.cc index 2d415cf0b24..b570148cd77 100644 --- a/tst/EnergyPlus/unit/SingleDuct.unit.cc +++ b/tst/EnergyPlus/unit/SingleDuct.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SiteBuildingSurfaceGroundTemperatures.unit.cc b/tst/EnergyPlus/unit/SiteBuildingSurfaceGroundTemperatures.unit.cc index 8bf0b06d40c..d987e2713cc 100644 --- a/tst/EnergyPlus/unit/SiteBuildingSurfaceGroundTemperatures.unit.cc +++ b/tst/EnergyPlus/unit/SiteBuildingSurfaceGroundTemperatures.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SiteDeepGroundTemperatures.unit.cc b/tst/EnergyPlus/unit/SiteDeepGroundTemperatures.unit.cc index 75662f9266f..c821fb2ef48 100644 --- a/tst/EnergyPlus/unit/SiteDeepGroundTemperatures.unit.cc +++ b/tst/EnergyPlus/unit/SiteDeepGroundTemperatures.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SiteFCFactorMethodGroundTemperatures.unit.cc b/tst/EnergyPlus/unit/SiteFCFactorMethodGroundTemperatures.unit.cc index 848a4ebcd58..ccaeab51c86 100644 --- a/tst/EnergyPlus/unit/SiteFCFactorMethodGroundTemperatures.unit.cc +++ b/tst/EnergyPlus/unit/SiteFCFactorMethodGroundTemperatures.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SiteGroundDomain.unit.cc b/tst/EnergyPlus/unit/SiteGroundDomain.unit.cc index 19fc1da20c3..61cdaaaa2fc 100644 --- a/tst/EnergyPlus/unit/SiteGroundDomain.unit.cc +++ b/tst/EnergyPlus/unit/SiteGroundDomain.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SiteShallowGroundTemperatures.unit.cc b/tst/EnergyPlus/unit/SiteShallowGroundTemperatures.unit.cc index ce8c4c51276..6bc096f41b5 100644 --- a/tst/EnergyPlus/unit/SiteShallowGroundTemperatures.unit.cc +++ b/tst/EnergyPlus/unit/SiteShallowGroundTemperatures.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SizeWaterHeatingCoil.unit.cc b/tst/EnergyPlus/unit/SizeWaterHeatingCoil.unit.cc index b24d5048c43..3748667e169 100644 --- a/tst/EnergyPlus/unit/SizeWaterHeatingCoil.unit.cc +++ b/tst/EnergyPlus/unit/SizeWaterHeatingCoil.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SizingAnalysisObjects.unit.cc b/tst/EnergyPlus/unit/SizingAnalysisObjects.unit.cc index a249811cac4..b46ed799b4a 100644 --- a/tst/EnergyPlus/unit/SizingAnalysisObjects.unit.cc +++ b/tst/EnergyPlus/unit/SizingAnalysisObjects.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -455,14 +455,14 @@ TEST_F(SizingAnalysisObjectsTest, DISABLED_LoggingSubStep4stepPerHour) SystemTimestepObject tmpSysStepStamp; tmpSysStepStamp.CurMinuteEnd = (timeStp - 1) * (minutesPerHour * zoneTimeStepDuration) + - (subTimeStp) * (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep) * minutesPerHour; + (subTimeStp) * (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep) * minutesPerHour; if (tmpSysStepStamp.CurMinuteEnd == 0.0) { tmpSysStepStamp.CurMinuteEnd = minutesPerHour; } tmpSysStepStamp.CurMinuteStart = tmpSysStepStamp.CurMinuteEnd - - (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep) * minutesPerHour; - tmpSysStepStamp.TimeStepDuration = *state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep; + (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep) * minutesPerHour; + tmpSysStepStamp.TimeStepDuration = *state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep; TestLogObj.FillSysStep(tmpztStepStamp, tmpSysStepStamp); } @@ -494,14 +494,14 @@ TEST_F(SizingAnalysisObjectsTest, DISABLED_LoggingSubStep4stepPerHour) SystemTimestepObject tmpSysStepStamp; tmpSysStepStamp.CurMinuteEnd = (timeStp - 1) * (minutesPerHour * zoneTimeStepDuration) + - (subTimeStp) * (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep) * minutesPerHour; + (subTimeStp) * (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep) * minutesPerHour; if (tmpSysStepStamp.CurMinuteEnd == 0.0) { tmpSysStepStamp.CurMinuteEnd = minutesPerHour; } tmpSysStepStamp.CurMinuteStart = tmpSysStepStamp.CurMinuteEnd - - (*state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep) * minutesPerHour; - tmpSysStepStamp.TimeStepDuration = *state->dataOutputProcessor->TimeValue.at(OutputProcessor::TimeStepType::System).TimeStep; + (*state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep) * minutesPerHour; + tmpSysStepStamp.TimeStepDuration = *state->dataOutputProcessor->TimeValue[(int)OutputProcessor::TimeStepType::System].TimeStep; TestLogObj.FillSysStep(tmpztStepStamp, tmpSysStepStamp); } diff --git a/tst/EnergyPlus/unit/SizingManager.unit.cc b/tst/EnergyPlus/unit/SizingManager.unit.cc index 3d86d0759cd..47b36423087 100644 --- a/tst/EnergyPlus/unit/SizingManager.unit.cc +++ b/tst/EnergyPlus/unit/SizingManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SolarShading.unit.cc b/tst/EnergyPlus/unit/SolarShading.unit.cc index 4ac5fbcc7fd..89e02eec33f 100644 --- a/tst/EnergyPlus/unit/SolarShading.unit.cc +++ b/tst/EnergyPlus/unit/SolarShading.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -53,7 +53,6 @@ // EnergyPlus Headers #include "Fixtures/EnergyPlusFixture.hh" #include -#include #include #include #include @@ -61,6 +60,7 @@ #include #include #include +#include #include #include #include @@ -118,8 +118,8 @@ TEST_F(EnergyPlusFixture, SolarShadingTest_CalcPerSolarBeamTest) // Test non-integrated option first, CalcPerSolarBeam should set OutProjSLFracMult and InOutProjSLFracMult to 1.0 for all hours for (int SurfNum = 1; SurfNum <= state->dataSurface->TotSurfaces; ++SurfNum) { for (int Hour = 1; Hour <= HoursInDay; ++Hour) { - state->dataSurface->SurfaceWindow(SurfNum).OutProjSLFracMult(Hour) = 999.0; - state->dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult(Hour) = 888.0; + state->dataSurface->SurfaceWindow(SurfNum).OutProjSLFracMult[Hour] = 999.0; + state->dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult[Hour] = 888.0; } } @@ -128,8 +128,8 @@ TEST_F(EnergyPlusFixture, SolarShadingTest_CalcPerSolarBeamTest) for (int SurfNum = 1; SurfNum <= state->dataSurface->TotSurfaces; ++SurfNum) { for (int Hour = 1; Hour <= HoursInDay; ++Hour) { - EXPECT_EQ(1.0, state->dataSurface->SurfaceWindow(SurfNum).OutProjSLFracMult(Hour)); - EXPECT_EQ(1.0, state->dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult(Hour)); + EXPECT_EQ(1.0, state->dataSurface->SurfaceWindow(SurfNum).OutProjSLFracMult[Hour]); + EXPECT_EQ(1.0, state->dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult[Hour]); } } @@ -137,8 +137,8 @@ TEST_F(EnergyPlusFixture, SolarShadingTest_CalcPerSolarBeamTest) // Re-initialize to new values for (int SurfNum = 1; SurfNum <= state->dataSurface->TotSurfaces; ++SurfNum) { for (int Hour = 1; Hour <= HoursInDay; ++Hour) { - state->dataSurface->SurfaceWindow(SurfNum).OutProjSLFracMult(Hour) = 555.0; - state->dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult(Hour) = 444.0; + state->dataSurface->SurfaceWindow(SurfNum).OutProjSLFracMult[Hour] = 555.0; + state->dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult[Hour] = 444.0; } } @@ -149,11 +149,11 @@ TEST_F(EnergyPlusFixture, SolarShadingTest_CalcPerSolarBeamTest) for (int SurfNum = 1; SurfNum <= state->dataSurface->TotSurfaces; ++SurfNum) { for (int Hour = 1; Hour <= HoursInDay; ++Hour) { if (Hour == state->dataGlobal->HourOfDay) { - EXPECT_EQ(1.0, state->dataSurface->SurfaceWindow(SurfNum).OutProjSLFracMult(Hour)); - EXPECT_EQ(1.0, state->dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult(Hour)); + EXPECT_EQ(1.0, state->dataSurface->SurfaceWindow(SurfNum).OutProjSLFracMult[Hour]); + EXPECT_EQ(1.0, state->dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult[Hour]); } else { - EXPECT_EQ(555.0, state->dataSurface->SurfaceWindow(SurfNum).OutProjSLFracMult(Hour)); - EXPECT_EQ(444.0, state->dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult(Hour)); + EXPECT_EQ(555.0, state->dataSurface->SurfaceWindow(SurfNum).OutProjSLFracMult[Hour]); + EXPECT_EQ(444.0, state->dataSurface->SurfaceWindow(SurfNum).InOutProjSLFracMult[Hour]); } } } @@ -2662,10 +2662,12 @@ TEST_F(EnergyPlusFixture, SolarShadingTest_selectActiveWindowShadingControl) TEST_F(EnergyPlusFixture, WindowShadingManager_Lum_Test) { state->dataSurface->Surface.allocate(2); + state->dataSurface->SurfaceWindow.allocate(2); + EnergyPlus::SurfaceGeometry::AllocateSurfaceWindows(*state, 2); state->dataConstruction->Construct.allocate(1); state->dataSurface->WindowShadingControl.allocate(2); - state->dataDaylightingData->ZoneDaylight.allocate(1); + state->dataDayltg->ZoneDaylight.allocate(1); auto &surf1 = state->dataSurface->Surface(1); auto &surf2 = state->dataSurface->Surface(2); diff --git a/tst/EnergyPlus/unit/SortAndStringUtilities.unit.cc b/tst/EnergyPlus/unit/SortAndStringUtilities.unit.cc index bae931172a8..22e3db70b99 100644 --- a/tst/EnergyPlus/unit/SortAndStringUtilities.unit.cc +++ b/tst/EnergyPlus/unit/SortAndStringUtilities.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Standard621SimplifiedProcedure.unit.cc b/tst/EnergyPlus/unit/Standard621SimplifiedProcedure.unit.cc index 02ef3706789..5c78b1b55fb 100644 --- a/tst/EnergyPlus/unit/Standard621SimplifiedProcedure.unit.cc +++ b/tst/EnergyPlus/unit/Standard621SimplifiedProcedure.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/StandardRatings.unit.cc b/tst/EnergyPlus/unit/StandardRatings.unit.cc index 3c57c2a0d99..c657e735fac 100644 --- a/tst/EnergyPlus/unit/StandardRatings.unit.cc +++ b/tst/EnergyPlus/unit/StandardRatings.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -2811,6 +2811,7 @@ TEST_F(EnergyPlusFixture, MultiSpeedCoolingCoil_3Speeds_IEER2022ValueOrigTest) "{m3/s-W", " , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation " "{m3/s-W", + " No, !- No Load Supply Air Flow Rate Control Set To Low Speed", " Autosize, !- Maximum Supply Air Temperature {C}", " 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C}", " , !- Outdoor Dry-Bulb Temperature Sensor Node Name", diff --git a/tst/EnergyPlus/unit/StringUtilities.unit.cc b/tst/EnergyPlus/unit/StringUtilities.unit.cc index aa2cd08c9ac..a4867756549 100644 --- a/tst/EnergyPlus/unit/StringUtilities.unit.cc +++ b/tst/EnergyPlus/unit/StringUtilities.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SurfaceGeometry.unit.cc b/tst/EnergyPlus/unit/SurfaceGeometry.unit.cc index 94969fbec87..6e3d1b57076 100644 --- a/tst/EnergyPlus/unit/SurfaceGeometry.unit.cc +++ b/tst/EnergyPlus/unit/SurfaceGeometry.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -5097,7 +5097,7 @@ TEST_F(EnergyPlusFixture, WorldCoord_with_RelativeRectSurfCoord_test4) " ** Warning ** GlobalGeometryRules: Potential mismatch of coordinate specifications. Note that the rectangular surfaces are relying on " "the default SurfaceGeometry for 'Relative to zone' coordinate.", " ** ~~~ ** Coordinate System=\"WORLD\"; while ", - " ** ~~~ ** Rectangular Surface Coordinate System=\"defaults to RELATIVE\".", + " ** ~~~ ** Rectangular Surface Coordinate System=\"RELATIVE\".", }); EXPECT_TRUE(compare_err_stream(error_string, true)); } diff --git a/tst/EnergyPlus/unit/SurfaceGroundHeatExchanger.unit.cc b/tst/EnergyPlus/unit/SurfaceGroundHeatExchanger.unit.cc index b0f2f68de80..fa026610d41 100644 --- a/tst/EnergyPlus/unit/SurfaceGroundHeatExchanger.unit.cc +++ b/tst/EnergyPlus/unit/SurfaceGroundHeatExchanger.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SurfaceOctree.unit.cc b/tst/EnergyPlus/unit/SurfaceOctree.unit.cc index 8e39b123536..b472559fe9a 100644 --- a/tst/EnergyPlus/unit/SurfaceOctree.unit.cc +++ b/tst/EnergyPlus/unit/SurfaceOctree.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SwimmingPool.unit.cc b/tst/EnergyPlus/unit/SwimmingPool.unit.cc index 47c8a92eb47..05d8a5e5e08 100644 --- a/tst/EnergyPlus/unit/SwimmingPool.unit.cc +++ b/tst/EnergyPlus/unit/SwimmingPool.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SystemAvailabilityManager.unit.cc b/tst/EnergyPlus/unit/SystemAvailabilityManager.unit.cc index 314c6bc418e..e349e747280 100644 --- a/tst/EnergyPlus/unit/SystemAvailabilityManager.unit.cc +++ b/tst/EnergyPlus/unit/SystemAvailabilityManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SystemReports.unit.cc b/tst/EnergyPlus/unit/SystemReports.unit.cc index 86731c0d40e..aec4c498976 100644 --- a/tst/EnergyPlus/unit/SystemReports.unit.cc +++ b/tst/EnergyPlus/unit/SystemReports.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -108,10 +108,9 @@ TEST_F(EnergyPlusFixture, SeparateGasOutputVariables) state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).NodeNumOut = 1; state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).NumMeteredVars = 1; state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).MeteredVar.allocate(1); - state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).MeteredVar(1).EndUse_CompMode = SystemReports::EndUseType::CoolingOnly; - state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).MeteredVar(1).CurMeterReading = 100.0; - state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).MeteredVar(1).ResourceType = - static_cast(getEnumValue(Constant::eResourceNamesUC, Util::makeUPPER("NaturalGas"))); + state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).MeteredVar(1).heatOrCool = Constant::HeatOrCool::CoolingOnly; + state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).MeteredVar(1).curMeterReading = 100.0; + state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).MeteredVar(1).resource = Constant::eResource::NaturalGas; state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(2).Name = "Main Gas Heating Coil"; state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(2).TypeOf = "COIL:HEATING:DESUPERHEATER"; @@ -119,10 +118,9 @@ TEST_F(EnergyPlusFixture, SeparateGasOutputVariables) state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(2).NodeNumOut = 2; state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(2).NumMeteredVars = 1; state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(2).MeteredVar.allocate(1); - state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(2).MeteredVar(1).EndUse_CompMode = SystemReports::EndUseType::CoolingOnly; - state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(2).MeteredVar(1).CurMeterReading = 100.0; - state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(2).MeteredVar(1).ResourceType = - static_cast(getEnumValue(Constant::eResourceNamesUC, Util::makeUPPER("NaturalGas"))); + state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(2).MeteredVar(1).heatOrCool = Constant::HeatOrCool::CoolingOnly; + state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(2).MeteredVar(1).curMeterReading = 100.0; + state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(2).MeteredVar(1).resource = Constant::eResource::NaturalGas; state->dataLoopNodes->Node(1).MassFlowRate = 1.0; state->dataLoopNodes->Node(2).MassFlowRate = 1.0; @@ -134,7 +132,7 @@ TEST_F(EnergyPlusFixture, SeparateGasOutputVariables) CompLoadFlag, AirLoopNum, state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).TypeOf, - state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).MeteredVar(1).ResourceType, + state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).MeteredVar(1).resource, CompLoad, CompEnergyUse); @@ -143,7 +141,7 @@ TEST_F(EnergyPlusFixture, SeparateGasOutputVariables) CompLoadFlag, AirLoopNum, state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(2).TypeOf, - state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(2).MeteredVar(1).ResourceType, + state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(2).MeteredVar(1).resource, CompLoad, CompEnergyUse); @@ -159,17 +157,15 @@ TEST_F(EnergyPlusFixture, SeparateGasOutputVariables) state->dataSysRpts->SysLoadRepVars(1).HCCompNaturalGas = 0; state->dataSysRpts->SysLoadRepVars(1).TotNaturalGas = 0; - state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).MeteredVar(1).ResourceType = - static_cast(getEnumValue(Constant::eResourceNamesUC, Util::makeUPPER("Propane"))); - state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(2).MeteredVar(1).ResourceType = - static_cast(getEnumValue(Constant::eResourceNamesUC, Util::makeUPPER("Propane"))); + state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).MeteredVar(1).resource = Constant::eResource::Propane; + state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(2).MeteredVar(1).resource = Constant::eResource::Propane; // Calculate SysHumidPropane ("Air System Humidifier Propane Energy" Output Variable) CalcSystemEnergyUse(*state, CompLoadFlag, AirLoopNum, state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).TypeOf, - state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).MeteredVar(1).ResourceType, + state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).MeteredVar(1).resource, CompLoad, CompEnergyUse); @@ -178,7 +174,7 @@ TEST_F(EnergyPlusFixture, SeparateGasOutputVariables) CompLoadFlag, AirLoopNum, state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(2).TypeOf, - state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(2).MeteredVar(1).ResourceType, + state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(2).MeteredVar(1).resource, CompLoad, CompEnergyUse); diff --git a/tst/EnergyPlus/unit/TestHelpers/IdfParser.cc b/tst/EnergyPlus/unit/TestHelpers/IdfParser.cc index d4e0e8bc370..6d8281491e7 100644 --- a/tst/EnergyPlus/unit/TestHelpers/IdfParser.cc +++ b/tst/EnergyPlus/unit/TestHelpers/IdfParser.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/TestHelpers/IdfParser.hh b/tst/EnergyPlus/unit/TestHelpers/IdfParser.hh index 72eaf7fc9f2..d3ad8b5efb0 100644 --- a/tst/EnergyPlus/unit/TestHelpers/IdfParser.hh +++ b/tst/EnergyPlus/unit/TestHelpers/IdfParser.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ThermalChimney.unit.cc b/tst/EnergyPlus/unit/ThermalChimney.unit.cc index 2b83d9c640e..b23a6a397a3 100644 --- a/tst/EnergyPlus/unit/ThermalChimney.unit.cc +++ b/tst/EnergyPlus/unit/ThermalChimney.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ThermalComfort.unit.cc b/tst/EnergyPlus/unit/ThermalComfort.unit.cc index 4f2b83727af..f576266b4c7 100644 --- a/tst/EnergyPlus/unit/ThermalComfort.unit.cc +++ b/tst/EnergyPlus/unit/ThermalComfort.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/TranspiredCollector.unit.cc b/tst/EnergyPlus/unit/TranspiredCollector.unit.cc index 23cb64b7858..a2aee98117b 100644 --- a/tst/EnergyPlus/unit/TranspiredCollector.unit.cc +++ b/tst/EnergyPlus/unit/TranspiredCollector.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/UFADManager.unit.cc b/tst/EnergyPlus/unit/UFADManager.unit.cc index b54c496106e..4c774d784e7 100644 --- a/tst/EnergyPlus/unit/UFADManager.unit.cc +++ b/tst/EnergyPlus/unit/UFADManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/UnitHeater.unit.cc b/tst/EnergyPlus/unit/UnitHeater.unit.cc index cf2098003bd..b87e22a71dc 100644 --- a/tst/EnergyPlus/unit/UnitHeater.unit.cc +++ b/tst/EnergyPlus/unit/UnitHeater.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -1129,6 +1129,8 @@ TEST_F(EnergyPlusFixture, UnitHeater_HWHeatingCoilUAAutoSizingTest) SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::Zone, state->dataGlobal->TimeStepZone); SetupTimePointers(*state, OutputProcessor::SOVTimeStepType::HVAC, state->dataHVACGlobal->TimeStepSys); + UpdateMeterReporting(*state); + SizingManager::ManageSizing(*state); EXPECT_FALSE(ErrorsFound); diff --git a/tst/EnergyPlus/unit/UnitVentilator.unit.cc b/tst/EnergyPlus/unit/UnitVentilator.unit.cc index 1d5df8299c8..9933fc61299 100644 --- a/tst/EnergyPlus/unit/UnitVentilator.unit.cc +++ b/tst/EnergyPlus/unit/UnitVentilator.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/UnitaryHybridAirConditioner.unit.cc b/tst/EnergyPlus/unit/UnitaryHybridAirConditioner.unit.cc index c61b88d809a..0770d6de282 100644 --- a/tst/EnergyPlus/unit/UnitaryHybridAirConditioner.unit.cc +++ b/tst/EnergyPlus/unit/UnitaryHybridAirConditioner.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -422,47 +422,39 @@ TEST_F(EnergyPlusFixture, Test_UnitaryHybridAirConditioner_Unittest) std::string TypeOfComp = "ZoneHVAC:HybridUnitaryHVAC"; std::string NameOfComp = thisUnitary.Name; int NumVariables = GetNumMeteredVariables(*state, TypeOfComp, NameOfComp); - Array1D_int VarIndexes(NumVariables); // Variable Numbers - Array1D VarTypes(NumVariables); // Variable Types (1=integer, 2=real, 3=meter) - Array1D IndexTypes(NumVariables); // Variable Index Types (1=Zone,2=HVAC) - Array1D unitsForVar(NumVariables); // units from enum for each variable - Array1D ResourceTypes(NumVariables); // ResourceTypes for each variable - Array1D_string EndUses(NumVariables); // EndUses for each variable - Array1D_string Groups(NumVariables); // Groups for each variable - Array1D_string Names(NumVariables); // Variable Names for each variable - - GetMeteredVariables( - *state, TypeOfComp, NameOfComp, VarIndexes, VarTypes, IndexTypes, unitsForVar, ResourceTypes, EndUses, Groups, Names, NumFound); + Array1D meteredVars(NumVariables); // Variable Types (1=integer, 2=real, 3=meter) + + NumFound = GetMeteredVariables(*state, NameOfComp, meteredVars); // output results Real64 MaxFlow = thisUnitary.ScaledSystemMaximumSupplyAirVolumeFlowRate; // Check the meters associated with the ZoneHVAC:HybridUnitaryHVAC outputs EXPECT_EQ(14, NumFound); - EXPECT_TRUE(compare_enums(ResourceTypes(1), Constant::eResource::EnergyTransfer)); // ENERGYTRANSFER - Cooling - EXPECT_EQ(EndUses(1), "COOLINGCOILS"); - EXPECT_EQ(Groups(1), "HVAC"); - EXPECT_TRUE(compare_enums(ResourceTypes(2), Constant::eResource::EnergyTransfer)); // ENERGYTRANSFER - Heating - EXPECT_EQ(EndUses(2), "HEATINGCOILS"); - EXPECT_EQ(Groups(2), "HVAC"); - EXPECT_TRUE(compare_enums(ResourceTypes(3), Constant::eResource::Electricity)); // ELECTRIC - Cooling Energy - EXPECT_EQ(EndUses(3), "COOLING"); - EXPECT_EQ(Groups(3), "HVAC"); - EXPECT_TRUE(compare_enums(ResourceTypes(4), Constant::eResource::Electricity)); // ELECTRIC - Fan Energy - EXPECT_EQ(EndUses(4), "FANS"); - EXPECT_EQ(Groups(4), "HVAC"); - EXPECT_TRUE(compare_enums(ResourceTypes(5), + EXPECT_TRUE(compare_enums(meteredVars(1).resource, Constant::eResource::EnergyTransfer)); // ENERGYTRANSFER - Cooling + EXPECT_TRUE(compare_enums(meteredVars(1).sovEndUseCat, OutputProcessor::SOVEndUseCat::CoolingCoils)); + EXPECT_TRUE(compare_enums(meteredVars(1).sovGroup, OutputProcessor::SOVGroup::HVAC)); + EXPECT_TRUE(compare_enums(meteredVars(2).resource, Constant::eResource::EnergyTransfer)); // ENERGYTRANSFER - Heating + EXPECT_TRUE(compare_enums(meteredVars(2).sovEndUseCat, OutputProcessor::SOVEndUseCat::HeatingCoils)); + EXPECT_TRUE(compare_enums(meteredVars(2).sovGroup, OutputProcessor::SOVGroup::HVAC)); + EXPECT_TRUE(compare_enums(meteredVars(3).resource, Constant::eResource::Electricity)); // ELECTRIC - Cooling Energy + EXPECT_TRUE(compare_enums(meteredVars(3).sovEndUseCat, OutputProcessor::SOVEndUseCat::Cooling)); + EXPECT_TRUE(compare_enums(meteredVars(3).sovGroup, OutputProcessor::SOVGroup::HVAC)); + EXPECT_TRUE(compare_enums(meteredVars(4).resource, Constant::eResource::Electricity)); // ELECTRIC - Fan Energy + EXPECT_TRUE(compare_enums(meteredVars(4).sovEndUseCat, OutputProcessor::SOVEndUseCat::Fans)); + EXPECT_TRUE(compare_enums(meteredVars(4).sovGroup, OutputProcessor::SOVGroup::HVAC)); + EXPECT_TRUE(compare_enums(meteredVars(5).resource, Constant::eResource::NaturalGas)); // NATURALGAS - Secondary Fuel Type - specified in UnitaryHybridUnitTest_DOSA.idf - EXPECT_EQ(EndUses(5), "COOLING"); - EXPECT_EQ(Groups(5), "HVAC"); + EXPECT_TRUE(compare_enums(meteredVars(5).sovEndUseCat, OutputProcessor::SOVEndUseCat::Cooling)); + EXPECT_TRUE(compare_enums(meteredVars(5).sovGroup, OutputProcessor::SOVGroup::HVAC)); EXPECT_TRUE( - compare_enums(ResourceTypes(6), + compare_enums(meteredVars(6).resource, Constant::eResource::DistrictCooling)); // DISTRICTCOOLING - Third Fuel Type - specified in UnitaryHybridUnitTest_DOSA.idf - EXPECT_EQ(EndUses(6), "COOLING"); - EXPECT_EQ(Groups(6), "HVAC"); - EXPECT_TRUE(compare_enums(ResourceTypes(7), Constant::eResource::Water)); // WATER - Cooling Water Use - EXPECT_EQ(EndUses(7), "COOLING"); - EXPECT_EQ(Groups(7), "HVAC"); + EXPECT_TRUE(compare_enums(meteredVars(6).sovEndUseCat, OutputProcessor::SOVEndUseCat::Cooling)); + EXPECT_TRUE(compare_enums(meteredVars(6).sovGroup, OutputProcessor::SOVGroup::HVAC)); + EXPECT_TRUE(compare_enums(meteredVars(7).resource, Constant::eResource::Water)); // WATER - Cooling Water Use + EXPECT_TRUE(compare_enums(meteredVars(7).sovEndUseCat, OutputProcessor::SOVEndUseCat::Cooling)); + EXPECT_TRUE(compare_enums(meteredVars(7).sovGroup, OutputProcessor::SOVGroup::HVAC)); // Check that unit is included in Component Sizing Summary Report EXPECT_EQ("ZoneHVAC:HybridUnitaryHVAC", state->dataOutRptPredefined->CompSizeTableEntry(1).typeField); diff --git a/tst/EnergyPlus/unit/UnitarySystem.unit.cc b/tst/EnergyPlus/unit/UnitarySystem.unit.cc index b3db270b8ac..a7ce2f4788c 100644 --- a/tst/EnergyPlus/unit/UnitarySystem.unit.cc +++ b/tst/EnergyPlus/unit/UnitarySystem.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -617,6 +617,7 @@ TEST_F(ZoneUnitarySysTest, Test_UnitarySystemModel_factory) , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed 80.0, !- Maximum Supply Air Temperature{ C } , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -847,6 +848,7 @@ TEST_F(ZoneUnitarySysTest, Test_UnitarySystemModel_factory) EXPECT_NEAR(fanDT, 0.7070, 0.0001); fanDT = thisSys->getFanDeltaTemp(*state, true, 0.5, 0.5); EXPECT_NEAR(fanDT, 0.7070, 0.0001); + EXPECT_TRUE(thisSys->m_useNoLoadLowSpeedAirFlow); } TEST_F(ZoneUnitarySysTest, UnitarySystemModel_TwoSpeedDXCoolCoil_Only) { @@ -892,6 +894,7 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_TwoSpeedDXCoolCoil_Only) , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed 80.0; !- Maximum Supply Air Temperature{ C } Fan:OnOff, Supply Fan 1, !- Name @@ -1066,6 +1069,7 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_TwoSpeedDXCoolCoil_Only) EXPECT_NEAR(state->dataLoopNodes->Node(2).Temp, state->dataLoopNodes->Node(2).TempSetPoint, 0.001); // cooling coil air inlet node temp is greater than cooling coil air outlet node temp EXPECT_GT(state->dataLoopNodes->Node(3).Temp, state->dataLoopNodes->Node(2).Temp); + EXPECT_TRUE(thisSys->m_useNoLoadLowSpeedAirFlow); } TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultiSpeedDXCoolCoil_Only) @@ -1112,6 +1116,7 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultiSpeedDXCoolCoil_Only) , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed 80.0, !- Maximum Supply Air Temperature{ C } , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -1470,6 +1475,7 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultiStageGasHeatCoil_Only) , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed 80.0, !- Maximum Supply Air Temperature{ C } , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -1702,6 +1708,7 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultiStageElecHeatCoil_Only) , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed 80.0, !- Maximum Supply Air Temperature{ C } , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -1948,6 +1955,7 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultiStageElecHeatCoil_Backup_Load , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed 80.0, !- Maximum Supply Air Temperature{ C } , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -2279,6 +2287,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed 80.0, !- Maximum Supply Air Temperature{ C } , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -2566,6 +2575,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed 80.0, !- Maximum Supply Air Temperature{ C } , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -2811,6 +2821,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed 80.0, !- Maximum Supply Air Temperature{ C } , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -3082,6 +3093,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed 80.0, !- Maximum Supply Air Temperature{ C } , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -3278,6 +3290,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed 80.0, !- Maximum Supply Air Temperature{ C } , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -3519,6 +3532,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed 35.0, !- Maximum Supply Air Temperature{ C } , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -4189,6 +4203,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed 25.0; !- Maximum Supply Air Temperature{ C } Fan:OnOff, @@ -4623,6 +4638,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed 25.0; !- Maximum Supply Air Temperature{ C } Fan:OnOff, @@ -5833,6 +5849,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed" 80; !- Maximum Supply Air Temperature{ C } Fan:OnOff, @@ -6314,6 +6331,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed", 80; !- Maximum Supply Air Temperature{ C } Fan:OnOff, @@ -6712,6 +6730,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed", 80; !- Maximum Supply Air Temperature{ C } Fan:OnOff, @@ -7207,6 +7226,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed", 80; !- Maximum Supply Air Temperature{ C } Fan:OnOff, @@ -7706,6 +7726,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed", 80, !- Maximum Supply Air Temperature{ C } 21, !- Maximum Outdoor Dry - Bulb Temperature for Supplemental Heater Operation{ C } , !- Outdoor Dry - Bulb Temperature Sensor Node Name @@ -7888,6 +7909,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed", 80, !- Maximum Supply Air Temperature{ C } 21, !- Maximum Outdoor Dry - Bulb Temperature for Supplemental Heater Operation{ C } , !- Outdoor Dry - Bulb Temperature Sensor Node Name @@ -8191,6 +8213,7 @@ AirLoopHVAC:UnitarySystem, , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation + , !- No Load Supply Air Flow Rate Control Set To Low Speed", Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -8587,6 +8610,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed", 80, !- Maximum Supply Air Temperature{ C } 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -9414,6 +9438,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + No, !- No Load Supply Air Flow Rate Control Set To Low Speed", 80; !- Maximum Supply Air Temperature{ C } Fan:OnOff, @@ -9832,6 +9857,7 @@ Curve:QuadLinear, // Unitary System mines data from coil objects EXPECT_EQ(thisSys->m_MinOATCompressorCooling, -1000.0); EXPECT_EQ(thisSys->m_MinOATCompressorHeating, -1000.0); + EXPECT_FALSE(thisSys->m_useNoLoadLowSpeedAirFlow); } TEST_F(EnergyPlusFixture, UnitarySystemModel_ASHRAEModel_WaterCoils) @@ -9918,6 +9944,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed", 25.0; !- Maximum Supply Air Temperature{ C } Fan:OnOff, @@ -10652,6 +10679,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed", 80, !- Maximum Supply Air Temperature{ C } 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -11212,15 +11240,16 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_MultiSpeedCoils_SingleMode) " , !- Fraction of Autosized Design Heating Supply Air Flow Rate", " , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W }", " , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W }", - " 50, !- Maximum Supply Air Temperature{ C }", - " 21, !- Maximum Outdoor Dry - Bulb Temperature for Supplemental Heater Operation{ C }", - " , !- Outdoor Dry - Bulb Temperature Sensor Node Name", - " , !- Ancillary On - Cycle Electric Power", - " , !- Ancillary Off - Cycle Electric Power", - " , !- Design Heat Recovery Water Flow Rate", - " , !- Maximum Temperature for Heat Recovery", - " , !- Heat Recovery Water Inlet Node Name", - " , !- Heat Recovery Water Outlet Node Name", + " , !- No Load Supply Air Flow Rate Control Set To Low Speed ", + " 50, !- Maximum Supply Air Temperature{ C }", + " 21, !- Maximum Outdoor Dry - Bulb Temperature for Supplemental Heater Operation{ C }", + " , !- Outdoor Dry - Bulb Temperature Sensor Node Name", + " , !- Ancillary On - Cycle Electric Power", + " , !- Ancillary Off - Cycle Electric Power", + " , !- Design Heat Recovery Water Flow Rate", + " , !- Maximum Temperature for Heat Recovery", + " , !- Heat Recovery Water Inlet Node Name", + " , !- Heat Recovery Water Outlet Node Name", " UnitarySystemPerformance:Multispeed, !- Design Specification Multispeed Object Type", " MyMultiSpeed; !- Design Specification Multispeed Object Name", " ", @@ -12276,6 +12305,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed", 80, !- Maximum Supply Air Temperature{ C } 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -13379,6 +13409,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed", 80.0, !- Maximum Supply Air Temperature{ C } , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -13524,6 +13555,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed", 80.0, !- Maximum Supply Air Temperature{ C } , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -13646,6 +13678,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed", 80.0, !- Maximum Supply Air Temperature{ C } , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -13770,6 +13803,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed", 80.0, !- Maximum Supply Air Temperature{ C } , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -13864,6 +13898,7 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_FractionOfAutoSizedCoolingValueTes , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 28.0, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -14012,6 +14047,7 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_FlowPerCoolingCapacityTest) , !- No Load Fraction of Autosized Heating Supply Air Flow Rate 0.0000462180155978106, !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 28.0, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -14159,6 +14195,7 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_getUnitarySystemInputDataTest) , !- No Load Fraction of Autosized Heating Supply Air Flow Rate 0.0000462180155978106, !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed 30.0, !- Maximum Supply Air Temperature {C} 20.0, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} System Outdoor Air Node, !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -14371,6 +14408,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed", 80; !- Maximum Supply Air Temperature{ C } Fan:OnOff, @@ -14606,6 +14644,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed", 80; !- Maximum Supply Air Temperature{ C } Fan:OnOff, @@ -15404,6 +15443,7 @@ TEST_F(EnergyPlusFixture, Test_UnitarySystemModel_SubcoolReheatCoil) , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed", 50.00000, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -16529,6 +16569,7 @@ AirLoopHVAC:UnitarySystem, , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation + , !- No Load Supply Air Flow Rate Control Set To Low Speed", Autosize; !- Maximum Supply Air Temperature Fan:OnOff, @@ -17026,6 +17067,7 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultiSpeedDXCoilsNoLoadFlowRateSiz , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed", Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -17333,6 +17375,7 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultiSpeedDXCoilsDirectSolutionTes , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + No, !- No Load Supply Air Flow Rate Control Set To Low Speed", Autosize, !- Maximum Supply Air Temperature {C} 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -18177,6 +18220,7 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_CheckBadInputOutputNodes) , !- No Load Fraction of Autosized Heating Supply Air Flow Rate , !- No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation {m3/s-W} , !- No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation {m3/s-W} + , !- No Load Supply Air Flow Rate Control Set To Low Speed", Autosize, !- Maximum Supply Air Temperature {C} , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -18250,6 +18294,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed", 80.0; !- Maximum Supply Air Temperature{ C } Fan:OnOff, @@ -18408,6 +18453,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed", 80.0, !- Maximum Supply Air Temperature{ C } , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -18612,6 +18658,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed", 80.0, !- Maximum Supply Air Temperature{ C } , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -18805,6 +18852,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed", 80.0, !- Maximum Supply Air Temperature{ C } , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -20341,6 +20389,7 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_LowerSpeedFlowSizingTest) , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed 80.0, !- Maximum Supply Air Temperature{ C } , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -20623,6 +20672,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed", 80.0, !- Maximum Supply Air Temperature{ C } , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} , !- Outdoor Dry-Bulb Temperature Sensor Node Name @@ -21094,6 +21144,7 @@ AirLoopHVAC:UnitarySystem, , !- Fraction of Autosized Design Heating Supply Air Flow Rate , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W } , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W } + , !- No Load Supply Air Flow Rate Control Set To Low Speed", 80; !- Maximum Supply Air Temperature{ C } Fan:OnOff, @@ -22327,6 +22378,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_MultiSpeedFanWSHP_Test) " Autosize, !- Cooling Supply Air Flow Rate {m3/s}", " Autosize, !- Heating Supply Air Flow Rate {m3/s}", " , !- No Load Supply Air Flow Rate {m3/s}", + " , !- No Load Supply Air Flow Rate Control Set To Low Speed ", " 0, !- Cooling Outdoor Air Flow Rate {m3/s}", " 0, !- Heating Outdoor Air Flow Rate {m3/s}", " 0, !- No Load Outdoor Air Flow Rate {m3/s}", @@ -22386,6 +22438,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_MultiSpeedFanWSHP_Test) " Autosize, !- Cooling Supply Air Flow Rate {m3/s}", " Autosize, !- Heating Supply Air Flow Rate {m3/s}", " , !- No Load Supply Air Flow Rate {m3/s}", + " No, !- No Load Supply Air Flow Rate Control Set To Low Speed ", " 0, !- Cooling Outdoor Air Flow Rate {m3/s}", " 0, !- Heating Outdoor Air Flow Rate {m3/s}", " 0, !- No Load Outdoor Air Flow Rate {m3/s}", @@ -23160,12 +23213,8 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_MultiSpeedFanWSHP_Test) " autosize, !- Nominal Supply Air Flow Rate {m3/s}", " 0.7, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless}", " 0.65, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless}", - " 0.750000, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless}", - " 0.700000, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless}", " 0.7, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless}", " 0.65, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless}", - " 0.750000, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless}", - " 0.700000, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless}", " DOAS Outdoor Air Inlet, !- Supply Air Inlet Node Name", " DOAS Heat Recovery Supply Outlet, !- Supply Air Outlet Node Name", " DOAS Relief Air Outlet, !- Exhaust Air Inlet Node Name", @@ -23177,7 +23226,57 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_MultiSpeedFanWSHP_Test) " 1.7, !- Threshold Temperature {C}", " 0.083, !- Initial Defrost Time Fraction {dimensionless}", " 0.012, !- Rate of Defrost Time Fraction Increase {1/K}", - " Yes; !- Economizer Lockout", + " Yes, !- Economizer Lockout", + " SenEffectivenessTable, !- Sensible Effectiveness of Heating Air Flow Curve Name", + " LatEffectivenessTable, !- Latent Effectiveness of Heating Air Flow Curve Name", + " SenEffectivenessTable, !- Sensible Effectiveness of Cooling Air Flow Curve Name", + " LatEffectivenessTable; !- Latent Effectiveness of Cooling Air Flow Curve Name", + + " Table:IndependentVariable,", + " airFlowRatio, !- Name", + " Linear, !- Interpolation Method", + " Linear, !- Extrapolation Method", + " 0.0, !- Minimum Value", + " 10.0, !- Maximum Value", + " , !- Normalization Reference Value", + " Dimensionless, !- Unit Type", + " , !- External File Name", + " , !- External File Column Number", + " , !- External File Starting Row Number", + " 0.75, !- Value 1", + " 1.0; !- Value 2", + + " Table:IndependentVariableList,", + " effectiveness_IndependentVariableList, !- Name", + " airFlowRatio; !- Independent Variable 1 Name", + + " Table:Lookup,", + " SenEffectivenessTable, !- Name", + " effectiveness_IndependentVariableList, !- Independent Variable List Name", + " DivisorOnly, !- Normalization Method", + " 0.7, !- Normalization Divisor", + " 0.0, !- Minimum Output", + " 10.0, !- Maximum Output", + " Dimensionless, !- Output Unit Type", + " , !- External File Name", + " , !- External File Column Number", + " , !- External File Starting Row Number", + " 0.75, !- Output Value 1", + " 0.70; !- Output Value 2", + + " Table:Lookup,", + " LatEffectivenessTable, !- Name", + " effectiveness_IndependentVariableList, !- Independent Variable List Name", + " DivisorOnly, !- Normalization Method", + " 0.65, !- Normalization Divisor", + " 0.0, !- Minimum Output", + " 10.0, !- Maximum Output", + " Dimensionless, !- Output Unit Type", + " , !- External File Name", + " , !- External File Column Number", + " , !- External File Starting Row Number", + " 0.70, !- Output Value 1", + " 0.65; !- Output Value 2", " Controller:OutdoorAir,", " DOAS OA Controller, !- Name", @@ -23684,7 +23783,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_MultiSpeedFanWSHP_Test) latOut); // first speed heating EXPECT_NEAR(thisSys.m_SpeedRatio, 0.0, 0.0001); - EXPECT_NEAR(thisSys.m_CycRatio, 0.81485929, 0.0001); + EXPECT_NEAR(thisSys.m_CycRatio, 0.81485980, 0.0001); EXPECT_EQ(thisSys.m_SpeedNum, 1); EXPECT_NEAR(sensOut, 2000.0, 0.5); @@ -23703,7 +23802,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_MultiSpeedFanWSHP_Test) ZoneEquipment, sensOut, latOut); - EXPECT_NEAR(thisSys.m_SpeedRatio, 0.691837, 0.0001); + EXPECT_NEAR(thisSys.m_SpeedRatio, 0.691942, 0.0001); EXPECT_NEAR(thisSys.m_CycRatio, 1.0, 0.0001); EXPECT_EQ(thisSys.m_SpeedNum, 2); EXPECT_NEAR(sensOut, 3000.0, 2); @@ -23728,7 +23827,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_MultiSpeedFanWSHP_Test) sensOut, latOut); EXPECT_NEAR(thisSys.m_SpeedRatio, 0.0, 0.0001); - EXPECT_NEAR(thisSys.m_CycRatio, 0.801813, 0.0001); + EXPECT_NEAR(thisSys.m_CycRatio, 0.809727, 0.0001); EXPECT_EQ(thisSys.m_SpeedNum, 1); EXPECT_NEAR(sensOut, -800.0, 2); state->dataZoneEnergyDemand->ZoneSysEnergyDemand[0].RemainingOutputRequired = -1500.0; @@ -23747,10 +23846,10 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_MultiSpeedFanWSHP_Test) ZoneEquipment, sensOut, latOut); - EXPECT_NEAR(thisSys.m_SpeedRatio, 0.27708, 0.0001); + EXPECT_NEAR(thisSys.m_SpeedRatio, 0.27929, 0.0001); EXPECT_NEAR(thisSys.m_CycRatio, 1.0, 0.0001); EXPECT_EQ(thisSys.m_SpeedNum, 2); - EXPECT_NEAR(sensOut, -1500.0, 2); + EXPECT_NEAR(sensOut, -1501.3, 2); // Variable speed water coil state->dataZoneEnergyDemand->ZoneSysEnergyDemand[1].RemainingOutputRequired = -100.0; @@ -23774,7 +23873,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_MultiSpeedFanWSHP_Test) latOut); // first speed cooling EXPECT_NEAR(thisSys1.m_SpeedRatio, 0.0, 0.0001); - EXPECT_NEAR(thisSys1.m_CycRatio, 0.507924, 0.0001); + EXPECT_NEAR(thisSys1.m_CycRatio, 0.510465, 0.0001); EXPECT_EQ(thisSys1.m_SpeedNum, 1); EXPECT_NEAR(sensOut, -100.0, 2); @@ -23794,7 +23893,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_MultiSpeedFanWSHP_Test) sensOut, latOut); // Sixth speed cooling - EXPECT_NEAR(thisSys1.m_SpeedRatio, 0.361666, 0.0001); + EXPECT_NEAR(thisSys1.m_SpeedRatio, 0.392999, 0.0001); EXPECT_NEAR(thisSys1.m_CycRatio, 1.0, 0.0001); EXPECT_EQ(thisSys1.m_SpeedNum, 6); EXPECT_NEAR(sensOut, -500.0, 2); @@ -23820,7 +23919,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_MultiSpeedFanWSHP_Test) latOut); // First speed heating EXPECT_NEAR(thisSys1.m_SpeedRatio, 0.0, 0.0001); - EXPECT_NEAR(thisSys1.m_CycRatio, 0.244636, 0.0001); + EXPECT_NEAR(thisSys1.m_CycRatio, 0.245589, 0.0001); EXPECT_EQ(thisSys1.m_SpeedNum, 1); EXPECT_NEAR(sensOut, 100.0, 2); state->dataZoneEnergyDemand->ZoneSysEnergyDemand[1].RemainingOutputRequired = 500.0; @@ -23839,7 +23938,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_MultiSpeedFanWSHP_Test) sensOut, latOut); // Second speed heating - EXPECT_NEAR(thisSys1.m_SpeedRatio, 0.926240, 0.0001); + EXPECT_NEAR(thisSys1.m_SpeedRatio, 0.945581, 0.0001); EXPECT_NEAR(thisSys1.m_CycRatio, 1.0, 0.0001); EXPECT_EQ(thisSys1.m_SpeedNum, 2); EXPECT_NEAR(sensOut, 500.0, 2); diff --git a/tst/EnergyPlus/unit/UtilityRoutines.unit.cc b/tst/EnergyPlus/unit/UtilityRoutines.unit.cc index ec10bd5ca6e..bdd7ed46878 100644 --- a/tst/EnergyPlus/unit/UtilityRoutines.unit.cc +++ b/tst/EnergyPlus/unit/UtilityRoutines.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/VAVDefMinMaxFlow.unit.cc b/tst/EnergyPlus/unit/VAVDefMinMaxFlow.unit.cc index f1fa28db7ba..65fd47dfa48 100644 --- a/tst/EnergyPlus/unit/VAVDefMinMaxFlow.unit.cc +++ b/tst/EnergyPlus/unit/VAVDefMinMaxFlow.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/VariableSpeedCoils.unit.cc b/tst/EnergyPlus/unit/VariableSpeedCoils.unit.cc index 9cf6ee56cfe..0e07b633ea5 100644 --- a/tst/EnergyPlus/unit/VariableSpeedCoils.unit.cc +++ b/tst/EnergyPlus/unit/VariableSpeedCoils.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -163,7 +163,8 @@ TEST_F(EnergyPlusFixture, VariableSpeedCoils_mixedCoilTypesInput) " , !- Outdoor Air Mixer Name", " Autosize, !- Supply Air Flow Rate During Cooling Operation {m3/s}", " Autosize, !- Supply Air Flow Rate During Heating Operation {m3/s}", - " , !- Supply Air Flow Rate When No Cooling or Heating is Needed {m3/s}", + " , !- Supply Air Flow Rate When No Cooling or Heating is Needed {m3/s}", + " , !- No Load Supply Air Flow Rate Control Set To Low Speed", " 0.0, !- Outdoor Air Flow Rate During Cooling Operation {m3/s}", " 0.0, !- Outdoor Air Flow Rate During Heating Operation {m3/s}", " , !- Outdoor Air Flow Rate When No Cooling or Heating is Needed {m3/s}", diff --git a/tst/EnergyPlus/unit/Vector.unit.cc b/tst/EnergyPlus/unit/Vector.unit.cc index 6a5403f19a0..29226d7081a 100644 --- a/tst/EnergyPlus/unit/Vector.unit.cc +++ b/tst/EnergyPlus/unit/Vector.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Vectors.unit.cc b/tst/EnergyPlus/unit/Vectors.unit.cc index ba6624a75fd..3b4bac42684 100644 --- a/tst/EnergyPlus/unit/Vectors.unit.cc +++ b/tst/EnergyPlus/unit/Vectors.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/VentilatedSlab.unit.cc b/tst/EnergyPlus/unit/VentilatedSlab.unit.cc index 3c796849deb..222d8e723e7 100644 --- a/tst/EnergyPlus/unit/VentilatedSlab.unit.cc +++ b/tst/EnergyPlus/unit/VentilatedSlab.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/WaterCoils.unit.cc b/tst/EnergyPlus/unit/WaterCoils.unit.cc index ce6a19b6aab..6929963340d 100644 --- a/tst/EnergyPlus/unit/WaterCoils.unit.cc +++ b/tst/EnergyPlus/unit/WaterCoils.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/WaterManager.unit.cc b/tst/EnergyPlus/unit/WaterManager.unit.cc index 0db1b4c42f0..01b0f356e3f 100644 --- a/tst/EnergyPlus/unit/WaterManager.unit.cc +++ b/tst/EnergyPlus/unit/WaterManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -368,11 +368,11 @@ TEST_F(EnergyPlusFixture, WaterManager_MainsWater_Meter_Test) EXPECT_EQ(state->dataWaterData->WaterStorage.size(), 1u); - EXPECT_EQ(state->dataOutputProcessor->EnergyMeters.size(), 11u); + EXPECT_EQ(state->dataOutputProcessor->meters.size(), 11u); - EXPECT_EQ(state->dataOutputProcessor->EnergyMeters(4).Name, "General:WaterSystems:MainsWater"); - EXPECT_EQ(state->dataOutputProcessor->EnergyMeters(4).ResourceType, "MainsWater"); - EXPECT_EQ(state->dataOutputProcessor->EnergyMeters(4).EndUse, "WaterSystems"); - EXPECT_EQ(state->dataOutputProcessor->EnergyMeters(4).EndUseSub, "General"); - EXPECT_EQ(state->dataOutputProcessor->EnergyMeters(4).Group, ""); + EXPECT_EQ(state->dataOutputProcessor->meters[3]->Name, "General:WaterSystems:MainsWater"); + EXPECT_TRUE(compare_enums(state->dataOutputProcessor->meters[3]->resource, Constant::eResource::MainsWater)); + EXPECT_TRUE(compare_enums(state->dataOutputProcessor->meters[3]->sovEndUseCat, OutputProcessor::SOVEndUseCat::WaterSystem)); + EXPECT_EQ(state->dataOutputProcessor->meters[3]->EndUseSub, "General"); + EXPECT_TRUE(compare_enums(state->dataOutputProcessor->meters[3]->sovGroup, OutputProcessor::SOVGroup::Invalid)); } diff --git a/tst/EnergyPlus/unit/WaterThermalTanks.unit.cc b/tst/EnergyPlus/unit/WaterThermalTanks.unit.cc index dc22d9b5ffd..61a2be41f66 100644 --- a/tst/EnergyPlus/unit/WaterThermalTanks.unit.cc +++ b/tst/EnergyPlus/unit/WaterThermalTanks.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/WaterToAirHeatPump.unit.cc b/tst/EnergyPlus/unit/WaterToAirHeatPump.unit.cc index f7a67b2011c..02116a83346 100644 --- a/tst/EnergyPlus/unit/WaterToAirHeatPump.unit.cc +++ b/tst/EnergyPlus/unit/WaterToAirHeatPump.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/WaterToAirHeatPumpSimple.unit.cc b/tst/EnergyPlus/unit/WaterToAirHeatPumpSimple.unit.cc index a278e0a4729..cc172aea850 100644 --- a/tst/EnergyPlus/unit/WaterToAirHeatPumpSimple.unit.cc +++ b/tst/EnergyPlus/unit/WaterToAirHeatPumpSimple.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/WaterUse.unit.cc b/tst/EnergyPlus/unit/WaterUse.unit.cc index 8900614d22f..5d6ec08564c 100644 --- a/tst/EnergyPlus/unit/WaterUse.unit.cc +++ b/tst/EnergyPlus/unit/WaterUse.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/WeatherManager.unit.cc b/tst/EnergyPlus/unit/WeatherManager.unit.cc index f2033bdbef5..e8d7014ad37 100644 --- a/tst/EnergyPlus/unit/WeatherManager.unit.cc +++ b/tst/EnergyPlus/unit/WeatherManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -1231,19 +1231,19 @@ TEST_F(EnergyPlusFixture, Add_and_InterpolateWeatherInputOutputTest) Weather::GetNextEnvironment(*state, Available, ErrorsFound); // Test get output variables for Total Sky Cover and Opaque Sky Cover - EXPECT_EQ("Site Outdoor Air Drybulb Temperature", state->dataOutputProcessor->RVariableTypes(1).VarNameOnly); - EXPECT_EQ("Environment:Site Outdoor Air Drybulb Temperature", state->dataOutputProcessor->RVariableTypes(1).VarName); - EXPECT_EQ("Site Wind Speed", state->dataOutputProcessor->RVariableTypes(2).VarNameOnly); - EXPECT_EQ("Environment:Site Wind Speed", state->dataOutputProcessor->RVariableTypes(2).VarName); - EXPECT_EQ("Site Total Sky Cover", state->dataOutputProcessor->RVariableTypes(3).VarNameOnly); - EXPECT_EQ("Environment:Site Total Sky Cover", state->dataOutputProcessor->RVariableTypes(3).VarName); - EXPECT_EQ("Site Opaque Sky Cover", state->dataOutputProcessor->RVariableTypes(4).VarNameOnly); - EXPECT_EQ("Environment:Site Opaque Sky Cover", state->dataOutputProcessor->RVariableTypes(4).VarName); - - EXPECT_EQ(7, state->dataOutputProcessor->RVariableTypes(1).ReportID); - EXPECT_EQ(8, state->dataOutputProcessor->RVariableTypes(2).ReportID); - EXPECT_EQ(9, state->dataOutputProcessor->RVariableTypes(3).ReportID); - EXPECT_EQ(10, state->dataOutputProcessor->RVariableTypes(4).ReportID); + EXPECT_EQ("Site Outdoor Air Drybulb Temperature", state->dataOutputProcessor->outVars[0]->name); + EXPECT_EQ("Environment:Site Outdoor Air Drybulb Temperature", state->dataOutputProcessor->outVars[0]->keyColonName); + EXPECT_EQ("Site Wind Speed", state->dataOutputProcessor->outVars[1]->name); + EXPECT_EQ("Environment:Site Wind Speed", state->dataOutputProcessor->outVars[1]->keyColonName); + EXPECT_EQ("Site Total Sky Cover", state->dataOutputProcessor->outVars[2]->name); + EXPECT_EQ("Environment:Site Total Sky Cover", state->dataOutputProcessor->outVars[2]->keyColonName); + EXPECT_EQ("Site Opaque Sky Cover", state->dataOutputProcessor->outVars[3]->name); + EXPECT_EQ("Environment:Site Opaque Sky Cover", state->dataOutputProcessor->outVars[3]->keyColonName); + + EXPECT_EQ(7, state->dataOutputProcessor->outVars[0]->ReportID); + EXPECT_EQ(8, state->dataOutputProcessor->outVars[1]->ReportID); + EXPECT_EQ(9, state->dataOutputProcessor->outVars[2]->ReportID); + EXPECT_EQ(10, state->dataOutputProcessor->outVars[3]->ReportID); state->dataWeather->Envrn = 1; @@ -1457,13 +1457,13 @@ TEST_F(EnergyPlusFixture, Fix_OpaqueSkyCover_Test) Weather::GetNextEnvironment(*state, Available, ErrorsFound); // Test get output variables for Total Sky Cover and Opaque Sky Cover - EXPECT_EQ("Site Total Sky Cover", state->dataOutputProcessor->RVariableTypes(1).VarNameOnly); - EXPECT_EQ("Environment:Site Total Sky Cover", state->dataOutputProcessor->RVariableTypes(1).VarName); - EXPECT_EQ("Site Opaque Sky Cover", state->dataOutputProcessor->RVariableTypes(2).VarNameOnly); - EXPECT_EQ("Environment:Site Opaque Sky Cover", state->dataOutputProcessor->RVariableTypes(2).VarName); + EXPECT_EQ("Site Total Sky Cover", state->dataOutputProcessor->outVars[0]->name); + EXPECT_EQ("Environment:Site Total Sky Cover", state->dataOutputProcessor->outVars[0]->keyColonName); + EXPECT_EQ("Site Opaque Sky Cover", state->dataOutputProcessor->outVars[1]->name); + EXPECT_EQ("Environment:Site Opaque Sky Cover", state->dataOutputProcessor->outVars[1]->keyColonName); - EXPECT_EQ(7, state->dataOutputProcessor->RVariableTypes(1).ReportID); - EXPECT_EQ(8, state->dataOutputProcessor->RVariableTypes(2).ReportID); + EXPECT_EQ(7, state->dataOutputProcessor->outVars[0]->ReportID); + EXPECT_EQ(8, state->dataOutputProcessor->outVars[1]->ReportID); state->dataWeather->Envrn = 1; diff --git a/tst/EnergyPlus/unit/WinCalcEngine.unit.cc b/tst/EnergyPlus/unit/WinCalcEngine.unit.cc index 8b7d6ec1e2a..26739a9b7e7 100644 --- a/tst/EnergyPlus/unit/WinCalcEngine.unit.cc +++ b/tst/EnergyPlus/unit/WinCalcEngine.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/WindTurbine.unit.cc b/tst/EnergyPlus/unit/WindTurbine.unit.cc index 886aa7b2105..16cdd3704c3 100644 --- a/tst/EnergyPlus/unit/WindTurbine.unit.cc +++ b/tst/EnergyPlus/unit/WindTurbine.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/WindowAC.unit.cc b/tst/EnergyPlus/unit/WindowAC.unit.cc index 4a87e362b70..f6e6b14f058 100644 --- a/tst/EnergyPlus/unit/WindowAC.unit.cc +++ b/tst/EnergyPlus/unit/WindowAC.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/WindowEquivalentLayer.unit.cc b/tst/EnergyPlus/unit/WindowEquivalentLayer.unit.cc index 82b1d1129b6..0331b43d2b5 100644 --- a/tst/EnergyPlus/unit/WindowEquivalentLayer.unit.cc +++ b/tst/EnergyPlus/unit/WindowEquivalentLayer.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -558,7 +558,7 @@ TEST_F(EnergyPlusFixture, WindowEquivalentLayer_VBMaximizeBeamSolar) // check the slat angle EXPECT_NEAR(-71.0772, state->dataSurface->SurfWinSlatAngThisTSDeg(SurfNum), 0.0001); // check that for MaximizeSolar slat angle control, the slat angle = -ve vertical profile angle - Dayltg::ProfileAngle(*state, SurfNum, state->dataEnvrn->SOLCOS, DataWindowEquivalentLayer::Orientation::Horizontal, ProfAngVer); + ProfAngVer = Dayltg::ProfileAngle(*state, SurfNum, state->dataEnvrn->SOLCOS, DataWindowEquivalentLayer::Orientation::Horizontal); EXPECT_NEAR(-Constant::RadToDeg * ProfAngVer, state->dataSurface->SurfWinSlatAngThisTSDeg(SurfNum), 0.0001); } @@ -920,7 +920,7 @@ TEST_F(EnergyPlusFixture, WindowEquivalentLayer_VBBlockBeamSolar) // check the VB slat angle EXPECT_NEAR(18.9228, state->dataSurface->SurfWinSlatAngThisTSDeg(SurfNum), 0.0001); // check that for BlockBeamSolar slat angle control, the slat angle = 90 - ProfAngVer - Dayltg::ProfileAngle(*state, SurfNum, state->dataEnvrn->SOLCOS, DataWindowEquivalentLayer::Orientation::Horizontal, ProfAngVer); + ProfAngVer = Dayltg::ProfileAngle(*state, SurfNum, state->dataEnvrn->SOLCOS, DataWindowEquivalentLayer::Orientation::Horizontal); EXPECT_NEAR(90.0 - Constant::RadToDeg * ProfAngVer, state->dataSurface->SurfWinSlatAngThisTSDeg(SurfNum), 0.0001); // get the slat angle from profile angle Real64 SlateAngleBlockBeamSolar = VB_CriticalSlatAngle(Constant::RadToDeg * ProfAngVer); diff --git a/tst/EnergyPlus/unit/WindowLayerEffectiveMultipliers.unit.cc b/tst/EnergyPlus/unit/WindowLayerEffectiveMultipliers.unit.cc index a626a3c56b1..b81e4200e80 100644 --- a/tst/EnergyPlus/unit/WindowLayerEffectiveMultipliers.unit.cc +++ b/tst/EnergyPlus/unit/WindowLayerEffectiveMultipliers.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/WindowManager.unit.cc b/tst/EnergyPlus/unit/WindowManager.unit.cc index 1c6e3962024..361530a887c 100644 --- a/tst/EnergyPlus/unit/WindowManager.unit.cc +++ b/tst/EnergyPlus/unit/WindowManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/WindowManagerExteriorThermal.unit.cc b/tst/EnergyPlus/unit/WindowManagerExteriorThermal.unit.cc index 6c1b007f87c..c07367a826d 100644 --- a/tst/EnergyPlus/unit/WindowManagerExteriorThermal.unit.cc +++ b/tst/EnergyPlus/unit/WindowManagerExteriorThermal.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/XingGroundTemperatureModel.unit.cc b/tst/EnergyPlus/unit/XingGroundTemperatureModel.unit.cc index a22bab03ce8..0f4655d0fb0 100644 --- a/tst/EnergyPlus/unit/XingGroundTemperatureModel.unit.cc +++ b/tst/EnergyPlus/unit/XingGroundTemperatureModel.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ZoneContaminantPredictorCorrector.unit.cc b/tst/EnergyPlus/unit/ZoneContaminantPredictorCorrector.unit.cc index 9aa175ca412..cbb64b3a260 100644 --- a/tst/EnergyPlus/unit/ZoneContaminantPredictorCorrector.unit.cc +++ b/tst/EnergyPlus/unit/ZoneContaminantPredictorCorrector.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ZoneEquipmentManager.unit.cc b/tst/EnergyPlus/unit/ZoneEquipmentManager.unit.cc index 07cc75e3601..3d01e4ac99e 100644 --- a/tst/EnergyPlus/unit/ZoneEquipmentManager.unit.cc +++ b/tst/EnergyPlus/unit/ZoneEquipmentManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ZoneHVACEvaporativeCooler.unit.cc b/tst/EnergyPlus/unit/ZoneHVACEvaporativeCooler.unit.cc index af6bef670c9..d0d7a21d0fa 100644 --- a/tst/EnergyPlus/unit/ZoneHVACEvaporativeCooler.unit.cc +++ b/tst/EnergyPlus/unit/ZoneHVACEvaporativeCooler.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ZonePlenum.unit.cc b/tst/EnergyPlus/unit/ZonePlenum.unit.cc index ceafb6d763f..ddf56d3cf17 100644 --- a/tst/EnergyPlus/unit/ZonePlenum.unit.cc +++ b/tst/EnergyPlus/unit/ZonePlenum.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ZoneTempPredictorCorrector.unit.cc b/tst/EnergyPlus/unit/ZoneTempPredictorCorrector.unit.cc index d67b0a175cb..7ae16c2693d 100644 --- a/tst/EnergyPlus/unit/ZoneTempPredictorCorrector.unit.cc +++ b/tst/EnergyPlus/unit/ZoneTempPredictorCorrector.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other @@ -1682,4 +1682,17 @@ TEST_F(EnergyPlusFixture, DownInterpolate4HistoryValues_Test) EXPECT_NEAR(DSHistoryValue2, 2.0, 0.000001); EXPECT_NEAR(DSHistoryValue3, 2.5, 0.000001); EXPECT_NEAR(DSHistoryValue4, 3.0, 0.000001); + + std::array newValue = {0.0, 0.0, 0.0, 0.0}; + std::array oldValue = {DSHistoryValue1, DSHistoryValue2, DSHistoryValue3, DSHistoryValue4}; + Real64 returnValue = DownInterpolate4HistoryValues(PriorTimeStep, state->dataHVACGlobal->TimeStepSys, oldValue, newValue); + EXPECT_NEAR(returnValue, oldValue[0], 0.000001); // setting up history terms for shortened time step simulation + EXPECT_NEAR(newValue[0], 1.5, 0.000001); // values are interpolated to provide history terms at the new time step + EXPECT_NEAR(newValue[1], 1.75, 0.000001); + EXPECT_NEAR(newValue[2], 2.0, 0.000001); + EXPECT_NEAR(newValue[3], 2.25, 0.000001); + EXPECT_NEAR(oldValue[0], DSHistoryValue1, 0.000001); // values are same as before + EXPECT_NEAR(oldValue[1], DSHistoryValue2, 0.000001); + EXPECT_NEAR(oldValue[2], DSHistoryValue3, 0.000001); + EXPECT_NEAR(oldValue[3], DSHistoryValue4, 0.000001); } diff --git a/tst/EnergyPlus/unit/api/datatransfer.unit.cc b/tst/EnergyPlus/unit/api/datatransfer.unit.cc index 35dfc20574f..eb50d603fa9 100644 --- a/tst/EnergyPlus/unit/api/datatransfer.unit.cc +++ b/tst/EnergyPlus/unit/api/datatransfer.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/main.cc b/tst/EnergyPlus/unit/main.cc index 5fa2cb6ab68..45d9421cf3b 100644 --- a/tst/EnergyPlus/unit/main.cc +++ b/tst/EnergyPlus/unit/main.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/workflows/app_g_postprocess.py b/workflows/app_g_postprocess.py index 8dca1654e0c..4fd8beaf751 100644 --- a/workflows/app_g_postprocess.py +++ b/workflows/app_g_postprocess.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/workflows/calc_soil_surface_temp.py b/workflows/calc_soil_surface_temp.py index eb520f7e1fb..caca7e118b2 100644 --- a/workflows/calc_soil_surface_temp.py +++ b/workflows/calc_soil_surface_temp.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/workflows/coeff_check.py b/workflows/coeff_check.py index 550876bc426..80c0bac7162 100644 --- a/workflows/coeff_check.py +++ b/workflows/coeff_check.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/workflows/coeff_conv.py b/workflows/coeff_conv.py index 0ed8bc87d9d..859c38bf57a 100644 --- a/workflows/coeff_conv.py +++ b/workflows/coeff_conv.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/workflows/convert_input_format.py b/workflows/convert_input_format.py index 2657f500253..e8eeebe6d80 100644 --- a/workflows/convert_input_format.py +++ b/workflows/convert_input_format.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/workflows/energyplus.py b/workflows/energyplus.py index 328ddb94763..7bd0c8af647 100644 --- a/workflows/energyplus.py +++ b/workflows/energyplus.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT- diff --git a/workflows/transition.py b/workflows/transition.py index 01c6f08b5ef..5f4d0ac1373 100644 --- a/workflows/transition.py +++ b/workflows/transition.py @@ -1,4 +1,4 @@ -# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University +# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University # of Illinois, The Regents of the University of California, through Lawrence # Berkeley National Laboratory (subject to receipt of any required approvals # from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT-