First time here? Check our help page!
1

openstudio-standards apply_prm...efficiency

I'm trying to call the call the apply_prm_pressure_rise_and_motor_efficiencymethod from openstudio-standards in a measure. I included require-'openstudio-standards'in the measure.

messure snippet:

if sc.to_PumpConstantSpeed.is_initialized 
            pump = sc.to_PumpConstantSpeed.get
            pump.apply_prm_pressure_rise_and_motor_efficiency(chw_pri_only_w_per_gpm,model)

I'm getting the following error (only first line shown):

Optional not initialized :/ruby/2.2.0/gems/openstudio-standards-0.1.15/lib/openstudio-standards/standards/Standards.Pump.rb:26:in `get'

My question is whether I called the method incorrectly or the error lies within the method. If the former, my second question is how to correctly utilize the openstudio-standard methods.

Luke.Y's avatar
89
Luke.Y
asked 2017-11-03 17:10:59 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2017-11-04 17:56:39 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

2

Here's what's going on:

In the code, it assumes that either:

  1. The pump flow rate was autosized and the autosized rated flow rate is available in the SQL file for this pump, which means that a sizing run has been done already.
  2. The pump flow rate was hard sized.

The code needs to be modified to throw a better, more explanatory error when neither of these conditions are met.

You can run a sizing run using OpenStudio-Standards in your measure via:

model.runSizingRun()

aparker's avatar
8.2k
aparker
answered 2017-11-07 16:04:47 -0500
edit flag offensive 0 remove flag delete link

Comments

Thanks @aparker. That makes sense.

Luke.Y's avatar Luke.Y (2017-11-07 16:11:59 -0500) edit
add a comment see more comments