santoshphilip / eppy

scripting language for E+, Energyplus
MIT License
151 stars 67 forks source link

ERROR Last severe error=HVACTemplate:* objects found. #412

Closed bbrangeo closed 1 year ago

bbrangeo commented 1 year ago

Hi

I run eppy;

import os
import sys

from eppy import modeleditor
from eppy.modeleditor import IDF

sys.path.append("/Applications/EnergyPlus-22-1-0/")

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 = {
        'ep_version': idfversionstr,  # runIDFs needs the version number
        # idf.run does not need the above arg
        # you can leave it there and it will be fine :-)
        '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 = "/Applications/EnergyPlus-22-1-0/Energy+.idd"
    print(iddfile)
    try:
        IDF.setiddname(iddfile)
    except modeleditor.IDDAlreadySetError as e:
        raise e

    epwfile = "." + os.sep + "MODELS" + os.sep + "1___MAC_ITI_LDV_DVECL_SHUON_MECHAR_H3" + os.sep + "H3_Th-D_2021.epw"
    idfname1 = "." + os.sep + "MODELS" + os.sep + "HVACTemplate-5ZoneBaseboardHeat.idf"

    idf = IDF(idfname1, epwfile)
    idf.run(
        output_directory="out",
        annual=False,
        design_day=True,
        idd=idf.iddname,
        epmacro=False,
        expandobjects=True,
        readvars=False,
        output_prefix=None,
        output_suffix=None,
        version=False,
        verbose="v",
        ep_version=None, )

if __name__ == '__main__':
    main()`

/Applications/EnergyPlus-22-1-0/energyplus --weather /Users/Boris/Documents/EPPY/MODELS/1___MAC_ITI_LDV_DVECL_SHUON_MECHAR_H3/H3_Th-D_2021.epw --output-directory /Users/Boris/Documents/EPPY/out --design-day --idd /Applications/EnergyPlus-22-1-0/Energy+.idd --expandobjects /Users/Boris/Documents/EPPY/MODELS/HVACTemplate-5ZoneBaseboardHeat_7e1b31.idf

But I have an Error : Program Version,EnergyPlus, Version 22.1.0-ed759b17ee, YMD=2022.12.20 11:03, ** Severe ** HVACTemplate:* objects found. These objects are not supported directly by EnergyPlus. ** ~~~ ** You must run the ExpandObjects program on this input. ** Fatal ** Errors occurred on processing input file. Preceding condition(s) cause termination. ...Summary of Errors that led to program termination: ..... Reference severe error count=1 ..... Last severe error=HVACTemplate:* objects found. These objects are not supported directly by EnergyPlus. ************* 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; 0 Severe Errors. ************* EnergyPlus Terminated--Fatal Error Detected. 0 Warning; 1 Severe Errors; Elapsed Time=00hr 00min 0.03sec can someone help me please .

Boris

santoshphilip commented 1 year ago

Your code looks good. Not sure why it is failing let me take a look.

santoshphilip commented 1 year ago

closed by mistake. reopened now.

santoshphilip commented 1 year ago

I tested it with the file HVACTemplate-5ZonePTAC-DOAS.idf from the example folder I tested it with different version of Energyplus

Results are::

fname = "./ver9_2/HVACTemplate-5ZonePTAC-DOAS.idf" - runs fine
fname = "./ver9_6/HVACTemplate-5ZonePTAC-DOAS.idf" - runs fine
fname = "./ver22_1/HVACTemplate-5ZonePTAC-DOAS.idf" - does NOT run

This may be a problem with version 22.1 If that is so, an issue will have to be opened at the Energyplus issue tracker. I would like to have it tested on a windows machine with EP Launch before opening an issue.

@bbrangeo , If you can get access to a windows machine, can you test it with the EPLaunch (run it without eppy) ?

santoshphilip commented 1 year ago

OK I tested it on a windows machine using EPLaunch. It works fine

hmmm ... now what ?

santoshphilip commented 1 year ago

works fine using EP-Launch-Lite on the Mac. Have the command line arguments or options changed ??

santoshphilip commented 1 year ago

On a Windows machine the following works

C:\EnergyPlusV22-1-0\energyplus.exe -w ..\weather\USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw -x HVACTemplate-5ZonePTAC-DOAS.idf
santoshphilip commented 1 year ago

On a Windows machine the following works

C:\EnergyPlusV22-1-0\energyplus.exe -w ..\weather\USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw -x HVACTemplate-5ZonePTAC-DOAS.idf

on a Mac the following does NOT work

/Applications/EnergyPlus-22-1-0/energyplus-22.1.0 -w ../weather/USA_CO_Denver-Stapleton/USA_CO_Denver-Stapleton.724690_TMY.epw -x HVACTemplate-5ZonePTAC-DOAS.idf

EP-Launch-Lite on the Mac works fine with ExpandObjects

Some questions arising from these experiments:

Next step may be to open an issue on the Energyplus issue tracker

bbrangeo commented 1 year ago

Hi, I switched to windows. On a Windows machine, the command line works

santoshphilip commented 1 year ago

I tested with Energyplus 22.2

The command line works on it.

/Applications/EnergyPlus-22-2-0/energyplus-22.2.0 -w ../weather/USA_CO_Denver-Stapleton/USA_CO_Denver-Stapleton.724690_TMY.epw -x HVACTemplate-5ZonePTAC-DOAS.idf

@bbrangeo , can you test your code with E+ 22.2 on you non-windows machine. I think it should work

santoshphilip commented 1 year ago

I am assuming that this issue is resolved. Energyplus version 22.1 has a problem. Version 22.2 works fine