openstudio-standards 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -384,6 +384,18 @@
384
384
  "max_out": null,
385
385
  "notes": "From Prototype Buildings"
386
386
  },
387
+ {
388
+ "name": "SWH-EFFFPLR-NECB2011",
389
+ "coeff_1": 0.7576,
390
+ "coeff_2": 1.0071,
391
+ "coeff_3": -1.4443,
392
+ "coeff_4": 0.6844,
393
+ "min_x": 0.0,
394
+ "max_x": 1.0,
395
+ "min_out": null,
396
+ "max_out": null,
397
+ "notes": "From NECB 2011"
398
+ },
387
399
  {
388
400
  "name": "SchoolPrimary Kitchen_ZN_1_FLR_1_Case:1_WALKINFREEZERSingleShelfHorizontal_LatentEnergyMult",
389
401
  "coeff_1": 0.0236,
@@ -162,7 +162,7 @@
162
162
  "roughness": "MediumRough",
163
163
  "thickness": 4.0,
164
164
  "conductivity": 16.0194175,
165
- "resistance": 0.25,
165
+ "resistance": 0.2496969693,
166
166
  "density": 144.957816,
167
167
  "specific_heat": 0.198852772,
168
168
  "thermal_absorptance": null,
@@ -15996,7 +15996,7 @@
15996
15996
  "roughness": "Smooth",
15997
15997
  "thickness": 0.5,
15998
15998
  "conductivity": 1.10957004,
15999
- "resistance": 0.451,
15999
+ "resistance": 0.4506250007,
16000
16000
  "density": 49.9424,
16001
16001
  "specific_heat": 0.260516252,
16002
16002
  "thermal_absorptance": 0.9,
@@ -10672,6 +10672,64 @@
10672
10672
  "necb_hvac_system_selection_type": null,
10673
10673
  "necb_schedule_type": null
10674
10674
  },
10675
+ {
10676
+ "template": "90.1-2004",
10677
+ "building_type": "Office",
10678
+ "space_type": "Dining",
10679
+ "rgb": "230_157_120",
10680
+ "lighting_standard": "ASHRAE 90.1-2004",
10681
+ "lighting_primary_space_type": "Dining Area",
10682
+ "lighting_secondary_space_type": "General",
10683
+ "lighting_per_area": 0.9,
10684
+ "lighting_per_person": null,
10685
+ "additional_lighting_per_area": null,
10686
+ "lighting_fraction_to_return_air": 0.4,
10687
+ "lighting_fraction_radiant": 0.4,
10688
+ "lighting_fraction_visible": 0.2,
10689
+ "lighting_schedule": "OfficeMedium BLDG_LIGHT_SCH_2004",
10690
+ "ventilation_standard": "ASHRAE 62.1-1999",
10691
+ "ventilation_primary_space_type": "Offices",
10692
+ "ventilation_secondary_space_type": "Reception areas",
10693
+ "ventilation_per_area": 0,
10694
+ "ventilation_per_person": 15,
10695
+ "ventilation_air_changes": "",
10696
+ "minimum_total_air_changes": null,
10697
+ "occupancy_per_area": null,
10698
+ "occupancy_schedule": "OfficeMedium BLDG_OCC_SCH",
10699
+ "occupancy_activity_schedule": "OfficeMedium ACTIVITY_SCH",
10700
+ "infiltration_per_exterior_area": 0.0595,
10701
+ "infiltration_per_exterior_wall_area": null,
10702
+ "infiltration_air_changes": null,
10703
+ "infiltration_schedule": "OfficeMedium INFIL_SCH_PNNL",
10704
+ "gas_equipment_per_area": null,
10705
+ "gas_equipment_fraction_latent": null,
10706
+ "gas_equipment_fraction_radiant": null,
10707
+ "gas_equipment_fraction_lost": null,
10708
+ "gas_equipment_schedule": null,
10709
+ "electric_equipment_per_area": 1.0,
10710
+ "electric_equipment_fraction_latent": 0.0,
10711
+ "electric_equipment_fraction_radiant": 0.5,
10712
+ "electric_equipment_fraction_lost": 0.0,
10713
+ "electric_equipment_schedule": "OfficeLarge BLDG_EQUIP_SCH",
10714
+ "heating_setpoint_schedule": "OfficeLarge BLDG_EQUIP_SCH",
10715
+ "cooling_setpoint_schedule": "OfficeLarge BLDG_EQUIP_SCH",
10716
+ "service_water_heating_peak_flow_rate": null,
10717
+ "service_water_heating_area": null,
10718
+ "service_water_heating_peak_flow_per_area": null,
10719
+ "service_water_heating_target_temperature": null,
10720
+ "service_water_heating_fraction_sensible": null,
10721
+ "service_water_heating_fraction_latent": null,
10722
+ "service_water_heating_schedule": null,
10723
+ "exhaust_fan_efficiency": null,
10724
+ "exhaust_fan_power": null,
10725
+ "exhaust_fan_pressure_rise": null,
10726
+ "exhaust_fan_maximum_flow_rate": null,
10727
+ "exhaust_schedule": null,
10728
+ "balanced_exhaust_fraction_schedule": null,
10729
+ "is_residential": null,
10730
+ "necb_hvac_system_selection_type": null,
10731
+ "necb_schedule_type": null
10732
+ },
10675
10733
  {
10676
10734
  "template": "90.1-2004",
10677
10735
  "building_type": "Office",
@@ -85,7 +85,7 @@ class OpenStudio::Model::CoilCoolingDXSingleSpeed
85
85
  pthp_eer = pthp_eer_coeff_1 - (pthp_eer_coeff_2 * eer_calc_cap_btu_per_hr / 1000.0)
86
86
  cop = eer_to_cop(pthp_eer, OpenStudio.convert(capacity_btu_per_hr, 'Btu/hr', 'W').get)
87
87
  new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{pthp_eer.round(1)}EER"
88
- OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}: #{cooling_type} #{heating_type} #{sub_category} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{pthp_eer.round(2)}")
88
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}: #{cooling_type} #{heating_type} #{sub_category} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{pthp_eer.round(1)}")
89
89
  end
90
90
 
91
91
  # If PTAC, use equations
@@ -103,7 +103,7 @@ class OpenStudio::Model::CoilCoolingDXSingleSpeed
103
103
  ptac_eer = ptac_eer_coeff_1 - (ptac_eer_coeff_2 * eer_calc_cap_btu_per_hr / 1000.0)
104
104
  cop = eer_to_cop(ptac_eer, OpenStudio.convert(capacity_btu_per_hr, 'Btu/hr', 'W').get)
105
105
  new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{ptac_eer.round(1)}EER"
106
- OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}: #{cooling_type} #{heating_type} #{sub_category} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{ptac_eer}")
106
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}: #{cooling_type} #{heating_type} #{sub_category} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{ptac_eer.round(1)}")
107
107
  end
108
108
 
109
109
  # If specified as SEER
@@ -16,6 +16,7 @@ class OpenStudio::Model::Model
16
16
  idf = forward_translator.translateModel(self)
17
17
  idf_path = OpenStudio::Path.new("#{run_dir}/#{idf_name}")
18
18
  osm_path = OpenStudio::Path.new("#{run_dir}/#{osm_name}")
19
+ osw_path = OpenStudio::Path.new("#{run_dir}/in.osw")
19
20
  idf.save(idf_path, true)
20
21
  save(osm_path, true)
21
22
 
@@ -36,9 +37,9 @@ class OpenStudio::Model::Model
36
37
  use_runmanager = true
37
38
 
38
39
  begin
39
- require 'openstudio-workflow'
40
+ workflow = OpenStudio::WorkflowJSON.new
40
41
  use_runmanager = false
41
- rescue LoadError
42
+ rescue NameError
42
43
  use_runmanager = true
43
44
  end
44
45
 
@@ -76,100 +77,23 @@ class OpenStudio::Model::Model
76
77
 
77
78
  OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Finished run.')
78
79
 
79
- elsif OpenStudio::Workflow::VERSION >= '1.0.0' # Use the OS 2.0 openstudio-workflow gem
80
- OpenStudio.logFree(OpenStudio::Debug, 'openstudio.model.Model', 'Running with OS 2.0 openstudio-workflow gem.')
81
-
82
- # Write OSW file for the simulation
83
- require 'json'
84
- osw_dir = File.dirname(osm_path.to_s)
85
- osw_hash = {
86
- run_directory: File.join(osw_dir, 'run'),
87
- seed_file: File.absolute_path(osm_path.to_s),
88
- weather_file: File.absolute_path(epw_path.to_s),
89
- steps: []
90
- }
91
- osw_path = File.join(osw_dir, 'workflow.osw')
92
- File.open(osw_path, 'wb') { |f| f << JSON.pretty_generate(osw_hash) }
93
-
94
- # Run workflow.osw
95
- run_options = {}
96
- #run_options[:debug] = true
97
-
98
- # jobs for running IDF
99
- # run_options[:jobs] = [
100
- # { state: :queued, next_state: :initialization, options: { initial: true } },
101
- # { state: :initialization, next_state: :preprocess, job: :RunInitialization,
102
- # file: 'openstudio/workflow/jobs/run_initialization.rb', options: {} },
103
- # { state: :preprocess, next_state: :simulation, job: :RunPreprocess,
104
- # file: 'openstudio/workflow/jobs/run_preprocess.rb' , options: {} },
105
- # { state: :simulation, next_state: :finished, job: :RunEnergyPlus,
106
- # file: 'openstudio/workflow/jobs/run_energyplus.rb', options: {} },
107
- # { state: :finished },
108
- # { state: :errored }
109
- # ]
110
-
111
- # jobs for running OSM
112
- run_options[:jobs] = [
113
- { state: :queued, next_state: :initialization, options: { initial: true } },
114
- { state: :initialization, next_state: :os_measures, job: :RunInitialization,
115
- file: 'openstudio/workflow/jobs/run_initialization.rb', options: {} },
116
- { state: :os_measures, next_state: :translator, job: :RunOpenStudioMeasures,
117
- file: 'openstudio/workflow/jobs/run_os_measures.rb', options: {} },
118
- { state: :translator, next_state: :ep_measures, job: :RunTranslation,
119
- file: 'openstudio/workflow/jobs/run_translation.rb', options: {} },
120
- { state: :ep_measures, next_state: :preprocess, job: :RunEnergyPlusMeasures,
121
- file: 'openstudio/workflow/jobs/run_ep_measures.rb', options: {} },
122
- { state: :preprocess, next_state: :simulation, job: :RunPreprocess,
123
- file: 'openstudio/workflow/jobs/run_preprocess.rb', options: {} },
124
- { state: :simulation, next_state: :reporting_measures, job: :RunEnergyPlus,
125
- file: 'openstudio/workflow/jobs/run_energyplus.rb', options: {} },
126
- { state: :reporting_measures, next_state: :postprocess, job: :RunReportingMeasures,
127
- file: 'openstudio/workflow/jobs/run_reporting_measures.rb', options: {} },
128
- { state: :postprocess, next_state: :finished, job: :RunPostprocess,
129
- file: 'openstudio/workflow/jobs/run_postprocess.rb', options: {} },
130
- { state: :finished },
131
- { state: :errored }
132
- ]
133
-
134
- begin
135
- # earlier version of the Workflow::Run method
136
-
137
- # Create local adapters
138
- adapter_options = { workflow_filename: File.basename(osw_path), output_directory: File.join(Dir.pwd, 'run') }
139
- input_adapter = OpenStudio::Workflow.load_input_adapter 'local', adapter_options
140
- output_adapter = OpenStudio::Workflow.load_output_adapter 'local', adapter_options
141
-
142
- k = OpenStudio::Workflow::Run.new input_adapter, output_adapter, File.dirname(osw_path), run_options
143
- rescue
144
- # current version of the Workflow::Run method
145
- k = OpenStudio::Workflow::Run.new osw_path, run_options
146
- end
147
-
148
- final_state = k.run
149
-
150
- # Check run status and return the sql_path
151
- if final_state == :finished
152
- OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Finished run.')
153
- else
154
- OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Run completed with errors.')
155
- end
156
- sql_path = OpenStudio::Path.new(File.join(osw_dir, 'run/eplusout.sql'))
80
+ else # method to running simulation within measure using OpenStudio 2.x WorkflowJSON
157
81
 
158
- OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Finished simulation.')
159
-
160
- else # Use the pre OS 2.0 openstudio-workflow gem
161
- OpenStudio.logFree(OpenStudio::Debug, 'openstudio.model.Model', 'Running with pre OS 2.0 openstudio-workflow gem.')
82
+ OpenStudio.logFree(OpenStudio::Debug, 'openstudio.model.Model', 'Running with OS 2.x WorkflowJSON.')
162
83
 
163
84
  # Copy the weather file to this directory
164
85
  FileUtils.copy(epw_path.to_s, run_dir)
165
86
 
166
- # Run the simulation
167
- sim = OpenStudio::Workflow.run_energyplus('Local', run_dir)
168
- final_state = sim.run
87
+ workflow.setSeedFile(File.absolute_path(osm_path.to_s))
88
+ workflow.setWeatherFile(epw_path)
89
+ workflow.saveAs(File.absolute_path(osw_path.to_s))
169
90
 
170
- if final_state == :finished
171
- OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Finished run.')
172
- end
91
+ cli_path = OpenStudio.getOpenStudioCLI
92
+ cmd = "\"#{cli_path}\" run -w \"#{osw_path}\""
93
+ puts cmd
94
+ system(cmd)
95
+
96
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Finished run.')
173
97
 
174
98
  sql_path = OpenStudio::Path.new("#{run_dir}/run/eplusout.sql")
175
99
 
@@ -1,3 +1,3 @@
1
1
  module OpenstudioStandards
2
- VERSION = '0.1.8'.freeze
2
+ VERSION = '0.1.9'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstudio-standards
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Parker
@@ -21,7 +21,7 @@ authors:
21
21
  autorequire:
22
22
  bindir: bin
23
23
  cert_chain: []
24
- date: 2016-10-26 00:00:00.000000000 Z
24
+ date: 2016-12-04 00:00:00.000000000 Z
25
25
  dependencies:
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: bundler
@@ -355,7 +355,6 @@ files:
355
355
  - data/geometry/Geometry.large_hotel.2010.osm
356
356
  - data/geometry/Geometry.large_hotel.2013.osm
357
357
  - data/geometry/Geometry.large_hotel.doe.osm
358
- - data/geometry/Geometry.large_office.osm
359
358
  - data/geometry/Geometry.large_office_2010.osm
360
359
  - data/geometry/Geometry.large_office_reference.osm
361
360
  - data/geometry/Geometry.medium_office.osm
@@ -731,3 +730,4 @@ specification_version: 4
731
730
  summary: Creates DOE Prototype building models and transforms proposed OpenStudio
732
731
  models to baseline OpenStudio models.
733
732
  test_files: []
733
+ has_rdoc: