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

Why do I keep getting a SWIG director method error when I try to apply a measure?

asked 2024-04-15 00:03:58 -0500

Mike117's avatar

updated 2024-04-16 09:19:44 -0500

I keep receiving the following error when I try to apply a measure:

image description

This error does not only occur when I apply this measure. It pretty much happens when I apply any measure.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2024-04-15 02:52:45 -0500

I don't think it occurs on "any measure". This is a logic error, clearly, as indicated by the Optional not initialized.

In this specific example, it's happening here: https://github.com/NREL/openstudio-ex...

Meaning your Space does not have a ThermalZone attached to it...

And you're hitting it on any measure that does use that os_lib_hvac.rb's createPrimaryAirLoops function.

Unfortunately, the function is wrong (openstudio-extension-gem 0.7.0 and 0.7.1 are affected at least, but that function was removed for the forthcoming release...):

    if space.thermalZone
      thermal_zone = space.thermalZone.get

Should actually be

    if space.thermalZone.is_initialized   # alternative: !space.thermalZone.empty?
      thermal_zone = space.thermalZone.get

Anyways: to work around your issue, please assign a ThermalZone to all of your Spaces. A Space must have a thermal zone in order to be simulated by E+.

edit flag offensive delete link more

Comments

Oh! I have a few spaces that are not assigned a thermal space because I was not planning on assigning an HVAC system to it.

Thank you!

Mike117's avatar Mike117  ( 2024-04-16 01:07:20 -0500 )edit
1

They still should have a ThermalZone assigned. The ThermalZone does not require a thermostat nor HVAC equipment though.

If this solved your issue, please mark the answer as accepted so the thread is marked as resolved. Thanks

Julien Marrec's avatar Julien Marrec  ( 2024-04-16 02:51:31 -0500 )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: 2024-04-15 00:03:58 -0500

Seen: 93 times

Last updated: Apr 17