Module: BTAP::Analysis::Parametric

Defined in:
lib/openstudio-standards/btap/analysis.rb

Class Method Summary collapse

Class Method Details

.full_analysis(model, folder) ⇒ Object

This method performs a full analysis (elimination and Sensitivity).

Parameters:

Author:



309
310
311
312
313
314
# File 'lib/openstudio-standards/btap/analysis.rb', line 309

def self.full_analysis(model, folder)
  FileUtils.rm_rf(folder)
  Dir::mkdir(folder) unless File.exists?(folder)
  self.full_elimination_analysis(model, folder + "/elimination")
  self.full_sensitivity_analysis(model, folder + "/sensitivity")
end

.full_elimination_analysis(model_in, folder_name) ⇒ modelArray<String>

This method performs an elimination analysis ( OA, H&C setpoints,infiltration,occupancy,lighting,plug_loads,gas_equipment, hotwater, steam, other) and returns a model array.

Parameters:

Returns:

Author:



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
# File 'lib/openstudio-standards/btap/analysis.rb', line 324

def self.full_elimination_analysis(model_in, folder_name)
  modelArray = Array.new()
  #model_in.add_standard_schedules()

  model = model_in.deep_copy()
  model.building.get.setName("elim_outdoor_air")
  model.eliminate_from_model_outdoor_air()
  modelArray.push(model)

  model = model_in.deep_copy()
  model.building.get.setName("elim_H&C_setpoints")
  model.set_temp_to_free_float()
  modelArray.push(model)

  model = model_in.deep_copy()
  model.building.get.setName("elim_infilt")
  model.set_infiltration(0.0)
  modelArray.push(model)

  model = model_in.deep_copy()
  model.building.get.setName("elim_occup")
  model.set_occupancy_density(0.0)
  modelArray.push(model)

  model = model_in.deep_copy()
  model.building.get.setName("elim_lighting")
  model.set_lighting_power_density(0.0)
  modelArray.push(model)


  model = model_in.deep_copy()
  model.building.get.setName("elim_elec_equip")
  model.set_electric_equipment_power_density(0.0)
  modelArray.push(model)

  model = model_in.deep_copy()
  model.building.get.setName("elim_gas_equip")
  model.set_gas_equipment_power_density(0.0)
  modelArray.push(model)

  model = model_in.deep_copy()
  model.building.get.setName("elim_hot_water_equip")
  model.set_hot_water_equipment(0.0)
  modelArray.push(model)

  model = model_in.deep_copy()
  model.building.get.setName("elim_steam_equip")
  model.set_steam_equipment(0.0)
  modelArray.push(model)

  model = model_in.deep_copy()
  model.building.get.setName("elim_other_equip")
  model.set_other_equipment(0.0)
  modelArray.push(model)

  model = model_in.deep_copy()
  model.building.get.setName("elim_all")
  model.set_other_equipment(0.0)
  modelArray.push(model)
  #Run Files
  self.run_models(modelArray,folder_name)
  return modelArray
end

.full_sensitivity_analysis(model, parent_folder) ⇒ Object

This method performs a full sensitivity analysis on the wall, roof, solar-trans,window,and ground surfaces.

Parameters:

Author:



296
297
298
299
300
301
302
303
# File 'lib/openstudio-standards/btap/analysis.rb', line 296

def self.full_sensitivity_analysis(model, parent_folder)
  self.wall_rvalue_sensitivity_model_analysis(model, (parent_folder + "/wall-r"))
  self.roof_rvalue_sensitivity_model_analysis(model, (parent_folder + "/roof-r"))
  self.solar_trans_sensitivity_model_analysis(model, (parent_folder + "/solar_trans"))
  self.window_rvalue_sensitivity_model_analysis(model, (parent_folder + "/window-r"))
  self.ground_wall_rvalue_sensitivity_model_analysis(model, (parent_folder + "/ground_wall-r"))
  self.ground_floor_rvalue_sensitivity_model_analysis(model, (parent_folder + "/ground-floor-r"))
end

.ground_wall_rvalue_sensitivity_model_analysis(model_in, folder_name, values = [5,10,15,20,30,50,100]) ⇒ Object

Performs a ground sensitivity analysis



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
# File 'lib/openstudio-standards/btap/analysis.rb', line 163

def self.ground_wall_rvalue_sensitivity_model_analysis(model_in, folder_name,values = [5,10,15,20,30,50,100])
  #Create RunManager
  #create models
  modelArray = Array.new()
  #perform Solar Transmittance parametric analysis
  values.each do |value|
    runname = "Ground-Wall-R-Value="+ value.to_s
    model = model_in.deep_copy()
    model.building.get.setName(runname)
    model.set_surface_RValues(["Wall"],
      ["Ground",
        "GroundFCfactorMethod",
        "GroundSlabPreprocessorAverage",
        "GroundSlabPreprocessorCore",
        "GroundSlabPreprocessorPerimeter",
        "GroundBasementPreprocessorAverageWall",
        "GroundBasementPreprocessorAverageFloor",
        "GroundBasementPreprocessorUpperWall",
        "GroundBasementPreprocessorLowerWall"
      ],
      value)
    modelArray.push(model)
  end
  #Run Files
  self.run_models(modelArray,folder_name)
  return modelArray
end

.opaque_surface_conductance_sensitivity_analysis(model, choice) ⇒ modelArray<String>

This method will do an analysis of the opaque surface conductance sensitivity and returns a string model array.

Parameters:

Returns:

Author:



99
100
101
102
103
104
105
106
107
108
109
110
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
# File 'lib/openstudio-standards/btap/analysis.rb', line 99

def self.opaque_surface_conductance_sensitivity_analysis(model,choice )
  
  case choice
  when "Ground Surfaces"
  when "Ext Wall RSI = 100"
  when "Ext Roof RSI = 100"
  when "Ext Floor RSI = 100"
  when "Window Skylight RSI = 100" 
  when "No Window Solar Transmittance"
  when "No Southern Window Solar Transmittance"
    #Loads
  when "No Infiltration"
  when "No Ventilation"
  when "No Occupants"
  when "No Lighting"
  when "No Plug Loads"
  when "No Setpoint"
    
    
  end
  
  ground_boundary_conditions = ["Ground",
    "GroundFCfactorMethod",
    "GroundSlabPreprocessorAverage",
    "GroundSlabPreprocessorCore",
    "GroundSlabPreprocessorPerimeter",
    "GroundBasementPreprocessorAverageWall",
    "GroundBasementPreprocessorAverageFloor",
    "GroundBasementPreprocessorUpperWall",
    "GroundBasementPreprocessorLowerWall"
  ]
  #get non-defaulted ground surfaces.

  ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition(model.getSurfaces,ground_boundary_conditions)
  non_defaulted_ground_surfaces = BTAP::Geometry::Surfaces::filter_by_non_defaulted_surfaces(ground_surfaces)
   
  
  
  #create models
  modelArray = Array.new()
  #perform Solar Transmittance parametric analysis
  values.each do |value|
    model = model_in.deep_copy()
    model.building.get.setName("Ground-Floor-R-Value="+ value.to_s)
    model.set_surface_RValues(["Floor"],
      ["Ground",
        "GroundFCfactorMethod",
        "GroundSlabPreprocessorAverage",
        "GroundSlabPreprocessorCore",
        "GroundSlabPreprocessorPerimeter",
        "GroundBasementPreprocessorAverageWall",
        "GroundBasementPreprocessorAverageFloor",
        "GroundBasementPreprocessorUpperWall",
        "GroundBasementPreprocessorLowerWall"
      ],
      value)
    modelArray.push(model)
  end
  #Run Files
  self.run_models(modelArray,folder_name)
  return modelArray
end

.roof_rvalue_sensitivity_model_analysis(model_in, folder_name, values = [5,10,15,20,30,50,100]) ⇒ modelArray<String>

This method performs a roof sensitivity analysis and returns a string model array.

Parameters:

Returns:

Author:



220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/openstudio-standards/btap/analysis.rb', line 220

def self.roof_rvalue_sensitivity_model_analysis(model_in, folder_name,values = [5,10,15,20,30,50,100])
  #create models
  modelArray = Array.new()
  #perform Solar Transmittance parametric analysis
  values.each do |value|
    runname = "Roof_R_Value_"+ value.to_s
    model = model_in.deep_copy()
    model.building.get.setName(runname)
    model.set_surface_RValues(["RoofCeiling"],["Outdoors"],value)
    modelArray.push(model)
  end

  #Run Files
  self.run_models(modelArray,folder_name)
  return modelArray
end

.run_models(modelArray, folder_name) ⇒ modelArray<String>

This method performs a roof sensitivity analysis and returns a string model array.

Parameters:

  • modelArray (Object)
  • folder_name (String)

Returns:

Author:



242
243
244
245
246
247
248
# File 'lib/openstudio-standards/btap/analysis.rb', line 242

def self.run_models(modelArray,folder_name)
  process_manager = BTAP::SimManager::ProcessManager.new(folder_name)
  modelArray.each do |model|
    process_manager.addModel(model)
  end
  process_manager.start_sims
end

.solar_trans_sensitivity_model_analysis(model_in, folder_name, values = [0.1,0.2,0.4,0.6,0.8,1.00]) ⇒ modelArray<String>

This method performs a glazing solar transmittance sensitivity analysis and returns a model array.

Parameters:

Returns:

Author:



256
257
258
259
260
261
262
263
264
265
266
267
268
269
# File 'lib/openstudio-standards/btap/analysis.rb', line 256

def self.solar_trans_sensitivity_model_analysis(model_in, folder_name, values = [0.1,0.2,0.4,0.6,0.8,1.00])
  modelArray = Array.new()
  #perform Solar Transmittance parametric analysis
  values.each do |value|
    runname = "Window-Tsol-"+ value.to_s
    model = model_in.deep_copy()
    model.building.get.setName(runname)
    model.set_subsurface_solar_transmittance(["FixedWindow","OperableWindow"],["Outdoors"],value)
    modelArray.push(model)
  end
  #Run Files
  self.run_models(modelArray,folder_name)
  return modelArray
end

.wall_rvalue_sensitivity_model_analysis(model, folder_name, values = [5,10,15,20,30,50,100]) ⇒ modelArray<String>

This method performs a wall sensitivity analysis and returns a string model array.

Parameters:

Returns:

Author:



198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# File 'lib/openstudio-standards/btap/analysis.rb', line 198

def self.wall_rvalue_sensitivity_model_analysis(model, folder_name,values = [5,10,15,20,30,50,100])
  #create models
  modelArray = Array.new()
  #perform Solar Transmittance parametric analysis
  values.each do |value|
    runname = "Wall_R_Value_"+ value.to_s
    model = model.deep_copy()
    model.building.get.setName(runname)
    model.set_surface_RValues(["Wall"],["Outdoors"],value)
    modelArray.push(model)
  end
  #Run Files
  self.run_models(modelArray,folder_name)
  return modelArray
end

.window_rvalue_sensitivity_model_analysis(model_in, folder_name, values = [5,10,15,20,30,50,100]) ⇒ modelArray<String>

This method performs an rvalue sensitivity analysis and returns a model array.

Parameters:

Returns:

Author:



277
278
279
280
281
282
283
284
285
286
287
288
289
290
# File 'lib/openstudio-standards/btap/analysis.rb', line 277

def self.window_rvalue_sensitivity_model_analysis(model_in, folder_name, values = [5,10,15,20,30,50,100])
  modelArray = Array.new()
  #perform Solar Transmittance parametric analysis
  values.each do |value|
    runname = "Window-R-Value="+ value.to_s
    model = model_in.deep_copy()
    model.building.get.setName(runname)
    model.set_subsurface_RValues(["FixedWindow","OperableWindow"],["Outdoors"],value)
    modelArray.push(model)
  end
  #Run Files
  self.run_models(modelArray,folder_name)
  return modelArray
end