# How could be modelled this heat transfer problem?

I have been puzzled the other day by a young boy who asked me about the phenomenon making that, when arriving to the shower, water is cold. Simple, isn't it? I started describing, in simple words, the many and different heat-transfers which happen starting from the tank to the shower but this was not enough for him. By the end, he said : "write the equation !" and, here, I must confess that I am totally stuck!

So, I shall try to phrase the problem (at least as I can see it).

Consider a tank containing hot water. The tank is perfectly insulated and has an infinite capacity. An horizontal pipe is connected to the tank. The pipe is not insulated and is surrounded by static air at a constant temperature lower than that in the tank. The pipe is isolated from the tank by a valve that can be used to vary the rate of hot water flowing into the pipe. Given that the pipe can be of different dimensions (i.e. internal diameter, wall thickness, length) and materials of construction (e.g. steel, copper, plastic, etc.), could we define the differential equations that must be solved to calculate the temperature of the first drop of liquid to exit the pipe as a function of pipe length?

Some basic assumptions could be :

• No heat losses from the valve

• The pressure in the tank is sufficient to maintain flow through the pipe

• Liquid fills the pipe at all flowrates

• All required physical properties (to be defined) are supposed to be available

I hope that, having the equations, I could solve numerically the problem.

I totally understand that this is off-topic and that the question could be deleted/downvoted for this reason (and probably other).

I thank you in advance for any help.

## 3 Answers

We can develop a crude model of this that captures the main essence of what is happening. Basically, the key mechanism involves transient heating of the pipe carrying the fluid. Once the pipe reaches its final temperature, the water temperature coming out of the pipe will no longer be changing.

Even though there are many effects occurring simultaneously, such as heat transfer from the pipe to the surroundings, the key focus is on the fluid and its thermal interaction with the pipe. So, in this model, we assume that the outside of the pipe is fully insulated. We also assume that the flow is turbulent, so that the water velocity profile in the pipe is nearly flat.

Let v be the velocity of water through the pipe

Let $\rho$ be the density of the water

Let C be the heat capacity of the water

Let $C_P$ be the heat capacity of the pipe

Let A be the cross sectional area of the pipe available for flow

Let m be the mass per unit length of pipe

Let S = $\pi D$ be the heat exchange area per unit length of pipe

Let $T_W(x)$ be the water temperature at axial location x along the pipe

Let $T_P(x)$ be the pipe temperature at axial location x along the pipe

Let h be the heat transfer coefficient from the water to the pipe

First we do a transient differential heat balance on the fluid in the section of pipe between axial locations x and x + $\Delta x$. The rate of heat flow into the section of pipe is equal to $v\rho AC(T_W(x)-T_0)$, where $T_0$ is a reference temperature. The rate of heat flow out of the section of pipe is $v\rho AC(T_W(x+\Delta x)-T_0)$. The mass of fluid in the section of pipe is $\rho A\Delta x$, and the rate of accumulation of heat in the section of pipe is $\rho AC\Delta x(dT/dt)$. The rate of heat loss from the water to the pipe is given by $Sh\Delta x(T_W-T_P)$. If we combine all this into a heat balance on the section of pipe, we obtain: $$\rho AC\Delta x(dT/dt)=v\rho AC(T_W(x)-T_0)-v\rho AC(T_W(x+\Delta x)-T_0)-Sh\Delta x(T_W-T_P)$$ If we divide this equation by $\Delta x$, and take the limit as $\Delta x$ approaches zero, we obtain: $$\rho AC\frac{\partial T_W}{\partial t}+v\rho AC\frac{\partial T_W}{\partial x}=-Sh(T_W-T_P)$$ A similar heat balance on the section of pipe between x and x + $\Delta x$ yields: $$mC_P\frac{\partial T_P}{\partial t}=+Sh(T_W-T_P)$$ Note that, unlike the fluid heat balance, this heat balance on the pipe does not include a flow term.

If we assume that the heat transfer coefficient h is very high so that, at any cross section, the water temperature $T_W$ and the pipe temperature $T_P$ are nearly equal, we can add the two equations together an obtain: $$(\rho AC+mC_P)\frac{\partial T}{\partial t}+v\rho AC\frac{\partial T}{\partial x}=0$$ where T now represents both the local water temperature and the local pipe temperature. If we divide this equation by $(\rho AC+mC_P)$, we obtain: $$\frac{\partial T}{\partial t}+v^*\frac{\partial T}{\partial x}=0\tag{1}$$ where $$v^*=\frac{v}{1+\frac{mC_P}{\rho AC}}\tag{2}$$ Eqn. 1 is the equation for a thermal wave traveling down the pipe with a velocity v*. At time t, the leading edge of the wave is at x = v*t. Behind the leading edge, the temperature throughout is the hot water temperature entering the pipe. Ahead of the leading edge, the temperature is the original cold temperature before water started flowing.

Eqn. 2 tells us that the thermal wave travels at a velocity substantially slower than the actual fluid velocity v. This is due to the thermal inertia of the pipe. So the hot water starts arriving at the shower at a somewhat later time than the transit time for the water flow from the hot water heater to the shower.

• Thanks for your efforts ! I really appreciate. I think that the assumption "the water temperature $T_W$ and the pipe temperature $T_P$ are nearly equal" could be an over simplfication. Difficult to know when to have the shower ! Cheers :-) Jan 7, 2016 at 14:53
• Yes. The next level of complexity is to allow the heat transfer coefficient to be finite and to solve the two coupled differential equations. But, I wanted to show the results for the simplest possible model first. The approximation I used is often employed in modeling fixed bed operations, such as adsorption and ion exchange (with mass transfer replacing heat transfer) to get a first order picture of what is happening. In these operations, they use the term "break through" for when the conc. suddenly changes at the exit. Jan 7, 2016 at 15:10
• Oh, I totally agree with you ! I am sure that for the first order it will be more than enough and I shall use it (hoping that I shall be able to perform the calculations !!). Many thanks again. Jan 7, 2016 at 15:21

Define the following parameters:

$T_1$: water tank temperature.

$T_2$: temperature of water flowing out of pipe.

$T_0$: temperature of surroundings.

$L$ and $R$: length and radius of pipe respectively.

$T(x)$: temperature of pipe at any point $x$.

$\dot{m}$ ($\frac{dm}{dt}$): mass flow rate through valve $V$.

$h$: Heat Transfer Coefficient of pipe.

$C_p$: the heat capacity of water.

Consider an infinitesimal element of pipe of length $dx$, it contains an amount of water $dm$. The element will lose heat according to:

$$dQ=-C_pdmdT$$

Dividing both sides by $dt$:

$$\frac{dQ}{dt}=-C_p\dot{m}dT$$

Using Newton's Law of cooling the heat loss can also be written as:

$$\frac{dQ}{dt}=hdA[T(x)-T_0],$$

where $dA=2\pi R dx$. Combining both expressions we get:

$$2 \pi R h dx[T(x)-T_0]=-C_p\dot{m}dT$$

If we define:

$$\alpha=\frac{2\pi Rh}{C_p\dot{m}},$$

then:

$$-\alpha dx=\frac{dT}{T(x)-T_0}$$

Integrated between $0,x$ and $T_1,T$:

$$-\alpha x=\ln\frac{T-T_0}{T_1-T_0}$$

$$\large{T=T_0+(T_1-T_0)e^{-\alpha x}}$$

Get $T_2$ for $x=L$.

Note that for $x \to \infty$, $T \to T_0$, as expected. And for $x=0$, then $T=T_1$, as expected.

• This analysis assumes that the system is operating at steady state, and the OP's question concerns the transient behavior of the system. In particular, how long it takes for the water in the shower to go from cold to hot. At least, that's my understanding of the question. Jan 6, 2016 at 21:05
• Thanks for answering but, as Chester Miller commented, this is a dynamic problem. Jan 7, 2016 at 14:49

This problem is pretty simple: the shower gets hot when water from the tank reaches the shower. The reason why the shower is "cold" is that the water coming out at first is the water in the pipe, which is ambient temperature 72F.

The interaction between the water and the pipe itself is relatively inconsequential. From a practical standpoint, all that matters is how fast the standing water gets exhausted and the tank water can reach the shower.

For example, let's imagine that the pipe has a 1/2 inch inner diameter and there are 50 feet of pipe from the tank to the shower. Then the volume of water in the pipe is 3.14 * (1/2/12)^2 * 50 = about 0.27 cubic feet.

Now, suppose the shower is a 2 gallons per minute shower. There are 7.48 gallons in a cubic foot, so this kind of shower will flow at a rate of about 2/7.48 = 0.27 cubic feet per minute.

Therefore, it will take about 1 minute for the shower to get hot.

Note that in practice, the water will start to get warmer before it gets fully hot. The reason for this is that near the tank, the water in the pipe is hotter than ambient temperature because it is heated by conduction from the tank.