openstudio-standards 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/openstudio-standards/exterior_lighting/create.rb +2 -2
- data/lib/openstudio-standards/exterior_lighting/data/convert_entryway_data.rb +94 -0
- data/lib/openstudio-standards/exterior_lighting/data/convert_parking_data.rb +82 -0
- data/lib/openstudio-standards/exterior_lighting/data/entryways.csv +1 -1
- data/lib/openstudio-standards/exterior_lighting/data/entryways.json +565 -0
- data/lib/openstudio-standards/exterior_lighting/data/parking.csv +1 -1
- data/lib/openstudio-standards/exterior_lighting/data/parking.json +428 -0
- data/lib/openstudio-standards/exterior_lighting/information.rb +15 -15
- data/lib/openstudio-standards/hvac/components/create.rb +4 -4
- data/lib/openstudio-standards/hvac/components/modify.rb +2 -2
- data/lib/openstudio-standards/hvac/exhaust/create_exhaust_fan.rb +2 -2
- data/lib/openstudio-standards/hvac/exhaust/data/convert_typical_exhaust_data.rb +67 -0
- data/lib/openstudio-standards/hvac/exhaust/data/typical_exhaust.csv +1 -1
- data/lib/openstudio-standards/infiltration/data/NISTInfiltrationCorrelations.csv +1 -1
- data/lib/openstudio-standards/infiltration/data/NISTInfiltrationCorrelations.json +3172 -0
- data/lib/openstudio-standards/infiltration/data/convert_infiltration_data.rb +87 -0
- data/lib/openstudio-standards/infiltration/infiltration.rb +3 -3
- data/lib/openstudio-standards/infiltration/nist_infiltration.rb +42 -42
- data/lib/openstudio-standards/refrigeration/create_case.rb +4 -4
- data/lib/openstudio-standards/refrigeration/create_compressor.rb +2 -2
- data/lib/openstudio-standards/refrigeration/create_typical_refrigeration.rb +26 -25
- data/lib/openstudio-standards/refrigeration/create_walkin.rb +2 -2
- data/lib/openstudio-standards/refrigeration/data/refrigeration_compressors.csv +1 -1
- data/lib/openstudio-standards/refrigeration/data/typical_refrigerated_cases.csv +1 -1
- data/lib/openstudio-standards/refrigeration/data/typical_refrigerated_walkins.csv +1 -1
- data/lib/openstudio-standards/refrigeration/information.rb +4 -4
- data/lib/openstudio-standards/service_water_heating/create_typical.rb +1 -1
- data/lib/openstudio-standards/service_water_heating/data/typical_water_use_equipment.csv +1 -1
- data/lib/openstudio-standards/standards/Standards.Space.rb +3 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirLoopHVAC.rb +10 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.schedules.json +131 -107
- data/lib/openstudio-standards/standards/deer/data/deer.schedules.json +24 -24
- data/lib/openstudio-standards/utilities/ruleset_check.rb +1 -2
- data/lib/openstudio-standards/version.rb +1 -1
- data/lib/openstudio-standards/weather/stat_file.rb +13 -4
- metadata +10 -6
- data/data/standards/OpenStudio_Standards-ashrae_90_1-ALL-comstock(space_types).xlsx +0 -0
- data/data/standards/openstudio_standards_duplicates_log.csv +0 -7962
- data/lib/openstudio-standards/hvac/exhaust/data/convert_data.rb +0 -86
@@ -1,86 +0,0 @@
|
|
1
|
-
# These methods convert space type service water heating equipment data to and from .csv for editing.
|
2
|
-
private
|
3
|
-
|
4
|
-
require 'csv'
|
5
|
-
require 'json'
|
6
|
-
|
7
|
-
# Typical Water Use Equipment Data Schema
|
8
|
-
# equipment_name: The name of the specific piece of equipment. The space name will be prepended, and flow rate and temperature appended to the name.
|
9
|
-
# peak_flow_rate: The peak flow rate in gallons per hour
|
10
|
-
# peak_flow_rate_per_area: The peak flow rate in gallons per hour per ft^2 of floor area. Only used if 'peak_flow_rate' is unspecified.
|
11
|
-
# loop_type: Several options are available.
|
12
|
-
# - 'One Per Space': This water use equipment uses a dedicated loop in each space.
|
13
|
-
# - 'One Per Unit': This water use equipment uses a dedicated loop in each space. Water use equipment flow rates are multiplied by the 'num_units' additional property on the Space object.
|
14
|
-
# - 'Shared': Equipment will use the shared building service hot water loop.
|
15
|
-
# - 'One Per Space Type Adjacent': Not yet supported. Will create a dedicated loop to serve all adjacent equipment of the same space type.
|
16
|
-
# - 'One Per Building Type Adjacent': Not yet supported. Will create a dedicated loop to serve all adjacent equipment of the same building type.
|
17
|
-
# temperature: Target mixed water temperature at the water use, in degrees Fahrenheit
|
18
|
-
# flow_rate_schedule: The name of the flow rate schedule from the schedules .json
|
19
|
-
# sensible_fraction: The fraction of heat content converted to space sensible load
|
20
|
-
# latent_fraction: The fraction of heat content converted to space latent load
|
21
|
-
|
22
|
-
# Future Schema inclusions?
|
23
|
-
# minimum_space_size: Not yet supported. Only add this water use if the space is above this size of floor area.
|
24
|
-
# minimum_tank_volume: Not yet supported. The minimum tank volume to use for dedicated loops. The default is 40 gallons.
|
25
|
-
|
26
|
-
def csv_to_json(input_csv = 'typical_exhaust.csv',
|
27
|
-
output_json = 'typical_exhaust.json')
|
28
|
-
# Initialize the structure
|
29
|
-
result = {
|
30
|
-
space_types: []
|
31
|
-
}
|
32
|
-
|
33
|
-
# Read the CSV file
|
34
|
-
CSV.foreach(input_csv, headers: true, header_converters: :symbol) do |row|
|
35
|
-
space_type = row[:space_type]
|
36
|
-
building_type = row[:building_type]
|
37
|
-
exhaust_per_area = row[:exhaust_per_area]
|
38
|
-
|
39
|
-
space_type_hash = {
|
40
|
-
space_type: space_type,
|
41
|
-
building_type: building_type,
|
42
|
-
exhaust_per_area: exhaust_per_area
|
43
|
-
}
|
44
|
-
|
45
|
-
# Add the space_type_hash to the result array
|
46
|
-
result[:space_types] << space_type_hash
|
47
|
-
end
|
48
|
-
|
49
|
-
# Write to the output JSON file
|
50
|
-
File.write(output_json, JSON.pretty_generate(result))
|
51
|
-
|
52
|
-
puts "Data has been converted to JSON and saved to #{output_json}"
|
53
|
-
end
|
54
|
-
|
55
|
-
# convert to json
|
56
|
-
csv_to_json
|
57
|
-
|
58
|
-
def json_to_csv(input_json = 'typical_exhaust.json',
|
59
|
-
output_csv = 'typical_exhaust.csv')
|
60
|
-
# Read the JSON file
|
61
|
-
data = JSON.parse(File.read(input_json), symbolize_names: true)
|
62
|
-
|
63
|
-
# Prepare the CSV headers
|
64
|
-
headers = [
|
65
|
-
:space_type,
|
66
|
-
:building_type,
|
67
|
-
:exhaust_per_area
|
68
|
-
]
|
69
|
-
|
70
|
-
# Write the CSV file
|
71
|
-
CSV.open(output_csv, 'w', write_headers: true, headers: headers) do |csv|
|
72
|
-
data[:space_types].each do |space_type_entry|
|
73
|
-
space_type = space_type_entry[:space_type]
|
74
|
-
building_type = space_type_entry[:building_type]
|
75
|
-
exhaust_per_area = space_type_entry[:exhaust_per_area]
|
76
|
-
|
77
|
-
csv << [
|
78
|
-
space_type,
|
79
|
-
building_type,
|
80
|
-
exhaust_per_area
|
81
|
-
]
|
82
|
-
end
|
83
|
-
end
|
84
|
-
|
85
|
-
puts "Data has been converted to CSV and saved to #{output_csv}"
|
86
|
-
end
|