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

OS: Retrieve/edit ZoneHVACIdealLoadsAirSystem from thermal zone

asked 2024-10-10 11:23:04 -0500

updated 2024-10-11 06:15:56 -0500

Is it possible to retrieve and edit the ZoneHVACIdealLoadsAirSystem from a themal zone for which the ideal loads have been set with the following

thermal_zone = space.thermalZone.get
thermal_zone.setUseIdealAirLoads(true)

I would like to edit some of the properties such as heat recovery with something like

ideal_loads.setHeatRecoveryType("Sensible")
ideal_loads.setSensibleHeatRecoveryEffectiveness(0.7)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2024-10-10 14:09:56 -0500

updated 2024-10-11 12:40:36 -0500

EDIT: I allowed myself to slightly change the title to emphasize OpenStudio. Also edited my initial answer in response to your comment below. If you search UMH, as well as OpenStudio and EnergyPlus GitHub issues, the approach appears something of a hot potato. I'll leave it at that, and try to stay on point.


Option A

thermal_zone.setUseIdealAirLoads(true)

... instructs OpenStudio to generate a HVACTemplate:Zone:IdealLoadsAirSystem object during forward translation. There are possibly other objects OpenStudio adds in the process, like OutputVariables - not sure.

One can always edit HVACTemplate:Zone:IdealLoadsAirSystem objects in the generated run/in.idf file, but heat recovery settings aren't (yet) available before ExpandObjects is finally executed. So in a nutshell, I don't believe it possible to edit ideal loads air system heat recovery settings using this approach with OpenStudio.

It's worth running energyplus -x in.idf and checking the generated eplusout.expidf file. As detailed in the EnergyPlus IO Reference, the HVACTemplate:Zone:IdealLoadsAirSystem objects are commented out, while the file inherits new (expanded) IDF objects (search for "New objects created from ExpandObjects") including ZoneHVAC:IdealLoadsAirSystem, allowing one to edit heat recovery settings! It's worth noting what ExpandedObjects ended up adding ...


Option B

As an alternative, one can skip the HVACTemplate option altogether, and instead directly add an ideal loads air system to each thermal zone - a nice demo here (Line 27):

ideal_loads = OpenStudio::Model::ZoneHVACIdealLoadsAirSystem.new(model)
ideal_loads.addToThermalZone(thermal_zone)
ideal_loads.setHeatRecoveryType("Sensible")
ideal_loads.setSensibleHeatRecoveryEffectiveness(0.7)

One can edit other variables. One can always look up other bare bones minimum model requirements, such as space/spacetype inputs (Line 469), thermostats (Line 620), etc. - I find OpenStudio Resources very handy!

More steps, yet more options to fine-tune. Preferred approach going forward, I think.


Hope this is clearer. There are certainly more experienced users with OpenStudio vs HVAC templates + ExpandObjects - maybe they can chime in.

edit flag offensive delete link more

Comments

Thanks @Denis Bourgeois, that helps. This is what I tried. Is this equivalent to using thermal_zone.setUseIdealAirLoads(true)?

I have realised that the code was actually failing for a different reason. It looks like that output variables are not being created (I use them in another part of the code)

output_variable_ventilation = OpenStudio::Model::OutputVariable.new("Zone Ventilation Current Density Volume Flow Rate", @os_model)
output_variable_ventilation.setReportingFrequency("Hourly")
output_variable_ventilation.setKeyValue("*")
MapMortar's avatar MapMortar  ( 2024-10-11 02:27:19 -0500 )edit
1

@MapMortar, I edited my initial answer. So no: what I described (now Option B) is not possible IMO using thermal_zone.setUseIdealAirLoads(true) - it's an alternative. Hope this helps.

Denis Bourgeois's avatar Denis Bourgeois  ( 2024-10-11 07:43:49 -0500 )edit

Thank you! Will review both opitions

MapMortar's avatar MapMortar  ( 2024-10-11 08:17:11 -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

1 follower

Stats

Asked: 2024-10-10 11:23:04 -0500

Seen: 90 times

Last updated: Oct 11