Question-and-Answer Resource for the Building Energy Modeling Community
Get s tarted with the Help page
Ask Your Question

How to add Thermal Storage Tank into the chiller loop ?

asked 2016-11-17 10:51:17 -0600

BL gravatar image

updated 2016-11-17 13:54:23 -0600

Hi, I added the thermal storage Chilled water tank in the loop, but don't know how to add it to the recharge loop. It doesn't show up in the My Model section.

How to add that tank into the recharge loop ?

image description

edit retag flag offensive close merge delete


Are you sure that component is supposed to be connected to two loops? From the I/O the object input only takes one inlet and one outlet node connection. In the 5ZoneDetailedIceStorage.idf example file, the ThermalStorage:Ice:Detailed object is only connected to the chilled water loop.

Eric Ringold gravatar image Eric Ringold  ( 2016-11-17 11:42:49 -0600 )edit

Hi Eric, Because I saw this post :

BL gravatar image BL  ( 2016-11-17 12:12:59 -0600 )edit

Then I guess the question is which object you're trying to use: ThermalStorage:Ice:Detailed or ThermalStorage:ChilledWater:Stratified. The answer you linked to is using the latter, which does take connections to multiple loops. Your screenshot is ambiguous, but based on the color of the icon you're trying to use ThermalStorage:Ice:Detailed, which does not connect to a recharge loop.

Eric Ringold gravatar image Eric Ringold  ( 2016-11-17 12:56:48 -0600 )edit

It also looks like you're using a version of OpenStudio that might not support ThermalStorage:ChilledWater:Stratified.

Eric Ringold gravatar image Eric Ringold  ( 2016-11-17 12:58:26 -0600 )edit

My current version is 1.12. I tried chilled water storage, can't find it.

BL gravatar image BL  ( 2016-11-17 13:17:15 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-11-18 11:15:10 -0600

updated 2016-11-18 11:16:46 -0600

The code shown below shows what the measure does. It literally just makes a new objects swaps it out for the water heater, then removes the water heater. Approach 1 seems like the right one. I assume the measure runs fine but you simulation is failing with missing setpoint. You can edit the model in the GUI after the measure has run to add anything else that is necessary.

# create thermal storage object
new_chilled_water =

placeholder = nil

# loop through plant loops and swap objects
model.getPlantLoops.each do |plant_loop|
  puts "Checking #{}"

  plant_loop.supplyComponents.each do |component|
    if == wh_name
      placeholder = component
      puts "found #{}"

      # swap components
      supply_inlet_node = component.to_WaterToWaterComponent.get.supplyInletModelObject.get.to_Node.get
      demand_inlet_node = component.to_WaterToWaterComponent.get.demandInletModelObject.get.to_Node.get


# remove unused water heater from the model
if not placeholder.nil?
  puts "Removing water heater"
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer


Question Tools

1 follower


Asked: 2016-11-17 10:51:17 -0600

Seen: 372 times

Last updated: Nov 18 '16