mabuseif commited on
Commit
b1504a6
·
verified ·
1 Parent(s): cc05fa7

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +0 -250
main.py CHANGED
@@ -323,256 +323,6 @@ class BuildSustain:
323
  else:
324
  st.error(f"Unknown page: {page}")
325
 
326
- # Placeholder display methods until actual modules are implemented
327
- def _display_intro_placeholder(self):
328
- st.info("This is a placeholder for the Intro module. The actual module will be implemented in Stage 2.")
329
- st.markdown("""
330
- ### About
331
- The BuildSustain is a tool for calculating heating and cooling loads for buildings.
332
-
333
- ### Features
334
- - Building information input
335
- - Climate data selection
336
- - Material and construction library
337
- - Component definition
338
- - Internal loads calculation
339
- - HVAC load calculation using CTF/TFM methods
340
- - Building energy consumption estimation
341
- - Renewable energy sizing
342
- - Embodied energy calculation
343
- - Materials cost estimation
344
-
345
- ### Project Management
346
- """)
347
-
348
- col1, col2, col3 = st.columns(3)
349
- with col1:
350
- st.button("Start New Project")
351
- with col2:
352
- st.file_uploader("Import Project", type=["json"])
353
- with col3:
354
- st.button("Export Project")
355
-
356
- def _display_building_info_placeholder(self):
357
- st.info("This is a placeholder for the Building Information module. The actual module will be implemented in Stage 3.")
358
-
359
- with st.form("building_info_form_placeholder"):
360
- st.text_input("Project Name", value=st.session_state.project_data["building_info"]["project_name"])
361
- st.number_input("Floor Area (square meters)", value=st.session_state.project_data["building_info"]["floor_area"])
362
- st.number_input("Building Height (meters)", value=st.session_state.project_data["building_info"]["building_height"])
363
- st.number_input("Indoor Design Temperature (°C)", value=st.session_state.project_data["building_info"]["indoor_design_temp"])
364
- st.number_input("Indoor Design Relative Humidity (%)", value=st.session_state.project_data["building_info"]["indoor_design_rh"])
365
- st.slider("Orientation Angle (°)", min_value=-180, max_value=180, value=int(st.session_state.project_data["building_info"]["orientation_angle"]))
366
- st.slider("Operation Hours (hours/day)", min_value=0, max_value=24, value=st.session_state.project_data["building_info"]["operation_hours"])
367
- st.selectbox("Building Type", ["Office", "Classroom", "Retail", "Restaurant", "Hotel", "Hospital", "Residential"])
368
-
369
- st.form_submit_button("Save")
370
-
371
- st.button("Continue to Climate Data")
372
-
373
- def _display_climate_data_placeholder(self):
374
- st.info("This is a placeholder for the Climate Data module. The actual module will be implemented in Stage 4.")
375
-
376
- st.file_uploader("Upload EPW File", type=["epw"])
377
-
378
- st.markdown("### Climate Data Summary")
379
- st.markdown("Location: Not selected")
380
- st.markdown("Climate Zone: Not available")
381
- st.markdown("Design Temperatures: Not available")
382
-
383
- col1, col2 = st.columns(2)
384
- with col1:
385
- st.button("Back to Building Information")
386
- with col2:
387
- st.button("Continue to Material Library")
388
-
389
- def _display_material_library_placeholder(self):
390
- st.info("This is a placeholder for the Material Library module. The actual module will be implemented in Stage 5.")
391
-
392
- tab1, tab2 = st.tabs(["Materials", "Fenestrations"])
393
-
394
- with tab1:
395
- st.markdown("### Library Materials")
396
- st.markdown("Material list will appear here")
397
-
398
- st.markdown("### Project Materials")
399
- st.markdown("User-defined materials will appear here")
400
-
401
- st.markdown("### Material Editor")
402
- st.text_input("Material Name")
403
- st.selectbox("Category", ["Finishing Materials", "Structural Materials", "Sub-Structural Materials", "Insulation"])
404
- st.number_input("Thermal Conductivity (W/m·K)", min_value=0.01, value=0.1)
405
- st.button("Save Material")
406
-
407
- with tab2:
408
- st.markdown("### Library Fenestrations")
409
- st.markdown("Fenestration list will appear here")
410
-
411
- st.markdown("### Project Fenestrations")
412
- st.markdown("User-defined fenestrations will appear here")
413
-
414
- st.markdown("### Fenestration Editor")
415
- st.text_input("Fenestration Name")
416
- st.number_input("U-Value (W/m²·K)", min_value=0.1, value=2.8)
417
- st.number_input("SHGC", min_value=0.0, max_value=1.0, value=0.7)
418
- st.button("Save Fenestration")
419
-
420
- col1, col2 = st.columns(2)
421
- with col1:
422
- st.button("Back to Climate Data")
423
- with col2:
424
- st.button("Continue to Construction")
425
-
426
- def _display_construction_placeholder(self):
427
- st.info("This is a placeholder for the Construction module. The actual module will be implemented in Stage 6.")
428
-
429
- st.markdown("### Library Constructions")
430
- st.markdown("Construction list will appear here")
431
-
432
- st.markdown("### Project Constructions")
433
- st.markdown("User-defined constructions will appear here")
434
-
435
- st.markdown("### Construction Editor")
436
- st.text_input("Construction Name")
437
- st.selectbox("Component Type", ["Wall", "Roof", "Floor"])
438
- st.markdown("Layer editor will appear here")
439
- st.button("Save Construction")
440
-
441
- col1, col2 = st.columns(2)
442
- with col1:
443
- st.button("Back to Material Library")
444
- with col2:
445
- st.button("Continue to Building Components")
446
-
447
- def _display_components_placeholder(self):
448
- st.info("This is a placeholder for the Building Components module. The actual module will be implemented in Stage 7.")
449
-
450
- tabs = st.tabs(["Walls", "Roofs", "Floors", "Windows", "Doors", "Skylights"])
451
-
452
- for i, tab in enumerate(tabs):
453
- with tab:
454
- st.markdown(f"### {['Walls', 'Roofs', 'Floors', 'Windows', 'Doors', 'Skylights'][i]}")
455
- st.markdown("Component list will appear here")
456
- st.button(f"Add New {['Wall', 'Roof', 'Floor', 'Window', 'Door', 'Skylight'][i]}")
457
-
458
- col1, col2 = st.columns(2)
459
- with col1:
460
- st.button("Back to Construction")
461
- with col2:
462
- st.button("Continue to Internal Loads")
463
-
464
- def _display_internal_loads_placeholder(self):
465
- st.info("This is a placeholder for the Internal Loads module. The actual module will be implemented in Stage 8.")
466
-
467
- tabs = st.tabs(["People", "Lighting", "Equipment"])
468
-
469
- with tabs[0]:
470
- st.number_input("Number of People", min_value=1, value=10)
471
- st.selectbox("Activity Level", ["Seated, at Rest", "Light Office Work", "Standing, Light Work"])
472
-
473
- with tabs[1]:
474
- st.number_input("Lighting Power Density (W/m²)", min_value=0.0, value=10.0)
475
- st.selectbox("Fixture Type", ["LED", "Fluorescent", "Incandescent"])
476
-
477
- with tabs[2]:
478
- st.number_input("Equipment Power Density (W/m²)", min_value=0.0, value=15.0)
479
-
480
- col1, col2 = st.columns(2)
481
- with col1:
482
- st.button("Back to Building Components")
483
- with col2:
484
- st.button("Continue to HVAC Loads")
485
-
486
- def _display_hvac_loads_placeholder(self):
487
- st.info("This is a placeholder for the HVAC Loads module. The actual module will be implemented in Stage 9.")
488
-
489
- st.button("Calculate HVAC Loads")
490
-
491
- st.markdown("### Results")
492
- st.markdown("Peak Cooling Load: Not calculated")
493
- st.markdown("Peak Heating Load: Not calculated")
494
-
495
- st.markdown("### Load Breakdown")
496
- st.markdown("Charts will appear here")
497
-
498
- col1, col2 = st.columns(2)
499
- with col1:
500
- st.button("Back to Internal Loads")
501
- with col2:
502
- st.button("Continue to Building Energy")
503
-
504
- def _display_building_energy_placeholder(self):
505
- st.info("This is a placeholder for the Building Energy module. The actual module will be implemented in Stage 10.")
506
-
507
- st.selectbox("HVAC System Type", ["Heat Pump", "Boiler + Chiller", "VRF", "Other"])
508
- st.number_input("COP/Efficiency", min_value=0.1, value=3.5)
509
- st.button("Calculate Energy Consumption")
510
-
511
- st.markdown("### Results")
512
- st.markdown("Total Annual Energy Consumption: Not calculated")
513
-
514
- st.markdown("### Energy Breakdown")
515
- st.markdown("Charts will appear here")
516
-
517
- col1, col2 = st.columns(2)
518
- with col1:
519
- st.button("Back to HVAC Loads")
520
- with col2:
521
- st.button("Continue to Renewable Energy")
522
-
523
- def _display_renewable_energy_placeholder(self):
524
- st.info("This is a placeholder for the Renewable Energy module. The actual module will be implemented in Stage 11.")
525
-
526
- st.markdown("### PV System Sizing")
527
- st.markdown("Required PV System Size for Net-Zero: Not calculated")
528
- st.number_input("Custom PV System Size (kWp)", min_value=0.0, value=10.0)
529
- st.button("Calculate PV Generation")
530
-
531
- st.markdown("### Results")
532
- st.markdown("Annual PV Generation: Not calculated")
533
- st.markdown("Net Energy Consumption: Not calculated")
534
- st.markdown("Zero Energy Status: Not calculated")
535
-
536
- st.markdown("### Energy Balance")
537
- st.markdown("Charts will appear here")
538
-
539
- col1, col2 = st.columns(2)
540
- with col1:
541
- st.button("Back to Building Energy")
542
- with col2:
543
- st.button("Continue to Embodied Energy")
544
-
545
- def _display_embodied_energy_placeholder(self):
546
- st.info("This is a placeholder for the Embodied Energy module. The actual module will be implemented in Stage 12.")
547
-
548
- st.button("Calculate Embodied Carbon")
549
-
550
- st.markdown("### Results")
551
- st.markdown("Total Embodied Carbon: Not calculated")
552
-
553
- st.markdown("### Carbon Breakdown")
554
- st.markdown("Charts will appear here")
555
-
556
- col1, col2 = st.columns(2)
557
- with col1:
558
- st.button("Back to Renewable Energy")
559
- with col2:
560
- st.button("Continue to Materials Cost")
561
-
562
- def _display_materials_cost_placeholder(self):
563
- st.info("This is a placeholder for the Materials Cost module. The actual module will be implemented in Stage 13.")
564
-
565
- st.button("Calculate Material Cost")
566
-
567
- st.markdown("### Results")
568
- st.markdown("Total Material Cost: Not calculated")
569
-
570
- st.markdown("### Cost Breakdown")
571
- st.markdown("Charts will appear here")
572
-
573
- st.button("Back to Embodied Energy")
574
-
575
-
576
  # Main entry point
577
  if __name__ == "__main__":
578
  try:
 
323
  else:
324
  st.error(f"Unknown page: {page}")
325
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
326
  # Main entry point
327
  if __name__ == "__main__":
328
  try: