Coverage for bim2sim/plugins/PluginEnergyPlus/bim2sim_energyplus/sim_settings.py: 0%

21 statements  

« prev     ^ index     » next       coverage.py v7.6.12, created at 2025-03-12 17:09 +0000

1from pathlib import Path 

2 

3from bim2sim.sim_settings import BuildingSimSettings, BooleanSetting, \ 

4 ChoiceSetting, PathSetting 

5 

6 

7class EnergyPlusSimSettings(BuildingSimSettings): 

8 """Defines simulation settings for EnergyPlus Plugin. 

9 

10 This class defines the simulation settings for the EnergyPlus Plugin. It 

11 inherits all choices from the BuildingSimulation settings. EnergyPlus 

12 specific settings are added here, such as simulation control parameters 

13 and export settings. 

14 """ 

15 cfd_export = BooleanSetting( 

16 default=False, 

17 description='Whether to use CFD export for this simulation or not.', 

18 for_frontend=True 

19 ) 

20 split_bounds = BooleanSetting( 

21 default=False, 

22 description='Whether to convert up non-convex space boundaries or ' 

23 'not.', 

24 for_frontend=True 

25 ) 

26 add_shadings = BooleanSetting( 

27 default=True, 

28 description='Whether to add shading surfaces if available or not.', 

29 for_frontend=True 

30 ) 

31 split_shadings = BooleanSetting( 

32 default=False, 

33 description='Whether to convert up non-convex shading boundaries or ' 

34 'not.', 

35 for_frontend=True 

36 ) 

37 run_full_simulation = BooleanSetting( 

38 default=False, 

39 description='Choose simulation period.', 

40 for_frontend=True 

41 ) 

42 ep_version = ChoiceSetting( 

43 default='9-4-0', 

44 choices={ 

45 '9-2-0': 'EnergyPlus Version 9-2-0', 

46 '9-4-0': 'EnergyPlus Version 9-4-0', 

47 '22-2-0': 'EnergyPlus Version 22-2-0' # todo: Test latest version 

48 }, 

49 description='Choose EnergyPlus Version', 

50 for_frontend=True, 

51 any_string=True 

52 ) 

53 ep_install_path = PathSetting( 

54 default=Path('/usr/local/EnergyPlus-9-4-0/'), 

55 description='Choose EnergyPlus Installation Path', 

56 for_frontend=False, 

57 ) 

58 system_sizing = BooleanSetting( 

59 default=True, 

60 description='Whether to do system sizing calculations in EnergyPlus ' 

61 'or not.', 

62 for_frontend=True 

63 ) 

64 run_for_sizing_periods = BooleanSetting( 

65 default=False, 

66 description='Whether to run the EnergyPlus simulation for sizing ' 

67 'periods or not.', 

68 for_frontend=True 

69 ) 

70 run_for_weather_period = BooleanSetting( 

71 default=True, 

72 description='Whether to run the EnergyPlus simulation for weather ' 

73 'file period or not.', 

74 for_frontend=True 

75 ) 

76 solar_distribution = ChoiceSetting( 

77 default='FullExterior', 

78 choices={ 

79 'FullExterior': 'Full exterior solar distribution', 

80 'FullInteriorAndExterior': 'Full interior and exterior solar ' 

81 'distribution' 

82 }, 

83 description='Choose solar distribution.', 

84 for_frontend=True 

85 ) 

86 add_window_shading = ChoiceSetting( 

87 default=None, 

88 choices={ 

89 None: 'Do not add window shading', 

90 'Interior': 'Add an interior shade in EnergyPlus', 

91 'Exterior': 'Add an exterior shade in EnergyPlus', 

92 }, 

93 description='Choose window shading.', 

94 for_frontend=True, 

95 ) 

96 output_format = ChoiceSetting( 

97 default='CommaAndHTML', 

98 choices={ 

99 'Comma': 'Output format Comma (.csv)', 

100 'Tab': 'Output format Tab (.tab)', 

101 'Fixed': 'Output format Fixed (.txt)', 

102 'HTML': 'Output format HTML (.htm)', 

103 'XML': 'Output format XML (.xml)', 

104 'CommaAndHTML': 'Output format CommaAndHTML', 

105 'TabAndHTML': 'Output format TabAndHTML', 

106 'XMLAndHTML': 'Output format TabAndHTML', 

107 'All': 'All output formats.', 

108 }, 

109 description='Choose output format for result files.', 

110 for_frontend=True 

111 ) 

112 unit_conversion = ChoiceSetting( 

113 default='JtoKWH', 

114 choices={ 

115 'None': 'No unit conversions', 

116 'JtoKWH': 'Convert Joule into kWh (1/3600000)', 

117 'JtoMJ': 'Joule converted into Megajoule (1/1000000)', 

118 'JtoGJ': 'Joule converted into Gigajoule', 

119 'InchPound': 'Convert all tabular values to common Inch-Pound ' \ 

120 'equivalent.' 

121 }, 

122 description='Choose unit conversion for result files.', 

123 for_frontend=True 

124 ) 

125 output_keys = ChoiceSetting( 

126 default=['output_outdoor_conditions', 'output_zone_temperature', 

127 'output_zone', 'output_infiltration', 'output_meters'], 

128 choices={ 

129 'output_outdoor_conditions': 'Add outputs for outdoor conditions.', 

130 'output_internal_gains': 'Add output for internal gains.', 

131 'output_zone_temperature': 'Add output for zone mean and ' 

132 'operative temperature.', 

133 'output_zone': 'Add heating and cooling rates and energy on zone ' 

134 'level.', 

135 'output_infiltration': 'Add output for zone infiltration.', 

136 'output_meters': 'Add heating and cooling meters.', 

137 'output_dxf': 'Output a dxf of the building geometry.', 

138 }, 

139 description='Choose groups of output variables (multiple choice).', 

140 multiple_choice=True, 

141 for_frontend=True 

142 ) 

143 correct_space_boundaries = BooleanSetting( 

144 default=True, 

145 description='Apply geometric correction to space boundaries.', 

146 for_frontend=True 

147 ) 

148 close_space_boundary_gaps = BooleanSetting( 

149 default=True, 

150 description='Close gaps in the set of space boundaries by adding ' 

151 'additional 2b space boundaries.', 

152 for_frontend=True 

153 ) 

154 add_natural_ventilation = BooleanSetting( 

155 default=True, 

156 description='Add natural ventilation to the building. Natural ' 

157 'ventilation is not available when cooling is activated.', 

158 for_frontend=True 

159 )