Natural Ventilation based on temps AND CO2 concentration

Hey guys!

Currently working on my thesis project and I am looking into passive buildings, therefore I want to naturally ventilate my space. The vent_ctrl component is already a great start but I would love to enhance it with co2 concetration. Meaning that if the temps fall into the defined range OR the co2 concentration exceeds a predefined limit, the windows open.

I also stumbled already across this blog post from 2018
[Natural ventilation based on CO2 sensors]
but I tried the comments and my result was not satisfactory. So I wanted to revive the discussion.

Currently my setup is the following that I am creating an .idf file with my temp based vent ctrl and then manipulating the .idf with a python component (written with the help of Claude) to create a new comprehensive EMS component that follows this logic:
IF Occupied AND ((Temp OK) OR (CO2 > 1000)) → Open.

Then the newly created idf is run through the run idf component.

Funnily enough it seems to somehow work but as soon as I change my schedule a bit I sometimes get co2 concentrations around 200 ppm (which is below my set outside co2 concentration of 420 ppm).

It’s a bit complicated to describe the whole issue which is why I was just wondering if anyone out there found a efficient way to implement this.

Thanks guys, happy for any leads!

Hi @quentin! The way I would go about it is via an EMS routine input via the _add_str_ input on the simulation component, there are some sample EMS files as well as PyEMS within the energyplus installation.
Here is the link to the ems documentation


hopefully that is helpful and not more confusing!
best
-trevor

also chatgpt can be helpful in creating these ems scripts but be very weary, double check everything and explicitly ask it to check against 24.2 idd file to help make the script accurate