Sauna Heat - simple heat and humidity models of a sauna room
=============================================================

Scilab toolbox, macros only, Scilab 6.0 and newer. MIT license.

Functions
---------
sauna_heat_psat(T)                       saturation vapour pressure of water, Pa
                                         (IAPWS-IF97, 0 to 373.946 C)
sauna_heat_rh(T, rho_v)                  relative humidity, %
sauna_heat_vapor_density(T, rh)          water vapour density, kg/m3
sauna_heat_loyly(m_w, V, T_air, rh0)     humidity after a ladle of water, and
                                         the heat it takes from the stones
sauna_heat_stone_energy(m, c, T1, T2)    heat stored in the stones, J
sauna_heat_u_value(d, lambda)            U-value of a layered wall, W/(m2 K)
sauna_heat_temperature(t, P, UA, C, To)  single-node heat-up curve, C
sauna_heat_heatup_time(P, UA, C, To, Tt) time to a target temperature, s

Example
-------
U  = sauna_heat_u_value([0.015 0.100 0.0125], [0.12 0.037 0.25]);
t  = sauna_heat_heatup_time(6000, 45, 3.5e5, 20, 80) / 60   // minutes
[rh1, rho_v1, Q] = sauna_heat_loyly(0.25, 10, 80, 10)

Two demos (Applications > Demonstrations > Sauna Heat) work through a small
home sauna and a ladle of water.

Sources of the constants
------------------------
- Saturation pressure, gas constant of water vapour (461.526 J/(kg K)):
  IAPWS R7-97(2012), IAPWS-IF97.
- Enthalpy of vaporization at 100 C, 2256.4 kJ/kg: IAPWS steam tables.
- Surface resistances 0.13 and 0.04 m2 K/W: EN ISO 6946:2017.
- Design conductivities of timber and plasterboard, specific heat of timber
  (1600 J/(kg K), used in a demo): EN ISO 10456:2007.
- Specific heat of rocks, about 750 to 950 J/(kg K) at room temperature:
  Waples and Waples (2004), Natural Resources Research 13(2), 97-122.

Limits
------
The heat-up model has one temperature for the whole room, constant losses and
a constant heater output. The water model assumes that all water evaporates
and mixes evenly into the room air. Use the results to understand a sauna and
to compare designs, not as a heater sizing rule or as health advice: follow
the heater maker's instructions.

Tests
-----
atomsTest("sauna_heat") or, from the source tree, test_run(pwd()) after
exec builder.sce and exec loader.sce. The tests check the IAPWS-IF97
verification values, round trips between the humidity functions, energy
balances and the heat-up curve against a step-by-step integration.

About
-----
Made by DIVELUX, a small family brand in Irvine, California that makes wool
sauna hats. More free sauna tools and data: https://diveluxsaunahat.com/pages/sauna-tools
The code and help pages were written with the help of an AI coding assistant;
every equation and constant was checked against the sources above and by the
unit tests.
