Project Description

GeomEppy is a scripting language for use with Eppy, which in turn is ascripting language for EnergyPlus IDF files and output files.

It primarily adds functions to do with IDF geometry, including zones,surfaces, constructions, etc.

Installation------------

GeomEppy requires Numpy, Shapely, and optionally Matplotlib.

`pip install geomeppy`

Full docs---------

Complete documentation is hosted at `Read the Docs <http://geomeppy.readthedocs.io/en/latest/?>`_. This covers the internals of geomeppy,and may be subject to change. Features documented in the API section below can be relied upon to remain stable.

API---

The API for GeomEppy depends on replacing an Eppy IDF object with aGeomEppy IDF object. To use this, you will need to import IDF fromGeomEppy rather than directly from Eppy.

In your scripts, use ``from geomeppy import IDF`` instead of``from eppy.modeleditor import IDF``. All other features of the currentrelease version of Eppy will still be available.

GeomEppy then provides a simple Python API for actions on the IDFobject:

``IDF.set_wwr() # set a WWR of 20% (the default) for all external walls``

``IDF.set_wwr(wwr=0.25) # set a WWR of 25% for all external walls``

``IDF.set_wwr(wwr_map={90: 0}) # set no windows on all external walls with azimuth of 90, and WWR of 20% on other walls``

``IDF.set_wwr(wwr=0, wwr_map={90: 0.3}) # set a WWR of 30% for all external walls with azimuth of 90, and no windows on other walls``

If ``wwr_map`` is passed, it overrides any value passed to ``wwr``, includingthe default of 0.2. However it only overrides it on walls which have anazimuth in the ``wwr_map``. Any omitted walls' WWR will be set to the value in``wwr``. If you want to specify no windows for walls which are not specified in``wwr_map``, you must also set ``wwr=None``.

- Setting constructions

``IDF.set_default_constructions() # set a name for each construction in the model``

- Viewing a simple 3D representation of an IDF

``IDF.view_model() # shows a zoomable, rotatable transparent model``

- Exporting a 3D OBJ file model

``IDF.to_obj('mymodel.obj')``

You can view the exported model `here <https://3dviewer.net/>`_. Just drag the .obj fileand .mtl file into the browser window.

|OBJ viewer|

- Get all surfaces in a model

``IDF.getsurfaces()``

- Get all surfaces in a model of a given type

``IDF.getsurfaces('wall') # only works if the surface type has been set in the IDF``

- Get all subsurfaces in a model

``IDF.getsubsurfaces()``

- Get all subsurfaces in a model of a given type

``IDF.getsubsurfaces('window') # only works if the surface type has been set in the IDF``

- Automatic geometry building

``IDF.add_block(...) # automatically adds a building block to the IDF``

This method requires some explanation. The parameters required are:

::

name : str A name for the block. coordinates : list A list of (x, y) tuples representing the building outline. height : float The height of the block roof above ground level. num_stories : int, optional The total number of stories including basement stories. Default : 1. below_ground_stories : int, optional The number of stories below ground. Default : 0. below_ground_storey_height : float, optional The height of each basement storey. Default : 2.5. zoning : str, optional The rules to use in creating zones. Currently the only option is `by_storey` which sets each storey in the block as a Zone.

The block generated will have boundary conditions set correctly and anyintersections with adjacent blocks will be handled automatically. Thesurface type will be set to ``wall``, ``floor``, ``ceiling`` or ``roof``for each surface. Constructions are not set automatically so these willneed to be added afterwards in the normal way for Eppy.

Other functions---------------

GeomEppy also provides some additional functions such as``surface.setcoords(...)``