Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page

# Simulation of Primary/Secondary Loop in OpenStudio

Hi everyone,

I have a problem when simulating primary/secondary chilled water loop in OS. I tried to create two separate loops and used a "heat exchanger: fluid to fluid" to couple them. First loop: primary loop in which the supply side has chiller and demand side includes the heat exchanger; Second loop: secondary loop in which the supply side includes the heat exchanger and the cooling coil is in the demand side.

However, there was a fatal error in the secondary loop: As for the "Object=PLANTEQUIPMENTOPERATIONSCHEMES", the required "[Control Scheme 1 Object Type], [Control Scheme 1 Name] and [Control Scheme 1 Schedule Name]" are all blank.

I export the osm file into idf and used E+ to check. I found that except for the secondary loop, all the other loops have completed PlantEquipmentOperationSchemes items. But for the secondary loop, only the name of the scheme has been defined, and the schedules, types are all missing.

If I add a chiller to the supply side of the secondary loop (parallel to heat exchanger), then the error is gone. Does it mean I cannot simulate a loop in which the only component of supply side is heat exchanger? It seems unreasonable.

Anyone has experienced this problem? Is this the correct way to simulate primary/secondary loop?

Thanks,

Yan

edit retag close merge delete

Do you have a setpoint manager on the secondary loop?

( 2014-11-12 16:10:46 -0600 )edit

Yes, I used a Setpoint Manager Scheduled. I also deleted the setpoint manager, increase/decrease the setpoint temperature but still had the same fatal error.

( 2014-11-12 16:14:48 -0600 )edit

This arrangement does work in the underlying EnergyPlus. Seems to be an OS issue, I don't know. IF you want to work with exported IDF, you could manually fill out the operation scheme information. What you need there will depend on how the fluid heat exchanger is controlled. If it is load based control then you'll need a cooling load operation, if the HX is setpoint based it can be uncontrolled operation.

( 2014-11-13 08:05:58 -0600 )edit

@Yan What is the "Control Type" for the HX set to? Is there a setpoint manager on the outlet node of the HX itself, on the supply outlet node of the plant, or both? I believe you are hitting a bug in OpenStudio, but there might be a workaround before it is fixed.

( 2014-11-13 10:33:23 -0600 )edit

I used the OpenStudio 1.5.0. Control Type of the heat exchanger was set to "UncontrolledOn". I didn't put a setpoint manager on the outlet node of the HX itself but just put one on the supply outlet node of the plant loop. It seems OS will not add HX to the "PlantEquipmentList". Now I just add a chiller to the supply side of the loop, and set the chiller capacity and flow close to zero. It works and create a "PlantEquipmentList" for the loop, but in this list, there is only a chiller and don't include the HX. I guess I should also fix this in E+.

( 2014-11-13 12:37:54 -0600 )edit

Sort by » oldest newest most voted

This configuration (Primary / Secondary) exposes a bug in OpenStudio. Normally OpenStudio categorizes plant equipment as heating, cooling, or uncontrolled and puts it on the appropriate plant operation scheme. If there is a setpoint manager on the immediate outlet node OS will write the component setpoint operation scheme. In this case the HeatExchangerFluidToFluid object was uncategorized therefore it didn't end up any any operation scheme. Essentially uncontrolled. EnergyPlus will let this slide if there are other components on the plant, but not if there is a completely empty operation scheme list like in this case.

We have done two things.

One we created an OpenStudio Idf Measure to fix your idf file so that it will run. You enter the plant name and the HX name, and the measure will modify the idf file and insert a cooling operation scheme for the heat exchanger. I uploaded it to Google Drive here. You could of course edit the idf file similarly outside of OpenStudio.

The other thing is that we made a change to OS so that the heat exchanger will at least be put on an uncontrolled operation scheme if nothing else. This change will drop in our 1.5.3 iteration build expected on Monday. Uncontrolled operation probably isn't appropriate for a primary secondary setup however. The other thing that change included was the ability to include HX on the component setpoint operation scheme. To do this you simply drop a setpoint manger on the HX's supply side outlet node, and OS will add it to the operation scheme like it does for other components. I believe you can get a valid primary / secondary setup with component setpoint but it needs further research to be certain. OS should have a writeup in our documentation about this use case soon, along with any code changes that are required to do this most correctly.

The important bit of the measure that actually modifies the idf is the following.

 operation_list = workspace.getObjectByTypeAndName("PlantEquipmentOperationSchemes".to_IddObjectType,"#{plant_name} Operation Scheme List")
string_objects = []
string_objects << "
PlantEquipmentList,
#{plant_name} EquipmentList,
HeatExchanger:FluidTofluid,
#{hx_name};
"
string_objects << "
0,
100000,
#{plant_name} EquipmentList;
"
string_objects.each do |o|
object = idfObject.get
end

operation_list = operation_list.get
operation_list.setString(3,"Always On Discrete")

more

Thanks. It does help.

( 2014-11-18 08:06:25 -0600 )edit

Hi i have the same problem by creating a plant loop with a boiler, some baseboards and of course the setpointmanager. now i want to fix it the same way of your measure by using the sdk. I tried to

PlantLoop pl = new PlantLoop(_model);PlantEquipmentOperationScheme scheme = pl.primaryPlantEquipmentOperationScheme().__ref__();

scheme.setString(3, hotwater.name().__str__());

but this is not the right one. Is there a way to fix it by the sdk?

( 2016-01-28 07:21:37 -0600 )edit

@gg_student can you send me your model? The issue in this thread is very particular to the heat exchanger component and has also been addressed in the current version of OpenStudio. I believe your issue may be something else.

( 2016-01-28 09:46:36 -0600 )edit

@Kyle Benne yes i can, what is the adress to send it?

( 2016-01-28 09:57:58 -0600 )edit
( 2016-01-28 10:14:34 -0600 )edit