Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

Ok, I may have come to a solution:

import os
from eppy.modeleditor import IDF
import sys
import math
from geomeppy import IDF

def make_adiabatic(c):
        print('converting %s into adiabatic' %c)
        c.Outside_Boundary_Condition = 'Adiabatic'
        c.Sun_Exposure = 'NoSun'
        c.Wind_Exposure = 'NoWind'
        print('done\n')


# path to E+ idd file (required by eppy)
iddfile = os.path.join(sys.argv[4], 'Energy+.idd')
IDF.setiddname(iddfile)

# path to energyplus input file within each simulated folder
idf = os.path.join(sys.argv[2], 'in.idf')

# assigns reads parameter from jeplus
jeplus_floor = str(sys.argv[3])

# read idf file to eppy
idf = IDF(idf)

# Convert horizontal surfaces to adiabatic depending on the value of the jeplus parameter 
floors = idf_New.getsurfaces('Floor')
ceilings = idf_New.getsurfaces('Ceiling')
roofs = idf_New.getsurfaces('Roof')

if jeplus_floor == 'Ground_Floor':
    adiab_ceilings = make_adiabatic((c) for c in ceilings)
    adiab_roofs = make_adiabatic((c) for c in roofs)
elif jeplus_floor == 'Top_Floor':
    adiab_floors = make_adiabatic((c) for c in floors)
else:
    adiab_floors = make_adiabatic((c) for c in floors)
    adiab_ceilings = make_adiabatic((c) for c in ceilings)
    adiab_roofs = make_adiabatic((c) for c in roofs)

I look forward to receive your feedback on this!