Thermochromic colors simulation debug
Hi
I am trying to simulate thermochromic colors on the building facade. My intended thermochromic color changes its color and furtherly its related physical properties (thermal, solar, and visible absorptance) around 28degree( C ) so I need a control procedure that checks external surfaces temperature at the start of any timestep during the run process and modifies those physical properties based on the current exterior surface temperature. I tried the Energyplus EMS scripting possibility and based on tutorial video and guide resources I've written a script but it doesn't work and I can't debug it.
I send the script in this post and would be thankful if anyone helps me in debugging this script.
<ForAllExternalSurfaces>
EnergyManagementSystem:Sensor,
Surface_Outside_Face_Temperature_<LoopSurfaceVariableName>,
<LoopSurfaceIDFName>,
Surface Outside Face Temperature;
<LoopNextSurface>
<ForAllExternalSurfaces>
EnergyManagementSystem:Actuator,
Surface_Property_Solar_Absorptance_<LoopSurfaceVariableName>,
<LoopSurfaceIDFName>,
Material,
Surface Property Solar Absorptance;
<LoopNextSurface>
<ForAllExternalSurfaces>
EnergyManagementSystem:Actuator,
Surface_Property_Thermal_Absorptance_<LoopSurfaceVariableName>,
<LoopSurfaceIDFName>,
Material,
Surface Property Thermal Absorptance;
<LoopNextSurface>
<ForAllExternalSurfaces>
EnergyManagementSystem:Actuator,
Surface_Property_Visible_Absorptance_<LoopSurfaceVariableName>,
<LoopSurfaceIDFName>,
Material,
Surface Property Visible Absorptance;
<LoopNextSurface>
EnergyManagementSystem:ProgramCallingManager,
Thermo,
BeginTimestepBeforePredictor,
Thermo;
EnergyManagementSystem:Program,
Thermo,
<ForAllExternalSurfaces>
if Surface_Outside_Face_Temperature_<LoopSurfaceVariableName> < 28,
set Surface_Property_Solar_Absorptance_<LoopSurfaceVariableName> == 0.9,
set Surface_Property_Thermal_Absorptance_<LoopSurfaceVariableName> == 0.9,
set Surface_Property_Visible_Absorptance_<LoopSurfaceVariableName> == 0.9,
elseif Surface_Outside_Face_Temperature_<LoopSurfaceVariableName> > 28,
set Surface_Property_Solar_Absorptance_<LoopSurfaceVariableName> == 0.1,
set Surface_Property_Thermal_Absorptance_<LoopSurfaceVariableName> == 0.1,
set Surface_Property_Visible_Absorptance_<LoopSurfaceVariableName> == 0.1,
elseif Surface_Outside_Face_Temperature_<LoopSurfaceVariableName> == 28,
set Surface_Property_Solar_Absorptance_<LoopSurfaceVariableName> == 0.5,
set Surface_Property_Thermal_Absorptance_<LoopSurfaceVariableName> == 0.5,
set Surface_Property_Visible_Absorptance_<LoopSurfaceVariableName> == 0.5,
endif,
<LoopNextSurface>
;
Have you considered using PythonPlugin instead of EMS?
@Amir Roth Actually, I wish I could, but since I haven't had any experience in working with Python I thought it may be impossible for me to be able to operate PythonPlugin during my research work deadlines