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

OS Measure - report autosized capacity for CoilHeatingGas object?

asked 2020-08-28 15:34:54 -0500

jkneifel's avatar

updated 2020-09-15 15:10:01 -0500

I am using the following code below in a measure to find the capacity of a CoilHeatingGas object. It works for hard coded capacities. However, when the value is autosized, it fails to find the value. I use exactly the same code for CoilHeatingElectric and it works fine with autosized values. I know when it gets to chg.autosizedNominalCapacity.get, the returned error is "For Coil Heating Gas 4 capacity is not available"

if coil.to_CoilHeatingGas.is_initialized
    chg = coil.to_CoilHeatingGas.get
    runner.registerInfo("CoilHeatingGas found = #{chg}.")
    # Get the capacity
    capacity_w = nil

    if chg.nominalCapacity.is_initialized
        capacity_w = chg.nominalCapacity.get
    elsif chg.autosizedNominalCapacity.is_initialized
        runner.registerInfo("CoilHeatingGas has autosized capacity.")
        capacity_w = chg.autosizedNominalCapacity.get
    else
        runner.registerError("For #{coil.name} capacity is not available.")
    end
    runner.registerInfo("CoilHeatingGas capacity found = #{capacity_w}.")


if coil.to_CoilHeatingElectric.is_initialized
    che = coil.to_CoilHeatingElectric.get
    runner.registerInfo("CoilHeatingElectric found = #{che}.")
    # Get the capacity
    capacity_w = nil
    if che.nominalCapacity.is_initialized
      capacity_w = che.nominalCapacity.get
    elsif che.autosizedNominalCapacity.is_initialized
      capacity_w = che.autosizedNominalCapacity.get
    else
      OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.BoilerHotWater', "For #{che.name} capacity is not available.")
    end
    runner.registerInfo("CoilHeatingElectric capacity = #{capacity_w}.")

Additionally, @jmarrec was gracious enough to help. When he ran the model through the <companion_folder>/run/ directory it can find the autosized capacity. These are the results.

[1] run(main)> m = osload('in.osm')

[2] run(main)> sql = OpenStudio::SqlFile.new()

[2] run(main)> sqlFile = OpenStudio::SqlFile.new('eplusout.sql')

[3] run(main)> m.setSqlFile(sqlFile)

[4] run(main)> coil = m.getCoilHeatingGass[0]

[5] run(main)> puts coil

OS:Coil:Heating:Gas, {871a33d0-6913-4883-9486-ccdfa3d5f11a}, !- Handle Coil Heating Gas 4, !- Name {13af84d4-14b4-44cd-8194-59dbf9daecee}, !- Availability Schedule Name 0.8, !- Gas Burner Efficiency Autosize, !- Nominal Capacity {W} , !- Air Inlet Node Name , !- Air Outlet Node Name , !- Temperature Setpoint Node Name 0, !- Parasitic Electric Load {W} , !- Part Load Fraction Correlation Curve Name 0; !- Parasitic Gas Load {W}

=> nil

[6] run(main)> coil.autosizedNominalCapacity.get => 11200.713297285292

edit retag flag offensive close merge delete

Comments

It's apparently looking for "Design Size Nominal Capacity" in the E+ output file, does that exist? See https://github.com/NREL/OpenStudio/bl...

shorowit's avatar shorowit  ( 2020-08-28 17:12:07 -0500 )edit

Yes, "Design Size Nominal Capacity" for heating does exist in the eplustbl.html file in the Coil:Heating:Fuel Table. Maybe the change in E+ to generalize coil:heating:gas to coil:heating:fuel has created an issue with the match?

jkneifel's avatar jkneifel  ( 2020-08-31 09:05:31 -0500 )edit

It sounds like a bug to me then. I suggest reporting the issue at https://github.com/NREL/OpenStudio/is....

shorowit's avatar shorowit  ( 2020-09-01 12:05:51 -0500 )edit

Its been determined that its not a bug. I will edit my initial question to include additional information on the issue.

jkneifel's avatar jkneifel  ( 2020-09-15 13:22:17 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-09-22 03:59:54 -0500

After investigation, it turns that the user had a bunch of outdated resources/HVACSizing.xxxx.rb that were overriding the C++ methods especially ModelObject::getAutosizedValue.

See https://github.com/NREL/OpenStudio/is... for more details.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Careers

Question Tools

1 follower

Stats

Asked: 2020-08-28 15:34:54 -0500

Seen: 418 times

Last updated: Sep 22 '20