Skip to content

SmartHome – Calculate dew point

Reading time < 1 minute

The dew point describes the temperature that must be fallen below in order for dew or mist or condensation to form at constant air pressure and given humidity.

Required hardware:

The program:

Program – dew point calculation

The code:

real T = dom.GetObject("T_actual_FH").Value();WriteLine("T_FH");WriteLine(T);
real rF = dom.GetObject("F_actual_FH").Value();WriteLine("rF_FH");WriteLine(rF);

if (T < 0.0) { T = 0.0; } real TK = T + 273.15; !Temperature in Kelvin real a = 7.5; real b = 237.3; !for T >= 0
real R = 8314.3; !J / (kmol * K)(universal gas constant)
real mw = 18,016; !kg / kmol (molecular weight of water vapor)
real pp = (a * T) / (b + T); !Calculate the power of the following formula
real SDD = 6.1078 * (10.0).Pow(pp); !Saturation vapor pressure in hPa
real DD = ((SDD * rF) / 100.0); !Vapor pressure in hPa
real v = (DD / 6.1078).Log10();
real TP_null = (b * v / (a - v));WriteLine("TP_null");WriteLine(TP_null); !Dew point
real TP = (TP_null).ToString(1); !Temperature switching threshold for ventilation

dom.GetObject("Dewpoint_FH").State(TP);WriteLine("Dewpoint");WriteLine(TP);
real AF = (10.0).Pow(5.0) * (mw / R) * DD / TK;

The two variables T and rF are read from the respective temperature/humidity sensors in an external program and are thus passed on to all other programs without having to query the sensor again (in order to minimize the DutyCycles) made available.

Leave a Reply

Your email address will not be published. Required fields are marked *

en_USEnglish