Electrochromic Glazing in Energy Simulation

Hi all,

I try to simulate the influence of switchable (EC) glazing on the energy budget.

The shading (EC) should be controlled by illuminance on workplane, glare or/and temperature in office.

I’ve done illuminance and glare based simulations in DIVA for Rhino, but in DIVA the control options are limited.

Since I’m a beginner in HB, I could use some help.

Let’s say we have 3 shading states (+ base state)

  1. When running an Annual Daylight Simulation like this (Glare)Is the shading controlled on DGP(0.4) or on radiance(W/m²)?

The DGP values in the result file/data are all below 0.4.

There is no schedule file, whence I know when and which shading state is active? Can I generate such a schedule from the Data in HB and use it later in the energy simulation?

  1. How to properly build this kind of control strategy in GH/HB?

  2. Is it possible to control the ECs by temperatur?

Greetings and thanks in advance,



As far as I know there is no straightforward solution for temperature responsive parameters. I think (don’t quote me on this) Energy Plus, Radiance and all packages will calculate thermal transfer (u-values, material transmittance,absorptance and reflectance by timesteps, in a dynamic calculation, however there is no way to tap or alter any of these material characteristics mid-calculation; so it kind of behaves like a steady state calculation in that sense.

I don’t know of any straightforward way to simulate dynamic materials that rely on E+ outputs (internal temp). However, as an ugly solution you could try to recursively generate a schedule by running multiple simulations and setting the shading schedule based on temperature outputs. E.g. first simulation without shading will give you a desired time to activate shading. Second sim will include shading starting at the previous time and will indicate when shading is no longer needed. you can repeat this until you have gone through the desired simulation period.

good luck. Let me know if you figure out a better solution.



Jakob and Mauricio,

While there may be some validity to the statement that E+ doesn’t have an easy means of dynamically altering ALL properties of materials, you can absolutely simulate electrochromic glazing and most types of dynamic shading very easily in E+. Testing out the effects of new technologies like ECs is one of the primary reasons why E+ was started and I can say as a general rule of thumb that you should be able to simulate any building technology in recent history with E+ if you are willing to dig deep enough.

To run E+ models with ECs using honeybee, you should check out this example file:

In the file, you will see that it is very easy to have a temperature setpoint for the electrochromic glazing. To account for glare, you can either add an additional radiation setpoint onto the temperature setpoint or create a custom csv schedule from the DAYSIM results that dynamically drives the shading state.

I can also say that, while Radiance is just a rendering engine that isn’t running a dynamic simulation per se, DAYSIM is made to run daylight calculations over the whole year and you can set dynamic blinds, which will be pulled down if glare is sensed. To use these DAYSIM dynamic blinds with Honeybee, you should use the DSParameters component and the shading group components.

Let me know if any questions arise as you work with these, Jakob.


Chris, Mauricio,

Thanks for your help. I perceive there are a lot of things about GH/HB I need to learn.

Regarding the example file, I build up the attached file.

I try to simulate two windows (window in window, image attached, model is a simple box).

The Big Window shall be controlled by Temperature and the Small Window by Glare (DGP, not illuminance threshold).

Q1 After running a daylight simulation with base material I get the DGP values.

I want to set an expression like if(“x”>“0.4”,1,0) to get the values for the csv schedule, but all results are 1 though there are dgp values above 0.4? (No syntax error in expression)

Besides, I already have dgp files from previous simulations with DIVA, but can’t import them into GH, the importDGP component is green but the outputs are empty…

**Q2 **Creating an EP model with a window in window surface (see attached file) is no problem. When I try to add the shade from the windowshadegenerator the complete wall disappears.

How do I correctly build this with two seperate controlled windows in one wall? Do I have to use the addGlazing component or can I simply use an hbsurface component and add the right epconstruction?

(There is a note that for EP simulations I should use addGlazing when setting srftype).

Q3 Like the problem in Q2, when adding multiple times the same wall/shading construction, how do I set up Electrochromic Glazing with several dimming stages? For example 3 dimming stages controlled by temperature(22,24,26°C) or glare(3 different schedules/materials).



ECexample.gh (156 KB)


I don’t understand what you are trying to run with the “window in window” situation. A window cannot be the child of another window. Input the two separate window surfaces with one AddHBGlz component and make sure that these two window surfaces do not overlap. In other words, trim out the area of the small window form the large window. To answer your questions:

  1. In what format do you have the DGP values? If you have DGP values in a csv format, just import them into GH like so:

  1. See above. Your initial “window in window” case is “not a problem” because your large window is being modeled as opaque.

  2. Several dimming stages with a single setpoints is not currently an option with EnergyPlus’s switchable glazing object. If you want to have dimming, you are going to have to create a custom csv schedule of 8760 fraction values (from 0 to 1) that represent how dimmed the window is. You will have to figure out these 8760 values before running the simulation using the DGP value and the temperature (from an EPW file if outdoor or perhaps from an initial energy simulation if indoor). Plug this schedule into the shadeSchedule of the “EnergyPlus Window Shade Generator.”


The small window is intended for user comfort and the big window to enhance the energy efficieny.

The DGP data format is the same as you get from the HB simulation. (it works when the file is in the annual simulation folder - looks like the other data from the folder is needed(ViewPoints/Direction)? I have attached a file))

I put both windows in one AddHBGlz component. This is what I got

Now I have two windows in the AddHBGlz output, but is it even possible to control them separatly?

Concerning dimming, did I understand you correctly, the values in the csv determine how much the window is dimmed? Like 0.25=25%, 0.5=50%?

When I set the darkest dimming state as shade material, what about the characteristics (reflectance and transmittance) of the shade material? Does it adapt?

(Apropos characteristics, is it the solar or the visible reflectance?)


DGP_DIVA.dgp (167 KB)

Regarding the attached image, there are two overlapping surfaces. When creating a usual window (AddHBGlz/byRatio) the surfaces don’t oberlap. Will this cause problems or falsify the results?

If not, I thought about two concepts.

Concept1: Building the two windows separatly with WindowShadeGenerator, put it in the Mass2Zones component, solve adjacencies and put it in the E+ Simulation component.

Problem: when I set writeIDF to true it says ‘EPZone’ object has no attribute ‘cenPt’?

Concept2 is about the WindowShadeGenerator. When you have Electrochromic Glazing, the shadeBreps output is empty, but what about the windowBreps. With ECs, is this output just the base geometry brep or is it the current shading state and does it contain any shade material data?

The thought behind this is, if you have the data when and which shading state (geometry+material) is active, you can use it as child surface in an AddHBGlz component and tell E+ when and which shading material is active (hourly).

Does this make any sense, can E+ even handle this?


I didn’t understand quite good what you asked, but i won’t recommend to leave the overlapping as an option. E+ won’t crash for that (you will amazed how much garbage can E+ eat), but the results will not be reliable.

Did you think about sectioning the windows in5 portions? One in the center and 4 on the sides. This should work. I see that you input the geometry of the windows, so you can be set with such option.


I just tried it. Made 5 surfaces, added them as glazing, every surface in one WinShGen, put them together and the E+ simulation component says

1. Solution exception:‘EPZone’ object has no attribute ‘cenPt’

How can I solve that error?

Can you upload the GH? (Internalize the geometry or add also the Rhino file).


Sorry for the late reply, here is the file.

After creating two csv schedules, one with fraction values and one with only 0 and 1, I ran simulations with one window… results are the same.

NoCenPT.gh (627 KB)

I’m not sure what we are supposed to check in the file you uploaded, but it was built badly. You joined the same surface 5 times (as the windows you have). It is like having the same wall 5 times (now i see this is what you wrote above).

I fixed this and it runs the simulation (see purple groups). Go ahead and see if this works for you and for what you want to do.


NoCenPT_AY.gh (667 KB)

Thanks for your help Abraham. It is great that there are no overlapping surfaces now.

The point why I built the windows separatly, is to control them individually. (Maybe this wasn’t clear because I haven’t changed the Setpoints)

Chris, hello. Here you mention that you can drive dimming of electrochromics with a pre-built schedule. That sounds nifty, so I tried it, but can’t get the system to respond to a fractional schedule - only to a boolean 1/0 schedule. It may be that this is not actually possible, but if you’ve done it, I’d like to replicate it.

I was working with a version of the file in this thread, copy uploaded. Any ideas you have, I’m all ears.



NoCenPT_AY _NN.gh (761 KB)