NREL / OpenStudio

OpenStudio is a cross-platform collection of software tools to support whole building energy modeling using EnergyPlus and advanced daylight analysis using Radiance.
https://www.openstudio.net/
Other
494 stars 188 forks source link

OS:Coil:Heating:LowTemperatureRadiant:ConstantFlow forward translate does not name fields #4877

Closed Ski90Moo closed 1 year ago

Ski90Moo commented 1 year ago

Issue overview

If the OpenStudio model has the OS:Coil:Heating:LowTemperatureRadiant:ConstantFlow object, it gets forward translated to EnergyPlus, but the Branch object that is created does not have !- Component Object Type 1 or !- Component Name 1. This causes the following error:

Severe [Branch][Rad Floor Loop Demand Branch 1][components][0] - Missing required property 'component_name'. Severe [Branch][Rad Floor Loop Demand Branch 1][components][0] - Missing required property 'component_object_type'.

Current Behavior

Expected Behavior

Steps to Reproduce

1. 2023-05-04 (3) 2. 2023-05-04 (4) 3. 2023-05-04 (6) 4. 2023-05-04 (5)

Possible Solution

Details

Environment

Some additional details about your environment for this issue (if relevant):

Context

joseph-robertson commented 1 year ago

@Ski90Moo Can you post your osm file?

joseph-robertson commented 1 year ago

@Ski90Moo

My hunch is that surfaces in your osm (with type "Radiant Surface Type" referenced by the ZoneHVAC:LowTemperatureRadiant:ConstantFlow) do not point to Construction:InternalSource objects. The FT requires this here.

See a ZoneHVACLowTempRadiantConstFlow example for setting ContructionWithInternalSource here.

While this may fix your issue, this error/requirement does seem quite cryptic. On our end, we may look at making this error/requirement more transparent.

Ski90Moo commented 1 year ago

@joseph-robertson Of course! My apologies, it does appear that I had not properly assigned a construction set that would apply the Construction:InternalSource object. Thank you for your help.

Perhaps if the error also gave a note something like "An Internal Source Construction may not be assigned. Check construction assignments".

Thank you for your help Joseph.

-Mike

jmarrec commented 1 year ago

@Ski90Moo thanks for the report (and in the correct repo too!).

When facing such issues, you could try forward translating your object in the SDK / CLI, perhaps with the log level set to Debug and see if you can spot helpful messages.

As a CLI one-liner, loading and FTing model.osm from current folder:

openstudio -e "OpenStudio::Logger.instance.standardOutLogger.setLogLevel(OpenStudio::Debug); vt = OpenStudio::OSVersion::VersionTranslator.new; m = vt.loadModel('model.osm').get; ft = OpenStudio::EnergyPlus::ForwardTranslator.new(); w = ft.translateModel(m);"

In pry/irb: (after doing the "Optional - Install ruby" from https://nrel.github.io/OpenStudio-user-documentation/getting_started/getting_started/)

require 'openstudio'

OpenStudio::Logger.instance.standardOutLogger.setLogLevel(OpenStudio::Debug)
vt = OpenStudio::OSVersion::VersionTranslator.new
m = vt.loadModel('model.osm').get
ft = OpenStudio::EnergyPlus::ForwardTranslator.new()
w = ft.translateModel(m)

Could also add a puts w.getObjectsByType('Branch') at the end, or even w.getObjectsByTypeAndName("Branch", "Rad Floor Loop Demand Branch 1")