NREL / EnergyPlus

EnergyPlus™ is a whole building energy simulation program that engineers, architects, and researchers use to model both energy consumption and water use in buildings.

Home Page:https://energyplus.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues when running E+residential building prototype model in python script.

XiongbaXu opened this issue · comments

Issue overview

I used the Eppy library to run simulations in Python. However, I encountered some problems. When I use Eppy to simulate with the building type 'US+SF+CZ5A+elecres+unheatedbsmt+IECC_2021' (https://www.energycodes.gov/prototype-building-models), it works fine. But when I try to simulate with building types 'US+SF+CZ5A+elecres+heatedbsmt+IECC_2021' and 'US+SF+CZ5A+elecres+slab+IECC_2021', I get errors.
"EnergyPlusRunError:

************* Beginning Zone Sizing Calculations
** Severe ** BuildingSurface:Detailed="BGWALL_LOWER_LDF", invalid Outside Boundary Condition Object="SURFPROPOTHSDCOEFBASEMENTAVGWALL".
** ~~~ ** no OtherSideCoefficients of that name.
** Severe ** BuildingSurface:Detailed="BGWALL_LOWER_SDR", invalid Outside Boundary Condition Object="SURFPROPOTHSDCOEFBASEMENTAVGWALL".
** ~~~ ** no OtherSideCoefficients of that name.
** Severe ** BuildingSurface:Detailed="BGWALL_LOWER_LDB", invalid Outside Boundary Condition Object="SURFPROPOTHSDCOEFBASEMENTAVGWALL".
** ~~~ ** no OtherSideCoefficients of that name.
** Severe ** BuildingSurface:Detailed="BGWALL_LOWER_SDL", invalid Outside Boundary Condition Object="SURFPROPOTHSDCOEFBASEMENTAVGWALL".
** ~~~ ** no OtherSideCoefficients of that name.
** Severe ** BuildingSurface:Detailed="EXTFLOOR_UNIT1", invalid Outside Boundary Condition Object="SURFPROPOTHSDCOEFBASEMENTAVGFLOOR".
** ~~~ ** no OtherSideCoefficients of that name.
** Fatal ** GetSurfaceData: Errors discovered, program terminates.
...Summary of Errors that led to program termination:
..... Reference severe error count=5
..... Last severe error=BuildingSurface:Detailed="EXTFLOOR_UNIT1", invalid Outside Boundary Condition Object="SURFPROPOTHSDCOEFBASEMENTAVGFLOOR".
************* Warning: Node connection errors not checked - most system input has not been read (see previous warning).
************* Fatal error -- final processing. Program exited before simulations began. See previous error messages.
************* EnergyPlus Warmup Error Summary. During Warmup: 0 Warning; 0 Severe Errors.
************* EnergyPlus Sizing Error Summary. During Sizing: 0 Warning; 5 Severe Errors.
************* EnergyPlus Terminated--Fatal Error Detected. 0 Warning; 5 Severe Errors; Elapsed Time=00hr 00min 0.08sec"

Here is my python script

import os
from eppy.modeleditor import IDF

def make_eplaunch_options(idf):
    """Make options for run, so that it runs like EPLaunch on Windows"""
    idfversion = idf.idfobjects['version'][0].Version_Identifier.split('.')
    idfversion.extend([0] * (3 - len(idfversion)))
    idfversionstr = '-'.join([str(item) for item in idfversion])
    fname = idf.idfname
    options = {
        'output_prefix': os.path.basename(fname).split('.')[0],
        'output_suffix': 'C',
        'output_directory': os.path.dirname(fname),
        'readvars': True,
        'expandobjects': True
    }
    return options

def main():
    iddfile = r"C:\EnergyPlusV24-1-0\Energy+.idd" 
    IDF.setiddname(iddfile)
    
    epwfile = r"C:\Users\Desktop\test1\ep_epw.epw"  

    idfname = r"C:\Users\Desktop\test1\US+SF+CZ5A+elecres+heatedbsmt+IECC_2021.idf"  
    idf = IDF(idfname, epwfile)
    theoptions = make_eplaunch_options(idf)
    idf.run(**theoptions)

if __name__ == '__main__':
    main()

Details

Some additional details for this issue (if relevant):

  • windows 10
  • EenergyPlus 24-1-0, conda(Python 3.11.4)

Checklist

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • Defect file added (list location of defect file here)
  • Ticket added to EnergyPlus Defect Complexity (Github Project)
  • Pull request created (the pull request will have additional tasks related to reviewing changes that fix this defect)

This issue is quite confusing, as it's got nothing to do with python.

You downloaded

https://www.energycodes.gov/sites/default/files/2021-05/resstd_CZ5A_IECC_2021.zip

and the weather file: https://www.energycodes.gov/sites/default/files/2021-05/USA_NY_Buffalo.Niagara.Intl_.AP_.725280_TMY3.epw

The files in resstd_CZ5A_IECC_2021.zip are at version 9.5. So you must use IDFVersionUpdater to transition them to 24.1.0 prior to running them with 24.1.0.

And it works just fine.

Here is the IDF in question transitioned to 24.1.0

US+SF+CZ5A+elecres+unheatedbsmt+IECC_2021.2410.idf.txt