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

Error Applying BCL VRF w/ DOAS Measure

asked 2016-06-11 22:01:33 -0600

willyJohan's avatar

updated 2016-06-12 12:16:32 -0600

I am trying to apply the whole system VRF with DOAS measure to an OSM coming out of CBECC-Com.

when I do I am getting the following error:


DL is deprecated, please use Fiddle

C:/Users/EBS Bootcamp/AppData/Local/Temp/OpenStudio.N14360/ApplyMeasureNow/UserScript/resources/OsLib_HVAC.rb:122:in `get': Optional not initialized (RuntimeError)

from C:/Users/EBS Bootcamp/AppData/Local/Temp/OpenStudio.N14360/ApplyMeasureNow/UserScript/resources/OsLib_HVAC.rb:122:in `block in sortZones'

from C:/Users/EBS Bootcamp/AppData/Local/Temp/OpenStudio.N14360/ApplyMeasureNow/UserScript/resources/OsLib_HVAC.rb:121:in `each'

from C:/Users/EBS Bootcamp/AppData/Local/Temp/OpenStudio.N14360/ApplyMeasureNow/UserScript/resources/OsLib_HVAC.rb:121:in `sortZones'

from C:/Users/EBS Bootcamp/AppData/Local/Temp/OpenStudio.N14360/ApplyMeasureNow/UserScript/user_script.rb:246:in `run'

from in.rb:355:in `<main>'

Script executing from: C:/Users/EBS Bootcamp/AppData/Local/Temp/OpenStudio.N14360/ApplyMeasureNow/UserScript Found argument 'vrfCondenserType' with value 'AirCooled'. Found argument 'vrfCoolCOP' with value '3.4'. Found argument 'vrfHeatCOP' with value '3.6'. Found argument 'vrfMinOATHPHeat' with value '-4'. Found argument 'vrfDefrost' with value 'Resistive'. Found argument 'vrfHPHeatRecovery' with value 'Yes'. Found argument 'vrfEquivPipingLength' with value '100'. Found argument 'vrfPipingHeight' with value '35'. Found argument 'doasFanType' with value 'Variable'. Found argument 'doasERV' with value 'none'. Found argument 'doasEvap' with value 'none'. Found argument 'doasDXEER' with value '11'. Found argument 'costTotalHVACSystem' with value '0'. Found argument 'remake_schedules' with value 'true'. Found UserScript 'VRFwithDOAS'


the existing (un-BCL-ified) OSM run to completion with only the normal assortment of errors. I found a number of other similar seeming errors addressed on this forum, but none of the solutions seem to apply here.

any help would be much appreciated.

edit retag flag offensive close merge delete

Comments

will@stok.com I'll try to look into this next week, it will be easier for me to reproduce if you send the model to OpenStudio@NREL.gov

David Goldwasser's avatar David Goldwasser  ( 2016-06-11 22:36:07 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2016-06-14 10:35:54 -0600

updated 2016-06-14 11:16:06 -0600

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 measure's output 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.

edit flag offensive delete link more
4

answered 2016-06-13 03:03:08 -0600

Seeing this error message:

C:/Users/EBS Bootcamp/AppData/Local/Temp/OpenStudio.N14360/ApplyMeasureNow/UserScript/resources/OsLib_HVAC.rb:122:in `get': Optional not initialized (RuntimeError)

It suggests going to OsLib_HVAC.rb, line 122, where you'll find (line 120 and 121 given for contex):

spaces = model.getSpaces
spaces.each do |space|
    spaceType = space.spaceType.get

The guilty line (122) is the last one. It just assumes that each space does have a spaceType defined, where clearly in your case you don't: space.spaceType is really empty, so space.spaceType.get fails miserably.

I don't know CBECC-Com, but it probably doesn't generate OpenStudio SpaceTypes or it doesn't assign one to each space.

edit flag offensive delete link more

Comments

I noticed the same thing (not the ruby stuff but thew lack of assigned space types in the OS:Space object). Seems that CBECC-Com makes space description objects (OS:People, OS:Lights, etc) for each space and references the space handle therein, while OS proper references the space description objects within the OS:Space object. The latter approach seems much more efficient (my model has ~150 spaces, but ~5 unique occupancies). Any one have some insight into a clever way to update this approach? Given the limitations of CBECC-Com it would be very nice to be able to easily apply measures in OS.

willyJohan's avatar willyJohan  ( 2016-06-13 12:24:53 -0600 )edit
1

Marked as correct, opening new question about how to automatically change the space characteristic assignation method

willyJohan's avatar willyJohan  ( 2016-06-13 12:36:14 -0600 )edit

@Julien Marrec, thanks for your help. Just posted update to BCL.

David Goldwasser's avatar David Goldwasser  ( 2016-06-29 13:01:32 -0600 )edit

Your Answer

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

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 2016-06-11 22:01:33 -0600

Seen: 659 times

Last updated: Jun 14 '16