Skip to content

Commit 332ebb7

Browse files
committed
feat(doe2): Document newly added properties for DOE-2
I don't think we necessarily need to expose these properties on the UI yet but, if people assign them, I do not want them to be lost as we send DFJSONs between different bindings.
1 parent 21f74ee commit 332ebb7

File tree

3 files changed

+73
-0
lines changed

3 files changed

+73
-0
lines changed

dragonfly_schema/doe2/__init__.py

Whitespace-only changes.

dragonfly_schema/doe2/properties.py

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
"""Model DOE-2 properties."""
2+
from pydantic import Field, constr
3+
from typing import Union
4+
5+
from honeybee_schema._base import NoExtraBaseModel
6+
from honeybee_schema.altnumber import Autocalculate
7+
8+
9+
class Room2DDoe2Properties(NoExtraBaseModel):
10+
11+
type: constr(regex='^Room2DDoe2Properties$') = \
12+
'Room2DDoe2Properties'
13+
14+
assigned_flow: Union[Autocalculate, float] = Field(
15+
Autocalculate(),
16+
ge=0,
17+
description='A number for the design supply air flow rate for the zone '
18+
'the Room is assigned to (cfm). This establishes the minimum allowed '
19+
'design air flow. Note that the actual design flow may be larger. If '
20+
'Autocalculate, this parameter will not be written into the INP.'
21+
)
22+
23+
flow_per_area: Union[Autocalculate, float] = Field(
24+
Autocalculate(),
25+
ge=0,
26+
description='A number for the design supply air flow rate to the zone '
27+
'per unit floor area (cfm/ft2). If Autocalculate, this parameter will '
28+
'not be written into the INP.'
29+
)
30+
31+
min_flow_ratio: Union[Autocalculate, float] = Field(
32+
Autocalculate(),
33+
ge=0,
34+
le=1,
35+
description='A number between 0 and 1 for the minimum allowable zone '
36+
'air supply flow rate, expressed as a fraction of design flow rate. Applicable '
37+
'to variable-volume type systems only. If Autocalculate, this parameter will '
38+
'not be written into the INP.'
39+
)
40+
41+
min_flow_per_area: Union[Autocalculate, float] = Field(
42+
Autocalculate(),
43+
ge=0,
44+
description='A number for the minimum air flow per square foot of '
45+
'floor area (cfm/ft2). This is an alternative way of specifying the '
46+
'min_flow_ratio. If Autocalculate, this parameter will not be written '
47+
'into the INP.'
48+
)
49+
50+
hmax_flow_ratio: Union[Autocalculate, float] = Field(
51+
Autocalculate(),
52+
ge=0,
53+
le=1,
54+
description='A number between 0 and 1 for the ratio of the maximum (or fixed) '
55+
'heating airflow to the cooling airflow. The specific meaning varies according '
56+
'to the type of zone terminal. If Autocalculate, this parameter will '
57+
'not be written into the INP.'
58+
)
59+
60+
61+
class ModelDoe2Properties(NoExtraBaseModel):
62+
63+
type: constr(regex='^ModelDoe2Properties$') = \
64+
'ModelDoe2Properties'

dragonfly_schema/model.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from .radiance.properties import Room2DRadiancePropertiesAbridged, \
2323
StoryRadiancePropertiesAbridged, BuildingRadiancePropertiesAbridged, \
2424
ContextShadeRadiancePropertiesAbridged, ModelRadianceProperties
25+
from .doe2.properties import Room2DDoe2Properties, ModelDoe2Properties
2526
from .comparison.properties import Room2DComparisonProperties, ModelComparisonProperties
2627

2728

@@ -37,6 +38,10 @@ class Room2DPropertiesAbridged(BaseModel):
3738
default=None
3839
)
3940

41+
doe2: Room2DDoe2Properties = Field(
42+
default=None
43+
)
44+
4045
comparison: Room2DComparisonProperties = Field(
4146
default=None
4247
)
@@ -412,6 +417,10 @@ class ModelProperties(BaseModel):
412417
default=None
413418
)
414419

420+
doe2: ModelDoe2Properties = Field(
421+
default=None
422+
)
423+
415424
comparison: ModelComparisonProperties = Field(
416425
default=None
417426
)

0 commit comments

Comments
 (0)