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

How to get Maximum Flow Rate

asked 2017-11-21 07:43:09 -0600

Luke.Y's avatar

Hello, I'm trying to call the maximum flow rate of a fan. First there's a sizing run, and then a segment that attempts to call the maximum flow rate:

model.runSizingRun()
model.getAirLoopHVACs.each do |air_loop|
supply_components = air_loop.supplyComponents
    supply_components.each do |supply_component|
        unit = supply_component.to_FanVariableVolume
        if not unit.empty?  
        fan_vv = unit.get
        runner.registerInfo("#{fan_vv.name}")   
            if fan_vv.isMaximumFlowRateAutosized == true
            runner.registerInfo("Autosized")
            flow_rate = fan_vv.getMaximumFlowRate
            runner.registerInfo("#{flow_rate}")             
            else
            runner.registerInfo("Not Autosized")
            end
        end
    end
end

The info message for flow_rate results in a '#' instead of a value.

image description

I'm not sure if I'm using the get.MaximumFowRate method correctly.

image description

Thanks in advance for any assistance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-11-21 10:07:31 -0600

Avi's avatar

updated 2017-11-21 12:47:39 -0600

You are missing .get when you assign the OSOptionalQuantity , so your code should look like that:

model.runSizingRun()
model.getAirLoopHVACs.each do |air_loop|
supply_components = air_loop.supplyComponents
    supply_components.each do |supply_component|
        unit = supply_component.to_FanVariableVolume
        if not unit.empty?  
        fan_vv = unit.get
        runner.registerInfo("#{fan_vv.name}")   
            if fan_vv.isMaximumFlowRateAutosized == true
            runner.registerInfo("Autosized")
            flow_rate = fan_vv.getMaximumFlowRate.get
            runner.registerInfo("#{flow_rate}")             
            else
            runner.registerInfo("Not Autosized")
            end
        end
    end
end
edit flag offensive delete link more

Comments

@Avi, thanks for your help!

Luke.Y's avatar Luke.Y  ( 2017-11-21 13:23:06 -0600 )edit

If you are satisfied with the answer you can mark it as correct.

Avi's avatar Avi  ( 2017-11-21 13:32:21 -0600 )edit
1

Just to clarify, I changed the line flow_rate = fan_vv.getMaximumFlowRate.get to flow_rate = fan_vv.autosizedMaximumFlowRate.get since the intention was to call the design flow rate based on a sizing run.

Luke.Y's avatar Luke.Y  ( 2017-11-21 18:41:36 -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: 2017-11-21 07:43:09 -0600

Seen: 125 times

Last updated: Nov 21 '17