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

OpenStudio measure returning 'undefined method' error

asked 2022-02-21 12:36:48 -0500

hamza_z's avatar

I am trying to run the measure of "Roof thermal properties multiplier" that I found in the BCL library, on a DOE prototypical building. It is throwing an error that says "undefined method 'getSolarAbsorptance'. Solar absorptance is one of the arguments in the measure. I am surprised because this is a measure from the BCL, and it should be working fine. Could I get some help understanding the 'undefined method' error.

edit retag flag offensive close merge delete

Comments

If one searches/downloads either "RoofThermalPropertiesPercentChange" or "RoofThermalPropertiesMultiplier" measures from BCL, the (deprecated) getSolarAbsorptance method is indeed there - deprecated after SDK v2.9.0. Recent versions of the (Calibration Gem) measures have been corrected - for some reason BCL holds older versions (compare copyright dates and GitHub branches).

Denis Bourgeois's avatar Denis Bourgeois  ( 2022-02-21 15:29:42 -0500 )edit

BTW, same issue with BCL-downloaded "ExteriorWallThermalPropertiesPercentChange" & "ExteriorWallThermalPropertiesMultiplier" calibration measures - also identified and fixed in recent years (compare "Develop" vs "Develop3" branches here).

Denis Bourgeois's avatar Denis Bourgeois  ( 2022-02-22 06:40:42 -0500 )edit

Thanks Denis, this has been a great help. I have corrected this in my local copy of the measure and this particular issue is resolved, However, I'm getting another error now. When I define a "multiplier" value for the three variables (thermal resistance, solar absorptance, density), it returns an error saying "undefined method 'value' for 0.56:Float" 0.56 is the new solar absorptance (0.7=existing solar absorptance TIMES 0.8=multiplier used)

Do you have any thoughts as to why I'm seeing this error?

hamza_z's avatar hamza_z  ( 2022-02-22 11:44:12 -0500 )edit

If you're substituting the deprecated getSolarAbsorptance method with solarAbsorptance, you also need to remove the subsequent .value. So getSolarAbsorptance.value should become solarAbsorptance. Same with getDensity. You can get a better idea of what went wrong with an OpenStudio measure by going over the out.osw file.

Denis Bourgeois's avatar Denis Bourgeois  ( 2022-02-22 14:29:28 -0500 )edit

Thanks Denis! This has been a great help.

hamza_z's avatar hamza_z  ( 2022-02-28 06:11:18 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-02-21 15:21:27 -0500

updated 2022-02-21 15:22:37 -0500

I found that issue here
https://github.com/NREL/openstudio-ca...

But it has been fixed in the current version of the measure. It has get.solarAbsorptance instead of get.getSolarAbsorptance.
https://github.com/NREL/openstudio-ca...

I'll investigate why you are getting an updated version on BCL. Looks like it was last updated on BCL in Nov 2021 and the measure was fixed Feb 2021
https://bcl.nrel.gov/repos/e05b8e44-e...

edit flag offensive delete link more

Comments

Thanks David, this has been a great help. I have corrected this in my local copy of the measure and this particular issue is resolved, However, I'm getting another error now. When I define a "multiplier" value for the three variables (thermal resistance, solar absorptance, density), it returns an error saying "undefined method 'value' for 0.56:Float" 0.56 is the new solar absorptance (0.7=existing solar absorptance TIMES 0.8=multiplier used)

Do you have any thoughts as to why I'm seeing this error?

hamza_z's avatar hamza_z  ( 2022-02-22 11:44:23 -0500 )edit

@hamza_z can you try from BCL again, I've updated the calibration repo measure for that. https://bcl.nrel.gov/repos/e05b8e44-e...

David Goldwasser's avatar David Goldwasser  ( 2022-02-23 17:27:18 -0500 )edit

Thanks David! Really appreciate your help.

hamza_z's avatar hamza_z  ( 2022-02-28 06:12:09 -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

Stats

Asked: 2022-02-21 12:36:48 -0500

Seen: 195 times

Last updated: Feb 21 '22