Ch 10.2 Hot Water Heater Revisited

Hot Water Heater Problem

  • In this section we revisit the hot water heater problem.
  • In Ch9.3, an ODE was derived using Ch9.2 ideas, including Newton's law of cooling for rate of heat lost to surroundings.
  • We will find the analytic solution using the method of integrating factors, and numerically using RK4 in R.

Hot Water Heater Problem

With the analytical solution, we seek to better understand the system, including addressing two items of interest.

  • The first is whether doubling the power output of the heating element will halve the heating time (to reach \( 60^\circ \mathrm{C} \)).
  • The second is to determine the equilibrium temperature.

Two Jokes



What did the fish say when he hit the wall?

Dam.


I'm reading a book about anti-gravity.

It's impossible to put down!

Hot Water Heater ODE

From Ch9.3:

\[ cm\frac{dU}{dt} = q - hS(U-u_{s}) \]

Parameters:

  • \( q \) = Rate of heat supplied.
  • \( h \) = Newton cooling coefficient.
  • \( S \) = Surface area.
  • \( m \) = Mass of water.
  • \( c \) = Specific heat of water.
  • \( u_{s} \) = Temperature of surroundings.

title

Hot Water Heater ODE

Our ODE is

\[ cm\frac{dU}{dt} = q - hS(U-u_{s}) \]

This can be rewritten as

\[ \begin{aligned} \frac{dU}{dt} &= \frac{q+hSu_{s}}{cm} -U\frac{hS}{cm} \\ \frac{dU}{dt} &= \beta - \alpha U \end{aligned} \]

where \( \alpha = \frac{hS}{cm} \) and \( \beta = \frac{q + h S u_{s}}{cm} \).

Example 10.3

This ODE is a first-order linear equation, and can be solved using the method of integrating factors.

\[ \frac{dU}{dt} + \alpha U = \beta, \,\, U(0) = u_0 \]

The integrating factor here is

\[ R(t) = e^{\int_{0}^{t} \alpha dt} = e^{\alpha t} \]

Example 10.3

Using the integrating factor \( R(t) \), we can rewrite the differential equation as follows.

\[ \begin{aligned} \frac{dU}{dt} + \alpha U &= \beta \\ \frac{dU}{dt} e^{\alpha t} + \alpha U e^{\alpha t} &= \beta e^{\alpha t} \\ e^{\alpha t} \frac{dU}{dt} + \frac{d}{dt}\left( e^{\alpha t} \right) U &= \beta e^{\alpha t} \\ \frac{d}{dt} \left( U e^{\alpha t} \right) &= \beta e^{\alpha t} \end{aligned} \]

Example 10.3

Integrate both sides with respect to \( t \):

\[ \begin{aligned} \frac{d}{dt} \left( U e^{\alpha t} \right) &= \beta e^{\alpha t} \\ e^{\alpha t}U &= \frac{\beta}{\alpha}e^{\alpha t} + K \\ U &= \frac{\beta}{\alpha} + Ke^{-\alpha t} \end{aligned} \]

With \( U(0)=u_0 \), it follows that \( K = u_0 - \frac{\beta}{\alpha} \) and

\[ U(t) = \left(u_0 - \frac{\beta}{\alpha}\right) e^{-\alpha t} + \frac{\beta}{\alpha} \]

Example 10.3

From previous slide, our solution to the hot water heater IVP is

\[ U(t) = \left(u_0 - \frac{\beta}{\alpha}\right) e^{-\alpha t} + \frac{\beta}{\alpha} \]

Recall \( \alpha = \frac{hS}{cm} \) and \( \beta = \frac{q + h S u_{s}}{cm} \). Then

\[ \frac{\beta}{\alpha} = \left(\frac{q + h S u_{s}}{cm}\right) \left(\frac{cm}{hS}\right) = \frac{q}{hs} + u_{s} \]

Thus

\[ U(t) = \left( u_0 - u_s - \frac{q}{hS} \right) e^{- \frac{hS}{cm} t } + u_s + \frac{q}{hS} \]

Applying The Model

  • We next consider a typical hot water heater used in an average Australian home of four individuals.
  • Since energy used has a cost, we discuss how better to operate the system.

Parameters

For typical household, we have:

  • \( H \) = 1.444 m, \( D \) = 0.564m
  • \( S \) = 3.06 m\( ^2 \), \( V \) = 250 L
  • \( q \) = 3.6 kW, \( m \) = 250 kg
  • \( c \) = 4200 J / (kg \( ^\circ \) C)
  • \( h \) = 12 W /(m\( ^2 \,^\circ \) C )
  • \( u_s \) = 15\( ^\circ \) C
(S <- pi*0.564*1.444+2*pi*(0.564/2)^2)
[1] 3.058227

cylinder

Unit Check

The temperature of the water in the tank is given by

\[ U(t) = \left( u_0 - u_s - \frac{q}{hS} \right) e^{- \frac{hS}{cm} t } + u_s + \frac{q}{hS} \]

  • Units for \( U \) on left and \( u_0 \) and \( u_s \) on right is \( C \).
  • Units for other terms on right:

\[ \begin{aligned} \left[\frac{q}{hS}\right] & = \frac{W}{\left(\frac{W}{m^2 \, C }\right)m^2} = C \\ \left[\frac{hS}{cm}t \right] & = \frac{ \left(\,\frac{J}{m^2 sec \, C}\right)\left(m^2 \,\right)\left(\, sec \, \right) } { \left(\frac{J}{kg \, C \,}\right) \,kg \, } = \mathrm{unitless} \end{aligned} \]

Example 10.4

Find time required to heat tank of water to \( 60^\circ C \).

\[ U(t) = \left( u_0 - u_s - \frac{q}{hS} \right) e^{- \frac{hS}{cm} t } + u_s + \frac{q}{hS} \]

  • To do this, we will solve for \( t \). As before, let

\[ \alpha = \frac{hS}{cm}, \beta = \frac{q+hSu_s}{cm} \]

  • Substitute \( \alpha \) and \( \beta \) into formula for \( U(t) \) to obtain

\[ U(t) = \left( u_0 - \frac{\beta}{\alpha} \right)e^{-\alpha t} + \frac{\beta}{\alpha} \]

Example 10.4, continued

  • Our equation is

\[ U(t) = \left( u_0 - \frac{\beta}{\alpha} \right)e^{-\alpha t} + \frac{\beta}{\alpha} \]

  • Start by solving for \( e^{-\alpha t} \), obtaining

\[ e^{-\alpha t} = \frac{U(t) - \beta / \alpha}{u_0 - \beta / \alpha} = \frac{\beta / \alpha - U(t) }{\beta / \alpha - u_0 } \]

  • Now solve for \( t \) (in seconds):

\[ t = - \frac{1}{\alpha} \ln \left| \frac{\beta / \alpha - U(t) }{\beta / \alpha - u_0 } \right| = \frac{1}{\alpha} \ln \left| \frac{\beta / \alpha - u_0}{\beta / \alpha - U(t)} \right| \]

Example 10.4, continued

Time to heat water from \( 15^\circ C \) to \( 60^\circ C \) is 4 hrs and 53 mins.

#System Parameters
   us <- 15; u0 <- us  
   S <- 3.06; q <- 3600; c <- 4200; m<-250; h<-12
#Compute alpha and beta
   hS <- h*S; cm <- c*m; a <- hS/cm
   b <- (q + hS*us)/(cm)
#Formula for t in hours & minutes
   time <- (1/a*log((b/a-u0)/(b/a-60))/3600)
   minutes <- (time-floor(time))*60
#Results
c(floor(time), minutes)
[1]  4.00000 52.77996

Example 10.4, continued

Formula for \( U(t) \):

\[ \small{ \begin{aligned} U(t) & = \left( u_0 - \frac{\beta}{\alpha} \right)e^{-\alpha t} + \frac{\beta}{\alpha} \\ \alpha & = \frac{hS}{cm} \\ \beta & = \frac{q+hSu_s}{cm} \end{aligned} } \]

Ex10.4Plot(10)

plot of chunk unnamed-chunk-5

R Code for Plot, Page 1

Ex10.4Plot <- function(T) {
#Ch10.2 Example 10.4: Plot Solution
#T is measured in hours for graph
#t is measured in seconds for formulas
T <- T*3600  #Convert hours to seconds

#System Parameters
us <- 15  #ambient temperature
u0 <- us  #initial temperature = ambient temperature
S <- 3.06
q <- 3600    
c <- 4200    
m <- 250 
h <- 12

R Code for Plot, Page 2

#Compute alpha and beta
hS <- h*S
cm <- c*m
a <- hS/cm
b <- (q + hS*us)/(cm)

#Temperature of Water in Hot Water Heater
U <- function(t){(u0 - b/a)*exp(-a*t) + b/a} 

#Initialize vectors for time t and temperature U. 
x <- seq(0,T, by=10)   
y <- U(x)
N <- length(x)
z <- rep(60,N)

R Code for Plot, Page 3

plot(x,y,                
  main = "Water Temperature",
  xlab = "t (Hours)",       #x-axis label
  ylab = "Temperature (C)", #y-axis label
  type = "l",col="blue",    #Line type and color
  xaxt = "n",        #Remove x-axis to customize
  xlim = c(0,T),            #x-axis interval 
  ylim = c(0,100)           #y-axis interval
  ) 

R Code for Plot, Page 4

#Customize x-axis to have tick marks for hours instead of seconds
axis(1, at = seq(0, T, T/10), labels = c(0:10))

#Graph horizontal line for 60 degrees Celcius
lines(x,z, type="l",col="red")  

legend("topright",
     legend = c("Water Temperature", "Target Temperature"),
     col=c("blue","red"),  #legend colors
     lty=c(1,1)            #lty=line type  
     )
} 

Discussion: Improving Efficiency

  • Insulating the tank will help efficiency.
  • The standard in Australia is 3 cm of compacted fiberglass.
  • Exercise 10.5 compares efficiency of our previous tank with one that is well-insulated (negligble heat loss).

Discussion: Cost Effectiveness Planning

The cost of heating the tank is proportional to time it takes for water to heat, i.e., length of time for which the heater is on.

  • Would it be cheaper to use a thermostat that switches heater on each time temperature drops below \( 50^{\circ}C \)?
  • Would it be cheaper to switch heater off for 8 hrs a day, and then relying on thermostat at other times?
  • Would this result change if the temperature of the environment were to fall to \( 10^{\circ}C \)?
  • These questions are addressed in Exercise 10.4.

Example 10.5

Does doubling the power output halve the heating time?

  • Recall the following results:

\[ \begin{aligned} U(t) & = \left( u_0 - \frac{\beta}{\alpha} \right)e^{-\alpha t} + \frac{\beta}{\alpha} \\ t & = \frac{1}{\alpha} \ln \left| \frac{\beta / \alpha - u_0}{\beta / \alpha - U(t)} \right| \end{aligned} \]

  • The parameters are given by

\[ \alpha = \frac{hS}{cm}, \, \, \beta = \frac{q+hSu_s}{cm} \]

Example 10.5, continued

Substituting in values for \( \alpha \) and \( \beta \), the formula for \( t \) becomes

\[ \begin{aligned} t &= \frac{1}{\frac{hS}{cm}} \ln \left| \frac{\frac{q+hSu_{s}}{cm}/\frac{hS}{cm}- u_{0}}{\frac{q+hSu_{s}}{cm}/ \frac{hS}{cm}-U} \right| \\ \\ &= \frac{cm}{hS} \ln \left| \frac{\frac{q+hSu_{s}}{cm}(\frac{cm}{hS})-u_{0}}{\frac{q+hSu_{s}}{cm}(\frac{cm}{hS})-U} \right| \\ \\ &= \frac{cm}{hS}\ln \left| \frac{\frac{q}{hS}+u_{s}-u_{0}}{\frac{q}{hS}+u_{s}-U} \right| \end{aligned} \]

Example 10.5, continued

  • Observe that if \( q \) is doubled, the value \( t \) is not cut in half.
  • Effect of \( q \) on \( t \) is not simple, although \( t \) does decrease as \( q \) increases. \[ t = \frac{cm}{hS}\ln \left| \frac{\frac{q}{hS}+u_{s}-u_{0}}{\frac{q}{hS}+u_{s}-U} \right| \]

Example 10.5, continued

This figure gives a plot of \( t \) as a function of \( q \) for a water heater to heat from \( u_O = 15 ^\circ C \) to \( U = 60 ^\circ C \), with \( u_s = 15 ^\circ C \) and other parameter values as before.

\[ \small{ t = \frac{cm}{hS}\ln \left| \frac{\frac{q}{hS}+u_{s}-u_{0}}{\frac{q}{hS}+u_{s}-U} \right| } \]

Example 10.5, continued

The line \( q \cong 1.6 kW \) is a vertical asymptote; below this level for \( q \) the heating element cannot supply enough energy to heat the mass of water in tank to \( 60 ^\circ C \).

\[ \small{ t = \frac{cm}{hS}\ln \left| \frac{\frac{q}{hS}+u_{s}-u_{0}}{\frac{q}{hS}+u_{s}-U} \right| } \]

Example 10.5, continued

The dotted lines indicate time in hours to heat the water for a \( 3.6 kW \) element and for a \( 4.8 kW \) element.

\[ \small{ t = \frac{cm}{hS}\ln \left| \frac{\frac{q}{hS}+u_{s}-u_{0}}{\frac{q}{hS}+u_{s}-U} \right| } \]

Equilibrium Temperature

The ODE

\[ cm\frac{dU}{dt}=q-hS(U-u_s) \]

represents a balance between heat produced by heating element and heat lost from surface.

This suggests the existence of an equilibrium temperature, or thermal equilibrium.

Thermal Equilibrium

  • Thermal equilibrium is defined as the condition under which two substances in physical contact with each other exchange no heat energy.
  • Two substances in thermal equilibrium are said to be at the same temperature.

Find Equilibrium Temperature

  • To find equilibrium temperature \( U_e \), set \( U' = 0 \) and solve.
  • Thus

\[ \begin{aligned} cm\frac{dU}{dt} &=q-hS(U-u_s) \\ 0 &= q-hS(U_e-u_s) \\ U_e & = u_s+\frac{q}{hS} \end{aligned} \]

  • Since \( q \), \( h \) and \( S \) are all positive constants, the equilibrium temperature \( U_e \) is always greater than the temperature of the surroundings, and hence \( U_e > u_s \).

Thermal Equilibrium Analytic Behavior

Recall that the IVP

\[ cm\frac{dU}{dt}=q-hS(U-u_s), \,\, U(0)=u_o \]

has solution

\[ U(t)=\left(u_0-u_s-\frac{q}{hS}\right)e^{-(\frac{hS}{cm})t}+u_s+\frac{q}{hS} \]

If we take the limit of this solution as \( t \rightarrow \infty \), we see that

\[ U(t) \rightarrow u_s+\frac{q}{hS} = U_e \]

Thermal Equilibrium: Physical Significance

  • The physical significance of this is that, as the steady-state temperature of water in tank is approached, heat is no longer used up to change temperature of water in tank.

Thermal Equilibrium: Heat Transfer

  • In terms of heat transfer, steady state means the temperature of the body does not vary with time.
  • A balance is attained where the heat input is equal to the heat escaping from the surface.

Thermal Equilibrium: Mathematical

In mathematical terms, from ODE describing the heat balance,

\[ cm\frac{dU}{dt}=q-hS(U-u_s), \]

the derivative term is zero for equilibrium temperature.

Thermal Equilibrium: Mathematical

Formulas:

\[ \small{ \begin{aligned} U(t) & = \left( u_0 - \frac{\beta}{\alpha} \right)e^{-\alpha t} + \frac{\beta}{\alpha} \\ \alpha & = \frac{hS}{cm} \\ \beta & = \frac{q+hSu_s}{cm} \\ U_e & = \frac{\beta}{\alpha} = u_s+\frac{q}{hS} \end{aligned} } \]

Ex10.6Plot(20)

plot of chunk unnamed-chunk-11