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

Example EMS code for PlantComponent:UserDefined

asked 2020-12-18 18:13:23 -0500

khaddad's avatar

updated 2020-12-19 18:00:08 -0500

Hello, Is there example Erl code somewhere for an EMS PlantComponent:UserDefined? The EnergyPlus EMS Application Guide doesn't have an example of this.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-12-19 18:28:31 -0500

The EMS Application Guide does have a set of example projects with a problem discussion, EMS design discussion, and EMS input object syntax for the EnergyPlus input file. If an example project doesn't showcase the specific EMS object that you are interested in (PlantComponent:UserDefined, in this case), then you can review the Input Output Reference documentation for that object to understand the input fields of the object that you can define. Most times after the input field descriptions there is an example snippet of input object syntax. However, this is usually for the object in isolation and doesn't show the other objects that are required to interact with it.

To see how an object interacts with other objects in an EnergyPlus model, you will want to review the example files. These are part of the EnergyPlus installation and should be found on your C:/ drive for the EnergyPlus version you installed (C:/EnergyPlusV9-4-0/ExampleFiles, for example). This folder is full of EnergyPlus input files (IDFs) created by the EnergyPlus development team to showcase different EnergyPlus objects and features. This folder also contains two HTML files that summarize information:

  • ExampleFiles.html: for each example file, summarize the major features (location, HVAC system, etc.)
  • ExampleFiles-ObjectsLink.html: for each object type in EnergyPlus, quantify how many example files contain the object and list the first three example files (alphabetically)

image description

So, since you want to find example files that contain the PlantComponent:UserDefined object, you want to open ExampleFiles-ObjectsLink.html and search for "PlantComponent:UserDefined". You should find that there are two example files that you could review: EMSUserDefined5ZoneAirCooled.idf and PythonPluginUserDefined5ZoneAirCooled.idf.

image description

edit flag offensive delete link more


Thank you for your answer. This is very helpful.

khaddad's avatar khaddad  ( 2020-12-21 08:33:29 -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


Question Tools

1 follower


Asked: 2020-12-18 18:13:23 -0500

Seen: 223 times

Last updated: Dec 19 '20