Design Days API¶
Design day parsing, classification, and model injection.
DesignDayManager¶
idfkit.weather.designday.DesignDayManager
¶
Parse DDY files and inject design day conditions into IDF models.
A DDY file is a valid IDF-syntax file containing Site:Location and
SizingPeriod:DesignDay objects. This class uses [idfkit.load_idf][idfkit.load_idf]
to parse the file and classifies each design day by its ASHRAE condition
type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ddy_path
|
Path | str
|
Path to a |
required |
version
|
tuple[int, int, int] | None
|
EnergyPlus version to use for schema resolution. Defaults to the latest supported version (design day fields are stable across versions). |
None
|
Source code in src/idfkit/weather/designday.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 | |
annual
property
¶
All classified annual design day objects.
monthly
property
¶
All monthly design day objects.
Monthly design days follow the naming pattern
{Location} {Month} {pct}% Condns {type} and are not classified
into the DesignDayType enum.
location
property
¶
The Site:Location object from the DDY file, if present.
get(dd_type)
¶
apply_to_model(model, *, heating='99.6%', cooling='1%', include_wet_bulb=False, include_enthalpy=False, include_dehumidification=False, include_wind=False, update_location=True, replace_existing=True)
¶
Inject design day objects into an IDF model.
Selects the appropriate design days based on common ASHRAE sizing
practices and adds them as SizingPeriod:DesignDay objects.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
IDFDocument
|
The target IDFDocument. |
required |
heating
|
Literal['99.6%', '99%', 'both']
|
Which heating percentile to include. |
'99.6%'
|
cooling
|
Literal['0.4%', '1%', '2%', 'all']
|
Which cooling dry-bulb percentile to include. |
'1%'
|
include_wet_bulb
|
bool
|
Also include cooling wet-bulb design days. |
False
|
include_enthalpy
|
bool
|
Also include cooling enthalpy design days. |
False
|
include_dehumidification
|
bool
|
Also include dehumidification design days. |
False
|
include_wind
|
bool
|
Also include heating wind-speed design days. |
False
|
update_location
|
bool
|
Update the |
True
|
replace_existing
|
bool
|
Remove existing |
True
|
Returns:
| Type | Description |
|---|---|
list[str]
|
List of design day names that were added. |
Source code in src/idfkit/weather/designday.py
summary()
¶
Human-readable summary of all design days in the DDY file.
Source code in src/idfkit/weather/designday.py
DesignDayType¶
idfkit.weather.designday.DesignDayType
¶
Bases: Enum
Classification of ASHRAE annual design day conditions.
Values encode the condition type and annual percentile.
Source code in src/idfkit/weather/designday.py
HEATING_99_6 = 'heating_99.6'
class-attribute
instance-attribute
¶
HEATING_99 = 'heating_99'
class-attribute
instance-attribute
¶
HTG_WIND_99_6 = 'htg_wind_99.6'
class-attribute
instance-attribute
¶
COOLING_DB_0_4 = 'cooling_db_0.4'
class-attribute
instance-attribute
¶
COOLING_DB_1 = 'cooling_db_1'
class-attribute
instance-attribute
¶
COOLING_DB_2 = 'cooling_db_2'
class-attribute
instance-attribute
¶
COOLING_WB_0_4 = 'cooling_wb_0.4'
class-attribute
instance-attribute
¶
COOLING_WB_1 = 'cooling_wb_1'
class-attribute
instance-attribute
¶
COOLING_WB_2 = 'cooling_wb_2'
class-attribute
instance-attribute
¶
COOLING_ENTH_0_4 = 'cooling_enth_0.4'
class-attribute
instance-attribute
¶
COOLING_ENTH_1 = 'cooling_enth_1'
class-attribute
instance-attribute
¶
COOLING_ENTH_2 = 'cooling_enth_2'
class-attribute
instance-attribute
¶
DEHUMID_0_4 = 'dehumid_0.4'
class-attribute
instance-attribute
¶
DEHUMID_1 = 'dehumid_1'
class-attribute
instance-attribute
¶
DEHUMID_2 = 'dehumid_2'
class-attribute
instance-attribute
¶
apply_ashrae_sizing¶
idfkit.weather.designday.apply_ashrae_sizing(model, station, *, standard='general', version=None)
¶
Apply standard ASHRAE sizing design days to a model.
This is the one-line convenience function for the most common use case.
Presets
"90.1": Heating 99.6% + Cooling 1% DB + Cooling 1% WB (per ASHRAE Standard 90.1 requirements)."general": Heating 99.6% + Cooling 0.4% DB (conservative general practice).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
IDFDocument
|
The IDFDocument to modify. |
required |
station
|
WeatherStation
|
Weather station whose DDY file to use. |
required |
standard
|
Literal['90.1', 'general']
|
ASHRAE preset to apply. |
'general'
|
version
|
tuple[int, int, int] | None
|
EnergyPlus version for schema resolution. |
None
|
Returns:
| Type | Description |
|---|---|
list[str]
|
List of design day names that were added. |
Raises:
| Type | Description |
|---|---|
NoDesignDaysError
|
If the station's DDY file contains no design days. The exception includes suggestions for nearby stations that may have design day data. |
Source code in src/idfkit/weather/designday.py
NoDesignDaysError¶
See NoDesignDaysError in the Exceptions API.