{ "cells": [ { "cell_type": "markdown", "id": "2ecf07a1-f064-444b-9ea4-53ee2725c5c1", "metadata": {}, "source": [ "# Thermal networks for heat trasfer in buildings\n", "\n", "This Annex presents the basic principles of thermal networks appled to modeling heat transfer in buildings. An example of the application of the thermal networks to modeling a wall is given in [Tutorial 2: Simple wall](02SimpleWall.ipynb) and for a building is shown in [Tutorial 3: Cubic building](03CubicBuilding.ipynb)." ] }, { "cell_type": "markdown", "id": "bb7e8099-f6b4-4a4f-a2a0-97a2f1b966ee", "metadata": {}, "source": [ "## Thermal networks\n", "\n", "Thermal networks are weighted [directed graphs](https://en.m.wikipedia.org/wiki/Directed_graph) (Figure 1) in which:\n", "- the **nodes** (or vertices) represent temperatures, $\\theta_i$, of geometrical points, surfaces or volumes;\n", "- the oriented **branches** (or edges) represent thermal heat flow rates, $q_j$, between the temperature nodes.\n", "\n", "![basic_TC](./figures/A01_Basic_thermal_circuit.svg)\n", "> Figure 1. Basic thermal network.\n", "\n", "The dependent variables of the thermal network are:\n", "- $\\theta_k$ - temperatures, in °C or K, of a volume, surface, line or point (the temperature is considred homogenious in these spaces). Temperatures are grouped in vector $\\theta$.\n", "- $q_j ≡ q_{k,l}$ - flow rates, in W, between two (0D, 1D, 2D or 3D) spaces characterized by homogenious temperatures $\\theta_k$ and $\\theta_l$, respectively. Flow rates are grouped in vector $q$.\n", "\n", "The parameters of the thermal network are:\n", "- $G_j ≡ G_{k,l}$ - [thermal conductance](https://en.m.wikipedia.org/wiki/Thermal_conductance_and_resistance), in W/K, between the spaces characterized by temperatures $\\theta_k$ and $\\theta_l$. Conductances are grouped in the diagonal matrix $G$.\n", "- $C_l$ - [thermal capacity](https://en.m.wikipedia.org/wiki/Heat_capacity), in J/kg, of the volume characterized by the homogenous temperature $\\theta_l$. Note that the thermal capacities for surfaces, lines and points are zero. Capacities are grouped in diagonal matrix $C$.\n", "\n", "The sources (or the inputs, or the independent variables) of the thermal network are:\n", "- $T_j$ - temperature source, in °C or K, is a source of thermal energy for which the temperature difference does not depend on the flow rate. Temperature sources are groupes in vector $b$.\n", "- $\\dot Q_k$ - flow rate source, in W, is a source of thermal energy for which the flow rate does not depend on the temperature difference. Flow rate sources are grouped in vector $f$.\n", "\n", "In a node, there are:\n", "- a thermal capacity, $C_i$, which can be positive or zero; \n", "- a heat flow rate source, $\\dot Q_i$, which can be positive, negative or zero.\n", "\n", "On a branch, there are:\n", "- a conductane, $G_j$, which needs to be strictly positive;\n", "- a temperature source, $T_j$, which can be positive, negative or zero.\n", "\n", "The [incidence matrix](https://en.m.wikipedia.org/wiki/Incidence_matrix) $A$ shows the relation between oriented branches (i.e., flow rates) and nodes (i.e., temperatures). The rows in the incidence matrix $A$ correspond to the branches containing the heat flow rates $q_j$ across the conductances $G_j$ and the columns correspond to the temperature nodes $\\theta_k$. In the row corresponding to the branch $q_j$ in the position of the node $\\theta_k$ there is -1 if the flow $q_j$ leaves the node, +1 if the flow $q_j$ enters into the node $\\theta_k$ and 0 if the conductance $G_j$ is not connected to the temperature node $\\theta_k$ [[Ghiaus, 2013](https://doi.org/10.1016/j.energy.2012.10.024)]:\n", "\n", "$$A_{j,k} = \\begin{cases}\\phantom{-}\n", "0 & \\text{if branch } q_j \\text{ is not connected to node } \\theta_k \\\\ \n", "+1 & \\text{if branch } q_j \\text{ enters into node } \\theta_k\\\\ \n", "-1 & \\text{if branch } q_j \\text{ gets out of node } \\theta_k \n", "\\end{cases}$$\n", "\n", "The problem of analysis of thermal circuits (or the simulation problem, or the direct problem) is:\n", "\n", "**given**:\n", "- [incidence matrix](https://en.m.wikipedia.org/wiki/Incidence_matrix) $A$ which indicates how the nodes are connected by oriented branches;\n", "- conductance diagonal matrix $G$;\n", "- capacity diagonal matrix $C$;\n", "- temperature source vector $b$;\n", "- heat flow source vector $f$;\n", "\n", "**find** the temperature vector $\\theta$ and the flow rate vector $q.$" ] }, { "cell_type": "markdown", "id": "e912ce0f-971a-4012-a6d5-c88b09ddcdf4", "metadata": {}, "source": [ "## Thermal conductances" ] }, { "cell_type": "markdown", "id": "4bddc9d9-08b9-4bd9-a795-e8c315e33d0d", "metadata": {}, "source": [ "### Conduction\n", "\n", "For a plan wall, [conduction]((https://en.m.wikipedia.org/wiki/Thermal_conduction)) conductances, in W/K, are of the form:\n", "$$G_{cd} = \\frac{\\lambda}{w}S$$\n", "where:\n", "\n", "- $\\lambda$ - [thermal conductvity](https://en.m.wikipedia.org/wiki/Thermal_conductivity), W/(m⋅K);\n", "- $w$ - width of the wall, m;\n", "- $S$ - surface area of the wall, m²." ] }, { "cell_type": "markdown", "id": "f3976858-da61-48fd-9ea8-10315ca9c36c", "metadata": {}, "source": [ "### Convection\n", "\n", "[Convection](https://en.m.wikipedia.org/wiki/Convection_(heat_transfer) conductances, in W/K, are of the form:\n", "$$G_{cv} = {h S}$$\n", "where:\n", "- $h$ is the [convection coefficient](https://en.m.wikipedia.org/wiki/Heat_transfer_coefficient), W/(m²⋅K);\n", "- $S$ - surface area of the wall, m².\n", "\n", ">Table 1. Surface thermal resistances [Dal Zotto et al. 2014, p. 251]\n", "\n", "| Type of wall | Indoor surface |Outdoor surface|\n", "|--------------|:--------------:|:-------------:|\n", "| | $h_i$,W/(m²·K) | $h_o$,W/(m²·K)|\n", "|*Vertical* (tilt > 60°)| 7.7| 25 |\n", "|*Horizontal* (tilt < 60°)| | |\n", "|- Upward heat flow | 10| 25 |\n", "|- Downward heat flow | 5.9| 25 |" ] }, { "cell_type": "markdown", "id": "d93d456f-4ec8-4d1d-83c3-550e679d1497", "metadata": {}, "source": [ "### Long wave radiation" ] }, { "cell_type": "markdown", "id": "19a59746-a1b4-4115-ad01-863632656b60", "metadata": {}, "source": [ "#### View factors inside the building\n", "\n", "The majority of methods used for modelling the [radiative heat exchange](https://en.m.wikipedia.org/wiki/Thermal_radiation) use the [view factors](https://en.m.wikipedia.org/wiki/View_factor) between surfaces. The view factor $F_{i,j}$ is defined as *the proportion of radiation leaving surface $i$ that is intercepted by surface $j$*. The view factors can be estimated by [differential areas](https://en.m.wikipedia.org/wiki/View_factor#View_factors_of_differential_areas) or for different configurations of surfaces ([Howell, 2010](http://www.thermalradiation.net/indexCat.html)).\n", "\n", "The view factors need to satisfy the [summation rule](https://en.m.wikipedia.org/wiki/View_factor#Summation_of_view_factors) \n", "$$\\sum_{j=0}^{n-1} F_{i,j} = 1$$\n", "and the [reciprocity theorem](https://en.wikipedia.org/wiki/View_factor#Reciprocity):\n", "$$F_{i,j} S_i = F_{j,i} S_j$$\n", "where $S_{i}$ and $S_{j}$ are the surface areas.\n", "\n", "For a [convex](https://en.m.wikipedia.org/wiki/Convex_function) surface $i$, the [self-viewing factor](https://en.wikipedia.org/wiki/View_factor#Self-viewing_surfaces) is zero,\n", "$$F_{i,i} = 0$$\n", "\n", "Two simplified relations are used to calculate the view factors for buildings.\n", "\n", "In the first one, the view factors are defined by:\n", "$$\\begin{cases}\n", "F_{i,j} = \\frac{S_i}{S_T}\\\\ \n", "F_{i,i} = 0\n", "\\end{cases}$$\n", "\n", "where $S_{T} = \\sum_{j=0}^{n-1} S_j$, i.e. the surface $S_j$ is included in the total surface $S_T$. In this method, the reciprocity theorem is satisfied,\n", "$$F_{i,j} S_i = F_{j,i} S_j = \\frac{S_i S_j}{S_T}$$\n", "but summation rule isn't,\n", "$$\\sum_{j=0}^{n-1} F_{i,j} = \\sum_{j=0, j \\neq i}^{n-1} \\frac{S_j}{S_T} = \\frac {S_T - S_i}{S_T} \\neq 1$$\n", "\n", "In this case, the heat balance for each surface would be wrong.\n", "\n", "In the second one, the view factors are defined by:\n", "$$\\begin{cases}\n", "F_{i,j} = \\frac{S_j}{S_T -S_i}\\\\ \n", "F_{i,i} = 0\n", "\\end{cases}$$\n", "\n", "where $S_{T} = \\sum_{j=0}^{n-1} S_j$, i.e. the surface $S_i$ is not included in the total surface $S_{T,i} = S_T - S_i$. \n", "\n", "In this case, the reciprocty theorem is generally not respected:\n", "$$F_{i, j} S_i = \\frac{S_j}{S_T - S_i} S_i \\neq F_{j, i} S_j = \\frac{S_i}{S_T - S_j} S_j$$\n", "but the summation rule is respected:\n", "$$ \\sum_{i=0}^{n-1} F_{i, j} = \\frac{1}{S_T - S_i} \\sum_{\\substack{j=0\\\\i\\neq j}}^{n-1} S_j = 1 $$\n", "\n", "Note: The view factor between two surfaces, $j,k$ that are in the same plan (e.g. a window and a wall) is zero,\n", "$$F_{j,k} = F_{k,j}=0$$\n", "\n", "Therefore the total surface $S_{T,i}$ should be:\n", "$$S_{T,i} = \\sum_{j=0}^{n-1} S_j - \\sum_k S_k$$\n", "i.e. the surfaces $S_k$ in the same plan with the surface $S_i$ are not included in $S_{T,i}$." ] }, { "cell_type": "markdown", "id": "45d0a74e-5b43-4ef1-92cb-62e111f17d3e", "metadata": {}, "source": [ "#### View factor between tilted outdoor walls and sky\n", "\n", "The view factor between the top surface of finite wall $w$ tilted relative to an infinite plane of the ground $g$ is [[5](http://www.thermalradiation.net/sectionc/C-9.html), [6](http://www.diva-portal.org/smash/get/diva2:1305017/FULLTEXT01.pdf), eq. 4.18]:\n", "\n", "$$ F_{w,g} = \\frac {1 - \\cos \\beta}{2}$$\n", "\n", "Therefore, the view factor between the tilted wall $w$ and the sky dome $s$ is [[6](http://www.diva-portal.org/smash/get/diva2:1305017/FULLTEXT01.pdf), eq. 4.17]:\n", "$$ F_{w,s} = 1 - F_{w,g} = \\frac {1 + \\cos \\beta}{2}$$" ] }, { "cell_type": "markdown", "id": "91537e07-57c9-41b8-a774-28963b6c31e3", "metadata": {}, "source": [ "#### View factor between tilted outdoor walls and sky\n", "\n", "The view factor between the top surface of finite wall $w$ tilted relative to an infinite plane of the ground $g$ is [[5](http://www.thermalradiation.net/sectionc/C-9.html), [6](http://www.diva-portal.org/smash/get/diva2:1305017/FULLTEXT01.pdf), eq. 4.18]:\n", "\n", "$$ F_{w,g} = \\frac {1 - \\cos \\beta}{2}$$\n", "\n", "Therefore, the view factor between the tilted wall $w$ and the sky dome $s$ is [[6](http://www.diva-portal.org/smash/get/diva2:1305017/FULLTEXT01.pdf), eq. 4.17]:\n", "$$ F_{w,s} = 1 - F_{w,g} = \\frac {1 + \\cos \\beta}{2}$$" ] }, { "cell_type": "markdown", "id": "3a03d49e-4aaf-4437-b9c0-8ba2d84828df", "metadata": {}, "source": [ "#### Thermal network for long wave radiation\n", "\n", "The long-wave heat exchange between surfaces may be modelled by using the concept of [radiosity](https://en.m.wikipedia.org/wiki/Radiosity_(radiometry)) and then linearizing the radiative heat exchange. \n", "\n", "![LW_rad_excg](./figures/03_LW_rad_excg.svg)\n", "> Figure 1. Radiative long-wave heat exchange between two surfaces: a) modeled by [emmitance](https://en.m.wikipedia.org/wiki/Radiant_exitance) (source) and [radiosity](https://en.m.wikipedia.org/wiki/Radiosity_(radiometry)) (nodes); b) modeled by linearization of emmitance (temperature sources) and radiosity (temperature nodes).\n", "\n", "For two surfaces, shown by temperature nodes 1 and 2 in Figure 1, the [conductances](https://en.m.wikipedia.org/wiki/Radiosity_(radiometry)#Circuit_analogy), in m², for radiative heat exchange expressed by using the emmitance (or the [radiant excitance](https://en.m.wikipedia.org/wiki/Radiant_exitance)) of the black body, the [radiosity](https://en.m.wikipedia.org/wiki/Radiosity_(radiometry)), and the [reciprocity](https://en.m.wikipedia.org/wiki/View_factor#Reciprocity) of view factors are:\n", "\n", "$$G_{1}^{r} = \\frac{\\varepsilon_1}{1 - \\varepsilon_1} S_1$$\n", "\n", "$$G_{1,2}^{r} = F_{1,2} S_1 = F_{2,1} S_2$$\n", "\n", "$$G_{2}^{r} = \\frac{\\varepsilon_2}{1 - \\varepsilon_2} S_2$$\n", "\n", "where:\n", "- $\\varepsilon_1$ and $\\varepsilon_2$ are the [emmisivities](https://en.m.wikipedia.org/wiki/Emissivity) of the surfaces 1 and 2;\n", "- $S_1$ and $S_2$ - areas of the surfaces 1 and 2, m²;\n", "- $F_{1,2}$ - [view factor](https://en.m.wikipedia.org/wiki/View_factor) between surfaces 1 and 2.\n", "\n", "\n", "The [net flows leaving the surfaces 1 and 2](https://en.m.wikipedia.org/wiki/Radiosity_(radiometry)#Circuit_analogy) are:\n", "\n", "$$q_{net,1} = \\frac{\\varepsilon_1}{1 - \\varepsilon_1} S_1 (M^o_1 - J_1)= G^r_1 (M_1^o - J_1)$$\n", "\n", "$$q_{net,2} = \\frac{\\varepsilon_2}{1 - \\varepsilon_2} S_2 (M^o_2 - J_2)= G^r_2 (M_2^o - J_2)$$\n", "\n", "respectively, where:\n", "- $M^o_1$ and $M^o_2$ are the [emmitances](https://en.m.wikipedia.org/wiki/Radiant_exitance) of the surfaces 1 and 2 when emmiting as black bodies, $M^o = \\sigma T^4$, W/m²;\n", "- $J_1$ and $J_2$ - [radiosities](https://en.m.wikipedia.org/wiki/Radiosity_(radiometry)) of surfaces 1 and 2, W/m²;\n", "- $G^r_1$ and $G^r_2$ - conductances for long wave radiative heat exchange, m².\n", "\n", "The [net flow between surfaces 1 and 2](https://en.m.wikipedia.org/wiki/Radiosity_(radiometry)#Circuit_analogy) is:\n", "\n", "$$q_{1,2} = F_{1,2} S_1 (J_1 - J_2) = F_{2,1} S_2 (J_1 - J_2)= G_{1,2}^r (J_1 - J_2)$$\n", "\n", "In order to express the long-wave radiative exchange as a function of temperature differences, a linearization of the difference of temperatures $T_1^4 - T_2^4$ may be used:\n", "\n", "$$T_1^4 - T_2^4 = (T_1^2 + T_2^2)(T_1^2 - T_2^2) = (T_1^2 + T_2^2)(T_1 + T_2)(T_1 - T_2) = 4 \\bar{T}^3 (T_1 - T_2)$$\n", "\n", "where the mean temperature $\\bar{T}$, measured in kelvin, is:\n", "\n", "$$\\bar{T} =\\sqrt[3]{ \\frac{(T_1^2 + T_2^2)(T_1 + T_2)}{4}}$$\n", "\n", "The evaluation of mean temperaure, $\\bar{T}$, requires the values of the surface tempetratures, $T_1$ and $T_2$. An initial guess can be used (and then an iterative process, for a more precise evaluation).\n", "\n", "After linearization, the conductances, in W/K, for radiative heat exchange are:\n", "\n", "$$G_{1} = 4 \\sigma \\bar{T}^3 \\frac{\\varepsilon_1}{1 - \\varepsilon_1} S_1$$\n", "\n", "$$G_{1,2} = 4 \\sigma \\bar{T}^3 F_{1,2} S_1 = 4 \\sigma \\bar{T}^3 F_{2,1} S_2$$\n", "\n", "$$G_{2} = 4 \\sigma \\bar{T}^3 \\frac{\\varepsilon_2}{1 - \\varepsilon_2} S_2$$" ] }, { "cell_type": "markdown", "id": "1120c7ca-86ed-4597-b970-2257aa8b71c7", "metadata": {}, "source": [ "### Advection\n", "\n", "The [volumetric flow rate](https://en.m.wikipedia.org/wiki/Volumetric_flow_rate) of the air, in m³/s, is:\n", "\n", "$$\\dot{V}_a = \\frac{\\mathrm{ACH}}{3600} V_a$$\n", "\n", "where:\n", "- $\\mathrm{ACH}$ ([air changes per hour](https://en.m.wikipedia.org/wiki/Air_changes_per_hour)) is the air infiltration rate, 1/h;\n", "- $3600$ - number of seconds in one hour, s/h;\n", "- $V_a$ - volume of the air in the thermal zone, m³.\n", "\n", "The net flow rate that the building receives by [advection](https://en.m.wikipedia.org/wiki/Advection), i.e., introducing outdoor air at temperature $T_o$ and extracting indoor air at temperature $\\theta_i$ by [ventilation](https://en.m.wikipedia.org/wiki/Ventilation_(architecture)) and/or [air infiltration](https://en.m.wikipedia.org/wiki/Infiltration_(HVAC)), is:\n", "\n", "$$q_v = \\dot{m}_a c_a (T_o - \\theta_i) = \\rho_a c_a \\dot{V}_a (T_o - \\theta_i)$$\n", "\n", "where:\n", "- $\\dot{m}_a$ is the [mass flow rate](https://en.m.wikipedia.org/wiki/Mass_flow_rate) of air, kg/s;\n", "- $\\dot{V}_a$ - [volumetric flow rate](https://en.m.wikipedia.org/wiki/Volumetric_flow_rate), m³/s;\n", "- $c_a$ - [specific heat capacity](https://en.m.wikipedia.org/wiki/Specific_heat_capacity) of the air, J/kg·K;\n", "- $\\rho_a$ - [density](https://en.m.wikipedia.org/wiki/Density) of air, kg/m³;\n", "- $T_o$ - outdoor air temperature, °C (noted in majuscule because it is a *temperature source* or *input variable*);\n", "- $\\theta_i$ - indoor air temperature, °C (noted in minuscule because it is a *dependent temperature* or *output variable*).\n", "\n", "Therefore, the conductance of [advection](https://en.m.wikipedia.org/wiki/Advection) by [ventilation](https://en.m.wikipedia.org/wiki/Ventilation_(architecture)) and/or [infiltration](https://en.m.wikipedia.org/wiki/Infiltration_(HVAC)), in W/K, is:\n", "\n", "$$G_v = \\rho_a c_a \\dot{V}_a$$\n", "\n", "> Table 2. Typical values for the ventilation rates (in air changes per hour, ACH) as a function of the position of windows (H. Recknagel, E. Spenger, E_R Schramek (2013), Table 1.12.1-4)\n", "\n", "| Position of windows | Ventilation rate, ACH [h⁻ⁱ] |\n", "| --------------------------------------- | ---------------------- |\n", "| Window closed, doors closed | 0 to 0.5 |\n", "| Tilted window, venetian blind closed | 0.3 to 1.5 |\n", "| Tilted window, whitout venetian blind | 0.8 to 4.0 |\n", "| Window half opened | 5 to 10 |\n", "| Window fully open | 9 to 15 |\n", "| Window and French window fully open (cross ventilation) | about 40 |" ] }, { "cell_type": "markdown", "id": "591682d1-de5c-46d7-885f-4a3877decef6", "metadata": {}, "source": [ "### Proportional controller\n", "\n", "In the simplest representation, the [HVAC system](https://en.m.wikipedia.org/wiki/HVAC_control_system) can be considered as a [proportional controller](https://en.m.wikipedia.org/wiki/Proportional_control) that adjusts the heat flow rate $q_{HVAC}$ in order to control the indoor temperature $\\theta_i$ at its setpoint value $T_{i,sp}$. The heat flow-rate, in W, injected by the [HVAC](https://en.m.wikipedia.org/wiki/Heating,_ventilation,_and_air_conditioning) system into the controlled space is:\n", "\n", "$$ q_{HVAC} = K_p (T_{i, sp} - \\theta_i)$$\n", "\n", "where:\n", "- $K_p$ is the proportional gain, W/K;\n", "- $T_{i, sp}$ - indoor temperature [setpoint](https://en.m.wikipedia.org/wiki/Setpoint_(control_system)), °C (noted in majuscule because it is an *input, i.e. independent, variable*);\n", "- $\\theta_i$ - indoor temperature, °C (noted in minuscule because it is a *output, i.e. dependent variable*).\n", "\n", "This equation shows that the proportional controller can be modelled by a source of temperature, $T_{i, sp}$, and a conductance, $K_p$. If the controller gain tends towards:\n", "- infinity, $K_p \\rightarrow \\infty$, then the controller is perfect, $\\theta_i \\rightarrow T_{i, sp}$.\n", "- zero, $K_p \\rightarrow 0$, then the controller is not acting and the building is in free-running, i.e. $q_{HVAC} = 0$ ([Ghiaus 2003](https://doi.org/10.1016/S0378-7788(02)00110-X)).\n", "\n", "*Note*: Respecting the [sign convention](https://en.m.wikipedia.org/wiki/Passive_sign_convention#Active_and_passive_components), the flow rate $q_{HVAC}$ is oriented from the lower to the higher potential of the temperature source $T_{i,sp}$." ] }, { "cell_type": "markdown", "id": "3a79ec0a-b978-4bde-a795-760ad950ddea", "metadata": {}, "source": [ "## Thermal capacities" ] }, { "cell_type": "markdown", "id": "3fe6f4a1-62b2-404b-8279-ffe4435f7141", "metadata": {}, "source": [ "### Walls\n", "The [thermal capacities](https://en.m.wikipedia.org/wiki/Heat_capacity) of the wall, in J/kg, are:\n", "\n", "$$C_w= m_w c_w= \\rho_w c_w w_w S_w$$\n", "\n", "where:\n", "- $m_w = \\rho_w w_w S_w$ is the mass of the wall, kg;\n", "- $c_w$ - [specific heat capacity](https://en.m.wikipedia.org/wiki/Specific_heat_capacity), J/(kg⋅K);\n", "- $\\rho_w$ - [density](https://en.m.wikipedia.org/wiki/Density), kg/m³;\n", "- $w_w$ - width of the wall, m;\n", "- $S_w$ - surface area of the wall, m²." ] }, { "cell_type": "markdown", "id": "bca46893-f8a3-4f6f-84d1-544c51373ba2", "metadata": {}, "source": [ "### Air\n", "Similarly, the thermal capacity of the air, in J/kg, is:\n", "\n", "$$C_a = m_a c_a = \\rho_a c_a V_a$$\n", "\n", "where:\n", "- $m_a = \\rho_a V_a$ is the mass of the air, kg;\n", "- $\\rho_w$ - [density](https://en.m.wikipedia.org/wiki/Density) of air, kg/m³;\n", "- $c_a$ - specific heat capacity of the air, J/(kg⋅K);\n", "- $V_a$ - volume of the air in the thermal zone, m³." ] }, { "cell_type": "markdown", "id": "77cf103f-18c2-4012-99cb-b9a03674693a", "metadata": {}, "source": [ "## Temperature sources\n", "\n", "The [temperature sources](https://en.m.wikipedia.org/wiki/Voltage_source#Ideal_voltage_sources) model temperatures which vary independently of what happens in the themal circuit; they are inputs of the physical model. Generally, the temperature sources are:\n", "- outdoor air and ground temperature;\n", "- temperature of adjacent spaces which have controlled temperature;\n", "- setpoint temperature." ] }, { "cell_type": "markdown", "id": "6db684f6-d3d2-4d7e-b1ba-9c454b7b8450", "metadata": {}, "source": [ "### Adjacent spaces with controlled temperature\n", "\n", "If the adjacent spaces are controlled by a HVAC system, it means that their temperature can be considered independent of the studied thermal zone(s); therefore, they can be modelled by a temperature source." ] }, { "cell_type": "markdown", "id": "e6814805-d1fb-4c9f-aabd-6644ccf05519", "metadata": {}, "source": [ "### Setpoint temperature\n", "\n", "[Setpoint](https://en.m.wikipedia.org/wiki/Setpoint_(control_system)) temperature does not depend on the heat transfer processes of the analyzed thermal zone. If the HVAC system can deliver the heat flow rate:\n", "\n", "$$ q_{HVAC} = K_p (T_{i, sp} - \\theta_i)$$\n", "\n", "where:\n", "- $K_p$ is the proportional gain, W/K;\n", "- $T_{i, sp}$ - indoor temperature [setpoint](https://en.m.wikipedia.org/wiki/Setpoint_(control_system)), °C;\n", "- $\\theta_i$ - indoor temperature, °C,\n", "\n", "then the setpoint for indoor temperature, $T_{i, sp}$, may be modelled by a source of temperature." ] }, { "cell_type": "markdown", "id": "8d3faa41-bc8c-49a6-a723-55b63fe5ec18", "metadata": {}, "source": [ "## Heat flow rate sources\n", "The [heat flow rate sources](https://en.m.wikipedia.org/wiki/Current_source#Background) model flow rates which vary idependently of what happens in the themal circuit. They are inputs of the physical model. Generally, the heat flow rate sources are:\n", "- solar radiation absorbed by the walls;\n", "- internal auxiliary sources." ] }, { "cell_type": "markdown", "id": "575c61f0-4e9d-4424-b3bb-75afce4a0dff", "metadata": {}, "source": [ "### Solar radiation absorbed by the walls\n", "\n", "The [direct](https://en.m.wikipedia.org/wiki/Direct_insolation), diffuse and reflected components of the [solar radiation](https://en.m.wikipedia.org/wiki/Solar_irradiance) on a tilted surface can be estimated from weather data by using the function `sol_rad_tilt_surf` from the module `dm4bem` (see the tutorial on [Weather data and solar radiation](../t01/t01ReadWeatherData.ipynb))." ] }, { "cell_type": "markdown", "id": "6bef4877-2239-4afa-807b-1c6ee985366f", "metadata": {}, "source": [ "#### External wall\n", "\n", "The radiation absorbed by the outdoor surface of the wall is:\n", "\n", "$$\\Phi_o = \\alpha_{w,SW} S_w E_{tot}$$\n", "\n", "where:\n", "- $\\alpha_{w,SW}$ is the [absorptance](https://en.m.wikipedia.org/wiki/Absorptance) of the outdoor surface of the wall in short wave, $0 \\leqslant \\alpha_{w,SW} \\leqslant 1$;\n", "- $S_w$ - surface area of the wall, m²;\n", "- $E_{tot}$ - total [solar irradiance](https://en.m.wikipedia.org/wiki/Solar_irradiance) on the wall, W/m²." ] }, { "cell_type": "markdown", "id": "f9cfc985-6744-4063-aa93-4ce27025dd4f", "metadata": {}, "source": [ "#### Internal walls\n", "\n", "The total shortwave incident irradiance on the wall $i$, $E_i$, may be estimated as a function of the direct solar irradiance incident on the surface of the walls, $E_{i}^{o}$:\n", "\n", "$$S_i E_i = S_i E_{i}^{o} + \\sum_{j=1}^{n} F_{j,i} S_j \\rho_j E_j$$\n", "\n", "where:\n", "- $S_i$ is the area of the surface of the wall $i$, m²;\n", "- $E_i$ - total irradiance received directly and by multiple reflections on surface $i$, W/m²;\n", "- $E_{i}^{o}$ - irradiance received directly from the sun on surface $i$, W/m²;\n", "- $F_{j, i}$ - [view factor](https://en.m.wikipedia.org/wiki/View_factor) between surface $j$ and surface $i$, $0 ⩽ F_{j,i} ⩽ 1$;\n", "- $\\rho_j$ - [reflectance](https://en.m.wikipedia.org/wiki/Reflectance) of surface $j$, $0 ⩽ \\rho_j ⩽ 1$.\n", "\n", "\n", "By taking into account the [reciprocity](https://en.m.wikipedia.org/wiki/View_factor#Reciprocity) of the view factors: $S_i F_{i,j} = S_j F_{j,i}$, the set of previous equation becomes:\n", "\n", "$$\n", "\\begin{bmatrix}\n", "1 - \\rho_1 F_{1,1} & - \\rho_2 F_{1,2} & ... & - \\rho_n F_{1,n}\\\\ \n", "- \\rho_1 F_{2,1} & 1 - \\rho_2 F_{2,2} & ... & - \\rho_n F_{2,n} \\\\ \n", "... & ... & ... & ... \\\\ \n", "- \\rho_1 F_{n,1} & - \\rho_2 F_{n,1} & ... & 1 - \\rho_n F_{n,n}\n", "\\end{bmatrix} \\begin{bmatrix}\n", "E_1\\\\ \n", "E_2\\\\ \n", "...\\\\ \n", "E_n\n", "\\end{bmatrix} = \\begin{bmatrix}\n", "E_{1}^{o}\\\\ \n", "E_{2}^{o}\\\\ \n", "...\\\\ \n", "E_{n}^{o}\n", "\\end{bmatrix}\n", "$$\n", "\n", "or\n", "\n", "$$(I - \\rho \\circ F) E = E^o$$\n", "\n", "The unknown total [irradiances](https://en.m.wikipedia.org/wiki/Irradiance) on walls, in W/m², are then\n", "\n", "$$ E = (I - \\rho \\circ F)^{-1} E^o$$\n", "\n", "where:\n", "\n", "- the symbol $\\circ$ represents the [Hadamard (or element-wise) product](https://en.wikipedia.org/wiki/Hadamard_product_(matrices));\n", "\n", "$I =\\begin{bmatrix}\n", "1 & 0 & ... & 0 \\\\ \n", "0 & 1 & ... & 0 \\\\ \n", "... & ... & ... & ...\\\\ \n", "0 & 0 & ... & 1 \n", "\\end{bmatrix}, $ is the [identity matrix](https://en.m.wikipedia.org/wiki/Identity_matrix);\n", "\n", "$\\rho = \\begin{bmatrix}\n", "\\rho_1\\\\ \n", "\\rho_2\\\\ \n", "...\\\\ \n", "\\rho_n\n", "\\end{bmatrix}$ - vector of [reflectances](https://en.m.wikipedia.org/wiki/Reflectance), $0 \\le \\rho_{i,j} \\le 1$;\n", "\n", "$F = \\begin{bmatrix}\n", "F_{1,1} & F_{1,2} & ... & F_{1,n}\\\\ \n", "F_{2,1} & F_{2,2} & ... & F_{2,n} \\\\ \n", "... & ... & ... & ...\\\\ \n", "F_{n,1} & F_{n,2} & ... & F_{n,n}\n", "\\end{bmatrix}$ - matrix of [view factors](https://en.m.wikipedia.org/wiki/View_factor), $0 \\le F_{i,j} \\le 1$;\n", "\n", "$E^o = \\begin{bmatrix}\n", "E_{1}^{o}\\\\ \n", "E_{2}^{o}\\\\ \n", "...\\\\ \n", "E_{n}^{o}\n", "\\end{bmatrix}$ - vector of [direct solar irradiances](https://en.m.wikipedia.org/wiki/Solar_irradiance), W/m²;\n", "\n", "$E = \\begin{bmatrix}\n", "E_1\\\\ \n", "E_2\\\\ \n", "...\\\\ \n", "E_n\n", "\\end{bmatrix}$ - vector of unknown total irradiances, W/m².\n", "\n", "\n", "The radiative short wave (i.e. solar) heat flow rate on each surface is:\n", "\n", "$$ \\Phi = S E $$\n", "\n", "where:\n", "\n", "$\\Phi = \\begin{bmatrix}\n", "\\Phi_1\\\\ \n", "\\Phi_2\\\\ \n", "...\\\\ \n", "\\Phi_n\n", "\\end{bmatrix}$ - vector of total heat flow rates due to solar radiation, W; \n", "\n", "$S =\\begin{bmatrix}\n", "S_1 & 0 & ... & 0 \\\\ \n", "0 & S_2 & ... & 0 \\\\ \n", "... & ... & ... & ...\\\\ \n", "0 & 0 & ... & S_n \n", "\\end{bmatrix}$ - matrix of surface areas of walls $i$, m²." ] }, { "cell_type": "markdown", "id": "9d3a11ec-ae30-4abf-8933-85d22deb2728", "metadata": {}, "source": [ "### Internal sources\n", "\n", "Internal flow rates are generated by occupants and by the electrical equipment (with values given for [offices](https://energieplus-lesite.be/theories/bilan-thermique44/charges-thermiques-internes-pour-les-bureaux/), [commercial spaces](https://energieplus-lesite.be/theories/bilan-thermique44/charges-thermiques-internes-pour-les-commerces/), etc.)." ] }, { "cell_type": "markdown", "id": "7232ff2c-d27b-4fe3-b39c-8e3a5433637d", "metadata": { "jp-MarkdownHeadingCollapsed": true, "tags": [] }, "source": [ "## System of algebraic-differential equations (DAE)\n", "\n", "The analysis of a thermal circuit, or the direct problem ([Ghiaus 2022](https://hal.archives-ouvertes.fr/hal-03484064/document)), means to find the temperatures in the nodes, $\\theta$, and the heat flows on the branches, $q$, i.e. to solve for $\\theta$ and $q$ the system of [Differential-Algebraic Equations (DAE)](https://en.m.wikipedia.org/wiki/Differential-algebraic_system_of_equations):\n", "\n", "$$\\left\\{\\begin{array}{ll}\n", "C \\dot{\\theta} = -(A^T G A) \\theta + A^T G b + f\\\\ \n", "q = G (-A \\theta + b)\n", "\\end{array}\\right.$$\n", "\n", "where:\n", "- $\\theta$ is the temperature vector of size $n_\\theta$ equal to the number of nodes;\n", "- $q$ - heat flow vector of size $n_q$ equal to the number of branches;\n", "- $A$ - [incidence matrix](https://en.m.wikipedia.org/wiki/Incidence_matrix) of size $n_q$ rows and $n_{\\theta}$ columns, where $n_q$ is the number of flow branches and $n_{\\theta}$ is the number of temperature nodes. It shows how the temperature nodes are connected by oriented branches of heat flows:\n", " - if flow *m* enters into node *n*, then the element (*m, n*) of the matrix $A$ is 1, i.e., $A_{m,n} = 1$;\n", " - if flow *m* exits from node *n*, then the element (*m, n*) of the matrix $A$ is -1, i.e., $A_{m,n} = -1$, ; \n", " - if flow *m* is not connected to node *n*, then the element (*m, n*) of the matrix $A$ is 0, i.e., $A_{m,n} = 0$.\n", "\n", "- $G$ - conductance diagonal matrix of size $n_q \\times n_q$, where $n_q$ is the number of flow branches: diagonal matrix containing the conductances. Each branch $k$ needs to contain a conductance $0 < G_{k,k} < \\infty $. \n", "\n", "- $C$ - capacity diagonal matrix of size $n_θ \\times n_θ$, where $n_θ$ is the number of temperature nodes: diagonal matrix containing the capacities. If there is no capacity in the node *n*, then $C_{n, n} = 0$.\n", "\n", "- $b$ - temperature source vector of size $n_q$: if there is no temperature source on the branch *m*, then $b_m = 0$.\n", "\n", "- $f$ - heat flow source vector of size $n_θ$: if there is no heat flow source in the node *n*, then $f_n = 0$.\n", "\n", "__Note__: The incidence matrix $A$ is related to difference operator $\\Delta$:\n", "$$ \\Delta = -A$$\n", "\n", "\n", "The resolution is first done for temperatures, $\\theta$, by solving the equation\n", "$$C \\dot{\\theta} = -(A^T G A) \\theta + A^T G b + f$$\n", "which, generally, is a system of differential-algebraic equations (DAE). Then, the heat flow rates are found from the equation\n", "$$q = G (-A \\theta + b)$$\n", "\n", "\n", "The vector of outputs is $y$, of size $n_{\\theta}$, the number of nodes. The non-zero values of $y$ indicate the nodes which are the outputs of the model." ] }, { "cell_type": "markdown", "id": "a300e258-9ff6-4baa-8fc8-de25c7f6b546", "metadata": { "jp-MarkdownHeadingCollapsed": true, "tags": [] }, "source": [ "## State-space representation\n", "The [differential-algebraic system of equations (DAE)](https://en.m.wikipedia.org/wiki/Differential-algebraic_system_of_equations)\n", "\n", "$$C \\dot{\\theta} = -(A^T G A) \\theta + A^T G b + f$$\n", "\n", "is transformed in [state-space representation](https://en.m.wikipedia.org/wiki/State-space_representation) ([Ghiaus 2013](https://hal.archives-ouvertes.fr/hal-03605823/document)):\n", "\n", "$$\\left\\{\\begin{array}{rr}\n", "\\dot{\\theta}_s=A_s \\theta_s + B_s u\\\\ \n", "y = C_s \\theta_s + D_s u\n", "\\end{array}\\right.$$\n", "\n", "where:\n", "- $\\theta_s$ is the vector of state variables which are the temperatures of nodes containing capacities; the elements are in the same order as in the vector of temperatures, $\\theta$; its dimension, $\\dim \\theta_s$, is equal to the number of capacities from the thermal network; for the circuit presented in Figure 3, $\\theta_s = [\\theta_1, \\theta_3, \\theta_6, \\theta_7]^T$;\n", "\n", "- $u = \\begin{bmatrix} b_T \\\\ f_Q\\end{bmatrix}$ - vector of inputs of dimension $\\dim u$ equal to the number of sources (of temperaure, $b_T$, and heat flows, $f_Q$) of the thermal network, where:\n", "\n", " - vector $b_T$ of nonzero elements of vector $b$ of temperature sources;\n", " - vector $f_Q$ of nonzero elements of vector $f$ of flow sources;\n", " \n", "- $y$ - vector of outputs, a subset of vector $\\theta$ representing temperature nodes which are of interest;\n", "\n", "- $A_s$ - state matrix, of dimension $\\dim A_s = \\dim {\\theta_s} \\times \\dim {\\theta_s}$;\n", "\n", "- $B_s$ - input matrix, of dimension $\\dim B_s = \\dim {\\theta_s} \\times \\dim u$;\n", "\n", "- $C_s$ - output matrix, of dimension $\\dim C_s = \\dim y \\times \\dim {\\theta_s}$;\n", "\n", "- $D_s$ - feedthrough (or feedforward) matrix, of dimension $\\dim D_s = \\dim y \\times \\dim u$.\n", "\n", "*Note*: The subscript $s$ of the matrices $A_s, B_s, C_s, D_s$ is used to differentiante the matrices $A_s, C_s$ of the state-space represenation of the matrices $A, C$ of the system of DAE." ] }, { "cell_type": "markdown", "id": "b8b16424-1ee3-4755-8afb-183af05c883b", "metadata": {}, "source": [ "## References\n", "\n", "C. Ghiaus (2021). Dynamic Models for Energy Control of Smart Homes, in *S. Ploix M. Amayri, N. Bouguila (eds.) Towards Energy Smart Homes*, Online ISBN: 978-3-030-76477-7, Print ISBN: 978-3-030-76476-0, Springer, pp. 163-198 (ref.)\n", "[DOI 10.1007/978-3-030-76477-7_5](https://doi.org/10.1007/978-3-030-76477-7_5), [HAL 03578578](https://hal.archives-ouvertes.fr/hal-03578578/document)\n", "\n", "[Dal Zotto et al.,(2014)](https://www.amazon.fr/Mémotech-Génie-énergétique-Dal-Zotto/dp/271352122X) Mémotech. Génie énergétique, 5 edition, Casteilla, ISBN-13: 978-2-206-10018-0\n", "\n", "[Howell, J. R. (2010)](http://www.thermalradiation.net/indexCat.html). A catalog of radiation heat transfer configuration factors 3rd edition. University of Texas at Austin" ] }, { "cell_type": "code", "execution_count": null, "id": "c5d0b998-660d-45ea-8fa9-40468eb1558d", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.7" }, "toc-autonumbering": true }, "nbformat": 4, "nbformat_minor": 5 }