1

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

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.

Mike117's avatar
105
Mike117
asked 2024-04-15 00:03:58 -0500
Aaron Boranian's avatar
14.1k
Aaron Boranian
updated 2024-04-16 09:19:44 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

2

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+.

Julien Marrec's avatar
29.7k
Julien Marrec
answered 2024-04-15 02:52:45 -0500
edit flag offensive 0 remove flag delete link

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
add a comment see more comments