runsim function

eprun.runsim(input_filepath, epw_filepath, ep_dir, sim_dir='.', annual=False, convert=False, design_day=False, epmacro=False, expand_objects=False, output_prefix='eplus', output_suffix='L', readvars=False, print_call=False, **kwargs)[source]

Runs an EnergyPlus simulation and returns the results.

Parameters
  • input_filepath (str) – The filepath of the input file. This can be either an .idf file or an .epJSON file. This can be relative or absolute.

  • epw_filepath (str) – The filepath of the climate .epw file. This can be relative or absolute.

  • ep_dir (str) – The EnergyPlus directory where ‘energyplus.exe’ is installed.

  • sim_dir (str) – The directory to hold the simulation files. This can be relative or absolute. Default is ‘.’ which is the current directory.

  • annual (bool) – If True, the ‘–annual’ argument is included in the call to EnergyPlus. This is the argument for ‘Forces annual simulation’. Default is False.

  • convert (bool) – If True, the ‘–convert’ argument is included in the call to EnergyPlus. This is the argument for ‘Output IDF->epJSON or epJSON->IDF, dependent on input file type’. Default is False.

  • design_day (bool) – If True, the ‘–design-day’ argument is included in the call to EnergyPlus. This is the argument for ‘Forces design-day-only simulation’. Default is False.

  • epmacro (bool) – If True, the ‘–epmacro’ argument is included in the call to EnergyPlus. This is the argument for ‘Run EPMacro prior to simulation’. Default is False.

  • expand_objects (bool) – If True, the ‘–expandobjects’ argument is included in the call to EnergyPlus. This is the argument for ‘Run ExpandObjects prior to simulation’. Default is False.

  • output_prefix (str) – Prefic for output file names. Default is ‘eplus’.

  • output_suffix (str) – Suffix style for output names. Should be one of ‘L’ (legacy), ‘C’ (capital) or ‘D’ (dash). Default is ‘L’

  • readvars (bool) – If True, the ‘–readvars’ argument is included in the call to EnergyPlus. This is the argument for ‘Run ReadVarsESO after simulation’. Default is False.

  • print_call (bool) – If True then the call string is printed. Default is False.

Returns

A EPResult object which contains the returncode, stdout and a dictionary of the results files.

Return type

EPResult

Code Example

>>> from eprun import eprun
>>> epresult=eprun(ep_dir='C:\EnergyPlusV9-6-0',
>>>                input_filepath='1ZoneUncontrolled.idf',
>>>                epw_filepath='USA_CO_Golden-NREL.724666_TMY3.epw',
>>>                sim_dir='simulation_files')
>>> print(type(epresult))
<class 'eprun.epresult.EPResult'>
>>> print(list(epresult.files.keys()))
['audit', 'bnd', 'dxf', 'eio', 'end', 'err', 'eso', 'mdd', 'mtd', 
 'mtr', 'rdd', 'shd', 'csv', 'htm', 'tab', 'txt', 'xml']