lib/openstudio-standards/standards/Standards.Model.rb in openstudio-standards-0.2.17.rc1 vs lib/openstudio-standards/standards/Standards.Model.rb in openstudio-standards-0.2.17.rc2

- old
+ new

@@ -17,25 +17,22 @@ # Method used for 90.1-2016 and onward # # @note Per 90.1, the Performance Rating Method "does NOT offer an alternative compliance path for minimum standard compliance." # This means you can't use this method for code compliance to get a permit. # @param user_model [OpenStudio::model::Model] User specified OpenStudio model - # @param building_type [String] the building type # @param climate_zone [String] the climate zone # @param hvac_building_type [String] the building type for baseline HVAC system determination (90.1-2016 and onward) # @param wwr_building_type [String] the building type for baseline WWR determination (90.1-2016 and onward) # @param swh_building_type [String] the building type for baseline SWH determination (90.1-2016 and onward) - # @param custom [String] the custom logic that will be applied during baseline creation. Valid choices are 'Xcel Energy CO EDA' or '90.1-2007 with addenda dn'. - # If nothing is specified, no custom logic will be applied; the process will follow the template logic explicitly. - # @param sizing_run_dir [String] the directory where the sizing runs will be performed + # @param output_dir [String] the directory where the PRM generations will be performed # @param run_all_orients [Boolean] indicate weather a baseline model should be created for all 4 orientations: same as user model, +90 deg, +180 deg, +270 deg # @param debug [Boolean] If true, will report out more detailed debugging output # @return [Bool] returns true if successful, false if not # Method used for 90.1-2016 and onward - def model_create_prm_stable_baseline_building(model, building_type, climate_zone, hvac_building_type, wwr_building_type, swh_building_type, custom = nil, sizing_run_dir = Dir.pwd, run_all_orients = true, unmet_load_hours_check = true, debug = false) - model_create_prm_any_baseline_building(model, building_type, climate_zone, hvac_building_type, wwr_building_type, swh_building_type, true, custom, sizing_run_dir, run_all_orients, unmet_load_hours_check, debug) + def model_create_prm_stable_baseline_building(model, climate_zone, hvac_building_type, wwr_building_type, swh_building_type, output_dir = Dir.pwd, unmet_load_hours_check = true, debug = false) + model_create_prm_any_baseline_building(model, '', climate_zone, hvac_building_type, wwr_building_type, swh_building_type, true, false, output_dir, true, unmet_load_hours_check, debug) end # Creates a Performance Rating Method (aka Appendix G aka LEED) baseline building model # Method used for 90.1-2013 and prior # @param user_model [OpenStudio::model::Model] User specified OpenStudio model @@ -75,10 +72,13 @@ umlh = model_get_unmet_load_hours(user_model) if umlh > 300 OpenStudio.logFree(OpenStudio::Error, 'prm.log', "Proposed model unmet load hours exceed 300. Baseline model(s) won't be created.") raise "Proposed model unmet load hours exceed 300. Baseline model(s) won't be created." end + else + OpenStudio.logFree(OpenStudio::Error, 'prm.log', "Simulation failed. Check the model to make sure no severe errors.") + raise "Simulation on proposed model failed. Baseline generation is stopped." end end # User data process # bldg_type_hvac_zone_hash could be an empty hash if all zones in the models are unconditioned @@ -1883,13 +1883,13 @@ story_zone_lists = model_group_zones_by_story(model, sys_group['zones']) # For the array of zones on each story, # separate the primary zones from the secondary zones. # Add the baseline system type to the primary zones # and add the suplemental system type to the secondary zones. - story_zone_lists.each do |zones| + story_zone_lists.each do |story_group| # Differentiate primary and secondary zones - pri_sec_zone_lists = model_differentiate_primary_secondary_thermal_zones(model, story_group, zone_fan_scheds) + pri_sec_zone_lists = model_differentiate_primary_secondary_thermal_zones(model, story_group) # Record the primary zone system types pri_sec_zone_lists['primary'].each do |zone| zone_to_sys_type[zone] = pri_system_type end # Record the secondary zone system types @@ -6924,11 +6924,11 @@ # A template method that handles the loading of user input data from multiple sources # include data source from: # 1. user data csv files # 2. data from measure and OpenStudio interface - # @param [Openstudio:model:Model] model + # @param [OpenStudio:model:Model] model # @param [String] climate_zone # @param [String] default_hvac_building_type # @param [String] default_wwr_building_type # @param [String] default_swh_building_type # @param [Hash] bldg_type_hvac_zone_hash A hash maps building type for hvac to a list of thermal zones @@ -6938,78 +6938,78 @@ end # Template method for adding a setpoint manager for a coil control logic to a heating coil. # ASHRAE 90.1-2019 Appendix G. # - # @param model [OpenStudio::Model::Model] Openstudio model + # @param model [OpenStudio::Model::Model] OpenStudio model # @param thermalZones Array([OpenStudio::Model::ThermalZone]) thermal zone array # @param coil Heating Coils # @return [Boolean] true def model_set_central_preheat_coil_spm(model, thermal_zones, coil) return true end # Template method for adding zone additional property "zone DCV implemented in user model" # # @author Xuechen (Jerry) Lei, PNNL - # @param model [OpenStudio::Model::Model] Openstudio model + # @param model [OpenStudio::Model::Model] OpenStudio model def model_mark_zone_dcv_existence(model) return true end # Check whether the baseline model generation needs to run all four orientations # The default shall be true # # @param [Boolean] run_all_orients: user inputs to indicate whether it is required to run all orientations - # @param [OpenStudio::Model::Model] Openstudio model + # @param [OpenStudio::Model::Model] OpenStudio model def run_all_orientations(run_all_orients, user_model) return run_all_orients end # Template method for reading user data and adding to zone additional properties # # @author Xuechen (Jerry) Lei, PNNL - # @param model [OpenStudio::Model::Model] Openstudio model + # @param model [OpenStudio::Model::Model] OpenStudio model def model_add_dcv_user_exception_properties(model) return true end # Template method for raising user model DCV warning and errors # # @author Xuechen (Jerry) Lei, PNNL - # @param model [OpenStudio::Model::Model] Openstudio model + # @param model [OpenStudio::Model::Model] OpenStudio model def model_raise_user_model_dcv_errors(model) return true end # Template method for adding zone additional property "airloop dcv required by 901" and "zone dcv required by 901" # # @author Xuechen (Jerry) Lei, PNNL - # @param model [OpenStudio::Model::Model] Openstudio model + # @param model [OpenStudio::Model::Model] OpenStudio model def model_add_dcv_requirement_properties(model) return true end # Template method for checking if zones in the baseline model should have DCV based on 90.1 2019 G3.1.2.5. # Zone additional property 'apxg no need to have DCV' added # # @author Xuechen (Jerry) Lei, PNNL - # @param model [OpenStudio::Model::Model] Openstudio model + # @param model [OpenStudio::Model::Model] OpenStudio model def model_add_apxg_dcv_properties(model) return true end # Template method for setting DCV in baseline HVAC system if required # # @author Xuechen (Jerry) Lei, PNNL - # @param model [OpenStudio::Model::Model] Openstudio model + # @param model [OpenStudio::Model::Model] OpenStudio model def model_set_baseline_demand_control_ventilation(model, climate_zone) return true end # Identify the return air type associated with each thermal zone # - # @param model [OpenStudio::Model::Model] Openstudio model object + # @param model [OpenStudio::Model::Model] OpenStudio model object def model_identify_return_air_type(model) # air-loop based system model.getThermalZones.each do |zone| # Conditioning category won't include indirectly conditioned thermal zones cond_cat = thermal_zone_conditioning_category(zone, model_standards_climate_zone(model))