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

How to use Energyplus-API to control ElectricEquipment like in ExternalInterface (FMU)?

asked 2021-09-07 06:37:18 -0600

BaseboardHeater's avatar

updated 2021-09-07 09:05:54 -0600

  • In a previous question, I asked about the callback function in the Energyplus-API and how to simulate every time-step (https://unmethours.com/question/58313...)
  • Now we want to control with an external python script the heat-load in Watt [W], which is sent into the Thermal Zone. But with the EnergyManagementSystem (EMS), you can only control and actuate the thermostat setpoints, but there is no actuation for the thermal loads
  • In our previous simulation we defined a ElectricEquipment Object, with a thermal Load of 10000 Watt, and we controlled it with the ExternalInterface and the FMU.

ElectricEquipment,

Fake_HVAC,                !- Name

Thermal Zone 1,           !- Zone or ZoneList Name

HVAC_SetTable,            !- Schedule Name

EquipmentLevel,           !- Design Level Calculation Method
10000,                    !- Design Level
,                         !- Watts per Zone Floor Area
,                         !- Watts per Person
0,                        !- Fraction Latent
1,                        !- Fraction Radiant
0,                        !- Fraction Lost
Baseboard Heat;           !- EndUse Subcategoryote

ExternalInterface:FunctionalMockupUnitExport:To:Schedule,

   HVAC_SetTable,            !- Schedule Name
   Any Number,               !- Schedule Type Limits Names
   HVAC_setter,              !- FMU Variable Name
   0;                        !- Initial Value
  • My question is now, how i can use this approach for my simulation with the Energyplus-API? Because i can only use the function set_actuator_value(actuator_handle: int, actuator_value: ctypes.c_double), I can only use actuators from the EMS, but our approach is not connected to EMS?

  • It also could be, that our approach is just realizable with the ExternalInterface and the FMU. Then the current API-version is not useful for controlling thermal loads. Or should we define a ElectricBaseboard with EMS and calculate the Thermal Loads with the temperatures with set every time step?

  • I know it is a difficult question, but the API is a new feature of Energyplus, and we want to simulate a big city with electrical loads, heat pumps, electric grids and the domestic houses. So the calculations with the FMU are very expensive and need a lot of time. This is why we want to use the API. Thank you in advance :)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-09-07 07:42:25 -0600

Put an ElectricEquipment with a schedule, and use the schedule actuator "Schedule Value"

edit flag offensive delete link more

Comments

Thank you very much :) you again helped me a lot. I used the EMSCustomSchedule.idf-File in the folder ExampleFiles as guideline. When I added the EnergyManagementSystem, I saw in the edd-file, that there is also an actuator EnergyManagementSystem:Actuator Available,THERMAL ZONE 1,Sizing:Zone,Zone Design Heating Load,[W]. Can I use this also as a control output? So I compute my Thermal Loads with an optimized control algorithm and give this thermal load to this actuator?

BaseboardHeater's avatar BaseboardHeater  ( 2021-09-08 04:17:48 -0600 )edit

Yes, that should affect the autosizing of the equipments that serve that zone.

Julien Marrec's avatar Julien Marrec  ( 2021-09-09 06:49:43 -0600 )edit

Yes, that should affect the autosizing of the equipment that serve that zone.

Julien Marrec's avatar Julien Marrec  ( 2021-09-09 06:49:48 -0600 )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: 2021-09-07 06:37:18 -0600

Seen: 285 times

Last updated: Sep 08 '21