In this manuscript, we propose a simplified mathematical model based on the heat transfer laws to predict the temperature profiles of a liquid controlled by a simple thermostat. The model result in a set of linear ordinary differential equations ODEs with forcing which turn on and off at a priori unknown times \({\mathcal {T}}_M=\left\{ \zeta _0,\zeta _1,\ldots ,\zeta _M\right\} \). The pth switch-time \(\zeta _p\in {\mathcal {T}}_p\) is calculated from the zeros of a function \({\mathcal {Q}}(\chi )={\mathcal {Q}}(\chi ;\zeta _1,\ldots ,\zeta _{p-1})\) coming from analytical solutions of the system depending on the previous times \(\zeta _1,\ldots ,\zeta _{p-1}\). The mathematical problem can be solved by using standard techniques for solving ODEs once \({\mathcal {T}}_M\) is calculated by M-successive iterations of the conditional expression \({\mathcal {Q}}(\chi =\zeta _p)=0\) and the Newton–Raphson method. We provide analytical expressions for the temperature as a function of time and \({\mathcal {T}}_M\) considering direct (DC) and alternate (AC) feeding voltages. We solve the system using this numerical-analytical approach and compare it with the results of the 4th Runge–Kutta method finding a good agreement between both methods.
Hinweise
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
1 Introduction
In this work, we present a simple mathematical model of a thermostat to control fluid temperature in thermal contact with the environment. With no thermostat, the fluid temperature T(t) will approach the room’s temperature \(T_{\text {env}}\) as \(t\longrightarrow \infty \) to reach the thermal equilibrium. In this scenario, a thermostat is a device that sets a target temperature \(T_{\text {target}} > T_{\text {env}}\) and transfers heat to approach the fluid temperature T(t) to the target.
In practice, thermostats are used to control the temperature of systems. A typical example corresponds to the control temperature in ferment tanks of non-distilled alcoholic beverages, e.g., beer [1‐6] and wine [7‐9]. Thermostats are also important for feeding processes as [10], bioreactors [11], reproduction of bacteria in lactose [12], biofuel production, among others [13‐18] including micro-controllers and analogical components.
Anzeige
Thermostatted system models are essential in thermodynamics and statistical mechanics for regulating temperature in physical and simulated systems, facilitating the study of equilibrium and non-equilibrium processes [19‐21]. Classical models like the Lorentz gas and Ehrenfest gas introduced thermostatted dynamics to explore thermal fluctuations, entropy, and equilibrium behavior [22, 23]. These systems allow simulations to transition from Newtonian dynamics (N, V, E) to canonical ensembles (N, V, T) and other configurations, such as constant pressure or enthalpy [24]. Modern advancements incorporate technologies like on-off valves and fuzzy controllers [25, 26] to enhance performance in nonlinear systems [25, 26].
In the modeling of many particle systems via Molecular Dynamics MD, thermostats also play an important role. Even when the thermostats in MD simulations are algorithms programmed in the numerical method, the MD’s thermostats as the real ones define a target temperature \(T_{\text {target}}\) which corresponds to the thermodynamic average of the kinetic energy of the system in the equilibrium. Examples of them in MD are the Nose-Hoover, Langevin, and Andersen thermostats, which properly reproduce the system’s thermal fluctuations in the thermal equilibrium [27, 28].
In the current work, we study a simplified thermostat model based on Newton’s cooling law. For simplicity, it is assumed that the room’s temperature is constant. Even when the model is linear, the analytic study of the system is not necessarily trivial since the forcing depends on the fluid temperature. That term turns on/off depending on the condition where T reaches or not \(T_{\text {target}}\) which occurs at a given set of unknown switch times \({\mathcal {T}}_M=\left\{ \zeta _0,\zeta _1,\ldots ,\zeta _M\right\} \). We shall show that it is possible to build the temperature profiles as a function of the time t from analytical expressions including explicitly the switch times up to time t, this is the solution in the interval \(t\in [\zeta _o, \zeta _M]\). The system studied in this document is essentially an on/off switch controller. These controllers are common in many conventional systems [29‐32]. We aim to provide solutions for a simplified on/off temperature controller that enables the understanding of its dynamical evolution by using analytical tools.
Previous studies on bioreactors with on-off control model thermal processes by using the analytic solutions of Newton’s law of cooling [33]. In that study the temperature profiles of the step response during heating and cooling are modeled mathematically by using the exact exponential solutions of the Newton’s law of cooling at least for DC voltage fed. The Newton’s cooling law can be also used to derive models for Proportional Integral Derivative (PID) temperature controlling [34].
Anzeige
The document is organized as follows: The model based on Newton’s cooling law is presented in Sect. 2. The next section is devoted to the analytical treatment. In Sect. 3.1 is briefly described the homogeneous solution of the system, this is, with no voltage source. The solution with (direct current) DC and (alternate current) AC voltage are presented in Sects. 3.3 and 3.4, respectively. A brief analysis of the limit cycles emerging on the system as a function of the voltage frequency \(\omega _o\) is presented in Sect. 3.4.1. Section 4 presents a comparison between the analytical expressions and the temperature profiles calculated via the 4th Order Runge–Kutta Method (RK4). A conclusion section is at the end of the manuscript.
2 A theoretical simplified model
The first approach that we are going to consider consists of modeling heat flows using Newton’s cooling law [35]. For instance, for the case fluid at temperature T in thermal contact with the environment at temperature \(T_{\text {env}}\), the law reads:
here, \(\textrm{d}Q/\textrm{d}t={\dot{Q}}\) is the heat flux, \(\kappa _1\) is the heat transfer coefficient, \(S_1\) is the heat transfer area, and the minus indicates lose of fluid energy \(\textrm{d}Q/\textrm{d}t<0\) if \(T>T_{\text {env}}\). Since phase changes in the fluid are not considered, heat flows will only involve temperature changes depending on the fluid’s specific heat \(c_f\):
The solution of that equation is the standard exponential decaying \(T(t)=T_{\text {env}}+(T(0)-T_{\text {env}})\exp (-t/\tau _2)\) where \(\tau _1\) is a characteristic time constant. Let us now introduce a resistance completely immersed into the fluid. The temperature of the resistance is \(T'\), and it is fed via a voltage V(t). Since the fluid plays the role of the environment for the resistance, then
where \(\kappa _2\) is the heat transfer coefficient resistance/fluid, \(S_2\) the effective area of heat transfer, and \({\dot{q}}\) is the power of the voltage source. The heat transfer can be written as follows \({\dot{Q}}'=c_R m_R {\dot{T}}'\) with \(C_R=c_R m_R\) a heat capacity associated to the resistance. As a result, the dynamic equations for the system including the thermostat are
with \(\tau _2=m_f c_f / (\kappa _2 S_2)\) and \(\tau _3=m_R c_R / (\kappa _2 S_2)\). These expressions Eqs. (1) and (2) should be solved for the fluid and resistance temperature, T(t) and \(T'(t)\), respectively.
We shall assume that target temperature of the thermostat is \(T_{\text {target}}\), and the electric current thought the resistance is activated via a relay switch circuit. Thus, the heating term \({\dot{q}}(T,T_{\text {target}},t)\) is a function defined as follows:
where \(\dot{{\mathcal {W}}}(t)\) is the power supply of the heat source \(\dot{{\mathcal {W}}}(t)=V(t)^2/R\) with R the resistance.
Even when the equations governing the fluid and the heat source temperatures involve a system of coupled first-order ordinary differential equations, solving this system analytically is not straightforward because the function \({\dot{q}}(T,T_{\text {target}},t)\) depends not only on the type of power supply used (direct current, harmonic alternating current, etc.) but also on a conditional statement that includes the fluid temperature T(t). Nevertheless, the linearity of the system enables to deal with the unknown switch times, say \(\left\{ \zeta _0,\zeta _1,\ldots ,\zeta _\infty \right\} \), implicit in the piece-wise function in Eq. (3) by finding analytic expression for the temperatures as it will be shown in the next section.
The governing equations of the system Eqs. (1) and (2) correspond to a liquid at temperature T(t) in thermal contact with the environment at temperature \(T_{\text {env}}\) with a heat source of temperature \(T'(t)\) completely immersed in the fluid. The heat source turns on/off depending on the conditions defined in Eq. (3). These equations determine the dynamic evolution of the temperature profiles of an ideal system controlled by a thermostat. In practice, these thermostats are devices that regulate the energy of the heat source by turning on or off the circuit. There are multiple ways to design a thermostat among them there are the Microcontroller-Based Designs (e.g., Arduino, ESP32, or STM32) these systems often incorporate digital temperature sensors like the DS18B20 or analog sensors like thermistors for accurate measurement. For instance, a standard circuit responsible for controlling the fluid temperature can be managed by a ESP32 [36] microcontroller as it is shown in Fig. 1. This device operates the optocoupler, which in turn activates or deactivates the relay when the temperature falls below the specified target temperature \(T_{\text {target}}\). Additionally, the microcontroller handles communication with three DS18B20 temperature sensors, which monitor the temperature of the fluid T(t), the heater \(T'(t)\), and the surrounding environment \(T_{\text {env}}\).
Fig. 1
A standard on/off control temperature. In this scheme, the circuit has three temperature sensors to measure the temperature of the heater \(T'(t)\), fluid T(t), and the environment \(T_{\text {env}}\). If the condition \(T(t)<T_{\text {env}}\) is true, the relay closes the circuit and AC voltage fed a resistance R1 (the heater) which transfers thermal energy to the fluid. Here the resistance is assumed to be completely immersed in the fluid. If the condition \(T(t)>T_{\text {env}}\) is true, the relay open the circuit and the fluid temperature gradually tends to the \(T_{\text {env}}\). Eventually the \(T(t)<T_{\text {env}}\) is again true and the process restarts with other starting conditions
×
3 Analytical treatment
In this section, we shall solve the set of equations Eqs. (1), (2) with the source \({\dot{q}}(T,T_{\text {target}},t)\) given by Eq. (3). It is advisable to combine the first-order ODEs Eqs. (1) and (2) to eliminate one the temperature of the resistance. To this, we can write Eq. (1) as follows:
The left-hand side of the is a linear second-order ordinary differential equation which resembles a classical damped harmonic oscillator. On the other hand, the term \(U(T, T_{\text {target}},t)\) can be interpreted as a forcing term. However, we have to remark that \(U(T, T_{\text {target}},t)\) depends explicitly on T(t), in other words, U depends on the dynamical evolution of the system, a priori unknown. The piece-wise condition on \(U(T, T_{\text {target}},t)\) is the way we introduce the relay device into the mathematical model. That device allows or denies the flux of current to the resistance at specific times, say
including the unknowns \(\left\{ \zeta _n\right\} _{n=0,\ldots \infty }\). The second-order ordinary equation Eq. (9) can be solved by using the Laplace Transform:
One can write \(s^2 + 2\omega _A s + \omega _B^2 = (s + \omega _A+\omega )(s + \omega _A - \omega )\) for a given \(\omega \). It is not difficult to show that \(\omega = \sqrt{\omega _A^2-\omega _B^2}\). Hence, \(s^2 + 2\omega _A s + \omega _B^2 = (s+\omega _+)(s+\omega _-)\) with
In the previous equation, the initial condition on \({\dot{T}}_o\) can be evaluated from the starting on the fluid and temperatures \(T(0)=T_o\) and \(T'(0) = T'_o\) as follows:
where we have used Eq. (1). The resistance temperature \(T'(t)\) is computed straightforwardly from Eqs. (11) and (6). The typical behavior of the analytical homogeneous solution with no source is shown in Fig. 2.
Fig. 2
Temperature profiles with no voltage source. (Top) \(T'(0) = 45\) larger than environment temperature \(T_{\text {env}}\) and (Bottom) \(T'(0) = 15\) smaller that \(T_{\text {env}}\). The environment and initial fluid temperatures were set as \(T_{\text {env}}=20\) and \(T(0)=10\), respectively
×
Damped and overedamped solutions take place for real values of \(\omega _{\pm } = \omega _A \pm \sqrt{\omega _A^2-\omega _B^2}\). On the other hand, oscillatory solutions require \(\omega _A^2<\omega _B^2\) for complex values of \(\omega _{\pm }\). One can expand explicitly the discriminant \(\sqrt{\omega _A^2-\omega _B^2}\) by using the definitions given in Eq. (7) as follows:
since \(\tau _1, \tau _2\), and \(\tau _2\) are positive reals. As a result, \(\omega _{\pm }\in {\mathbb {R}}\) is always real and the homogeneous problem does not have oscillatory solutions. Additionally, the term \(\omega _{+}-\omega _{-}\) given by
At this point, we study separately two cases regarding the fed of the resistance: direct current (constant voltage), and alternate current (harmonic voltage).
3.3 DC voltage source
This case corresponds to \({\mathcal {U}}(t) = {\mathcal {U}}_o = \dot{{\mathcal {W}}}_o/m_R C_R\) with \(\dot{{\mathcal {W}}}_o = V_o i_o\) the power, \(V_o\) the voltage and \(i_o\) the current. The Laplace transform of the source terms is
Now we have to compute the times in \(\left\{ \zeta _n \right\} _{n=0,1,\ldots ,\infty }\). We know the first one \(\zeta _o = 0\) assuming that voltage turn on at \(t=0\), this the case \(T(0) < T_{\text {env}}\). The condition in Eq. (15) for \(t=\zeta _1\) is
The last expression enables to calculate \(\zeta _2\) from the previous times \(\zeta _1\) and \(\zeta _0\). This procedure can be generalized for a given \(\zeta _p\). Again we can use
are precisely \(\zeta _1,\zeta _2,\ldots ,\zeta _p\). Of course, we are interested in the last one \(\chi =\zeta _p\) if we know the previous zeros \(\zeta _1,\zeta _2,\ldots ,\zeta _{p-1}\). Then an strategy is to use recursively Eq. (16) to find \(\chi =\zeta _2\) from \(\zeta _1\), later \(\chi =\zeta _3\) from \(\zeta _2, \zeta _1\), after this one compute \(\chi =\zeta _4\) from \(\zeta _3, \zeta _2,\zeta _1\) and so on. An example of code in Wolfram Mathematica to compute the first M switch-times \(\zeta _1,\dots ,\zeta _M\) is shown in Listing 1. Once the switch times are determined, one can use Eq. (14) to evaluate the fluid’s temperature.
Fig. 3
Temperature profiles with DC voltage source. (Top) Fluid and resistance temperature profiles according to Eq. (14). (Bottom) Voltage source power. The shadow region represents the time intervals where voltage is turned on
×
A plot of the voltage source and fluids’ temperature for the following numerical values \((\tau _1,\tau _2,\tau _3)=(3,3,4)\), \(T_{\text {target}},T_{\text {env}},T_o,T'_o = (25,20,10,20)\), \(V_o=120\) and \(R=3000\) is shown in Fig. 3. The profiles of that figure were computed by using Eq. (14) truncating the sum up to the first M even numbers, this is
setting \(M=80\), which corresponds to the number of times that the voltage source turned on & off, or conversely the number of box-cars functions in the plot of \({\dot{q}}(t)\) (see Fig. 3-bottom).
Fig. 4
Zoom of the temperature profiles with DC voltage source. (Top) Fluid temperature profiles according to Eq. (14) and (bottom) resistance temperature. The shadow region represents the time intervals where voltage is turned on. The black points are the set \(\left\{ \zeta _m\right\} _{10\le m \le 2M+1}\) and the dot-dashed black line is given by Eq. (19). (Color figure online)
×
We observe that the fluid’s temperature T(t) (blue solid line) oscillates around target temperature \(T_{\text {target}}\) approaching asymptotically to that value. A zoom of the behavior of T(t) in the range \(t\in [\zeta _10,\zeta _{2M+1}]\) is illustrated in Fig. 4-top. We remark the fact that Eq. (14) includes exponential of real arguments which are by definition non-oscillatory individually. However, these exponential functions collectively turning on at the right times \(\left\{ \zeta _m\right\} _{0<m<\infty }\) generate a oscillatory profile.
The time derivative of the fluid’s temperature is1
This function is continuous in \(t\in [0,\infty )\) including the switch times \(\left\{ \zeta _m\right\} _{m=1,\ldots \infty }\). The temperature of the resistance is computed by replacing T(t) (given by Eq. (14)) and \({\dot{T}}\) (given by Eq. (17)) in Eq. (6). The temporal average of the resistance temperature is
The solution Eq. (14)) tends to \(T_{\text {target}}\) as \(t\longrightarrow \infty \) and \(\langle {\dot{T}} \rangle _{\zeta _1,t}\longrightarrow 0\) as t goes to infinity. The resistance temperature tends to the following value:
A plot of the resistance temperature \(T'(t)\) is shown in Fig. 4-bottom. One can observe that \(T'(t)\) approaches to \(T'_{\text {lim}}\) (given by Eq. (19)) as \(t\longleftrightarrow \infty \). Even when \(T'(t)\) is a continuous function in \(t\in [0,\infty )\), its times derivative \({\dot{T}}'(t)\) is not continuous since \(T'(t)\) is not smooth at switch-times \(\left\{ \zeta _m\right\} _{m=1,\ldots \infty }\) implying jumps of \({\dot{T}}'(t)\) at that times.
3.4 AC voltage source
This second case includes a harmonic source term \({\mathcal {U}}(t) = \dot{{\mathcal {W}}}(t)/m_R C_R = {\mathcal {U}}_o\cos ^2(\omega _o t)\) with \(\dot{{\mathcal {W}}}_o = V_o^2 \cos ^2(\omega _o t) / R\) the power, \(V_o\) the voltage amplitude, and \(\omega _o\) the angular frequency of the voltage source. Of course, if we take \(\omega _o \longrightarrow 0\), we recover the case studied in the previous section. The Laplace transform of the source terms is
and using the inverse Laplace transform shifting property \({\mathcal {L}}^{-1}\left\{ \exp (-a s)F(s)\right\} = {\mathcal {L}}^{-1}\left\{ F(s)\right\} _{t \longrightarrow t-a} H(t-a)\) the fluid’s temperature takes the form
was already calculated in the previous section regarding DC voltage source, and it corresponds to the function \(f_1(t)\) given by Eq. (13). The other functions are
The inverse Laplace transforms can be computed straightforwardly again with partial fractions as we have done with \(f_1(t)\). As a result, the fluid’s temperature including an AC thermostat is
Note that the solution for fluid’s temperature regarding AC voltage is mathematically similar to the one found in the case of DC voltage. Essentially one may do the following identification
between Eqs. (14) and (20) to go from the expression for DC to AC voltage. Then there is no need to repeat all the procedures to find iterative conditions to calculate \(\zeta _1,\ldots ,\zeta _p\). It is more convenient to start from Eq. (16) valid for DC voltage and applying the change f by \(\frac{1}{2}Q_m\) to write the expression
which enables with the condition \({\mathcal {G}}(\chi ;\zeta _{p-1},\ldots ,\zeta _1) = 0\) to compute the switching times when a harmonic AC voltage of angular frequency \(\omega _o\) is considered.
Fig. 5
Temperature profiles with AC voltage source with \(\omega _o=4\omega _B\). (Top) Fluid and resistance temperature profiles according to Eq. (20). (Bottom) Voltage source power. The shadow region represents the time intervals where voltage is turned on. The dot-dashed line corresponds to the limit temperature of the resistance given by Eq. (19)
×
We illustrate the fluid’s temperature solution of Eq. (20) setting the parameters as follows: \((\tau _1,\tau _2,\tau _3)=(3,3,4)\), \(T_{\text {target}},T_{\text {env}},T_o,T'_o = (25,20,10,20)\), \(V_o=120\), \(R=3000\) and \(\omega =4\omega _B\).
3.4.1 The effect of the voltage frequency
In the previous subsections, we obtained analytic expression to compute the fluid and resistance temperature as a function of time including a harmonic voltage source of frequency \(\omega _o\). We can observe in Fig. 5 that T(t) and \(T'(t)\) starts in a transitory state in the interval \(t\in (0,\zeta _{2m}]\) including few switch-times (m around 2). After a few additional switch times (typically m around 5), the fluid and resistance temperatures become periodic functions oscillating around \(T_{\text {target}}\) and \(T'_{\text {lim}}\), respectively.
Fig. 6
Temperature profiles with AC voltage for several voltage frequencies \(\omega _o \ge \omega _B\)
×
These periodic functions emerging at \(t \longrightarrow \infty \) become in the \(T T'\)-plane limit cycles depending on the value of the voltage angular frequency \(\omega _o\) as shown in Fig. 6. In general, these cycles are closed trajectories or -orbits turning times around the point \((T_{\text {target}},T'_{\text {lim}})\) (yellow open points in Fig. 6) corresponding to the target temperature and the limit resistance temperature given by Eq. (19). If the voltage frequency is too large compared with the natural frequency \(\omega _o\gg \omega _B\) then the system remains in an orbit of period one, a 1-orbit. This is illustrated in Fig. 6 for \(\omega _o=50\omega _B\). If the frequency \(\omega _o\) is decreased at some point the period of the orbit doubles its value as it is shown for the cases \(\omega _o = 10\omega _B\) and \(\omega _o = \omega _B\) in Fig. 6 where temperatures are in 2-orbit.
Fig. 7
Temperature profiles with AC voltage for several voltage frequencies in the interval \(0<\omega _o <\omega _B\)
×
The period of the orbits increases rapidly when the frequency \(\omega _o\) becomes smaller with respect \(\omega _B\) as it is shown in Fig. 7 for \(\omega _o=0.75\omega _B\), \(\omega _o=0.5\omega _B\), and \(\omega _o=0.15\omega _B\) regarding a 3-orbit, 9-orbit, and 94-orbit, respectively. One can observe that period of the -orbit corresponds exactly to the number of times that the voltage source turned on (or turned off) along a period of T(t) or \(T'(t)\). Graphically, this can be observed by counting the shaded horizontal stripes in T vs t plots in Figs. 6 and 7. Mathematically, these cycle limit solutions are given by Eq. (20) for \(t \gg 1\), this is
where the exponential part coming from the homogeneous solution of the problem is negligible.
4 Numerical comparison
In the previous sections, we presented an analytical approach to calculate temperature profiles of a system controlled by a simple on-off circuit. These solutions are invaluable for providing deep insights into the underlying physics of the system. However, the correctness of Eq. (20) must be rigorously validated.
Fig. 8
Comparison of the temperature profiles for \(\omega _o=0.5\omega _B\). (Top) Fluid and resistance temperature profiles. (bottom) Voltage source power. Symbols corresponds to Runge–Kutta Method of 4th order, and the solid line given by Eq. (20). (Color figure online)
×
To ensure the validity of our solution, we compare it with results obtained from numerical simulations using the fourth-order Runge–Kutta (RK4) method. As independent of the analytical derivation, numerical methods offer a complementary approach to verify accuracy and robustness. Moreover, this comparison highlights the reliability of our analytical solution across the parameter regimes considered. By demonstrating strong agreement between the two methods, we establish confidence in the applicability of our approach to the broader study of temperature profiles of simple on-off systems.
In this section, we shall perform a brief numerical comparison of the results obtained with the Eq. (20) and the 4th-order Runge–Kutta method (RK4).
Fig. 9
Error on the temperature profiles for \(\omega _o=0.5\omega _B\). (Top) Fluid and resistance temperature profiles for MaxSteps = 200. Symbols correspond to Runge–Kutta Method of 4th order, and the solid line given by Eq. (20). (Bottom) Standard deviation as a function of the maximum steps employed in the RK4 method
×
That numerical method is generally used to generate numerical solutions ODEs, e.g., dynamical governing equations of classical systems including chaotic ones [37, 38]. We have numerically solved the system defined by Eqs. (1) and (2) with source according to Eq. (3) implementing a standard algorithm of the RK4 in Python. The temperature profiles calculated with the RK4 method and the Eq. (20) are shown in Fig. 8. The angular frequency of the voltage source was set as \(\omega _o = 0.5\omega _B\) and the other parameters and starting conditions are the same set in Fig. 5. In Fig. 8 we observe that numerical calculations of the RK4 method (white and yellow symbols for T and \(T'\)) are in excellent agreement with the temperature profiles (solid red and blue lines) calculated with Eq. (20).
The error in fluid temperature profiles between the solution derived from Eq. (20) and the one obtained via RK4 method is shown in Fig. 9. This error is analyzed as a function of the maximum number of time steps used in the RK4 method. If the number of temporal steps is insufficient, the numerical error in the RK4 method can lead to divergent solutions of the ODEs, as illustrated in Fig. 9-top, particularly for high-frequency source switching. This divergence can be mitigated by increasing the maximum number of time steps in the RK4 method. In Fig. 9, the standard deviation \(\sigma = \sqrt{\langle \delta T^2 \rangle }\), where \(\delta T = T^{(\textrm{RK}4)}(t) - T(t)\), quantifies the fluctuations between the numerical temperature \(T^{(\textrm{RK}4)}(t)\) and the analytical temperature T(t) from Eq. (20). The results indicate that \(\sigma \) approaches zero as the maximum number of RK4 steps is increased demonstrating improved agreement between the RK4 method and the analytical solution. This is the case of results presented in Fig. 8 where 300 maximum steps are enough to have a good agreement between both solutions.
5 Limitations
We remark that Eqs. (1) and (2) model the temperature profiles of an idealized version of real thermostats, such as the one illustrated in Fig. 1. There are considerations that must be taken into account to improve the model. Among these considerations is the fact that the fluid’s temperature is not necessarily uniform, as assumed in the model. Since the heat source is completely immersed in the liquid, the fluid in the regions around the resistance could have higher temperatures than regions of the fluid far from the heater. This results in internal temperature gradients and convection effects, which are assumed to be irrelevant in our model but not necessarily in real devices controlled by standard on/off circuits.
Another limitation regards Newton’s law of cooling, which was used to derive Eqs. (1) and (2). This law requires uniform fluid temperature and sufficiently small temperature differences between the heater/fluid and the fluid/environment. These assumptions are not necessarily fulfilled since, depending on the system parameters and initial conditions, the heater temperature can increase significantly (e.g., when using a high-voltage source). In such scenarios, a refined version of Newton’s cooling law, including higher-order temperature differences, must be implemented. Another important assumption of the model is that the environmental temperature is constant, which implies a steady heat transfer between the fluid and the environment. If the environment temperature varies drastically, the strategy of connecting homogeneous solutions of Eqs. (1) and (2) will fail and other considerations would be required to refine the model.
6 Conclusion
In this manuscript, we proposed a simple model to describe thermostats to control the temperature of a fluid. Even when the dynamic equations of the systems are ordinary and linear, they need numerical methods to solve them since the corresponding fed depends on the fluid’s temperature evolution. The system behaves as a damped and driven harmonic oscillator including force term depending on temperature. We showed that the evolution of the homogeneous solution involves pure real parameters \(\omega _{\pm }\in {\mathbb {R}}\) which result in exponential profiles of fluid and resistance temperatures. The forcing term depends on the fluids temperature profile T(t) and more precisely the history of switch-times \(\left\{ \zeta _n\right\} _{n\in {\mathbb {N}}^0}={\mathcal {T}}\) where T(t) reaches the target temperature \(T_{\text {target}}\) of the thermostat. The p-th switch-time \(\zeta _p\) is zero of a function \({\mathcal {G}}(\chi ;\zeta _{p-1},\ldots ,\zeta _1)\) depending on the previous times and satisfying the condition \(\zeta _m > \zeta _{m-1} \forall m=1,\ldots ,p\). This enables us to compute the time \(\zeta _p\) from successive p-iterations of the condition \({\mathcal {G}}(\chi =\zeta _p;\zeta _{p-1},\ldots ,\zeta _1)=0\), as well as, to evaluate the analytic expression of the fluid and resistance temperature.
Typically, in the current model, the fluid and resistance temperature profiles start in a transitional region where the thermostat is still working to approach T(t) to \(T_{\text {target}}\). Once that state ends, the fluid’s temperature can have one of two behaviors depending on the type of voltage used to feed the resistance. On one hand, a DC voltage source results in an oscillatory but asymptotic approach of the fluid’s temperature to the target temperature. On the other, an AC harmonic voltage results in oscillatory solutions of fluid’s temperature \(T_{\textrm{cycle}}(t)\) around the target temperature with no asymptotic approach which depends on the AC frequency \(\omega _o\). For high voltage frequencies \(\omega _o \gg \omega _B\) the system trajectory in the \(TT'\)-plane is a 1-orbit turning around the point \((T_{\text {target}},T'_{\text {lim}})\) with \(T'_{\text {lim}}\) given by Eq. (19). The period of the -orbit corresponds to the number of times that voltage source turns on during a period of \(T_{\textrm{cycle}}(t)\). The period increases as \(\omega _o\) is decreased recovering the non-periodic DC solution in the limit \(\omega _o \longrightarrow 0\) where goes to infinity.
Acknowledgements
This work was partially supported by Vicerrectoría de investigación, Universidad ECCI.
Declarations
Conflict of interest
The authors declare no competing interests.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Die im Laufe eines Jahres in der „adhäsion“ veröffentlichten Marktübersichten helfen Anwendern verschiedenster Branchen, sich einen gezielten Überblick über Lieferantenangebote zu verschaffen.