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

Revision history [back]

click to hide/show revision 1
initial version

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

  • 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/how-can-i-simulate-just-one-time-step-dt-60s-with-the-e-api/)
  • 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 :)

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

  • 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/how-can-i-simulate-just-one-time-step-dt-60s-with-the-e-api/)
  • 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 :)

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

  • 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/how-can-i-simulate-just-one-time-step-dt-60s-with-the-e-api/)
  • 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 :)