Spaces:
Sleeping
Sleeping
Update app/building_information.py
Browse files- app/building_information.py +33 -43
app/building_information.py
CHANGED
@@ -35,7 +35,7 @@ def display_building_info_page():
|
|
35 |
# Get current values from session state or use defaults
|
36 |
current_values = st.session_state.project_data["building_info"]
|
37 |
|
38 |
-
|
39 |
col1, col2 = st.columns(2)
|
40 |
with col1:
|
41 |
project_name = st.text_input(
|
@@ -43,8 +43,15 @@ def display_building_info_page():
|
|
43 |
value=current_values["project_name"],
|
44 |
help="Enter a unique identifier for your project."
|
45 |
)
|
46 |
-
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
# Floor Area
|
49 |
floor_area = st.number_input(
|
50 |
"Floor Area (square meters)",
|
@@ -55,11 +62,7 @@ def display_building_info_page():
|
|
55 |
format="%.1f",
|
56 |
help="Total conditioned floor area of the building in square meters."
|
57 |
)
|
58 |
-
|
59 |
-
# Create two columns for layout
|
60 |
-
col1, col2 = st.columns(2)
|
61 |
-
|
62 |
-
with col1:
|
63 |
# Building Height
|
64 |
building_height = st.number_input(
|
65 |
"Building Height (meters)",
|
@@ -70,54 +73,30 @@ def display_building_info_page():
|
|
70 |
format="%.1f",
|
71 |
help="Average ceiling height of the building in meters."
|
72 |
)
|
73 |
-
|
74 |
-
# Building Type
|
75 |
-
building_type = st.selectbox(
|
76 |
-
"Building Type",
|
77 |
-
options=BUILDING_TYPES,
|
78 |
-
index=BUILDING_TYPES.index(current_values["building_type"]) if current_values["building_type"] in BUILDING_TYPES else 0,
|
79 |
-
help="Primary use of the building, which affects default internal loads."
|
80 |
-
)
|
81 |
|
82 |
with col2:
|
83 |
-
#
|
84 |
-
|
85 |
-
"
|
86 |
min_value=15.0,
|
87 |
max_value=30.0,
|
88 |
-
value=float(current_values.get("
|
89 |
step=0.5,
|
90 |
format="%.1f",
|
91 |
-
help="Target indoor temperature for
|
92 |
)
|
93 |
|
94 |
-
# Winter Indoor Design
|
95 |
-
|
96 |
-
"Winter Indoor Design
|
97 |
-
min_value=20.0,
|
98 |
-
max_value=80.0,
|
99 |
-
value=float(current_values.get("winter_indoor_design_rh", current_values.get("indoor_design_rh", 50.0))),
|
100 |
-
step=5.0,
|
101 |
-
format="%.1f",
|
102 |
-
help="Target indoor relative humidity for winter season comfort (20–80%)."
|
103 |
-
)
|
104 |
-
|
105 |
-
# Summer Indoor Design Conditions
|
106 |
-
col1, col2 = st.columns(2)
|
107 |
-
|
108 |
-
with col1:
|
109 |
-
# Summer Indoor Design Temperature
|
110 |
-
summer_indoor_design_temp = st.number_input(
|
111 |
-
"Summer Indoor Design Temperature (°C)",
|
112 |
min_value=15.0,
|
113 |
max_value=30.0,
|
114 |
-
value=float(current_values.get("
|
115 |
step=0.5,
|
116 |
format="%.1f",
|
117 |
-
help="Target indoor temperature for
|
118 |
)
|
119 |
-
|
120 |
-
with col2:
|
121 |
# Summer Indoor Design Relative Humidity
|
122 |
summer_indoor_design_rh = st.number_input(
|
123 |
"Summer Indoor Design Relative Humidity (%)",
|
@@ -128,6 +107,17 @@ def display_building_info_page():
|
|
128 |
format="%.1f",
|
129 |
help="Target indoor relative humidity for summer season comfort (20–80%)."
|
130 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
|
132 |
# Building Orientation
|
133 |
st.subheader("Building Orientation")
|
|
|
35 |
# Get current values from session state or use defaults
|
36 |
current_values = st.session_state.project_data["building_info"]
|
37 |
|
38 |
+
# Project Name and other fields
|
39 |
col1, col2 = st.columns(2)
|
40 |
with col1:
|
41 |
project_name = st.text_input(
|
|
|
43 |
value=current_values["project_name"],
|
44 |
help="Enter a unique identifier for your project."
|
45 |
)
|
46 |
+
|
47 |
+
# Building Type
|
48 |
+
building_type = st.selectbox(
|
49 |
+
"Building Type",
|
50 |
+
options=BUILDING_TYPES,
|
51 |
+
index=BUILDING_TYPES.index(current_values["building_type"]) if current_values["building_type"] in BUILDING_TYPES else 0,
|
52 |
+
help="Primary use of the building, which affects default internal loads."
|
53 |
+
)
|
54 |
+
|
55 |
# Floor Area
|
56 |
floor_area = st.number_input(
|
57 |
"Floor Area (square meters)",
|
|
|
62 |
format="%.1f",
|
63 |
help="Total conditioned floor area of the building in square meters."
|
64 |
)
|
65 |
+
|
|
|
|
|
|
|
|
|
66 |
# Building Height
|
67 |
building_height = st.number_input(
|
68 |
"Building Height (meters)",
|
|
|
73 |
format="%.1f",
|
74 |
help="Average ceiling height of the building in meters."
|
75 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
with col2:
|
78 |
+
# Summer Indoor Design Temperature
|
79 |
+
summer_indoor_design_temp = st.number_input(
|
80 |
+
"Summer Indoor Design Temperature (°C)",
|
81 |
min_value=15.0,
|
82 |
max_value=30.0,
|
83 |
+
value=float(current_values.get("summer_indoor_design_temp", current_values.get("indoor_design_temp", 24.0))),
|
84 |
step=0.5,
|
85 |
format="%.1f",
|
86 |
+
help="Target indoor temperature for summer season comfort (15–30°C)."
|
87 |
)
|
88 |
|
89 |
+
# Winter Indoor Design Temperature
|
90 |
+
winter_indoor_design_temp = st.number_input(
|
91 |
+
"Winter Indoor Design Temperature (°C)",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
min_value=15.0,
|
93 |
max_value=30.0,
|
94 |
+
value=float(current_values.get("winter_indoor_design_temp", current_values.get("indoor_design_temp", 20.0))),
|
95 |
step=0.5,
|
96 |
format="%.1f",
|
97 |
+
help="Target indoor temperature for winter season comfort (15–30°C)."
|
98 |
)
|
99 |
+
|
|
|
100 |
# Summer Indoor Design Relative Humidity
|
101 |
summer_indoor_design_rh = st.number_input(
|
102 |
"Summer Indoor Design Relative Humidity (%)",
|
|
|
107 |
format="%.1f",
|
108 |
help="Target indoor relative humidity for summer season comfort (20–80%)."
|
109 |
)
|
110 |
+
|
111 |
+
# Winter Indoor Design Relative Humidity
|
112 |
+
winter_indoor_design_rh = st.number_input(
|
113 |
+
"Winter Indoor Design Relative Humidity (%)",
|
114 |
+
min_value=20.0,
|
115 |
+
max_value=80.0,
|
116 |
+
value=float(current_values.get("winter_indoor_design_rh", current_values.get("indoor_design_rh", 50.0))),
|
117 |
+
step=5.0,
|
118 |
+
format="%.1f",
|
119 |
+
help="Target indoor relative humidity for winter season comfort (20–80%)."
|
120 |
+
)
|
121 |
|
122 |
# Building Orientation
|
123 |
st.subheader("Building Orientation")
|