Ch9.3 Model for a Hot Water Heater

Introduction

  • In this section we derive a differential equation for temperature of water in hot water tank.
  • The problem applies principles similar to those in described in the coffee cup problem, except that in this case heat is added to the system via the heating element.

Humor



Why are elevator jokes so classic and good?

They work on many levels.

Background

  • We rely on hot water heaters for all of our hot water needs, and often take their operation for granted.
  • Hot water heaters are typically hidden within a utility closet or mechanical room.
  • They can operate for years without needing maintenance.

Background

  • Consider a cylindrical electric hot water heater.
  • The heating element supplies heat at a constant rate of 3.6 kW (kJoules/sec).
  • The hot water heater shuts off during night to save energy.
  • How long will it take to reach \( 60^{\circ}C \) (\( 140^{\circ}F \) ) from \( 15^{\circ}C \)
    (\( 59^{\circ}F \)) in the morning?

Background

  • Height \( h = 144.4 \) cm
  • Diameter \( d = 56.4 \) cm
  • Volume \( V = 250 \) L
(V <- pi*(56.4/2)^2*(144.4)/1000)
[1] 360.7574

Problem Description

  • Determine temperature of water in hot water heater as a function of time.
  • Once established, use model to predict time required for water to be heated to a specified temperature.

Assumptions

  • The water in tank is well stirred so that temperature remains homogeneous throughout.
  • Heat lost from surfaces according to Newton's law of cooling.
  • Specific heat \( c \) and Newton cooling coefficient \( h \) remain constant.

Compartment Diagram

The compartment diagram for heat content of tank is:

Word Equation

The word equation is obtained from compartment diagram and balance law:

\[ \small{ \begin{Bmatrix} \mathrm{rate \, of \, change} \\ \mathrm{of \, heat \, in \, tank } \end{Bmatrix} = \begin{Bmatrix} \mathrm{rate \, of \, change } \\ \mathrm{of \, heat \, produced} \\ \mathrm{by\, heating \, element} \end{Bmatrix} - \begin{Bmatrix} \mathrm{rate \, of \, change } \\ \mathrm{of \, heat \, lost \, to} \\ \mathrm{surroundings} \end{Bmatrix} } \]

Identify Variables and Parameters

  • \( U(t)= \) temperature in Celcius of the water at time t
  • \( u_0= \) initial temperature of the water
  • \( u_f= \) final temperature
  • \( u_s= \) temperature of surroundings
  • \( m= \) mass of water in the heater, in kg.
  • \( q= \) rate of heat energy supplied, in W = J/sec.
  • \( S= \) surface area m2 of the tank
  • \( Q = \) rate of change of heat content, in J/s.
  • \( c= \) specific heat of water, in J/(kg C).
  • \( h= \) Newton cooling coefficient, in W/(m2 C).

Formulation of IVP

To derive IVP, we start by looking back at word equation.

\[ \small{ \begin{Bmatrix} \mathrm{rate \, of \, change} \\ \mathrm{of \, heat \, in \, tank } \end{Bmatrix} = \begin{Bmatrix} \mathrm{rate \, of \, change } \\ \mathrm{of \, heat \, produced} \\ \mathrm{by\, heating \, element} \end{Bmatrix} - \begin{Bmatrix} \mathrm{rate \, of \, change } \\ \mathrm{of \, heat \, lost \, to} \\ \mathrm{surroundings} \end{Bmatrix} } \]

Using results from Ch9.2, we obtain

\[ \small{ \begin{aligned} cm \frac{dU}{dt} &= q - hS \left[ U(t) - u_s \right] \\ \\ \frac{dU}{dt} &= \frac{q}{cm}-\frac{hS}{cm}\left[ U(t) - u_s \right], \,\,\, U(0) = u_0 \end{aligned} } \]

Unit Check for Differential Equation

Check that units make sense and balance on both sides.

\[ \small{ \begin{aligned} \left[\frac{dU}{dt}\right] & = \frac{C}{sec} \\ \\ \left[\frac{q}{cm}\right] & = \frac{ \frac{J}{sec} } { \left(\frac{J}{kg ~C}\right)kg } = \frac{C}{sec} \\ \\ \left[\frac{hS}{cm}\left(U - u_s \right)\right] & = \frac{ \left(\, \frac{J}{m^2 sec \, C}\right)\left(m^2~\right)\left(\, C \, \right) } { \left(\frac{J}{kg \, C \,}\right) \,kg \,} = \frac{C}{sec} \end{aligned} } \]

Alternative Derivation

Use amount of change on \( \small{[t, t+\Delta t]} \), rather than rate of change:

\[ \small{ \begin{Bmatrix} \mathrm{change \, in} \\ \mathrm{heat \, energy } \end{Bmatrix} = \begin{Bmatrix} \mathrm{amount \, of } \\ \mathrm{heat \, produced \, by } \\ \mathrm{heating \, element} \end{Bmatrix} - \begin{Bmatrix} \mathrm{amount \, of} \\ \mathrm{ heat \, lost \, to } \\ \mathrm{surroundings} \end{Bmatrix} } \]

For this word equation, use:

  • Change in heat energy = \( cm \left[ U(t + \Delta t) - U(t) \right] \)
  • Amount heat produced = \( q \Delta t \)
  • Amount heat lost to surroundings = \( hS \left[ U(t^{*}) - u_s \right]\Delta t \)
  • \( U(t^{*}) \) = temperature at \( t^{*} \in [t, t + \Delta t] \)

Alternative Derivation

The ODE can then be derived as shown below.

\[ \small{ \begin{aligned} cm \left[ U(t + \Delta t) - U(t) \right] &= q \Delta t - hS \left[ U(t^*) - u_s \right] \Delta t \\ \\ \lim_{\Delta t \rightarrow 0} \frac{U(t + \Delta t) - U(t)}{\Delta t} &= \frac{q}{cm} - \frac{hS}{cm} \lim_{\Delta t \rightarrow 0} \frac{\left[ U(t^*) - u_s \right]\Delta t}{\Delta t} \\ \\ \frac{dU}{dt} &= \frac{q}{cm} - \frac{hS}{cm}\left[ U(t) - u_s \right] \end{aligned} } \]

Analytic Solution

The exact solution will be found and explored in Ch10.2.

\[ \small{ \begin{aligned} \frac{dU}{dt} &= \frac{q}{cm}-\frac{hS}{cm}\left[ U(t) - u_s \right], \,\,\, U(0) = u_0 \\ \frac{dU}{dt} + \frac{hS}{cm}U(t) &= \frac{q+hSu_s}{cm} \end{aligned} } \]

Numerical Solution: RK4 Program

The numerical solution is included in the textbook for Ch9.3, using the parameter specifications below:

  • \( q = 3600 W = 3600 \frac{J}{sec} \)
  • \( c = 4200 \, \frac{J}{kg \,^\circ C} \)
  • \( m = 250 \, kg \)
  • \( h = 12 \, \frac{W}{m^2 \,^\circ C}= 12 \frac{J}{m^2 sec \,^\circ C } \)
  • \( S = 3.06 m^2 \)
  • \( u_0 = u_s = 15^\circ C \)

Numerical Solution: RK4 Chunk 1

WaterHeater <- function(T) {
#Ch9.3: Perform Rk4 for hot water heater
#T is time length in hours for [0, T]

#Parameters  
N <- 10000       #N = number of time steps
T1 <- T*3600    #Convert hours to seconds
h <- T1/N        #h = step size
UL <- 60         #UL = target temperature

#System Parameters
t0 <- 0      #seconds (SI units)
q <- 3600    #Joules/sec (SI units)
c <- 4200     
h2 <- 12     #h2 because h is used for step size 

Numerical Solution: RK4 Chunk 2

#Slope formula from ODE
f <- function(U){q/(c*m)-((h2*S)/(c*m))*(U-us)}  

#Runge-Kutta Loop (Generate temperature vector U)
for(i in 1:N) {
a1 <- h*f(U[i]);          
b1 <- h*f(U[i]+0.5*a1);   
c1 <- h*f(U[i]+0.5*b1);  #c = specific heat
d1 <- h*f(U[i]+c1);        
U[i+1]<-U[i]+(1/6)*(a1+2*b1+2*c1+d1);
t[i+1] <- t[i] + h  } 

Numerical Solution: RK4 Chunk 3

#Plot results 

#Convert [0,T1] in seconds to [0,T] in hours
plot(t/3600,U,               
      main = "Hot Water Heater",
      xlab = "t (hours)",           
      ylab = "Temperature (C)",      
      type="l",lwd=2,col="blue", 
      xlim=c(0,T),                
      ylim=c(0,100)  )

#Place additional graph in plot  
lines(t/3600,z, type="l",lwd=2,col="red") 

Graph of Numerical Solutions

The graph of the numerical solution over a 10 hour period is shown in the figure below, using the following command.

WaterHeater(10)

plot of chunk unnamed-chunk-7

Discussion of Results

  • The graph of numerical solution shows target temperature reached after about 5 hours.
  • This is a long time to wait for a shower in the morning!

plot of chunk unnamed-chunk-8

Discussion of Results

  • Assuming water in tank is well stirred allows us to model temperature \( U(t) \) as a function of time \( t \) only.
  • Otherwise temperature would be function of time and position \( U(x,y,z,t) \), leading to a PDE model.
  • Further, we would need to account for heat transfer by conduction and convection between different points in tank.

Discussion of Results

  • The book points out that the model no longer applies after the temperature reaches boiling point (\( 100^\circ \) Celcius).
  • This is because model doesn't account for latent heat, which is an additional form of energy associated with a change in state without a change in temperature; see [1,2,3].

References

[1] Mathematical Modeling with Case Studies, Barnes and Fulford, CRC Press, 2015

[2] Latent heat, https://en.wikipedia.org/wiki/Latent_heat, retrieved on 9/25/2022.

[3] Latent heat figure, https://www.teachoo.com/12526/3426/Latent-Heat-of-Vaporization-and-Fusion/category/Extra-Questions/, retrieved 9/25/2022.