eppy_funcs

Functions to interact with eppy and geomeppy. Some functions also support equivalent operations for json buildings.

eppy_funcs.check_direct(direction: str, xs, ys, values) → bool[source]

check if the window’s direction is the same as the desired direction

Parameters:
  • direction – the direction to compare with
  • values – the dictionary of max and min range of all windows
Returns:

eppy_funcs.convert_format(s: str, place, mode)[source]

Converts energyPlus names to their Eppy equivalents

Parameters:
  • s – name to convert
  • place – the type of place that is being used ‘field’ or ‘class’
  • mode – whether to convert to idf or json formatting
Returns:

the converted name

eppy_funcs.convert_to_json(idf: besos.IDF_class.IDF)[source]

convert idf file to json the func will create a json file that is converted from the idf can use –convert-only when energyplus version 9.3 is in besos

eppy_funcs.generate_batch(account: str, time: str, email: str, task_id: int, cpu_per_task=1, mem=1000)[source]

function to write a bash file for running jupyter on computer canada

Parameters:
  • account – account used
  • time – time for bash job
  • email – user email
  • task_id – task id to use
  • cpu_per_task – number of cpu used to run one task
  • mem – memory needs in total
eppy_funcs.generate_dir(dest_folder=None)[source]

func use to generate a directory for besos outputs

eppy_funcs.get_building(building=None, data_dict=None, output_directory=None, mode=None, version=None, ep_path=None)[source]

Get building from directory

eppy_funcs.get_coordinates(window, building, mode)[source]

Get coordinates of the xs, ys, and zs

eppy_funcs.get_idf(idf_file: str = '/home/docs/checkouts/readthedocs.org/user_builds/besos/envs/latest/lib/python3.7/site-packages/besos/data/example_idf.idf', idd_file: str = None, version=None, output_directory=None, ep_path=None) → besos.IDF_class.IDF[source]

Uses eppy to read an idf file and generate the corresponding idf object

eppy_funcs.get_idfobject_from_name(idf: besos.IDF_class.IDF, name: str) → Optional[eppy.bunch_subclass.EpBunch][source]

Gets an object from the passed idf where it’s name value is equal to the passed string, if none are found then this method returns None

Parameters:
  • idf – The idf to find the object from.
  • name – The string to find that is equal to the name field of the object.
Returns:

the object from the idf with the matching name.

eppy_funcs.get_mode(building) → str[source]

Determines whether building uses an idf or json format

Parameters:building – a building, either an IDF or a dictionary of json data
Returns:“idf” or “json”
eppy_funcs.get_window_range(windows, building, mode)[source]

get max and min coordinates range of windows

eppy_funcs.merge_building(building_from, building_to)[source]

Copy objects in building_from to building_to.

eppy_funcs.one_window(building)[source]

Removes some windows so that each wall has no more than one

eppy_funcs.read_sql(path: str, cmds: list, direction=None)[source]

Open sql file with connect

Parameters:
  • path – absolute directory to the sql file.
  • cmds – list of commands need to be processed, ‘all’ will process all cmds. All commands available : ‘all’, ‘wall area’, ‘ceiling height’, ‘floor area’, ‘volume’
  • direction – a list of directions of walls when process wall area cmd, None means taking both area and gross area of walls in all directions and the total areas of all walls.
Returns:

a dictionary of all data desired.

eppy_funcs.set_daylight_control(building, zone_name, distance, illuminance=500)[source]

Set daylighting control to the biggest window of the zone.

Parameters:
  • building – an idf object
  • zone_name – name of the zone
  • distance – the distance from the reference point to the window
  • illuminance – illuminance setpoint at reference point
eppy_funcs.set_vertex(idfObj, vertexNum: int, x: float = 0, y: float = 0, z: float = 0)[source]

Sets a single vertex of the passed idfObject (idfObj) to the specified x,y and z coordinates.

eppy_funcs.set_wwr_single(window, wwr: float, axs, zs, axis)[source]

Set the single window’s wwr

Parameters:
  • window – the window to be modified
  • wwr – the window to wall ratio of the result
  • axs – the axis this window is aligned with
  • zs – the z coordinate of the window
eppy_funcs.view_building(building)[source]

Displays a matplotlib 3d plot of the building

eppy_funcs.write_csv(path: str, dest: str, shape=False)[source]

A handler to call read_sql() function and get data, then put the data into exl file

Parameters:
  • path – path to read sql file
  • dest – destination to put data
  • shape – for special use, only works with right file name
eppy_funcs.wwr_all(building, wwr: float, direction=None) → None[source]

Sets the wwr for all walls that have a window. Will malfunction if there are multiple windows on one wall

eppy_funcs.wwr_single(window, wwr: float, building, mode, direction=None, values=None)[source]

Process a single window to have the window to wall ratio specified by wwr