-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #303 - Add ZoneHVACCoolingPanelRadiantConvectiveWater to OpenStud…
…ioApplication
- Loading branch information
Showing
12 changed files
with
165 additions
and
1 deletion.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
src/openstudio_app/Resources/default/add_zonehvac_coolingpanel_radiantconvective_water.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# p = File.join(ENV["HOME"], "Software/Others/OSApp-build-release/OpenStudio-3.1.1/OpenStudio-3.1.1-alpha+3d83fc2b65-Linux/usr/local/openstudio-3.1.1-alpha/Ruby/openstudio.rb") | ||
# require p | ||
require 'openstudio' | ||
|
||
include OpenStudio::Model | ||
|
||
# Helper to load a model in one line | ||
# It will raise if the path (or the model) isn't valid | ||
# | ||
# @param path [String] The path to the osm | ||
# @return [OpenStudio::Model::Model] the resulting model. | ||
def osload(path) | ||
translator = OpenStudio::OSVersion::VersionTranslator.new | ||
ospath = OpenStudio::Path.new(path) | ||
model = translator.loadModel(ospath) | ||
if model.empty? | ||
raise "Path '#{path}' is not a valid path to an OpenStudio Model" | ||
else | ||
model = model.get | ||
end | ||
return model | ||
end | ||
|
||
m = osload('hvac_library.osm') | ||
|
||
alwaysOn = m.getScheduleConstantByName("Always On Discrete hvac_library").get | ||
|
||
panel = ZoneHVACCoolingPanelRadiantConvectiveWater.new(m) | ||
panel.setAvailabilitySchedule(alwaysOn) | ||
panel.setName("Zone HVAC Cooling Panel Radiant Convective Water") | ||
|
||
cc = panel.coolingCoil.to_CoilCoolingWaterPanelRadiant.get | ||
cc.setName("Coil Cooling Water Panel Radiant") | ||
|
||
# Remove the alwaysOn it created by default, and the schedule type lim | ||
sch = m.getScheduleConstantByName("Always On Discrete").get | ||
sch_lim = sch.scheduleTypeLimits.get | ||
sch_lim.remove() | ||
sch.remove() | ||
|
||
m.save('hvac_library.osm', true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.56 KB
src/openstudio_lib/images/mini_icons/coilcooling_water_panel_radiant.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.13 KB
...nstudio_lib/images/mini_icons/zonehvac_coolingpanel_radiantconvective_water.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.16 KB
src/openstudio_lib/images/zonehvac_coolingpanel_radiantconvective_water.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters