Question-and-Answer Resource for the Building Energy Modeling Community
Get s tarted with the Help page
Ask Your Question
0

Help with writing measure to create Unitary Multi-Speed

asked 2021-09-04 13:12:31 -0500

I am having trouble getting this little bit of code to work:

# Make a new fan and coils
vav_fan = OpenStudio::Model::FanVariableVolume.new(model, model.alwaysOnDiscreteSchedule)   
new_cooling_coil = OpenStudio::Model::CoilCoolingDXMultiSpeed.new(model)
new_heating_coil = OpenStudio::Model::CoilHeatingDXMultiSpeed.new(model)
new_supheating_coil = OpenStudio::Model::CoilHeatingElectric.new(model)
# Make a new AirLoopHVAC:UnitarySystem object
runner.registerInitialCondition("Line 212")
air_loop_hvac_unitary_system_multi = OpenStudio::Model::AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.new(model, vav_fan, new_heating_coil, new_cooling_coil, new_supheating_coil)
# Add the VAV fan to the AirLoopHVAC:UnitarySystem object
      air_loop_hvac_unitary_system_multi.setSupplyAirFan(vav_fan)
# Set the AirLoopHVAC:UnitarySystem fan placement
      air_loop_hvac_unitary_system_multi.setSupplyAirFanPlacement('BlowThrough')
# Set the AirLoopHVAC:UnitarySystem Supply Air Fan Operating Mode Schedule
      air_loop_hvac_unitary_system_multi.setSupplyAirFanOperatingModeSchedule(model.alwaysOnDiscreteSchedule)
runner.registerInitialCondition("Line 214")

I get this error telling me that the new object does not have a supply fan attached:

[openstudio.model.AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed] Object of type 'OS:AirLoopHVAC:UnitaryHeatPump:AirToAir:MultiSpeed' and named 'Air Loop HVAC Unitary Heat Pump Air To Air Multi Speed 1' does not have an Supply Air Fan attached. [10:57:43.599224 ERROR] D:\OSN\src\model\AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.cpp@102 : Object of type 'OS:AirLoopHVAC:UnitaryHeatPump:AirToAir:MultiSpeed' and named 'Air Loop HVAC Unitary Heat Pump Air To Air Multi Speed 1' does not have an Supply Air Fan attached. C:/Users/owner/OpenStudio/Measures/create_variable_speed_rtu_copy/measure.rb:213:in initialize' C:/Users/owner/OpenStudio/Measures/create_variable_speed_rtu_copy/measure.rb:213:innew' C:/Users/owner/OpenStudio/Measures/create_variable_speed_rtu_copy/measure.rb:213:in run' :/ruby/2.7.0/gems/openstudio-workflow-2.2.1/lib/openstudio/workflow/util/measure.rb:517:inapply_measure' :/ruby/2.7.0/gems/openstudio-workflow-2.2.1/lib/openstudio/workflow/util/measure.rb:114:in block in apply_measures' :/ruby/2.7.0/gems/openstudio-workflow-2.2.1/lib/openstudio/workflow/util/measure.rb:67:ineach_index' :/ruby/2.7.0/gems/openstudio-workflow-2.2.1/lib/openstudio/workflow/util/measure.rb:67:in apply_measures' :/ruby/2.7.0/gems/openstudio-workflow-2.2.1/lib/openstudio/workflow/jobs/run_os_measures.rb:70:inperform' :/ruby/2.7.0/gems/openstudio-workflow-2.2.1/lib/openstudio/workflow/run.rb:287:in step' :/ruby/2.7.0/gems/openstudio-workflow-2.2.1/lib/openstudio/workflow/run.rb:229:inrun' :/openstudio_cli.rb:1013:in execute' :/openstudio_cli.rb:803:inexecute' :/openstudio_cli.rb:1797:in ' eval:185:ineval' eval:185:in require_embedded_absolute' eval:170:inblock in require_embedded' eval:164:in each' eval:164:inrequire_embedded' eval:123:in require' eval:3:in'

edit retag flag offensive close merge delete

Comments

2

EnergyPlus 9.4 Input Output reference under AirLoopHVAC:UnitaryHeatPump:AirToAir:MultiSpeed seems to allow only Fan:OnOff or Fan:ConstantVolume, but not Fan:VariableVolume?

mattkoch gravatar image mattkoch  ( 2021-09-06 08:22:22 -0500 )edit

Yep! That is it, thank you Matt!

Ski90Moo gravatar image Ski90Moo  ( 2021-09-07 12:27:56 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-09-07 12:28:28 -0500

"EnergyPlus 9.4 Input Output reference under AirLoopHVAC:UnitaryHeatPump:AirToAir:MultiSpeed seems to allow only Fan:OnOff or Fan:ConstantVolume, but not Fan:VariableVolume"

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

 

Question Tools

1 follower

Stats

Asked: 2021-09-04 13:12:31 -0500

Seen: 75 times

Last updated: Sep 07