eppy outputs in ubuntu
I use this example from eppy
documentation to run a simulation:
iddfile = "/usr/local/EnergyPlus-8-9-0/Energy+.idd"
IDF.setiddname(iddfile)
idfname = "/usr/local/EnergyPlus-8-9-0/ExampleFiles/BasicsFiles/Exercise1A.idf"
epwfile = "/usr/local/EnergyPlus-8-9-0/WeatherData/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw"
idf = IDF(idfname, epwfile)
idf.run()
The document says that I should get an output like:
Processing Data Dictionary
Processing Input File
Initializing Simulation
Reporting Surfaces
Beginning Primary Simulation
Initializing New Environment Parameters
Warming up {1}
Warming up {2}
Warming up {3}
Warming up {4}
Warming up {5}
Warming up {6}
Starting Simulation at 07/21 for CHICAGO_IL_USA COOLING .4% CONDITIONS DB=>MWB
Initializing New Environment Parameters
Warming up {1}
Warming up {2}
Warming up {3}
Warming up {4}
Warming up {5}
Warming up {6}
Starting Simulation at 01/21 for CHICAGO_IL_USA HEATING 99.6% CONDITIONS
Writing final SQL reports
EnergyPlus Run Time=00hr 00min 0.24sec
,however, I get nothing in the python. Only I see these new files in the directory that I run the python script:
eplusout.audit eplusout.bnd eplusout.dxf eplusout.eio eplusout.end eplusout.err eplusout.eso eplusout.mdd eplusout.mtd eplusout.mtr eplusout.rdd eplusout.shd
. These files include a lot different outputs, but the point is that I could not find any standard way of reading these files through eppy. In the documentation, there is a section Reading outputs from E+
which explains how one can use htmlreader to extract the output of E+ simulations. However, there is no html file among the generated files. I can read those files manually through f.read() function in python, but I thought probably I am missing a point and there should a way to get the output of the idf.run()
directly in python.
I would appreciate any help and comment.
Thanks, Afshin
Add the following objects to your IDF file
See if you get the HTML report
@santoshphilip Thanks for the suggestion. I tried
newobject = idf.newidfobject("OutputControl".upper())
, but it gives meValueError: 'OUTPUTCONTROL' is not in list
. It seems that my idd file does not have it. Do you know aidd
which includes it?Additionally, is there any way to get a given output in return of calling
idf.run()
? not by reading some result file,I made my first comment without testing. I'll look to see how to make it work.
Regarding your second comment about getting an output directly after
idf.run()
. You can probably do it by writing your own functionif your code is useful, I'll add it to
eppy
I added the objects using:
idf.idfobjects['OUTPUTCONTROL:TABLE:STYLE'] = 'HTML; !- Column Separator'
idf.idfobjects['OUTPUT:TABLE:SUMMARYREPORTS']= 'AllSummary; !- Report 1 Name'
, but it complains aboutCalledProcessError: Command '[u'/usr/local/EnergyPlus-8-9-0/energyplus', u'--output-directory', u'/home/afshin', u'--weather', '/usr/local/EnergyPlus-8-9-0/WeatherData/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw', u'/home/afshin/in.idf']' returned non-zero exit status 1
. I am trying to figure out the problem with the route.About the function, I am kind of confused. let me re-paraphrase it, does E+ write the outputs in the html file or whatever format, or you get them on the fly and write them on those file? If it is the latter case, why not just returning them in a dictionary and make it available in the python level?
I am agreeing with you. I can see that it would be a useful functionality. I am suggesting that you write a function that does what you are describing. To clarify:
unmethours is not letting me write more. Open an issue in eppy issues