topologicpy.EnergyModel module
- class topologicpy.EnergyModel.EnergyModel
Bases:
object@staticmethod def ByOSMFile(file):
“”” Creates an EnergyModel from the input OSM file path.
- Parameters
- pathstring
The path to the input .OSM file.
- Returns
- openstudio.openstudiomodelcore.Model
The OSM model.
- “””
- if not file:
print(“EnergyModel.ByOSMFile - Error: The input path is not valid. Returning None.”) return None
- osModel = file.read()
- if osModel.isNull():
print(“EnergyModel.ByOSMFile - Error: The openstudio model is null. Returning None.”) return None
- else:
osModel = osModel.get()
- return osModel
Methods
ByOSMPath(path)Creates an EnergyModel from the input OSM file path.
ByTopology(building[, shadingSurfaces, ...])Creates an EnergyModel from the input topology and parameters.
ColumnNames(model, reportName, tableName)Returns the list of column names given an OSM model, report name, and table name.
DefaultConstructionSets(model)Returns the default construction sets in the input OSM model.
DefaultScheduleSets(model)Returns the default schedule sets found in the input OSM model.
ExportToGBXML(model, path[, overwrite])Exports the input OSM model to a GBXML file.
ExportToOSM(model, path[, overwrite])Exports the input OSM model to an OSM file.
GBXMLString(model)Returns the GBXML string of the input OSM model.
Query(model[, reportName, reportForString, ...])Queries the model for values.
ReportNames(model)Returns the report names found in the input OSM model.
RowNames(model, reportName, tableName)Returns the list of row names given an OSM model, report name, and table name.
Run(model[, weatherFilePath, osBinaryPath, ...])Runs an energy simulation.
SpaceColors(model)Return the space colors found in the input OSM model.
SpaceDictionaries(model)Return the space dictionaries found in the input OSM model.
SpaceTypeNames(model)Return the space type names found in the input OSM model.
SpaceTypes(model)Return the space types found in the input OSM model.
SqlFile(model)Returns the SQL file found in the input OSM model.
TableNames(model, reportName)Returns the table names found in the input OSM model and report name.
Topologies(model[, tolerance])Returns the topologies found in the input OSM model.
Units(model, reportName, tableName, columnName)Returns the units string found in the input OSM model, report name, table name, and column name.
Version([check, silent])Returns the OpenStudio SDK version number.
- static ByOSMPath(path: str)
Creates an EnergyModel from the input OSM file path.
- static ByTopology(building, shadingSurfaces=None, osModelPath: str = None, weatherFilePath: str = None, designDayFilePath: str = None, floorLevels: list = None, buildingName: str = 'TopologicBuilding', buildingType: str = 'Commercial', northAxis: float = 0.0, glazingRatio: float = 0.0, coolingTemp: float = 25.0, heatingTemp: float = 20.0, defaultSpaceType: str = '189.1-2009 - Office - WholeBuilding - Lg Office - CZ4-8', spaceNameKey: str = 'TOPOLOGIC_name', spaceTypeKey: str = 'TOPOLOGIC_type', mantissa: int = 6, tolerance: float = 0.0001)
Creates an EnergyModel from the input topology and parameters.
- Parameters
- buildingtopologic_core.CellComplex or topologic_core.Cell
The input building topology.
- shadingSurfacestopologic_core.Topology , optional
The input topology for shading surfaces. Default is None.
- osModelPathstr , optional
The path to the template OSM file. Default is “./assets/EnergyModel/OSMTemplate-OfficeBuilding-3.10.0.osm”.
- weatherFilePathstr , optional
The input energy plus weather (epw) file. Default is “./assets/EnergyModel/GBR_London.Gatwick.037760_IWEC.epw”.
- designDayFilePathstr , optional
The input design day (ddy) file path. Default is “./assets/EnergyModel/GBR_London.Gatwick.037760_IWEC.ddy”.
- floorLevelslist , optional
The list of floor level Z heights including the lowest most and the highest most levels. If set to None, this method will attempt to find the floor levels from the horizontal faces of the input topology.
- buildingNamestr , optional
The desired name of the building. Default is “TopologicBuilding”.
- buildingTypestr , optional
The building type. Default is “Commercial”.
- defaultSpaceTypestr , optional
The default space type to apply to spaces that do not have a type assigned in their dictionary.
- northAxisfloat , optional
The counter-clockwise angle in degrees from the positive Y-axis representing the direction of the north axis. Default is 0.0.
- glazingRatiofloat , optional
The glazing ratio (ratio of windows to wall) to use for exterior vertical walls that do not have apertures. If you do not wish to use a glazing ratio, set it to 0. Default is 0.
- coolingTempfloat , optional
The desired temperature in degrees at which the cooling system should activate. Default is 25.0.
- heatingTempfloat , optional
The desired temperature in degrees at which the heating system should activate. Default is 20.0.
- spaceNameKeystr , optional
The dictionary key to use to find the space name value. Default is “TOPOLOGIC_name”.
- spaceTypeKeystr , optional
The dictionary key to use to find the space type value. Default is “TOPOLOGIC_type”.
- mantissaint , optional
The number of decimal places to round the result to. Default is 6.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- Returns
- openstudio.openstudiomodelcore.Model
The created OSM model.
- static ColumnNames(model, reportName, tableName)
Returns the list of column names given an OSM model, report name, and table name.
- static DefaultConstructionSets(model)
Returns the default construction sets in the input OSM model.
- static DefaultScheduleSets(model)
Returns the default schedule sets found in the input OSM model.
- static ExportToGBXML(model, path, overwrite=False)
Exports the input OSM model to a GBXML file.
- static ExportToOSM(model, path, overwrite=False)
Exports the input OSM model to an OSM file.
- static GBXMLString(model)
Returns the GBXML string of the input OSM model.
- static Query(model, reportName: str = 'HVACSizingSummary', reportForString: str = 'Entire Facility', tableName: str = 'Zone Sensible Cooling', columnName: str = 'Calculated Design Load', rowNames: list = None, units: str = 'W')
Queries the model for values.
- static ReportNames(model)
Returns the report names found in the input OSM model.
- static RowNames(model, reportName, tableName)
Returns the list of row names given an OSM model, report name, and table name.
- static Run(model, weatherFilePath: str = None, osBinaryPath: str = None, outputFolder: str = None, removeFiles: bool = False)
Runs an energy simulation.
- static SpaceColors(model)
Return the space colors found in the input OSM model.
- static SpaceDictionaries(model)
Return the space dictionaries found in the input OSM model.
- static SpaceTypeNames(model)
Return the space type names found in the input OSM model.
- static SpaceTypes(model)
Return the space types found in the input OSM model.
- static SqlFile(model)
Returns the SQL file found in the input OSM model.
- static TableNames(model, reportName)
Returns the table names found in the input OSM model and report name.
- static Topologies(model, tolerance=0.0001)
Returns the topologies found in the input OSM model.
- static Units(model, reportName, tableName, columnName)
Returns the units string found in the input OSM model, report name, table name, and column name.
- static Version(check: bool = True, silent: bool = False)
Returns the OpenStudio SDK version number.