feature/upgrade_ep_to_23.2.0 #59

Merged
g_gutierrez merged 10 commits from feature/upgrade_ep_to_23.2.0 into main 2024-01-22 08:34:48 -05:00
6 changed files with 103917 additions and 19 deletions

View File

@ -54,6 +54,14 @@ class Idf:
_SIZING_PERIODS = 'SIZINGPERIOD:DESIGNDAY'
_LOCATION = 'SITE:LOCATION'
_SIMPLE = 'Simple'
_EQUIPMENT_CONNECTIONS = 'ZONEHVAC:EQUIPMENTCONNECTIONS'
_NODE_LIST = 'NODELIST'
_BASEBOARD = 'ZONEHVAC:BASEBOARD:CONVECTIVE:ELECTRIC'
_AIR_TERMINAL_NO_REHEAT = 'AIRTERMINAL:SINGLEDUCT:CONSTANTVOLUME:NOREHEAT'
_AIR_DISTRIBUTION = 'ZONEHVAC:AIRDISTRIBUTIONUNIT'
_EQUIPMENT_LIST = 'ZONEHVAC:EQUIPMENTLIST'
_SIZING_ZONE = 'SIZING:ZONE'
_DESIGN_SPECIFICATION_OUTDOOR_AIR = 'DESIGNSPECIFICATION:OUTDOORAIR'
idf_surfaces = {
cte.WALL: 'wall',
@ -117,7 +125,8 @@ class Idf:
if levels_of_detail.construction is None:
raise AttributeError('Level of detail of construction not assigned')
if levels_of_detail.construction < 2:
raise AttributeError(f'Level of detail of construction = {levels_of_detail.construction}. Required minimum level 2')
raise AttributeError(
f'Level of detail of construction = {levels_of_detail.construction}. Required minimum level 2')
if levels_of_detail.usage is None:
raise AttributeError('Level of detail of usage not assigned')
if levels_of_detail.usage < 2:
@ -381,16 +390,80 @@ class Idf:
)
def _add_heating_system(self, thermal_zone, zone_name):
for air_system in self._idf.idfobjects[self._IDEAL_LOAD_AIR_SYSTEM]:
for air_system in self._idf.idfobjects[self._EQUIPMENT_CONNECTIONS]:
if air_system.Zone_Name == zone_name:
return
thermostat = self._add_thermostat(thermal_zone)
self._idf.newidfobject(self._IDEAL_LOAD_AIR_SYSTEM,
self._idf.newidfobject(self._EQUIPMENT_CONNECTIONS,
Zone_Name=zone_name,
System_Availability_Schedule_Name=f'HVAC AVAIL SCHEDULES {thermal_zone.usage_name}',
Heating_Availability_Schedule_Name=f'HVAC AVAIL SCHEDULES {thermal_zone.usage_name}',
Cooling_Availability_Schedule_Name=f'HVAC AVAIL SCHEDULES {thermal_zone.usage_name}',
Template_Thermostat_Name=thermostat.Name)
Zone_Conditioning_Equipment_List_Name=f'{zone_name} Equipment List',
Zone_Air_Inlet_Node_or_NodeList_Name=f'{zone_name} Inlet Node List',
Zone_Air_Node_Name=f'Node 1',
Zone_Return_Air_Node_or_NodeList_Name=f'{zone_name} Return Node List')
def _add_nodelist_system(self, thermal_zone, zone_name):
self._idf.newidfobject(self._NODE_LIST,
Name=f'{zone_name} Inlet Node List',
Node_1_Name='Node 2')
self._idf.newidfobject(self._NODE_LIST,
Name=f'{zone_name} Return Node List',
Node_1_Name='Node 3')
def _add_baseboard_system(self, thermal_zone, zone_name):
for baseboard in self._idf.idfobjects[self._BASEBOARD]:
if baseboard.Zone_Name == zone_name:
return
self._idf.newidfobject(self._BASEBOARD, Name=f'Elec Baseboard',Availability_Schedule_Name='HVAC AVAIL')
def _add_air_terminal_system(self, thermal_zone, zone_name):
"""for air_terminal in self._idf.idfobjects[self._AIR_TERMINAL_NO_REHEAT]:
if air_terminal.Zone_Name == zone_name:
return"""
self._idf.newidfobject(self._AIR_TERMINAL_NO_REHEAT, Name=f'Diffuser',
Availability_Schedule_Name='HVAC AVAIL',
Air_Inlet_Node_Name='Node 4',
Air_Outlet_Node_Name='Node 2',
Maximum_Air_Flow_Rate='AutoSize')
def _add_air_distribution_system(self, thermal_zone, zone_name):
for air_distribution in self._idf.idfobjects[self._AIR_DISTRIBUTION]:
if air_distribution.Zone_Name == zone_name:
return
self._idf.newidfobject(self._AIR_DISTRIBUTION,
Name='ADU Diffuser',
Air_Distribution_Unit_Outlet_Node_Name='Node 2',
Air_Terminal_Object_Type='AirTerminal:SingleDuct:ConstantVolume:NoReheat',
Air_Terminal_Name='Diffuser')
def _add_equipment_list_system(self, thermal_zone, zone_name):
for air_distribution in self._idf.idfobjects[self._EQUIPMENT_LIST]:
if air_distribution.Zone_Name == zone_name:
return
self._idf.newidfobject(self._EQUIPMENT_LIST,
Name=f'{zone_name} Equipment List',
Load_Distribution_Scheme='SequentialLoad',
Zone_Equipment_1_Object_Type='ZoneHVAC:Baseboard:Convective:Electric',
Zone_Equipment_1_Name='Elec Baseboard',
Zone_Equipment_1_Cooling_Sequence='1',
Zone_Equipment_1_Heating_or_NoLoad_Sequence='1',
Zone_Equipment_2_Object_Type='ZoneHVAC:AirDistributionUnit',
Zone_Equipment_2_Name='ADU Diffuser',
Zone_Equipment_2_Cooling_Sequence='2',
Zone_Equipment_2_Heating_or_NoLoad_Sequence='2'
)
def _add_sizing_zone(self, thermal_zone, zone_name):
koa=self._idf.newidfobject(self._SIZING_ZONE,
Zone_or_ZoneList_Name=f'{zone_name}',
Zone_Cooling_Design_Supply_Air_Humidity_Ratio='0.0085',
Zone_Heating_Design_Supply_Air_Humidity_Ratio='0.008'
)
def _add_outdoor_air_design_specification(self, thermal_zone, zone_name):
self._idf.newidfobject(self._DESIGN_SPECIFICATION_OUTDOOR_AIR,
Name='MidriseApartment Apartment Ventilation',
Outdoor_Air_Method='Sum',
Outdoor_Air_Flow_per_Person='0.0169901079552')
def _add_occupancy(self, thermal_zone, zone_name):
number_of_people = thermal_zone.occupancy.occupancy_density * thermal_zone.total_floor_area
@ -553,10 +626,6 @@ class Idf:
self._add_zone(thermal_zone, building.name)
self._add_heating_system(thermal_zone, building.name)
self._add_infiltration(thermal_zone, building.name)
self._add_ventilation(thermal_zone, building.name)
self._add_occupancy(thermal_zone, building.name)
self._add_lighting(thermal_zone, building.name)
self._add_appliances(thermal_zone, building.name)
self._add_dhw(thermal_zone, building.name)
if self._export_type == "Surfaces":
if building.name in self._target_buildings or building.name in self._adjacent_buildings:
@ -586,7 +655,6 @@ class Idf:
Variable_Name="Water Use Equipment Heating Rate",
Reporting_Frequency="Hourly",
)
# post-process to erase windows associated to adiabatic walls
windows_list = []
for window in self._idf.idfobjects[self._WINDOW]:
@ -598,7 +666,6 @@ class Idf:
windows_list.append(window)
for window in windows_list:
self._idf.removeidfobject(window)
self._idf.saveas(str(self._output_file))
return self._idf

File diff suppressed because it is too large Load Diff

View File

@ -13,7 +13,7 @@
! HVAC: None.
!
Version,23.2;
Version,24.1;
Timestep,4;
@ -122,8 +122,8 @@
No, !- Do Zone Sizing Calculation
No, !- Do System Sizing Calculation
No, !- Do Plant Sizing Calculation
No, !- Run Simulation for Sizing Periods
Yes, !- Run Simulation for Weather File Run Periods
Yes, !- Run Simulation for Sizing Periods
No, !- Run Simulation for Weather File Run Periods
No, !- Do HVAC Sizing Simulation for Sizing Periods
1; !- Maximum Number of HVAC Sizing Simulation Passes

View File

@ -0,0 +1,157 @@
! Minimal.idf
! Basic file description: This is a minimal configuration necessary to run.
! Highlights: Illustrates minimal items necessary to perform run.
! BUILDING, SURFACEGEOMETRY, LOCATION and DESIGNDAY (or RUNPERIOD) are the absolute minimal required input objects.
! TIME STEP IN HOUR is included so as to not get warning error.
! Including two design days, Run Control object and RunPeriod to facilitate use.
! Although not incredibly useful, this could be used as a weather/solar calculator.
! Simulation Location/Run: Denver is included. Any could be used.
! Building: None.
!
! Internal gains description: None.
!
! HVAC: None.
!
Version,9.5;
Timestep,4;
Building,
None, !- Name
0.0000000E+00, !- North Axis {deg}
Suburbs, !- Terrain
0.04, !- Loads Convergence Tolerance Value {W}
0.40, !- Temperature Convergence Tolerance Value {deltaC}
FullInteriorAndExterior, !- Solar Distribution
25, !- Maximum Number of Warmup Days
6; !- Minimum Number of Warmup Days
GlobalGeometryRules,
UpperLeftCorner, !- Starting Vertex Position
CounterClockWise, !- Vertex Entry Direction
World; !- Coordinate System
Site:Location,
DENVER_STAPLETON_CO_USA_WMO_724690, !- Name
39.77, !- Latitude {deg}
-104.87, !- Longitude {deg}
-7.00, !- Time Zone {hr}
1611.00; !- Elevation {m}
! DENVER_STAPLETON_CO_USA Annual Heating Design Conditions Wind Speed=2.3m/s Wind Dir=180
! Coldest Month=December
! DENVER_STAPLETON_CO_USA Annual Heating 99.6%, MaxDB=-20°C
SizingPeriod:DesignDay,
DENVER_STAPLETON Ann Htg 99.6% Condns DB, !- Name
12, !- Month
21, !- Day of Month
WinterDesignDay, !- Day Type
-20, !- Maximum Dry-Bulb Temperature {C}
0.0, !- Daily Dry-Bulb Temperature Range {deltaC}
, !- Dry-Bulb Temperature Range Modifier Type
, !- Dry-Bulb Temperature Range Modifier Day Schedule Name
Wetbulb, !- Humidity Condition Type
-20, !- Wetbulb or DewPoint at Maximum Dry-Bulb {C}
, !- Humidity Condition Day Schedule Name
, !- Humidity Ratio at Maximum Dry-Bulb {kgWater/kgDryAir}
, !- Enthalpy at Maximum Dry-Bulb {J/kg}
, !- Daily Wet-Bulb Temperature Range {deltaC}
83411., !- Barometric Pressure {Pa}
2.3, !- Wind Speed {m/s}
180, !- Wind Direction {deg}
No, !- Rain Indicator
No, !- Snow Indicator
No, !- Daylight Saving Time Indicator
ASHRAEClearSky, !- Solar Model Indicator
, !- Beam Solar Day Schedule Name
, !- Diffuse Solar Day Schedule Name
, !- ASHRAE Clear Sky Optical Depth for Beam Irradiance (taub) {dimensionless}
, !- ASHRAE Clear Sky Optical Depth for Diffuse Irradiance (taud) {dimensionless}
0.00; !- Sky Clearness
! DENVER_STAPLETON Annual Cooling Design Conditions Wind Speed=4m/s Wind Dir=120
! Hottest Month=July
! DENVER_STAPLETON_CO_USA Annual Cooling (DB=>MWB) .4%, MaxDB=34.1°C MWB=15.8°C
SizingPeriod:DesignDay,
DENVER_STAPLETON Ann Clg .4% Condns DB=>MWB, !- Name
7, !- Month
21, !- Day of Month
SummerDesignDay, !- Day Type
34.1, !- Maximum Dry-Bulb Temperature {C}
15.2, !- Daily Dry-Bulb Temperature Range {deltaC}
, !- Dry-Bulb Temperature Range Modifier Type
, !- Dry-Bulb Temperature Range Modifier Day Schedule Name
Wetbulb, !- Humidity Condition Type
15.8, !- Wetbulb or DewPoint at Maximum Dry-Bulb {C}
, !- Humidity Condition Day Schedule Name
, !- Humidity Ratio at Maximum Dry-Bulb {kgWater/kgDryAir}
, !- Enthalpy at Maximum Dry-Bulb {J/kg}
, !- Daily Wet-Bulb Temperature Range {deltaC}
83411., !- Barometric Pressure {Pa}
4, !- Wind Speed {m/s}
120, !- Wind Direction {deg}
No, !- Rain Indicator
No, !- Snow Indicator
No, !- Daylight Saving Time Indicator
ASHRAEClearSky, !- Solar Model Indicator
, !- Beam Solar Day Schedule Name
, !- Diffuse Solar Day Schedule Name
, !- ASHRAE Clear Sky Optical Depth for Beam Irradiance (taub) {dimensionless}
, !- ASHRAE Clear Sky Optical Depth for Diffuse Irradiance (taud) {dimensionless}
1.00; !- Sky Clearness
RunPeriod,
Run Period 1, !- Name
1, !- Begin Month
1, !- Begin Day of Month
, !- Begin Year
12, !- End Month
31, !- End Day of Month
, !- End Year
Tuesday, !- Day of Week for Start Day
Yes, !- Use Weather File Holidays and Special Days
Yes, !- Use Weather File Daylight Saving Period
No, !- Apply Weekend Holiday Rule
Yes, !- Use Weather File Rain Indicators
Yes; !- Use Weather File Snow Indicators
SimulationControl,
No, !- Do Zone Sizing Calculation
No, !- Do System Sizing Calculation
No, !- Do Plant Sizing Calculation
No, !- Run Simulation for Sizing Periods
Yes, !- Run Simulation for Weather File Run Periods
No, !- Do HVAC Sizing Simulation for Sizing Periods
1; !- Maximum Number of HVAC Sizing Simulation Passes
Output:Table:SummaryReports, AnnualBuildingUtilityPerformanceSummary,
DemandEndUseComponentsSummary,
SensibleHeatGainSummary,
InputVerificationandResultsSummary,
AdaptiveComfortSummary,
Standard62.1Summary,
ClimaticDataSummary,
EquipmentSummary,
EnvelopeSummary,
LightingSummary,
HVACSizingSummary,
SystemSummary,
ComponentSizingSummary,
OutdoorAirSummary,
ObjectCountSummary,
EndUseEnergyConsumptionOtherFuelsMonthly,
PeakEnergyEndUseOtherFuelsMonthly;
OutputControl:Table:Style, CommaAndHTML,JtoKWH;
Output:Meter,DISTRICTHEATING:Facility,hourly;
Output:Meter,DISTRICTCOOLING:Facility,hourly;
Output:Meter,InteriorEquipment:Electricity,hourly;
Output:Meter,InteriorLights:Electricity,hourly;
OutputControl:IlluminanceMap:Style,
Comma; !- Column separator

View File

@ -1,4 +1,4 @@
"""
"""
TestExports test and validate the city export formats
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2022 Concordia CERC group

142
texttest Normal file
View File

@ -0,0 +1,142 @@
ZoneControl:Thermostat,
Room_180_7ad8616b Thermostat, !- Name
Room_180_7ad8616b, !- Zone or ZoneList Name
Room_180_7ad8616b Thermostat Schedule, !- Control Type Schedule Name
ThermostatSetpoint:DualSetpoint, !- Control 1 Object Type
LargeOffice Building_Setpoint 26, !- Control 1 Name
, !- Control 2 Object Type
, !- Control 2 Name
, !- Control 3 Object Type
, !- Control 3 Name
, !- Control 4 Object Type
, !- Control 4 Name
0; !- Temperature Difference Between Cutout And Setpoint {deltaC}
Schedule:Compact,
Room_180_7ad8616b Thermostat Schedule, !- Name
Room_180_7ad8616b Thermostat Schedule Type Limits, !- Schedule Type Limits Name
Through: 12/31, !- Field 1
For: AllDays, !- Field 2
Until: 24:00, !- Field 3
4; !- Field 4
ScheduleTypeLimits,
Room_180_7ad8616b Thermostat Schedule Type Limits, !- Name
0, !- Lower Limit Value {BasedOnField A3}
4, !- Upper Limit Value {BasedOnField A3}
DISCRETE; !- Numeric Type
ThermostatSetpoint:DualSetpoint,
LargeOffice Building_Setpoint 26, !- Name
LargeOffice Building_Setpoint_HtgSetp Schedule, !- Heating Setpoint Temperature Schedule Name
LargeOffice Building_Setpoint_ClgSetp Schedule; !- Cooling Setpoint Temperature Schedule Name
ZoneHVAC:EquipmentConnections,
Room_180_7ad8616b, !- Zone Name
Room_180_7ad8616b Equipment List, !- Zone Conditioning Equipment List Name
Room_180_7ad8616b Inlet Node List, !- Zone Air Inlet Node or NodeList Name
, !- Zone Air Exhaust Node or NodeList Name
Node 27, !- Zone Air Node Name
Room_180_7ad8616b Return Node List; !- Zone Return Air Node or NodeList Name
NodeList,
Room_180_7ad8616b Inlet Node List, !- Name
Node 305; !- Node Name 1
NodeList,
Room_180_7ad8616b Return Node List, !- Name
Node 308; !- Node Name 1
ZoneHVAC:Baseboard:Convective:Electric,
Elec Baseboard 1, !- Name
Always On Discrete hvac_library, !- Availability Schedule Name
, !- Heating Design Capacity Method
Autosize, !- Heating Design Capacity {W}
, !- Heating Design Capacity Per Floor Area {W/m2}
, !- Fraction of Autosized Heating Design Capacity
1; !- Efficiency
AirTerminal:SingleDuct:ConstantVolume:NoReheat,
Diffuser 21, !- Name
Always On Discrete hvac_library, !- Availability Schedule Name
Node 307, !- Air Inlet Node Name
Node 305, !- Air Outlet Node Name
AutoSize; !- Maximum Air Flow Rate {m3/s}
ZoneHVAC:AirDistributionUnit,
ADU Diffuser 21, !- Name
Node 305, !- Air Distribution Unit Outlet Node Name
AirTerminal:SingleDuct:ConstantVolume:NoReheat, !- Air Terminal Object Type
Diffuser 21; !- Air Terminal Name
ZoneHVAC:EquipmentList,
Room_180_7ad8616b Equipment List, !- Name
SequentialLoad, !- Load Distribution Scheme
ZoneHVAC:Baseboard:Convective:Electric, !- Zone Equipment Object Type 1
Elec Baseboard 1, !- Zone Equipment Name 1
1, !- Zone Equipment Cooling Sequence 1
1, !- Zone Equipment Heating or No-Load Sequence 1
, !- Zone Equipment Sequential Cooling Fraction Schedule Name 1
, !- Zone Equipment Sequential Heating Fraction Schedule Name 1
ZoneHVAC:AirDistributionUnit, !- Zone Equipment Object Type 2
ADU Diffuser 21, !- Zone Equipment Name 2
2, !- Zone Equipment Cooling Sequence 2
2, !- Zone Equipment Heating or No-Load Sequence 2
, !- Zone Equipment Sequential Cooling Fraction Schedule Name 2
; !- Zone Equipment Sequential Heating Fraction Schedule Name 2
Sizing:Zone,
Room_180_7ad8616b, !- Zone or ZoneList Name
SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method
14, !- Zone Cooling Design Supply Air Temperature {C}
11.11, !- Zone Cooling Design Supply Air Temperature Difference {deltaC}
SupplyAirTemperature, !- Zone Heating Design Supply Air Temperature Input Method
40, !- Zone Heating Design Supply Air Temperature {C}
11.11, !- Zone Heating Design Supply Air Temperature Difference {deltaC}
0.0085, !- Zone Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir}
0.008, !- Zone Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir}
Room_180_7ad8616b DSOA Space List, !- Design Specification Outdoor Air Object Name
, !- Zone Heating Sizing Factor
, !- Zone Cooling Sizing Factor
DesignDay, !- Cooling Design Air Flow Method
0, !- Cooling Design Air Flow Rate {m3/s}
0.000762, !- Cooling Minimum Air Flow per Zone Floor Area {m3/s-m2}
0, !- Cooling Minimum Air Flow {m3/s}
0, !- Cooling Minimum Air Flow Fraction
DesignDay, !- Heating Design Air Flow Method
0, !- Heating Design Air Flow Rate {m3/s}
0.002032, !- Heating Maximum Air Flow per Zone Floor Area {m3/s-m2}
0.1415762, !- Heating Maximum Air Flow {m3/s}
0.3, !- Heating Maximum Air Flow Fraction
, !- Design Specification Zone Air Distribution Object Name
No, !- Account for Dedicated Outdoor Air System
, !- Dedicated Outdoor Air System Control Strategy
, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C}
, !- Dedicated Outdoor Air High Setpoint Temperature for Design {C}
Sensible Load Only No Latent Load, !- Zone Load Sizing Method
HumidityRatioDifference, !- Zone Latent Cooling Design Supply Air Humidity Ratio Input Method
, !- Zone Dehumidification Design Supply Air Humidity Ratio {kgWater/kgDryAir}
0.005, !- Zone Cooling Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir}
HumidityRatioDifference, !- Zone Latent Heating Design Supply Air Humidity Ratio Input Method
, !- Zone Humidification Design Supply Air Humidity Ratio {kgWater/kgDryAir}
0.005; !- Zone Humidification Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir}
DesignSpecification:OutdoorAir:SpaceList,
Room_180_7ad8616b DSOA Space List, !- Name
Room_180_7ad8616b_Space, !- Space Name 1
MidriseApartment Apartment Ventilation; !- Space Design Specification Outdoor Air Object Name 1
Zone,
Room_181_3a411b5d, !- Name
, !- Direction of Relative North {deg}
0, !- X Origin {m}
0, !- Y Origin {m}
0, !- Z Origin {m}
, !- Type
1, !- Multiplier
4, !- Ceiling Height {m}
291.62935408288, !- Volume {m3}
, !- Floor Area {m2}
, !- Zone Inside Convection Algorithm
, !- Zone Outside Convection Algorithm
Yes; !- Part of Total Floor Area