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

Revision history [back]

will@stok.com Thanks for the file. As Julien Marrec pointed out the issue was that this measure was not written to handle spaces that don't have a space type assigned. For some background the OsLib_HVAC.rb file was created for the AEDG School and Office measures. In those measures this condition is properly trapped. This measure has altered the library so it no longer functions in the same way. In the original use the space type was used to determine which zones got the primary HVAC type vs. the secondary HVAC type, in this case it is used to determine which zones should have the new HVAC system.

You can add this line of code just above line 122 and the measure will not hit a ruby error, but it won't behave as you expect either.

next unless space.spaceType.is_initialized

As you can see below the result no longer has a ruby error, but also nothing changed in your model which isn't what you want. While models that come out of CBECC-Com are OpenStudio models, they don't make use of OpenStudio SpaceTypes, ConstructionSets or ScheduleRulesets. As a result many measures which rely on these objects will probably not run as expected on these models.

image description

This measure appears to expect you to have space types in your model. It will create a bool argument for each space type to determine if the HVAC system will be applied to that space type. The process below will apply the system to the entire building, you can adapt it to apply it to specific parts.

First, create a new empty space type. Don't add anything to it.

image description

Next make this the default space type for the entire building. This won't impact the simulation results, since the space type does not add or remove any loads. If you don't want to apply the HVAC system to the entire building then assign another space type to specific spaces in your model. It will override the default space type you set at the building level.

image description

Now when you run the measure you will see a new argument for the space type. Check this to apply the HVAC system to that space type.

image description

Lastly you can see the output measures to see that the model was altered.

image description

I hope this his helpful. I'll update the measure on BCL to avoid this ruby error, but without larger changes to the model you will still need to assign space types where you want the system applied.

will@stok.com Thanks for the file. As Julien @Julien Marrec pointed out the issue was that this measure was not written to handle spaces that don't have a space type assigned. For some background the OsLib_HVAC.rb file was created for the AEDG School and Office measures. In those measures this condition is properly trapped. This measure has altered the library so it no longer functions in the same way. In the original use the space type was used to determine which zones got the primary HVAC type vs. the secondary HVAC type, in this case it is used to determine which zones should have the new HVAC system.

You can add this line of code just above line 122 and the measure will not hit a ruby error, but it won't behave as you expect either.

next unless space.spaceType.is_initialized

As you can see below the result no longer has a ruby error, but also nothing changed in your model which isn't what you want. While models that come out of CBECC-Com are OpenStudio models, they don't make use of OpenStudio SpaceTypes, ConstructionSets or ScheduleRulesets. As a result many measures which rely on these objects will probably not run as expected on these models.

image description

This measure appears to expect you to have space types in your model. It will create a bool argument for each space type to determine if the HVAC system will be applied to that space type. The process below will apply the system to the entire building, you can adapt it to apply it to specific parts.

First, create a new empty space type. Don't add anything to it.

image description

Next make this the default space type for the entire building. This won't impact the simulation results, since the space type does not add or remove any loads. If you don't want to apply the HVAC system to the entire building then assign another space type to specific spaces in your model. It will override the default space type you set at the building level.

image description

Now when you run the measure you will see a new argument for the space type. Check this to apply the HVAC system to that space type.

image description

Lastly you can see the measure's output measures to see that the model was altered.

image description

I hope this his helpful. I'll update the measure on BCL to avoid this ruby error, but without larger changes to the model you will still need to assign space types where you want the system applied.