First time here? Check our help page!
4

add new actuators by changing the source code of EnergyPlus

I am working on an ASHRAE project for demand control ventilation. I need to add three actuators by changing the source code of EnergyPlus:

• Minimum Primary Air Flow Fraction in module AirTerminal:SingleDuct:SeriesPIU:Reheat

• Minimum Primary Air Flow Fraction in module AirTerminal:SingleDuct:ParallelPIU

• Zone Minimum Air Flow Fraction in module AirTerminal:DualDuct:VAV

Please advise what modules and what procedure to follow to add the 3 actuators? I already have the software environment ready to build EnergyPlus.

building_performance's avatar
441
building_performance
asked 2019-06-10 14:10:27 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2019-06-13 07:23:41 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

7

To learn how to add a new actuator, search the code for the name of an existing actuator. For example, search for "AirTerminal:SingleDuct:Uncontrolled" and find SetupEMSActuator in the search results:

SetupEMSActuator("AirTerminal:SingleDuct:Uncontrolled",
DirectAir(Loop).EquipID,
"Mass Flow Rate",
"[kg/s]",
DirectAir(Loop).EMSOverrideAirFlow,
DirectAir(Loop).EMSMassFlowRateValue);

This is in DirectAirManager.cc. Search that source file for the last two variables above EMSOverrideAirFlow and EMSMassFlowRateValue to see how the actuator is applied in the terminal unit model.

If you search the code for "AirTerminal:SingleDuct:SeriesPIU:Reheat" you should find the source file that models that unit. Likewise for the others.

MJWitte's avatar
9.7k
MJWitte
answered 2019-06-13 17:19:05 -0500, updated 2019-06-14 11:00:16 -0500
edit flag offensive 0 remove flag delete link

Comments

Thank you! this is a smart approach!

building_performance's avatar building_performance (2019-06-13 17:58:25 -0500) edit
add a comment see more comments