Thermo-fluid-dynamics, also known as thermal-fluid sciences, is an interdisciplinary field that combines principles from thermodynamics, fluid mechanics, and heat transfer to study and analyze the behavior of thermal systems. These systems involve the transfer of energy in the form of heat and the movement of fluids such as air and water so it could be interesting to analyze also small thermal systems from a user perspective.

Here, a small domestic thermal system application is analyzed with some perspective of thermodynamics rising up during the personalization of the irrespective control system to optimize comfort reducing energy consumption.

Furthermore, the following is mainly a personal reflection on these systems however I write it down with the intent of dedicating it to the professor of the Thermal Physics course who was more worried that I remembered the Guoj-Stodola theorem as well as his publications instead of teaching something really useful and applicable.

Thermal systems encompass a wide range of applications, including power generation, heating, ventilation, and air conditioning (HVAC), refrigeration, and aerospace engineering. Thermo-fluid-dynamics provides the tools and methods to model, analyze, and optimize these systems, allowing engineers and researchers to make informed decisions to improve their performance, energy efficiency, and environmental sustainability.


It is well known that to heat water as well as the environment we need power. In small thermal systems, generally, power comes from a boiler that uses gas combustion in order to transfer energy to water. In the following, a condensing boiler is considered. It could heat both radiators or a puffer that works as technical water for primary exchangers.

The heat rate represents the power given by the source. The heat exchange in a hot water loop is related to the mass flow, specific heat capacity, and differences in temperature, as:

\dot Q=\dot mC_p\Delta T

Where m is the mass flow rate, cp is the heat capacity and ΔT the temperature difference.

\dot m\left[\text{kg}\over\text{s}\right]\\ \:\\c_p\left[\text{kJ}\over\text{kg K}\right]\\ \: \\\Delta T=T_{\operatorname{cold}}-T_{\operatorname{hot}}

Then it is possible to compute the energy by the integration. In reality, due to the discrete temperature sampling, it is computed as the discrete left integration by summing all the i samples.

Q=\int_{t_{on}}^{t_{off}}\dot Q dt\approx \sum_{i=1}^{Q_i}\dot mC_p[\Delta T\Delta t]_i

Boiler heat exchange

A condensing boiler is a type of heating system that is designed to maximize energy efficiency by recovering heat from the flue gases that would typically be lost in traditional boilers. It achieves this by utilizing the principles of condensation. When a fuel, such as natural gas or oil, is burned in a boiler, heat is produced as a result of the combustion process.

In a conventional boiler, the hot combustion gases are released through the flue and into the atmosphere, carrying away a significant amount of heat energy. In contrast, a condensing boiler is equipped with a secondary heat exchanger that is designed to extract as much heat as possible from the flue gases. These flue gases, which still contain a substantial amount of heat, are directed through the heat exchanger. The heat exchanger is usually made of a corrosion-resistant material, such as stainless steel or aluminum, that allows for efficient heat transfer.


As the flue gases pass through the heat exchanger, they cool down significantly. The cooling causes the water vapor present in the flue gases to condense into liquid form. This process of condensation releases additional latent heat, which is captured and transferred to the system’s heating circuit. The condensed water, along with any impurities and acidic components from the flue gases, is then drained away through a condensate pipe. The condensate is typically acidic due to the presence of carbon dioxide, and measures are taken to neutralize its acidity to prevent damage to the boiler and the drainage system.

By recovering the latent heat from the flue gases through condensation, a condensing boiler can achieve higher energy efficiency compared to conventional boilers. This increased efficiency translates into lower fuel consumption, reduced greenhouse gas emissions, and cost savings for the user.

So, I can use thermal probes to read the temperature difference between supply and return pipes to compute the exchanged heat. I know that the heat transfer fluid is water with a heat capacity of 4.184 kJ kg−1K−1 . However, I need to discover the mass flow rate. Basically, I could use a flow sensor but it requires a sensor capable of supporting high temperature. Furthermore, it is a relatively constant quantity that doesn’t need to be continuously monitored as the temperature.

In this system under investigation, there are basically two states: pump ON with the corresponding mass flow rate and pump OFF with no flow, no heating, and no heat exchange. There is not a modulation control.

Pump and system curve

The heating loop is driven by the boiler pump through a 20mm copper pipe. By comparing the pump curve and the empirical system curve we can theoretically find the working point and so the current flow. This allows me to implement the computation of the energy obtained from the boiler in the smart home control system. The following images came from the Home Assistant dashboard but this is described in another article.

Smart home control system: thermal overview interactive dashboard
Boiler daily energy consumption – interactive bar chart in Home Assistant

The pump needs to be able to satisfy the energy balance to pump the water from the desired height against friction losses. Following Bernoulli’s equation between the input (1) and the output (2) of the pipe:

\frac{p_1}{\rho g}+\frac{1}{2} \frac{v_1^2}{g}+h_1+H_{\text {Pump }}=\\\:\\\frac{p_2}{\rho g}+\frac{1}{2} \frac{v_2^2}{g}+h_2+H_{\text {friction }}

In this closed loop, we can only consider the head losses due to friction. The head loss could be computed through empirical equations, related to fluid and flow properties, otherwise, we can use tabulated data. By considering the copper pipe pressure losses, an approximative loop length, and an appropriate factor to account for curve as well as restrictions we can find the working point of the pump, and so the current flow.

General losses in copper tube. Source: EngineeringToolBox
General pump characteristic curve. Source: wikipedia

It requires some re-arrangements to fit the log-log curve and compare it with the pump one. Based on the specific curve of the products that constitute the system under investigation the fitting leads to:

Adaptive pump

While for the boiler I can rely on a constant flow rate pump and estimate the current flow from the curves for the solar panel control unit is a little different. It is designed to adjust the speed of the pump to meet the varying demands of a system in order to optimize energy efficiency and maintain desired system performance.

As described in a previous article, it relies on Triac dimming for the alternate current load as the 230V pump. I designed a little circuit to convert the 310 Vpk AC into a signal readable with Arduino. By measuring the signal amplitude in time I can compute the apparent and real power as well as the phase shift of the Triac dimming.

Phase cut at 45°
Reading circuit

The analog-digital converter of Arudino allows sampling of the signal and computing the root mean square voltage with an appropriate frequency.

If you are interested in more details have a look at this article:

With an appropriate computation, it is possible to obtain the pump percentage of power as well as the corresponding pump curve.

Arduino NANO Code

Thermal power estimation

The Arduino computation of the pump power percentage is sent through a serial port to a web server so that Home Assistant can read the signal thanks to the REST integration. However, the actual pump power is only the starting point. I have to convert it into the current flow by the intersection with the system curve. In addition, the pump curve varies depending on the current power.

I made a linear interpolation between the minimum and maximal pump curves corresponding to the minimal and maximal power, respectively 30% and 100% of the nominal power.

Fit pump data

System estimation

System curve fit

In the end, we obtain the system and pump curves as well as their intersection point.

Pump dynamic range

A linear relation is considered between the minimal and maximal power.

\Phi ={1000\over 3600}\left[0.6+(0.85-0.6){P-30\over100-30}\right]\quad \left[\text l/\text s\right]

Φ represents the current flow and P is the actual pump power reader by the Arduino. Such information is then integrated into the Home Assistant platform to compute energy usage.

Flow sensor definition

Low pass filtering

Thermal energy

Finally, it is possible to compute the energy consumption or the be precise the amount of energy that both the gas boiler and the solar thermal system give to the technical water inside the puffer.

CSST pipe

Another interesting topic is the corrugated stainless steel tube used for the solar system. The corrugated profile allows bending the conduct and easily modeling it through the entire path. However, with these geometries, it may seem to present a very elevated pressure drop due to friction. Besides this consideration, we should account also for the low range of velocity of the thermal fluid.

The thermal fluid, typically water with the addition of glycol, circulates with a very low flow because it has to be slowly heated by the solar panel where a small mesh of capillaries is present. So, with a good calibration of the system and pump the friction due to pipe geometry shouldn't be a problem. However, a CFD analysis may be interesting.

Computational Fluid Dynamics (CFD) is a branch of fluid mechanics that involves the use of numerical methods and algorithms to solve and analyze problems related to fluid flow, heat transfer, and related phenomena. It combines principles from physics, mathematics, and computer science to simulate and understand the behavior of fluids in various applications.


In traditional fluid dynamics, the governing equations that describe the motion of fluids are often complex and difficult to solve analytically. CFD provides a computational approach to solving these equations by discretizing the domain into small elements (grid cells or mesh) and approximating the fluid properties and equations over these elements. The fluid flow equations, typically the Navier-Stokes equations, are then solved numerically on this discretized domain.

The previous figure shows a segment of the CSST pipe and the velocity field in the bi-dimensional half of the rotational-symmetric tube. In this particular problem, we can simplify the formulation accounting only for the 2D slice and its symmetry around the pipe axis. A velocity field is applied at the inlet with a parabolic profile obtained from the pump flow while a pressure BC is applied at the outlet. The segment is considered to be just before the pressure gauge which gives us the pressure condition.

A simple comparison between a corrugated tube and a smooth one is shown. They present the same internal diameter. The velocity field in the CSST show also a horizontal component due to the corrugation profile which accounts for friction losses. The third figure shows the differences between the two different fields in terms of velocity magnitude.

Thermal sensor

The aforementioned temperature probes are mainly DS18B20 digital temperature sensors based on One Wire connection. However, the following analysis is relatively valid also for PT100/1000 and other sensors with a stainless steel 6mm shell that appear really similar from a thermo-mechanical point of view.

There are some probe holders well used to put the temperature sensor nearest to the fluid of interest. Generally, they suggest using a thermal compound to increment the thermal conductivity and obtained more accurate measurements. Furthermore, discussion with the technical staff they suggest I use thermal paste also on sensors placed over the tube.

So, let's analyze what happens when we put a temperature probe with a stainless steel shell in contact with a copper pipe filled with hot water.

Thermal compound

The thermal compound is a chemical compound with high thermal conductivity used to enhance thermal dissipation generally in electronic equipment. It helps fill microscopic gaps to avoid trapping air in and so it allows us to reduce the response time of the temperature variation and let's see if it may be useful or not for this application.

As for a general thermal system, it satisfies the law of thermodynamics, and the heat is transferred from the hotter end to the colder one. The ability to transfer heat is linked to the thermal conductivity k and the spontaneous thermal flow is directed opposite to the temperature gradient, as expressed by Fuorier's law:

\mathbf q=-k\nabla T

From the conservation of energy, the rate of change of heat accumulation is equal to the spatial derivative of the heat flow:

{\partial Q\over \partial t}+{\nabla\cdot \mathbf q}=0

So, by considering the time rate of change of heat stored as a function of the temperature and eventually a heat source qv, it reads:

\rho c_p {\partial T\over \partial t}-\nabla\cdot (k\nabla T)=\dot q_v

In the case of an isotropic and homogenous medium in space, without external or internal sources, it leads to the heat equation:

{\partial T \over \partial t}=-{\alpha}{\nabla^2 T}

With the thermal diffusivity function of the thermal conductivity k, density ρ and specific heat capacity cp:

\alpha={k\over c_p\rho}

Finite Element Method analysis

With the physical phenomenon well described we can try to solve the heat equation over the aforementioned domain: a probe in contact with a copper pipe filled with hot water. In addition, the probe is considered made of a stainless steel shell filled with air and all the elements are covered with a thermal insulator.

To solve the equation in these domains we need a numerical solver and I decided to use the Wolfram Mathematica PDE solver. The problem is analyzed in 2D representing a slice of the probes and the process of solution is made of different steps:

Variable definition

Domain definition

Material parsing

W need to define the boundary and initial conditions before solving the problem.


Boundary conditions

And we can simply solve the numerical problem:

tend = 50;
Tfun = NDSolveValue[pde, T, {t, 0, tend}, {x, y} \[Element] mesh];

Do we really need thermal paste?

Besides the animation, we can use this numerical formulation to investigate the need for thermal paste. Let's add a domain representing the thermal paste and observe how much the temperature varies.

Paste geometry

New mesh

Add material properties

The new domain is pretty similar to the older one with the addition of the thermal compound around the junction between the probe and the pipe.

Boundary conditions


The new solution shows a larger contour domain of higher temperature near the probe sheel highlighting how the thermal compound increases the conductivity, as expected.

0 s



However, a numerical investigation could be interesting to detect quantitative differences. Without thermal paste, the temperature reached in 6 seconds is 0.5°C lower in both the shell and the internal region of the probe.

Without thermal paste
With thermal paste

Compute average

Plot data

However, in both cases, the temperature reaches 95% of the boundary temperature with a time difference of 0.7s over the 3.5s of the faster one.

Thermal compound application

But what could happen if we put too much thermal compound?

Test different geometry



Clearly, the little differences highlighted are not relevant in these applications where the temperature is read in time intervals of minutes over differences of a few seconds.

As we can see from the visual comparison of the temperature behavior in time:

Probe and shell temperature

It is also highlighted that in both cases with the thermal compound, the equilibrium temperature of the shell is 0.4 °C higher than the standard case. However, as mentioned before the time differences of a few seconds are not relevant for this particular application.

Differences between shell temperature in all the three cases (note that the temperature range is very zoomed in).

Time differences to reach the 95% and 99% of the equilibrium temperature for the three different cases