What do you call a fake noodle?
An impasta.
(V <- pi*(56.4/2)^2*(144.4)/1000)
[1] 360.7574
The compartment diagram for heat content of tank is:
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} } \]
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} } \]
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} } \]
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:
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} } \]
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} } \]
The numerical solution is included in the textbook for Ch9.3, using the parameter specifications below:
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*36000 #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
#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 }
#Plot results
#Convert [0,T1] in seconds to [0,T] in hours
plot(t/36000,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/36000,z, type="l",lwd=2,col="red")
The graph of the numerical solution over a 1 hour period is shown in the figure below, using the following command.
WaterHeater(1)
[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.