humidityoftemp

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 5.4, Creation date: 2024-08-11, Last change: 2025-09-15

calculates the humidity at temperature change

Description

The standard use is
humidityoftemp ( [outside temp, outside humid] , room temperature )
Open the windows if the calculated humidity is significant lower than the measured inside humidity, i.e. about 3%

See Also: Gauge2mm , mm2inch , Charriere2mm , French2mm

Example Illustration

 missing image of humidityoftemp(th,t2)

Syntax

h2=humidityoftemp([th,t2])

Input Parameter

th: [temperatur humidity] at the moment
t2: [new temperatur]

Output Parameter

h2: humidity of t2 is reached and there is no water change

Examples

Does it make sense to ventilate in June when it is outside 14º and 70% humidity at dawn and 26º and 50% humidity indoors?
humidityoftemp([14 70], 25) % dawn outside 14º 70%, room is 26º and for instance 50%




Copyright 2024-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Algorithm (Workflow)

The function humidityoftemp calculates the humidity at a new temperature without any water change. It is designed to determine if it makes sense to ventilate based on outside and inside conditions.

Input Parameters

Output

Algorithm Steps

  1. Retrieve the input parameters using getfuncparams. If th contains three elements, the third element is considered as t2, and th is reduced to the first two elements.
  2. Extract the current temperature t1 and humidity h1 from th.
  3. Calculate the saturation vapor pressure es1 at the current temperature t1 using the formula:
    es1 = 6.1078 * 10^((7.5 * t1) / (273.5 + t1))
  4. Calculate the saturation vapor pressure es2 at the new temperature t2 using the formula:
    es2 = 6.1078 * 10^((7.5 * t2) / (273.5 + t2))
  5. Log the maximum water content in the air at both temperatures using dbprintf.
  6. Calculate the actual water content ww in the air using the formula:
    ww = h1 / 100 * es1
  7. Calculate the new humidity h2 at temperature t2 using the formula:
    h2 = ww / es2 * 100
  8. Log the change in humidity from h1 at t1 to h2 at t2 using dbprintf.

Example

To determine if it makes sense to ventilate in June when it is 14°C and 70% humidity outside at dawn, and 26°C and 50% humidity indoors, use:

humidityoftemp([14, 70], 25)

This calculates the humidity at 25°C based on the outside conditions.

Algorithm explaination created using ChatGPT on 2025-08-19 08:25. (Please note: No guarantee for the correctness of this explanation)

Last html export of this page out of FM database by TL: 2025-09-21